{"version":3,"sources":["icons/warning.svg","commonImages/search.svg","icons/air-pollution.svg","icons/megaphone.svg","icons/tower.svg","icons/cleanup.svg","icons/water-droplet.svg","icons/toxic-tank.svg","context/MainContext.js","context/SearchContext.js","theme/theme.js","styleFunctions/StyleFunctions.js","components/CommonLayout.js","components/SplitWithChildMargin.js","theme/themeMapping.js","styleFunctions/ButtonStyleFunctions.js","components/Buttons.js","theme/commonType.js","components/AppBrand.js","components/LandingHeader.js","components/SvgWrap.js","components/WrappedInlineSvg.js","components/InputStyle.js","components/SearchBar.js","components/Chevron.js","components/Card.js","components/CalloutCard.js","components/SimpleMap.js","constants/EntityTypes.js","components/Hero.js","MainView.js","components/SmallerHeader.js","map-viewer/hooks/useMapViewerReducer.js","map-viewer/hooks/useIsMounted.js","constants/HwEnums.js","map-viewer/context/api/functions/ExtraProps.js","map-viewer/context/api/index.js","map-viewer/context/state/actions-types.js","map-viewer/context/state/actions.js","constants/FlyoutPanels.js","constants/Layers.js","constants/ToolPanels.js","constants/MapConstants.js","map-viewer/context/state/initialState.js","map-viewer/context/state/fp/isEmptyResults.js","map-viewer/context/state/reducer.js","map-viewer/context/MapViewerProvider.js","map/util/transform.js","map/context/state/reducer.js","map/context/state/actions-types.js","map/context/MapStateProvider.js","map/context/state/actions.js","map/context/useMap.js","map-viewer/context/useMapViewer.js","map-viewer/map/interaction/MapFeatureClickListener.js","map-viewer/map/interaction/SingleClickSelectInteraction.js","map-viewer/map/interaction/SelectReferenceLayerFeatureInteraction.js","map/util/randomId.js","map/layer/ArcGISTileLayer.js","map/layer/OpenStreetMapTileLayer.js","map-viewer/map/layer/BaseLayer.js","map/layer/FeaturesLayer.js","map-viewer/map/layer/EntityFeaturesLayer.js","map-viewer/map/layer/MyLocationLayer.js","map/layer/ArcGISFeatureService.js","map-viewer/map/layer/ReferenceLayers.js","map-viewer/flyout/detail/components/DetailTitle.js","map-viewer/flyout/detail/components/Value.js","map-viewer/flyout/detail/components/ValueAddress.js","map-viewer/map/util/extentEntityLocations.js","components/ItemPanel.js","components/SearchListItems.js","map-viewer/map/overlay/Overlay.js","map-viewer/map/overlay/EntityOverlay.js","map-viewer/flyout/detail/components/Label.js","map-viewer/flyout/detail/components/DetailRow.js","map-viewer/util/formatNumber.js","map-viewer/map/overlay/ReferenceLayerFeatureOverlay.js","map/styled/MapContainer.js","map/Map.js","map-viewer/map/ViewerMap.js","map-viewer/map/layer/EntityLayer.js","map-viewer/flyout/detail/components/DetailMapInsert.js","map-viewer/flyout/detail/components/DetailSourceSystemLink.js","map-viewer/flyout/detail/AirPollutionSourceDetail.js","map-viewer/flyout/detail/components/DetailAddress.js","map-viewer/flyout/detail/EmergencyReleaseDetail.js","map-viewer/flyout/detail/RemediationSiteDetail.js","map-viewer/flyout/detail/UicFacilityDetail.js","map-viewer/flyout/detail/WaterQualityAdvisoryDetail.js","map-viewer/flyout/detail/HwHandlersDetail.js","constants/NpdesEnums.js","map-viewer/flyout/detail/NpdesFacilitiesDetail.js","map-viewer/flyout/detail/EntityDetail.js","map-viewer/flyout/search/SearchOptions.js","map-viewer/flyout/FlyoutRoot.js","map-viewer/results/EmptyResults.js","map-viewer/results/SearchError.js","map-viewer/components/EntityIndicator.js","map-viewer/results/SearchResultItem.js","map-viewer/results/WindowedSearchResults.js","map-viewer/results/SearchResults.js","map-viewer/search/SearchInput.js","map-viewer/search/SearchBar.js","map-viewer/tools/panels/ShowResultsButton.js","map-viewer/tools/panels/HelpPanel.js","map-viewer/tools/panels/LayersToolPanel.js","map-viewer/tools/panels/MeasurePanel.js","map-viewer/tools/buttons/ToolBarItem.js","map-viewer/tools/buttons/HelpToolBarItem.js","map-viewer/tools/buttons/HomeToolBarItem.js","map-viewer/tools/buttons/LayersToolBarItem.js","map-viewer/tools/buttons/MyLocationToolBarItem.js","map-viewer/tools/ToolBar.js","map-viewer/MapOmniBox.js","MapView.js","components/SplitSelect.js","SearchViewUI.js","SearchView.js","style/GlobalStyles.js","App.js","serviceWorker.js","index.js"],"names":["module","exports","MainContext","React","createContext","initialState","searchIsActive","MainContextProvider","props","state","dispatch","useReducer","action","console","log","type","redirectTo","createElement","Provider","value","Router","basename","children","SearchContext","SearchProvider","Component","constructor","super","updateQuery","query","this","setState","render","SearchConsumer","Consumer","typeScale","0","1","2","3","4","5","6","7","colors","yellow","electricBlue","turquoise","darkGreen","darkBlue","fadedBlue","veryDarkBlue","violet","nearWhite","nearWhite2","mediumGray","gradients","hero","concat","spacing","small","medium","large","extraLarge","screenEdgeMarginH","theme","fontSizes","transitions","listItemBg","buttonSpacingH","buttonSpacingV","flexbox","compose","alignContent","alignItems","alignSelf","flex","flexBasis","flexDirection","flexWrap","justifyContent","justifyItems","justifySelf","order","layout","display","height","maxHeight","maxWidth","minHeight","minWidth","overflow","verticalAlign","width","centerColumnGutter","Rows","_styled","target","name","styles","getColumnsMargin","_ref","gutter","flush","ColumnsDiv","breakAt","gutterV","ColumnsContext","Columns","_ref2","Object","assign","defaultProps","ColumnDiv","usePadding","Column","_ref3","context","useContext","NoWrapColumns","CenterColumnWrap","CenterColumnDiv","CenterColumn","_ref4","FlexContainer","vertical","FlexItem","auto","SplitWithChildMarginWrapper","SplitWithChildMargin","margin","undefined","rest","length","map","child","index","isFirst","isLast","cloneElement","key","style","marginLeft","marginRight","paddingLeft","paddingRight","colorMap","normalText","highlightText","boldText","diminishedText","heading","subduedHeading","activeHighlight","link","linkHover","Color","lighten","string","inputBorder","cardBorder","cardBgColor","cardHighlight","cardText","listBackground","transparentHighlight","saturationl","lightness","searchBar","lightSeparator","cardActive","fade","toString","cardHover","typeScaleMap","h1","h2","h3","h4","h5","h6","cardHeading","cardBody","listSearchHeadings","lineHeightMap","body","layoutSpacing","buttonSpacingLeft","prop","alias","transformValue","getPx","buttonSpacingRight","buttonSpacingTop","buttonSpacingBottom","mapProps","buttonSpacing","buttonStyles","Button","borders","color","fontSize","fontWeight","HollowBlueButton","styleProps","border","borderColor","backgroundColor","borderRadius","HeadingBase","Heading1","Heading2","Heading4","CutoffText","isCutoff","AppBrand","headerTheme","HeaderOuter","OrgHeadingText","LandingHeader","SvgWrap","autoSize","size","fill","stroke","WrappedInlineSvg","src","InlineSVG","InputStyleBase","css","_templateObject","_taggedTemplateLiteral","InputStyleFocus","_templateObject2","InputStyle","variants","searchFontSize","searchPaddingH","searchPaddingV","iconSize","block","placeholderColor","default","iconColor","getVariantProp","propName","variant","SearchInputIconStyle","leftOffset","isActive","SearchInputIcon","paddingH","SearchInput","SearchInputWrap","br","b","SearchBar","focus","setFocus","useState","inputRef","useRef","useEffect","autoFocus","current","styleActive","onSubmit","e","preventDefault","as","searchSvg","ref","placeholder","onFocus","onBlur","onChange","event","currentTarget","Chevron","x","y","viewBox","strokeMiterlimit","points","bgColor","bgColorActive","highlight","boxShadowColor","boxShadow","boxShadowActive","headingFontSize","bodyFontSize","CardStyleInner","paddingV","CardUI","CardHeader","CardHeaderItem","CardHeading","CardBody","Card","element","to","Link","CalloutCard","titleHeadingLevel","title","chevron","description","iconSrc","headingLevel","projection","geoMercator","center","SimpleMap","ComposableMap","scale","Geographies","geography","geoJSON","geographies","proj","geo","Geography","tabIndex","rsmKey","airPollutionSources","id","label","endpoint","defaultParams","hasLocations","colorMarker","colorBg","getSourceSystemLink","entity","emergencyReleases","remediationSites","uicFacilities","expand","waterQualityAdvisories","hwHandlers","orderBy","propertyName","isDescending","take","skip","npdesFacilities","replace","hasPermits","innerPaddingV","innerPaddingBottom","HeroStyle","HeroHeading","MainColumn","CardAsideColumn","CardAsideSequence","FeatureHeader","MapContainer","MapEntryButtonWrap","MapEntryButton","Disclaimer","withRouter","history","push","Box","mb","Relative","EntityTypes","megaphoneSvg","warningSvg","towerSvg","cleanupSvg","airPollutionSvg","toxicTankSvg","waterDropletSvg","mt","opacity","MainView","Fragment","Hero","reducer","isMounted","useIsMounted","useCallback","arguments","hwCounties","Map","hwGenerators","longDescription","isFilter","handlerSourceTypes","getLocalMoment","date","endsWith","moment","islandName","island","releaseName","caseNumber","summary","status","reportedOn","format","url","postedDate","affiliatedOrganizations","facility","_operatedBy","organization","_locatedAt","street","city","zipCode","updatedOn","locationDescription","number","_permittee","_hwCounties$get","_hwGenerators$get","_generator","get","federalWasteGenerator","locationStreet1","locationCity","locationZip","_islandName","countyCode","receiveDate","isOk","response","compareName","a","extra","cancelTokens","cancelSearch","forEach","cancel","async","term","searchOptions","cancelExecutor","c","requests","newGet","entityType","axios","cancelToken","params","maxResults","keywords","makeGet","CancelToken","catch","err","warn","message","entityTypes","responses","all","results","spreadExtraProps","data","list","locationLongitude","locationLatitude","locations","result","geometry","centroid","ExtraProps","hasLocation","isArray","sort","payload","actionSearchBegin","actionSearchSuccess","actionSearchError","error","actionDeselectResultItem","actionSetActivePanel","panel","actionDeselectReferenceLayerFeature","actionOpenFlyoutPanel","actionCloseFlyoutPanel","LayerTypes","BaseLayers","thumbnail","maxZoom","attributions","ReferenceLayers","layerId","minZoom","zIndex","extent","omniBox","bg","defaultZoom","duration","defaultSearchTerm","defaultPanel","ToolPanels","baseLayer","defaultBaseLayer","Layers","defaultSearchOptions","values","search","countInProgress","isSearching","MapConstants","selection","item","hasSelection","referenceLayers","referenceLayerFeature","feature","isFlyoutOpen","flyOutPanel","FlyoutPanels","produce","draft","isSearchResultEmpty","isEmptyResults","entityLocation","clickCoordinates","layer","layers","MapViewerContext","MapViewerProvider","useMapViewerReducer","api","doSearch","toWebMercatorExtent","obj","transformExtent","getView","calculateExtent","getSize","Polygon","getExtent","View","Array","toWebMercatorCenter","array","transform","MapStateContext","MapStateProvider","zoom","OlMap","view","OlView","fit","padding","resolution","getResolutionForZoom","Point","minResolution","actionSetMap","setTarget","setMaxZoom","initialCenter","Math","random","slice","useMap","useMapViewer","executeSearch","deselectResultItem","setActivePanel","panelId","setBaseLayer","actionSetBaseLayer","deselectReferenceLayerFeature","selectResultItem","args","actionSelectResultItem","selectReferenceLayerFeature","actionSelectReferenceLayerFeature","setReferenceLayers","actionSetReferenceLayers","toggleSearchOptions","reset","MapFeatureClickListener","clickListener","features","forEachFeatureAtPixel","pixel","getProperties","coordinate","on","un","SingleClickSelectInteraction","forwardRef","onSelect","selectRef","Select","condition","singleClick","addInteraction","removeInteraction","useImperativeHandle","clear","getFeatures","SelectReferenceLayerFeatureInteraction","selected","randomId","String","fromCharCode","floor","Date","now","ArcGISTileLayer","visible","layersRef","urls","isString","layerUrl","tileLayer","TileLayer","source","TileArcGISRest","crossOrigin","getLayers","removeLayer","setZIndex","setOpacity","setVisible","propTypes","PropTypes","any","bool","OpenStreetMapTileLayer","layerRef","OSM","BaseLayer","FeaturesLayer","sourceRef","VectorSource","VectorLayer","f","addFeature","WKT","EntityFeaturesLayer","setFeatures","Style","image","Icon","Stroke","Fill","isEntityType","location","readFeature","dataProjection","featureProjection","setProperties","setId","setStyle","readFeatureFromText","getZoom","getGeometry","MyLocationLayer","myLocation","setMyLocation","navigator","geolocation","getCurrentPosition","position","coords","longitude","latitude","Feature","Circle","radius","window","alert","esriJsonFormat","EsriJSON","ArcGISFeatureService","serviceUrl","extraKey","extraProperties","vectorSource","loader","encodeURIComponent","then","readFeatures","set","addFeatures","strategy","tileStrategy","createXYZ","tileSize","vector","DetailTitle","rootMarginBottom","Text","utcDateRegex","formatValue","str","test","Value","ValueAddress","formatStreetLine2","parts","join","ext","createEmpty","readGeometryFromText","extend","paddingHStandard","hoverColor","ItemPanelClickable","ItemPanelHover","_templateObject3","ItemPanelClick","_templateObject4","darken","ItemPanel","clickable","ListItemStyle","ListItemTitle","ListItemText","ListItemActions","SearchListSequence","PostedDate","MemoizedItem","memo","searchTitleName","searchStatusText","isExpanded","searchDescriptionText","href","entityUrl","SearchListItems","selectedCategory","last","onClick","handleItemClick","expandedItemId","OverlayRoot","styled","Absolute","Title","Overlay","onAfterClose","overlayRef","elementRef","OLOverlay","autoPan","autoPanAnimation","getOverlays","setPosition","componentTitle","Flex","column","Item","p","baseColor","icon","Icons","X","shape","handleOnClickClose","overflowY","EntityOverlay","point","getCoordinates","extentEntityLocations","getCenter","borderTopWidth","borderTopColor","Label","DetailRow","labelProps","row","Intl","NumberFormat","ReferenceLayerFeatureOverlay","setData","setTitle","centerOfExtent","gisAcres","formatNumber","Number","parseFloat","pt","div","ViewerMap","EntityLayer","DetailMapInsert","DetailSourceSystemLink","textAlign","AirPollutionSourceDetail","sourceCategory","ownershipType","operatingStatusType","DetailAddress","EmergencyReleaseDetail","RemediationSiteDetail","leadAgency","program","getOperatorName","UicFacilityDetail","WaterQualityAdvisoryDetail","locationName","closedDate","HwHandlersDetail","_handlerSourceTypes$g","sourceType","createdDate","facilitySiteOwnershipTypes","NpdesFacilitiesDetail","_entity$sicCodes$find","_entity$sicCodes","_entity$naicsCodes$fi","_entity$naicsCodes","_facilitySiteOwnershi","sicCode","setSicCode","naicsCode","setNaicsCode","sicCodes","findIndex","isPrimary","sicEndpoint","sicId","code","naicsCodes","naicsEndpoint","naicsId","taxMapKey","EntityDetail","entityComponent","BorderBox","pr","pl","pb","FlexRoot","SearchOptions","isSelected","find","isDisabled","found","nextEntityTypes","filter","nextSearchOptions","handleOnToggleEntity","Checkbox","isChecked","Marker","Root","HiddenRoot","ShowingRoot","HiddenRootFlipped","Flipped","flipId","shadow","ShowingRootFlipped","FlyoutRoot","Flipper","flipKey","EmptyResults","SearchError","EntityIndicator","RootSelected","entityBg","entityBorderColor","truncate","len","ellipsis","substring","SearchResultItem","listIndex","selectedIndex","RootComponent","borderBottomColor","borderBottomWidth","handleOnClick","ml","WindowedSearchResults","renderItem","scrollToIndex","listRef","scrollToItem","AutoSizer","FixedSizeList","itemCount","itemSize","itemData","items","SearchResults","SearchOptionsIcon","setValue","subscription","fromEvent","pipe","debounceTime","subscribe","unsubscribe","addonEnd","Settings","mr","LoadingBubbles","TextInput","addonStart","Search","text","py","ShowResultsButton","HelpHeading1","HelpHeading2","HelpText","HelpPanel","FlexSelectable","TextLabel","LayerImage","useShadow","borderWidth","IMAGE_SIZE","LayerOption","LayerSelection","Heading","_ref5","my","LayersToolPanel","_ref6","isReferenceLayerSelected","referenceLayer","m","SingleSelect","allowClear","options","optionId","renderOption","_ref7","renderSelection","_ref8","newRefLayers","toggleReferenceLayer","MeasurePanel","ToolBarItem","iconName","badgeLabel","Badge","HelpToolBarItem","Info","HomeToolBarItem","Home","LayersToolBarItem","MyLocationToolBarItem","success","Location","ToolBar","MapOmniBox","left","top","Header","Body","fonts","sans","serif","monospace","MapView","ThemeProvider","createTheme","SmallerHeader","separatorColor","headingMargin","SplitSelectIndexOuter","borderBottom","SplitSelectIndexHeading","SplitSelectIndexBody","SplitSelectIndex","ShadowBoxStyle","ShadowBoxRightStyle","HeaderContainer","ShadowBoxBottomStyle","ListColumn","fillWidth","ResultsColumn","ListContainer","ResultsCountBox","SelectACategoryPrompt","MatchedQuery","SearchCategories","setIslandName","categories","addListViewFields","defineProperties","_statusField","category","getCategory","SearchView","setExpandedItemId","searchStatus","setSearchStatus","searchResults","setSearchResults","searchResultsCategory","setResultsCategory","searchQuery","setSearchQuery","match","doQuery","setTimeout","clearTimeout","cat","ContextualSearchView","GlobalStyles","App","Global","Route","component","path","exact","Boolean","hostname","ReactDOM","document","getElementById","serviceWorker","ready","registration","unregister"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,qC,oBCA3CD,EAAOC,QAAU,IAA0B,oC,oBCA3CD,EAAOC,QAAU,IAA0B,2C,oBCA3CD,EAAOC,QAAU,IAA0B,uC,oBCA3CD,EAAOC,QAAU,IAA0B,mC,oBCA3CD,EAAOC,QAAU,IAA0B,qC,oBCA3CD,EAAOC,QAAU,IAA0B,2C,oBCA3CD,EAAOC,QAAU,IAA0B,wC,utHCI3C,MAAMC,EAAcC,IAAMC,cAAc,IAElCC,EAAe,CACnBC,gBAAgB,GAGZC,EAAuBC,IAC3B,MAAOC,EAAOC,GAAYC,sBAAW,SAAkBF,EAAOG,GAE5D,OADAC,QAAQC,IAAIL,EAAOG,GACXA,EAAOG,MACb,IAAK,aAGH,OADAF,QAAQC,IAAIL,GACL,IAAKA,EAAOH,gBAAgB,EAAMU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ACjCA,EAAaC,iB","file":"static/js/main.81d0bb5a.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/warning.d4ac66ca.svg\";","module.exports = __webpack_public_path__ + \"static/media/search.62d192a5.svg\";","module.exports = __webpack_public_path__ + \"static/media/air-pollution.b426de86.svg\";","module.exports = __webpack_public_path__ + \"static/media/megaphone.34f479cd.svg\";","module.exports = __webpack_public_path__ + \"static/media/tower.941b0db5.svg\";","module.exports = __webpack_public_path__ + \"static/media/cleanup.8f8cc05e.svg\";","module.exports = __webpack_public_path__ + \"static/media/water-droplet.57f45b49.svg\";","module.exports = __webpack_public_path__ + \"static/media/toxic-tank.33b06f94.svg\";","import React, { useReducer } from 'react';\n// import { navigate } from '@reach/router';\nimport { BrowserRouter as Router, Route, Link, Redirect } from \"react-router-dom\";\n\nconst MainContext = React.createContext({});\n\nconst initialState = {\n searchIsActive: false,\n}\n\nconst MainContextProvider = (props) => {\n const [state, dispatch] = useReducer(function reducer (state, action) {\n console.log(state, action);\n switch (action.type) {\n case 'openSearch':\n // navigate('/search');\n console.log(state);\n return { ...state, searchIsActive: true, redirectTo: '/search'} ;\n case 'closeSearch':\n return {...state, searchIsActive: false};\n default:\n return state;\n }\n },\n initialState);\n \n return (\n \n \n {/* {state.redirectTo ? (\n \n {props.children}\n )\n : <>\n { props.children }\n \n } */}\n {props.children}\n \n \n );\n};\n\nexport { MainContext, MainContextProvider }","import React, { Component } from 'react';\n\nconst SearchContext = React.createContext();\n\nexport class SearchProvider extends Component {\n constructor(props) {\n super(props);\n\n //TODO: Could eventually expand to include info about either search in progress, etc.\n this.state = {\n query: \"\",\n updateQuery: this.updateQuery,\n };\n }\n\n updateQuery = query => {\n this.setState({...this.state, query});\n };\n\n render() {\n const { children } = this.props;\n\n return (\n // Passing state prevents unnecessary child re-renders\n // https://reactjs.org/docs/context.html#caveats\n \n {children}\n \n );\n }\n}\n\n\nexport const SearchConsumer = SearchContext.Consumer;","export const typeScale = {\n '-2': 11,\n '-1': 13,\n 0: 15,\n 1: 17,\n 2: 19,\n 3: 21,\n 4: 24,\n 5: 28,\n 6: 32,\n 7: 40\n}\nexport const colors = {\n yellow: '#f6f9d0',\n electricBlue: '#2b88fe',\n turquoise: '#5df0f6',\n // darkGreen: '#1f5c66',\n darkGreen: '#0c4f5a',\n darkBlue: '#3364a3',\n fadedBlue: '#5b86b0',\n veryDarkBlue: '#16427d',\n violet: '#719dff',\n nearWhite: '#f8f9fa',\n nearWhite2: '#f0f5fc',\n mediumGray: '#929292',\n}\nexport const gradients = {\n hero: `linear-gradient(135deg, ${colors.turquoise}, 31.3%, ${colors.yellow})`\n}\nexport const transitions = {\n listItemBg: '70ms linear background-color'\n}\nexport const spacing = [\n 4,\n 8,\n 12,\n 16,\n 20,\n 24,\n 32,\n 40\n]\nspacing.small = 12;\nspacing.medium = 20;\nspacing.large = 40;\nspacing.extraLarge = 60;\nspacing.screenEdgeMarginH = 20;\nexport const buttonSpacingH = [12, 12, 18];\nexport const buttonSpacingV = [4, 6, 10];\n\nconst theme = {\n typeScale,\n fontSizes: typeScale, // for styled-system\n colors,\n transitions,\n spacing,\n buttonSpacingH,\n buttonSpacingV,\n}\n\nexport default theme;","import {\n alignContent,\n alignItems,\n alignSelf,\n compose,\n display,\n flex,\n flexBasis,\n flexDirection,\n flexWrap,\n height,\n justifyContent,\n justifyItems,\n justifySelf,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n order,\n overflow,\n verticalAlign,\n width,\n} from 'styled-system';\n\nexport const flexbox = compose(\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexBasis,\n flexDirection,\n flexWrap,\n justifyContent,\n justifyItems,\n justifySelf,\n order,\n);\n\nexport const layout = compose(\n display,\n height,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n overflow,\n verticalAlign,\n width\n);\n","import React, { useContext } from 'react';\nimport styled from '@emotion/styled/macro';\nimport { css } from '@emotion/core';\nimport { spacing } from '../theme/theme';\nimport { flexbox } from '../styleFunctions/StyleFunctions';\n\nconst centerColumnMaxWidth = 1200;\nconst centerColumnGutter = spacing.medium;\n\nexport const breakAtMQ = width => `\n @media screen and (max-width: ${width - 1}px) {\n flex-direction: column;\n justify-content: flex-start;\n }\n`\n\nexport const SplitWrap = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n`\n\nexport const Rows = styled.div`\n display: flex;\n flex-direction: column;\n`\n\nconst getColumnsMargin = ({ gutter, flush }) => {\n return (flush \n ? gutter \n ? -1 * gutter / 2\n : 0\n : gutter\n )\n}\n\nexport const ColumnsDiv = styled.div`\n display: flex;\n flex-direction: row;\n margin-left: ${getColumnsMargin}px;\n margin-right: ${getColumnsMargin}px;\n margin-bottom: -${props => props.breakAt ? (props.gutterV || props.gutter) : 0}px;\n ${props => props.breakAt && breakAtMQ(props.breakAt)}\n`\n\nconst ColumnsContext = React.createContext();\n\nexport const Columns = ({ children, gutter, gutterV, breakAt, ...props }) => {\n gutterV = breakAt ? (gutterV || gutter) : 0;\n return (\n \n {children}\n \n )\n}\n\nColumns.defaultProps = {\n gutter: centerColumnGutter,\n flush: true,\n}\n\nconst ColumnDiv = styled.div`\n flex: 1 0 0%;\n display: flex;\n flex-direction: column;\n ${flexbox}\n margin-left: ${props => !props.usePadding ? (props.gutter / 2) : 0}px;\n margin-right: ${props => !props.usePadding ? (props.gutter / 2) : 0}px;\n padding-left: ${props => props.usePadding ? (props.gutter / 2) : 0}px;\n padding-right: ${props => props.usePadding ? (props.gutter / 2) : 0}px;\n margin-bottom: ${props => !props.usePadding ? props.gutterV : 0}px;\n padding-bottom: ${props => props.usePadding ? props.gutterV : 0}px;\n`\n\nexport const Column = ({gutter, gutterV, children, ...props}) => {\n const context = useContext(ColumnsContext);\n return (\n \n {children}\n \n )\n}\n\nexport const NoWrapColumns = styled(Columns)`\n margin-left: 0;\n margin-right: 0;\n margin-bottom: 0;\n`\n\nexport const CenterColumnWrap = styled(Columns)`\n justify-content: center;\n`\nCenterColumnWrap.defaultProps = {\n flush: false\n}\n\nconst CenterColumnDiv = styled(Column)`\n /* max-width: ${props => props.width + (props.gutter || 0)}px; */\n max-width: ${props => props.maxWidth}px;\n`\nexport const CenterColumn = ({ children, maxWidth, ...props }) => {\n return (\n {children}\n )\n}\nCenterColumn.defaultProps = {\n maxWidth: centerColumnMaxWidth,\n // gutter: centerColumnGutter\n}\n\nexport const FlexContainer = styled.div`\n ${flexbox}\n display: flex;\n flex-direction: ${props => props.vertical ? 'column' : 'row'};\n` \n\nexport const FlexItem = styled.div`\n flex: ${props => props.auto ? '0 0 auto' : '1 1 0%'};\n ${flexbox}\n`\n","import React from 'react';\n\nimport styled from '@emotion/styled/macro';\nimport { flexbox } from '../styleFunctions/StyleFunctions';\n\nconst SplitWithChildMarginWrapper = styled.div`\n display: flex;\n ${flexbox}\n flex-direction: ${props => props.vertical ? 'column' : 'row'};\n`\n\nconst SplitWithChildMargin = (props) => {\n let margin = props.gutter !== undefined ? (props.gutter / 2) : 12;\n margin = typeof(props.gutter) === 'string' ? margin : (margin + 'px');\n const { children, usePadding, ...rest } = props;\n\n return (\n \n {children && children.length \n ? children.map((child, index) => {\n const isFirst = index === 0;\n const isLast = index === children.length - 1;\n return React.cloneElement(child, {\n key: index,\n ...child.props,\n style: {\n ...child.props.style,\n marginLeft: !usePadding && isFirst ? undefined : margin,\n marginRight: !usePadding && isLast ? undefined : margin,\n paddingLeft: usePadding && isFirst ? undefined : margin,\n paddingRight: usePadding && isLast ? undefined : margin\n },\n })\n })\n : children\n }\n \n\n )\n}\n\nexport default SplitWithChildMargin","import { colors, typeScale, spacing } from './theme';\nimport Color from 'color';\n\nexport const colorMap = {\n normalText: colors.veryDarkBlue,\n highlightText: colors.turquoise,\n boldText: colors.darkGreen,\n diminishedText: colors.mediumGray,\n heading: colors.darkBlue,\n subduedHeading: colors.fadedBlue,\n activeHighlight: colors.electricBlue,\n link: colors.electricBlue,\n linkHover: Color(colors.electricBlue).lighten(.2).string(),\n inputBorder: colors.violet,\n cardBorder: 'transparent',\n cardBgColor: 'white',\n cardHighlight: colors.electricBlue,\n cardText: colors.darkBlue,\n listBackground: colors.nearWhite,\n transparentHighlight: Color(colors.electricBlue).saturationl(100).lightness(98).string(),\n // searchBar: \"#f0f5fc\",\n searchBar: \"#dfecff\",\n lightSeparator: 'gainsboro',\n}\ncolorMap.cardActive = Color(colorMap.cardHighlight).fade(.8).toString();\ncolorMap.cardHover = Color(colorMap.cardHighlight).fade(.9).toString();\n\nexport const bgElevations = {\n top: '#ffffff',\n b1: 'hsl(215, 67%, 98%)',\n b2: 'hsl(214, 4%, 95%)',\n}\nexport const typeScaleMap = {\n h1: typeScale[7],\n h2: typeScale[6],\n h3: typeScale[5],\n h4: typeScale[3],\n h5: typeScale[1],\n h6: typeScale[0],\n cardHeading: 18,\n cardBody: 14,\n listSearchHeadings: typeScale[1],\n}\nexport const lineHeightMap = {\n body: 1.42,\n h1: 1.35,\n h2: 1.35,\n h3: 1.35,\n h4: 1.35,\n h5: 1.35,\n h6: 1.35,\n}\nexport const layoutSpacing = {\n screenEdgeMarginH: 32,\n listPaddingH: 24,\n listPaddingV: 32,\n}","import {\n style,\n compose,\n getPx,\n mapProps,\n} from \"styled-system\";\n\nexport const buttonSpacingLeft = style({\n prop: \"paddingLeft\",\n key: \"buttonSpacingH\",\n alias: \"buttonSpacingLeft\",\n transformValue: getPx,\n});\n\nexport const buttonSpacingRight = style({\n prop: \"paddingRight\",\n key: \"buttonSpacingH\",\n alias: \"buttonSpacingRight\",\n transformValue: getPx\n});\n\nexport const buttonSpacingTop = style({\n prop: \"paddingTop\",\n key: \"buttonSpacingV\",\n alias: \"buttonSpacingTop\",\n transformValue: getPx,\n});\n\nexport const buttonSpacingBottom = style({\n prop: \"paddingBottom\",\n key: \"buttonSpacingV\",\n alias: \"buttonSpacingBottom\",\n transformValue: getPx\n});\n\nexport const buttonSpacingH = mapProps(props => ({\n ...props,\n buttonSpacingLeft: props.buttonSpacingH || props.buttonSpacing,\n buttonSpacingRight: props.buttonSpacingH || props.buttonSpacing\n}))(\n compose(\n buttonSpacingLeft,\n buttonSpacingRight\n )\n)\n\nexport const buttonSpacingV = mapProps(props => ({\n ...props,\n buttonSpacingTop: props.buttonSpacingV || props.buttonSpacing,\n buttonSpacingBottom: props.buttonSpacingV || props.buttonSpacing,\n}))(\n compose(\n buttonSpacingTop,\n buttonSpacingBottom\n )\n)\n\nexport const buttonSpacing = compose(\n buttonSpacingH,\n buttonSpacingV\n)\n","import React from 'react';\nimport styled from '@emotion/styled/macro';\nimport { colors } from '../theme/theme';\nimport { colorMap } from '../theme/themeMapping';\nimport { borders, space, color, fontSize, fontWeight } from 'styled-system';\nimport { buttonSpacing } from '../styleFunctions/ButtonStyleFunctions';\n\nconst buttonStyles = {\n borderRadius: 5\n}\n\nexport const Button = styled.button`\n ${borders}\n ${color}\n ${fontSize}\n ${fontWeight}\n ${buttonSpacing}\n cursor: pointer;\n &:hover, &:focus {\n opacity: .8;\n }\n &:focus {\n outline: 0;\n }\n`\n\nexport const HollowBlueButton = (props, styleProps) => (\n \n {props.children}\n \n)","import styled from '@emotion/styled/macro';\nimport React from 'react';\nimport {\n colorMap,\n lineHeightMap,\n typeScaleMap\n} from './themeMapping';\n\nexport const HeadingBase = styled.div`\n margin: 0;\n line-height: 1.35em;\n color: ${colorMap.heading};\n font-weight: 600;\n`;\n\nexport const Heading1 = styled(HeadingBase)`\n font-size: ${typeScaleMap.h1}px;\n`;\nexport const Heading2 = styled(HeadingBase)`\n font-size: ${typeScaleMap.h2}px;\n`;\nexport const Heading3 = styled(HeadingBase)`\n font-size: ${typeScaleMap.h3}px;\n`;\nexport const Heading4 = styled(HeadingBase)`\n font-size: ${typeScaleMap.h4}px;\n`;\nexport const Heading5 = styled(HeadingBase)`\n font-size: ${typeScaleMap.h5}px;\n`;\nexport const Heading6 = styled(HeadingBase)`\n font-size: ${typeScaleMap.h6}px;\n`;\n\nexport const getLineHeight = (level) => {\n return lineHeightMap[level];\n};\n\nexport const CutoffText = styled.div`\n ${props => (props.isCutoff || props.isCutoff === undefined) && `\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `}\n`;\n\nexport const DiminishedText = styled.span`\n color: ${colorMap.diminishedText};\n`;\n","import styled from '@emotion/styled/macro';\nimport { Heading1 } from '../theme/commonType';\nimport { colorMap } from '../theme/themeMapping';\n\nconst AppBrand = styled(Heading1)`\n font-size: ${props => props.large ? 30 : 18}px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: .018em;\n color: ${colorMap.highlightText};\n strong {\n color: ${colorMap.boldText};\n font-weight: 700;\n }\n`;\n\nexport default AppBrand;\n","import React from 'react';\nimport styled from '@emotion/styled/macro';\nimport { CenterColumnWrap, CenterColumn, Columns, Column } from './CommonLayout';\nimport { colors } from '../theme/theme';\nimport SplitWithChildMargin from './SplitWithChildMargin';\nimport { HollowBlueButton } from './Buttons';\nimport AppBrand from './AppBrand';\nimport { layoutSpacing } from '../theme/themeMapping';\n\n\nexport const headerTheme = {\n background: 'white',\n outerPaddingV: 32,\n outerPaddingVSmall: 24,\n}\n\nconst HeaderOuter = styled.header`\n background-color: ${headerTheme.background};\n padding: ${headerTheme.outerPaddingV}px 0;\n`\n\nexport const OrgHeadingText = styled.span`\n color: ${colors.darkGreen};\n`\n\nfunction LandingHeader () {\n return (\n \n \n \n \n \n Hawaii State Environmental Health Administration\n EHAConnect\n \n \n {/* Admin Login */}\n \n \n \n \n \n );\n}\n\nexport default LandingHeader;\n","import React from 'react';\nimport styled from '@emotion/styled/macro';\n\nconst SvgWrap = styled.div`\n color: ${props => props.color || 'inherit'};\n height: ${props => props.autoSize ? 'auto' : props.size || props.height || '100%'};\n width: ${props => props.autoSize ? 'auto' : props.size || props.width || '100%'};\n display: flex;\n align-items: center;\n justify-content: center;\n > span {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n svg {\n fill: ${props => props.fill || `currentColor`};\n ${props => props.stroke && `stroke: currentColor;`}\n ${props => props.stroke && `stroke-width: inherit;`}\n width: 100%;\n height 100%;\n }\n`\n\nexport default SvgWrap;","import React from 'react';\nimport InlineSVG from 'react-inlinesvg';\nimport SvgWrap from './SvgWrap';\n\n\nconst WrappedInlineSvg = (props) => {\n const {src, ...rest} = props;\n return (\n \n \n \n )\n}\n\nexport default WrappedInlineSvg;","import styled from '@emotion/styled/macro';\nimport { css } from '@emotion/core';\nimport { colors } from \"../theme/theme\";\nimport { colorMap } from '../theme/themeMapping';\n\nexport const inputPaddingH = 20;\nexport const inputPaddingV = 12;\nexport const inputFontSize = 16;\nexport const inputBorderRadius = 5;\nexport const inputBorderWidth = 1;\nexport const backgroundColor = 'white';\n\n// padding-top: ${(inputHeight - inputFontSize - inputBorderWidth) / 2}px;\n// padding-bottom: ${(inputHeight - inputFontSize - inputBorderWidth) / 2}px;\n\nexport const InputStyleBase = props => css`\n width: 100%;\n padding-top: ${inputPaddingV}px;\n padding-bottom: ${inputPaddingV}px;\n padding-left: ${inputPaddingH}px;\n padding-right: ${inputPaddingH}px;\n border: ${inputBorderWidth}px solid ${colorMap.inputBorder};\n font-size: ${inputFontSize}px;\n line-height: 1em;\n background: ${backgroundColor};\n border-radius: ${inputBorderRadius}px;\n color: ${colorMap.normalText};\n &, &:focus {\n outline: 0;\n box-shadow: none;\n }\n`\nexport const InputStyleFocus = () => css`\n border-color: ${colorMap.activeHighlight};\n`\n\nexport const InputStyle = styled.input`\n ${InputStyleBase}\n &:focus {\n ${InputStyleFocus}\n }\n`","import React, { useState, useRef, useEffect } from 'react';\nimport styled from '@emotion/styled/macro';\nimport Color from 'color';\nimport WrappedInlineSvg from './WrappedInlineSvg';\nimport { InputStyle, InputStyleBase, InputStyleFocus } from './InputStyle';\nimport { colorMap } from '../theme/themeMapping';\nimport { SearchConsumer } from '../context/SearchContext';\nimport searchSvg from '../commonImages/search.svg';\n\nconst variants = {\n large: {\n searchFontSize: 24,\n searchPaddingH: 20,\n searchPaddingV: 12,\n iconSize: 28,\n },\n block: {\n searchFontSize: 24,\n searchPaddingH: 16,\n searchPaddingV: 14,\n iconSize: 18,\n borderRadius: 5,\n backgroundColor: colorMap.searchBar,\n placeholderColor: Color('#719dff').fade(.5).string(),\n border: 0\n },\n default: {\n backgroundColor: InputStyle.backgroundColor,\n placeholderColor: '#719dff',\n iconColor: colorMap.inputBorder,\n }\n}\nconst getVariantProp = (propName, variant) => {\n const target = variants[variant][propName];\n return target !== undefined ? target : variants.default[propName];\n}\n\nconst SearchInputIconStyle = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: ${props => props.leftOffset}px;\n margin-right: ${props => props.leftOffset}px;\n width: ${props => props.size}px;\n height: ${props => props.size}px;\n color: ${props => props.isActive ? colorMap.activeHighlight : getVariantProp('iconColor', props.variant)};\n`\n\nconst SearchInputIcon = (props) => ( \n \n {props.children}\n \n)\n\nconst SearchInput = styled.input`\n ${InputStyleBase}\n border: 0;\n background: none;\n width: 100%;\n font-weight: 500;\n font-size: ${props => getVariantProp('searchFontSize', props.variant)}px;\n padding-top: ${props => getVariantProp('searchPaddingV', props.variant)}px;\n padding-bottom: ${props => getVariantProp('searchPaddingV', props.variant)}px;\n padding-left: 0;\n padding-right: ${props => getVariantProp('searchPaddingH', props.variant)}px;\n & ::placeholder {\n color: ${props => getVariantProp('placeholderColor', props.variant)};\n }\n`;\n\nconst SearchInputWrap = styled(InputStyle)`\n ${InputStyleBase}\n padding: 0;\n width: 100%;\n display: flex;\n align-items: center;\n background-color: ${props => getVariantProp('backgroundColor', props.variant)};\n ${props => props.isActive && InputStyleFocus}\n ${props => {\n const br = getVariantProp('borderRadius', props.variant);\n return br !== undefined ? `border-radius: ${br}px;` : ''}\n }\n ${props => {\n const b = getVariantProp('border', props.variant);\n return b !== undefined ? `border: ${b}px` : ''}\n }\n`\n\n// const BlockSearchBarWrap = styled(SearchInputWrap)\n\n// export const BlockSearchBar = ({inputComponent: }) => {\n const [focus, setFocus] = useState(false);\n const inputRef = useRef();\n\n useEffect(() => {\n if (props.autoFocus) inputRef.current.focus();\n }, [props.autoFocus])\n \n const isActive = focus || props.styleActive;\n const paddingH = props.paddingH != null ? props.paddingH : getVariantProp('searchPaddingH', props.variant);\n return (\n \n {({ query, updateQuery }) => (\n
props.onSubmit(e) : e => { e.preventDefault(); }}>\n \n \n \n \n {props.onFocus && props.onFocus(); setFocus(true)}}\n onBlur={() => {props.onBlur && props.onBlur(); setFocus(false)}}\n onChange={(event) => {updateQuery(event.currentTarget.value)}}\n isActive={isActive}\n value={query || ''}\n >\n \n
\n )}\n
\n )\n}\nSearchBar.defaultProps = {\n variant: 'large'\n}\n\nexport default SearchBar;","import React from 'react';\nimport SvgWrap from './SvgWrap';\n\nconst Chevron = (props) => {\n const {color, ...rest} = props;\n return (\n \n \n \n \n \n )\n};\n\nexport default Chevron;","import React from 'react';\nimport styled from \"@emotion/styled/macro\";\nimport { css } from '@emotion/core';\nimport { Link } from \"react-router-dom\";\nimport { colorMap, typeScaleMap } from '../theme/themeMapping';\nimport Color from 'color';\nimport { HeadingBase, getLineHeight } from '../theme/commonType';\nimport Chevron from './Chevron';\nimport { flexbox } from '../styleFunctions/StyleFunctions';\n\nconst paddingHStandard = 26;\nconst paddingVStandard = 22;\nconst borderRadius = 5;\nconst borderWidth = 1;\nconst bgColor = colorMap.cardBgColor;\nconst bgColorActive = colorMap.transparentHighlight;\nconst highlight = colorMap.cardHighlight;\nconst boxShadowColor = Color(highlight).fade(.7);\nconst boxShadow = `0px 0px 8px ${boxShadowColor}`;\nconst boxShadowActive = `0px 0px 5px ${boxShadowColor}`;\nconst headingFontSize = typeScaleMap.cardHeading;\nconst bodyFontSize = typeScaleMap.cardBody;\n\n\n// padding-top: ${(inputHeight - inputFontSize - inputBorderWidth) / 2}px;\n// padding-bottom: ${(inputHeight - inputFontSize - inputBorderWidth) / 2}px;\n\nexport const CardStyleInner = props => css`\n padding-top: ${props.paddingV != null ? props.paddingV : paddingVStandard}px;\n padding-bottom: ${props.paddingV != null ? props.paddingV : paddingVStandard}px;\n padding-left: ${props.paddingH != null ? props.paddingH : paddingHStandard}px;\n padding-right: ${props.paddingH != null ? props.paddingH : paddingHStandard}px;\n font-size: ${bodyFontSize}px;\n background: ${bgColor};\n color: ${colorMap.normalText};\n`\n\nexport const CardStyleBase = props => css`\n display: block;\n border: ${borderWidth}px solid transparent;\n border-radius: ${borderRadius}px;\n cursor: pointer;\n transition: 90ms ease;\n box-shadow: ${boxShadow};\n &, &:focus {\n outline: 0;\n /* box-shadow: none; */\n }\n &:hover, &:focus {\n /* background-color: ${bgColorActive}; */\n /* border-color: ${highlight}; */\n box-shadow: ${boxShadowActive};\n transform: translateY(-1px);\n }\n`\n\nconst CardUI = styled.div`\n ${CardStyleBase}\n ${CardStyleInner}\n`;\n\nexport const CardHeader = styled.div`\n display: flex;\n align-items: center;\n`\n\nexport const CardHeaderItem = styled.div`\n ${flexbox}\n &:not(:last-child) {\n margin-right: ${headingFontSize * .75}px; \n }\n`\n\nexport const CardHeading = styled(HeadingBase)`\n flex: 1;\n font-size: ${headingFontSize}px;\n font-weight: 600;\n color: ${colorMap.heading};\n`\n\nexport const CardInner = styled.div`\n ${CardStyleInner}\n`\n\nexport const CardBody = styled.div`\n &:not(:first-of-type) {\n padding-top: ${props => props.paddingV != null ? props.paddingV * (2/3) : paddingVStandard * (2/3)}px;\n }\n`\n\nexport default function Card ({ children, ...props }) {\n const element = props.to ? Link :\n props.action ? \"button\" : \"div\"\n return (\n \n {children}\n \n )\n}","import React from \"react\";\nimport { Icon } from \"@modernary/ui-kit-core\";\nimport { getLineHeight } from \"../theme/commonType\";\nimport Chevron from \"./Chevron\";\nimport { typeScaleMap, colorMap } from \"../theme/themeMapping\";\nimport Card, { CardHeader, CardHeading, CardHeaderItem, CardBody } from \"./Card\";\nimport WrappedInlineSvg from \"./WrappedInlineSvg\";\n\nconst headingFontSize = typeScaleMap.cardHeading;\n\nconst CalloutCard = ({\n titleHeadingLevel,\n title,\n chevron,\n description,\n children,\n iconSrc,\n ...props\n}) => {\n const headingLevel = props.titleHeadingLevel || \"h3\";\n // calculate chevron vertical offset\n const chevronPadding = (headingFontSize * getLineHeight(headingLevel) - headingFontSize) / 2;\n\n return (\n \n {title && (\n \n {/* {props.icon &&\n (typeof props.icon === 'string')\n ? \n : \n } */}\n {iconSrc && (\n \n \n \n )}\n {/* */}\n \n {title}\n \n {chevron && (\n \n \n \n )}\n \n )}\n {description &&
{description}
}\n {children && {children}}\n
\n );\n};\n\nexport default CalloutCard;\n","import React from \"react\";\nimport {\n ZoomableGroup,\n ComposableMap,\n Geographies,\n Geography,\n Marker,\n Line\n} from \"react-simple-maps\";\nimport { geoMercator } from \"d3-geo\"\n\nimport geoJSON from '../hawaii-counties-topo.json';\n\nconst projection = geoMercator;\nconst zoom = 1;\n\n// var features = feature(geoJSON, geoJSON.objects[Object.keys(geoJSON.objects)[0]]).features;\n\n// const featureCollection = {\n// \"type\": \"FeatureCollection\",\n// \"features\": features\n// }\n\n// const center = (geoCentroid(featureCollection));\n\n// const center = [-156.98, 21]; // for 800x600\nconst center = [-156.98, 20.675]\n\nconst proj = () =>\n projection()\n .center(center)\n .scale(8400);\n\nfunction SimpleMap () {\n return (\n
\n \n \n {({ geographies, proj }) => {\n return geographies.map(geo => )\n }}\n \n \n
\n )\n}\n\nexport default SimpleMap;\n","export default {\r\n airPollutionSources: {\r\n id: \"airPollutionSources\",\r\n label: \"Air Pollution Sources\",\r\n description:\r\n \"Covered and non-covered permitted stationary sources of air emissions subject to pollution control.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/cab/api/facility-sites\",\r\n defaultParams: {\r\n type: \"Facility\",\r\n hasLocations: true,\r\n },\r\n colorMarker: \"#42a7ae\",\r\n colorBg: \"#f4fafb\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/cab/#!/facilitySite/${entity.id}/details/view`,\r\n },\r\n emergencyReleases: {\r\n id: \"emergencyReleases\",\r\n label: \"Emergency Releases\",\r\n description:\r\n \"Hazardous substance release emergencies that may cause immediate threats to human health or the environment.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/iheer/api/incidents\",\r\n defaultParams: {\r\n hasLocations: true,\r\n },\r\n colorMarker: \"#ae4271\",\r\n colorBg: \"#fbf4f7\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/iheer/#!/incident/${entity.id}/details/view`,\r\n },\r\n remediationSites: {\r\n id: \"remediationSites\",\r\n label: \"Remediation Sites\",\r\n description:\r\n \"Non-emergency environmental cleanup locations with soil, sediment, and groundwater contamination.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/iheer/api/sites\",\r\n defaultParams: {\r\n hasLocations: true,\r\n },\r\n colorMarker: \"#71ae42\",\r\n colorBg: \"#f7fbf4\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/iheer/#!/site/${entity.id}/details/view`,\r\n },\r\n uicFacilities: {\r\n id: \"uicFacilities\",\r\n label: \"UIC Facilities\",\r\n description:\r\n \"Facilities comprised of wells used for injecting water or other fluids into a groundwater aquifer.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/sdwb/api/facilities\",\r\n defaultParams: {\r\n hasLocations: true,\r\n expand: \"locations\",\r\n },\r\n colorMarker: \"#ae4942\",\r\n colorBg: \"#fbf5f4\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/sdwb/#!/facility/${entity.id}/details/view`,\r\n },\r\n waterQualityAdvisories: {\r\n id: \"waterQualityAdvisories\",\r\n label: \"Water Quality Advisories\",\r\n description:\r\n \"Brown water advisories, high bacteria beach advisories, and sewage spills impacting coastal waters.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/cwb/api/events\",\r\n defaultParams: {\r\n hasLocations: true,\r\n expand: \"locations\",\r\n },\r\n colorMarker: \"#4271AE\",\r\n colorBg: \"#f4f7fb\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/cwb/#!/event/${entity.id}/details/view`,\r\n },\r\n hwHandlers: {\r\n id: \"hwHandlers\",\r\n label: \"Hazardous Waste Handlers\",\r\n description:\r\n \"Handlers include all generators, transporters, treaters, storers, and disposers of hazardous waste.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/hw/api/handlers\",\r\n // endpoint: \"https://localhost:60020/api/handlers\", // development\r\n defaultParams: {\r\n hasLocations: true,\r\n orderBy: [{ propertyName: \"number\", isDescending: false }],\r\n take: 3000,\r\n skip: 0,\r\n },\r\n colorMarker: \"#004E00\",\r\n colorBg: \"#F5FFFB\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/hw/handler/${entity.id}/view`,\r\n },\r\n npdesFacilities: {\r\n id: \"npdesFacilities\",\r\n label: \"NPDES Facilities\",\r\n description:\r\n \"Facility locations that are permitted for water pollution control into surface waters.\",\r\n endpoint: \"https://eha-cloud.doh.hawaii.gov/cwb/api/facility-sites\",\r\n get sicEndpoint() {\r\n return this.endpoint.replace(\"facility-sites\", \"sics\");\r\n },\r\n get naicsEndpoint() {\r\n return this.endpoint.replace(\"facility-sites\", \"naicss\");\r\n },\r\n defaultParams: {\r\n hasLocations: true,\r\n hasPermits: true,\r\n },\r\n colorMarker: \"#E4989E\",\r\n colorBg: \"#FFF9F9\",\r\n getSourceSystemLink: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/cwb/#!/facilitySite/${entity.id}/details/view`,\r\n },\r\n};\r\n","import React from \"react\";\nimport styled from \"@emotion/styled/macro\";\nimport { gradients, spacing, colors } from \"../theme/theme\";\nimport { CenterColumnWrap, CenterColumn, Rows, Columns, Column, breakAtMQ } from \"./CommonLayout\";\nimport SearchBar from \"./SearchBar\";\nimport { Heading2, Heading3, Heading4 } from \"../theme/commonType\";\nimport { colorMap, layoutSpacing } from \"../theme/themeMapping\";\nimport SplitWithChildMargin from \"./SplitWithChildMargin\";\nimport { withRouter } from \"react-router-dom\";\nimport CalloutCard from \"./CalloutCard\";\nimport airPollutionSvg from \"../icons/air-pollution.svg\";\nimport megaphoneSvg from \"../icons/megaphone.svg\";\nimport towerSvg from \"../icons/tower.svg\";\nimport warningSvg from \"../icons/warning.svg\";\nimport cleanupSvg from \"../icons/cleanup.svg\";\nimport waterDropletSvg from \"../icons/water-droplet.svg\";\nimport toxicTankSvg from \"../icons/toxic-tank.svg\";\nimport { Box, Relative } from \"@modernary/ui-kit-core\";\nimport SimpleMap from \"./SimpleMap\";\nimport { HollowBlueButton } from \"./Buttons\";\nimport { CardHeading } from \"./Card\";\nimport EntityTypes from \"../constants/EntityTypes\";\nimport WrappedInlineSvg from \"./WrappedInlineSvg\";\n\nconst innerPaddingV = spacing.large;\nconst innerPaddingBottom = spacing.extraLarge;\nconst featureHeaderMarginV = 18;\nconst mapPadding = 32;\nconst columnBreakWidth = 800;\n\nconst HeroStyle = styled.div`\n display: flex;\n flex-direction: column;\n background: ${gradients.hero};\n padding-top: ${innerPaddingV}px;\n padding-bottom: ${innerPaddingBottom}px;\n /* margin: 0 ${spacing.medium}px; */\n min-height: 400px;\n`;\n\nconst HeroHeading = styled(Heading2)`\n font-size: 38px;\n letter-spacing: -0.02em;\n color: ${colors.darkGreen};\n font-weight: 600;\n line-height: 1.25;\n margin: 0;\n margin-bottom: ${innerPaddingBottom}px;\n @media screen and (min-width: ${columnBreakWidth}px) {\n span {\n display: block;\n }\n }\n`;\n\nconst MainColumn = styled(Column)`\n flex: 2;\n /* max-width: 720px; */\n`;\nconst CardAsideColumn = styled(Column)`\n flex: 1;\n /* max-width: 320px; */\n`;\nconst CardAsideSequence = styled.div`\n & > *:not(:last-child) {\n margin-bottom: 16px;\n }\n`;\n\nconst FeatureHeader = styled.div`\n margin-bottom: ${featureHeaderMarginV}px;\n`;\n\nconst ViewMoreLink = styled.a`\n display: flex;\n align-items: center;\n color: ${colorMap.link};\n text-decoration: none;\n border-bottom: 1px solid;\n padding: 2px 0;\n cursor: pointer;\n &:hover,\n &:focus {\n color: ${colorMap.linkHover};\n }\n`;\nconst ViewMoreWrap = styled.div`\n display: flex;\n justify-content: center;\n`;\n\nconst MapContainer = styled.div`\n background-color: hsla(0, 0%, 100%, 0.35);\n padding: ${mapPadding}px;\n border-radius: 5px;\n`;\n\nconst MapEntryButtonWrap = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 10px;\n @media screen and (min-width: ${columnBreakWidth}px) {\n margin-top: 0;\n position: absolute;\n bottom: 0;\n }\n`;\nconst MapEntryButton = styled(CalloutCard)`\n flex: 0 0 auto;\n padding: 12px 18px;\n & ${CardHeading} {\n font-size: 16px;\n }\n`;\n\nconst Disclaimer = styled.div`\n background-color: hsl(53, 100%, 84%);\n padding: 20px 24px;\n border-radius: 3px;\n border: 1px solid hsl(53, 100%, 54%);\n`;\n\nconst Hero = (props) => {\n return (\n \n \n \n \n \n \n \n Keeping you connected to your local environment.\n \n {/* \n */}\n {/*\n Search EHA public data\n */}\n {\n e.preventDefault();\n props.history.push(\"/search\");\n }}\n >
\n \n {/* \n Explore with our Map Viewer\n */}\n \n Explore the map\n \n \n \n \n \n \n \n \n \n \n \n \n \n Explore our data\n \n {EntityTypes.emergencyReleases.description}\n \n \n {EntityTypes.waterQualityAdvisories.description}\n \n \n {EntityTypes.uicFacilities.description}\n \n \n {EntityTypes.remediationSites.description}\n \n \n {EntityTypes.airPollutionSources.description}\n \n \n {EntityTypes.hwHandlers.description}\n \n \n {EntityTypes.npdesFacilities.description}\n \n {/* \n \n Explore all 5 datasets \n \n */}\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n Please be advised that the map viewer is a piloted feature. We will continue to\n enhance functionality and improve data quality as resources become available. If\n you have any questions, please contact epwebadmin@doh.hawaii.gov.\n
\n
\n
\n
\n
\n
\n \n );\n};\n\nexport default withRouter(Hero);\n","import React, { useContext } from 'react';\nimport LandingHeader from './components/LandingHeader';\nimport Hero from './components/Hero';\nimport { MainContext } from './context/MainContext';\n\nconst MainView = () => {\n const {state, dispatch} = useContext(MainContext);\n\n return (\n <>\n \n {/* */}\n \n \n );\n}\n\nexport default MainView;\n","import React from 'react';\nimport styled from '@emotion/styled/macro';\nimport { CenterColumnWrap, CenterColumn, Columns, Column, NoWrapColumns } from './CommonLayout';\nimport { colors, spacing } from '../theme/theme';\nimport { Heading1 } from '../theme/commonType';\nimport { colorMap } from '../theme/themeMapping';\nimport SplitWithChildMargin from './SplitWithChildMargin';\nimport { HollowBlueButton } from './Buttons';\nimport AppBrand from './AppBrand';\nimport { headerTheme } from './LandingHeader';\nimport { Link } from \"react-router-dom\";\n\nconst HeaderOuter = styled.header`\n background-color: ${headerTheme.background};\n padding: ${headerTheme.outerPaddingVSmall}px 0;\n`\n\nfunction LandingHeader () {\n return (\n \n \n \n \n
\n \n EHAConnect\n \n
\n
\n {/* Admin Login */}\n
\n
\n
\n
\n
\n );\n}\n\nexport default LandingHeader;\n","import {\n useCallback,\n useReducer\n} from 'react';\nimport useIsMounted from './useIsMounted';\n\nexport default (reducer, initialState) => {\n const [state, dispatch] = useReducer(reducer, initialState);\n const isMounted = useIsMounted();\n\n const guardedDispatch = useCallback((...args) => {\n if (isMounted) {\n dispatch(...args);\n }\n }, [dispatch, isMounted]);\n\n return [state, guardedDispatch];\n};\n","import {\n useEffect,\n useRef\n} from 'react';\n\nexport default () => {\n const isMounted = useRef(true);\n\n useEffect(() => {\n return () => isMounted.current = false;\n }, []);\n\n return isMounted;\n};\n","export const hwCounties = new Map([\r\n [\r\n \"HI001\",\r\n {\r\n id: \"HI001\",\r\n description: \"Hawaii\",\r\n },\r\n ],\r\n [\r\n \"HI003\",\r\n {\r\n id: \"HI003\",\r\n description: \"Honolulu\",\r\n },\r\n ],\r\n [\r\n \"HI005\",\r\n {\r\n id: \"HI005\",\r\n description: \"Kalawao\",\r\n },\r\n ],\r\n [\r\n \"HI007\",\r\n {\r\n id: \"HI007\",\r\n description: \"Kauai\",\r\n },\r\n ],\r\n [\r\n \"HI009\",\r\n {\r\n id: \"HI009\",\r\n description: \"Maui\",\r\n },\r\n ],\r\n]);\r\n\r\nexport const hwGenerators = new Map([\r\n [\r\n \"1\",\r\n {\r\n id: \"1\",\r\n description: \"LQG\",\r\n longDescription: \"Large Quantity Generator\",\r\n isFilter: true,\r\n },\r\n ],\r\n [\r\n \"2\",\r\n {\r\n id: \"2\",\r\n description: \"SQG\",\r\n longDescription: \"Small Quantity Generator\",\r\n isFilter: true,\r\n },\r\n ],\r\n [\r\n \"3\",\r\n {\r\n id: \"3\",\r\n description: \"VSQG\",\r\n longDescription: \"Very Small Quantity Generator\",\r\n isFilter: true,\r\n },\r\n ],\r\n [\r\n \"U\",\r\n {\r\n id: \"U\",\r\n description: \"Undetermined\",\r\n longDescription: \"Undetermined\",\r\n isFilter: false,\r\n },\r\n ],\r\n [\r\n \"N\",\r\n {\r\n id: \"N\",\r\n description: \"Not Generator\",\r\n longDescription: \"Not Generator\",\r\n isFilter: true,\r\n },\r\n ],\r\n [\r\n \"P\",\r\n {\r\n id: \"P\",\r\n description: null,\r\n longDescription: null,\r\n isFilter: false,\r\n },\r\n ],\r\n]);\r\n\r\nexport const handlerSourceTypes = new Map([\r\n [\r\n \"A\",\r\n {\r\n id: \"A\",\r\n description: \"Part A\",\r\n },\r\n ],\r\n [\r\n \"B\",\r\n {\r\n id: \"B\",\r\n description: \"Annual/Biennial Report update with Notification\",\r\n },\r\n ],\r\n [\r\n \"D\",\r\n {\r\n id: \"D\",\r\n description: \"Deactivation\",\r\n },\r\n ],\r\n [\r\n \"E\",\r\n {\r\n id: \"E\",\r\n description: \"Emergency\",\r\n },\r\n ],\r\n [\r\n \"I\",\r\n {\r\n id: \"I\",\r\n description: \"Implementer\",\r\n },\r\n ],\r\n [\r\n \"K\",\r\n {\r\n id: \"K\",\r\n description: \"Electronic Manifest Broker\",\r\n },\r\n ],\r\n [\r\n \"N\",\r\n {\r\n id: \"N\",\r\n description: \"Notification\",\r\n },\r\n ],\r\n [\r\n \"R\",\r\n {\r\n id: \"R\",\r\n description: \"Annual/Biennial Report\",\r\n },\r\n ],\r\n [\r\n \"T\",\r\n {\r\n id: \"T\",\r\n description: \"Temporary\",\r\n },\r\n ],\r\n]);\r\n","import moment from \"moment\";\r\nimport EntityTypes from \"../../../../constants/EntityTypes\";\r\nimport { hwCounties, hwGenerators } from \"../../../../constants/HwEnums\";\r\n\r\nconst getLocalMoment = (date) => {\r\n if (date && typeof date === \"string\" && date.length > 10 && !date.toString().endsWith(\"Z\")) {\r\n date += \"Z\";\r\n }\r\n return moment(date);\r\n};\r\n\r\nconst islandName = (entity) => (entity.island ? entity.island.name : \"\");\r\n\r\nexport default {\r\n [`${EntityTypes.emergencyReleases.id}`]: {\r\n type: \"emergencyReleases\",\r\n title: (entity) => `${entity.releaseName} (${entity.caseNumber})`,\r\n description: (entity) => `${islandName(entity)} - ${entity.summary}`,\r\n status: (entity) =>\r\n \"Reported On \" + getLocalMoment(entity.reportedOn).format(\"MM/D/YY h:mm A zz\"),\r\n url: (entity) => `https://eha-cloud.doh.hawaii.gov/iheer/#!/incident/${entity.id}/details/view`,\r\n },\r\n [`${EntityTypes.waterQualityAdvisories.id}`]: {\r\n type: \"waterQualityAdvisories\",\r\n title: (entity) => entity.title,\r\n description: (entity) => `${islandName(entity)} - ${entity.description || \"\"}`,\r\n status: (entity) => \"Posted On \" + getLocalMoment(entity.postedDate).format(\"ll\"),\r\n url: (entity) => `https://eha-cloud.doh.hawaii.gov/cwb/#!/event/${entity.id}/details/view`,\r\n },\r\n [`${EntityTypes.uicFacilities.id}`]: {\r\n type: \"uicFacilities\",\r\n title: (entity) => {\r\n if (\r\n entity.affiliatedOrganizations &&\r\n entity.affiliatedOrganizations.length > 0 &&\r\n entity.affiliatedOrganizations[0].facility\r\n ) {\r\n return entity.affiliatedOrganizations[0].facility.name;\r\n }\r\n return entity.name;\r\n },\r\n description: (entity) => {\r\n if (!entity._operatedBy) {\r\n if (\r\n entity.affiliatedOrganizations &&\r\n entity.affiliatedOrganizations.length > 0 &&\r\n entity.affiliatedOrganizations[0].organization\r\n ) {\r\n entity._operatedBy = \" - \" + entity.affiliatedOrganizations[0].organization.name;\r\n } else {\r\n entity._operatedBy = \"\";\r\n }\r\n }\r\n if (!entity._locatedAt) {\r\n if (entity.street && entity.city && entity.zipCode) {\r\n entity._locatedAt =\r\n \" - located at \" + entity.street + \" \" + entity.city + \" \" + entity.zipCode;\r\n } else {\r\n entity._locatedAt = \"\";\r\n }\r\n }\r\n return islandName(entity) + entity._operatedBy + entity._locatedAt;\r\n },\r\n status: (entity) => \"Last Updated On \" + getLocalMoment(entity.updatedOn).format(\"ll\"),\r\n url: (entity) => `https://eha-cloud.doh.hawaii.gov/sdwb/#!/facility/${entity.id}/details/view`,\r\n },\r\n [`${EntityTypes.remediationSites.id}`]: {\r\n type: \"remediationSites\",\r\n title: (entity) => entity.name,\r\n description: (entity) => {\r\n if (!entity._locatedAt) {\r\n if (entity.street && entity.city && entity.zipCode) {\r\n entity._locatedAt =\r\n \" - located at \" + entity.street + \" \" + entity.city + \" \" + entity.zipCode;\r\n } else if (entity.locationDescription) {\r\n entity._locatedAt = \" - located at \" + entity.locationDescription;\r\n } else {\r\n entity._locatedAt = \"\";\r\n }\r\n }\r\n return islandName(entity) + entity._locatedAt;\r\n },\r\n status: (entity) => \"Last Updated On \" + getLocalMoment(entity.updatedOn).format(\"ll\"),\r\n url: (entity) => `https://eha-cloud.doh.hawaii.gov/iheer/#!/site/${entity.id}/details/view`,\r\n },\r\n [`${EntityTypes.airPollutionSources.id}`]: {\r\n type: \"airPollutionSources\",\r\n title: (entity) => entity.name + \" (\" + entity.number + \")\",\r\n description: (entity) => {\r\n if (!entity._permittee) {\r\n if (\r\n entity.affiliatedOrganizations &&\r\n entity.affiliatedOrganizations.length > 0 &&\r\n entity.affiliatedOrganizations[0].organization\r\n ) {\r\n entity._permittee = \" - \" + entity.affiliatedOrganizations[0].organization.name;\r\n } else {\r\n entity._permittee = \"\";\r\n }\r\n }\r\n if (!entity._locatedAt) {\r\n if (entity.street && entity.city && entity.zipCode) {\r\n entity._locatedAt =\r\n \" - located at \" + entity.street + \" \" + entity.city + \" \" + entity.zipCode;\r\n } else {\r\n entity._locatedAt = \"\";\r\n }\r\n }\r\n return islandName(entity) + entity._permittee + entity._locatedAt;\r\n },\r\n status: (entity) => \"Last Updated On \" + getLocalMoment(entity.updatedOn).format(\"ll\"),\r\n url: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/cab/#!/facilitySite/${entity.id}/details/view`,\r\n },\r\n [`${EntityTypes.hwHandlers.id}`]: {\r\n type: \"hwHandlers\",\r\n title: (entity) => `${entity.number} - ${entity.name}`,\r\n description: (entity) => {\r\n if (!entity._generator) {\r\n entity._generator = hwGenerators.get(entity.federalWasteGenerator)?.longDescription;\r\n entity._generator = entity._generator ? ` - ${entity._generator}` : \"\";\r\n }\r\n if (!entity._locatedAt) {\r\n if (entity.locationStreet1 && entity.locationCity && entity.locationZip) {\r\n entity._locatedAt = ` - located at ${entity.locationStreet1} ${entity.locationCity} ${entity.locationZip}`;\r\n } else {\r\n entity._locatedAt = \"\";\r\n }\r\n }\r\n if (!entity._islandName) entity._islandName = hwCounties.get(entity.countyCode)?.description;\r\n\r\n return entity._islandName + entity._generator + entity._locatedAt;\r\n },\r\n status: (entity) =>\r\n \"Received \" + getLocalMoment(entity.receiveDate).format(\"MM/DD/YY h:mm A zz\"),\r\n url: (entity) => `https://eha-cloud.doh.hawaii.gov/hw/handler/${entity.id}/view`,\r\n },\r\n [`${EntityTypes.npdesFacilities.id}`]: {\r\n type: \"npdesFacilities\",\r\n title: (entity) => entity.name,\r\n description: (entity) => {\r\n if (!entity._locatedAt) {\r\n if (entity.street && entity.city && entity.state && entity.zipCode) {\r\n entity._locatedAt = ` - located at ${entity.street} ${entity.city} ${entity.state} ${entity.zipCode}`;\r\n } else {\r\n entity._locatedAt = ` - located at ${entity.locationDescription}`;\r\n }\r\n }\r\n\r\n return `${islandName(entity)} ${entity._locatedAt}`;\r\n },\r\n status: (entity) => \"Last Updated \" + getLocalMoment(entity.updatedOn).format(\"ll\"),\r\n url: (entity) =>\r\n `https://eha-cloud.doh.hawaii.gov/cwb/#!/facilitySite/${entity.id}/details/view`,\r\n },\r\n};\r\n","import axios, { CancelToken } from \"axios\";\r\nimport isArray from \"lodash/isArray\";\r\nimport ExtraProps from \"./functions/ExtraProps\";\r\nimport EntityTypes from \"../../../constants/EntityTypes\";\r\n\r\nconst makeGet = ({ entityType, term, cancelToken, searchOptions }) => ({\r\n params: {\r\n maxResults: searchOptions.maxResults,\r\n take: searchOptions.maxResults, // uic facilities only\r\n ...entityType.defaultParams,\r\n keywords: term,\r\n },\r\n cancelToken: cancelToken,\r\n});\r\n\r\nexport const isOk = (response) => response && response.status === 200;\r\n\r\nconst spreadExtraProps = (entityType, results, response) => {\r\n let list = response.data.list ? response.data.list : response.data.value;\r\n return list.forEach((entity) => {\r\n if (EntityTypes.hwHandlers.id === entityType.id) {\r\n //hw is a little funky because it doesn't return an array of locations, we need to make that ourselves.\r\n if (!entity.locationLongitude || !entity.locationLatitude) return [];\r\n\r\n if (!entity.locations) {\r\n var result = {\r\n id: entity.id,\r\n geometry: `POINT (${entity.locationLongitude} ${entity.locationLatitude})`,\r\n centroid: `POINT (${entity.locationLongitude} ${entity.locationLatitude})`,\r\n //locationType?\r\n };\r\n entity.locations = [result];\r\n }\r\n }\r\n results.push({\r\n ...entity,\r\n extra: {\r\n type: ExtraProps[entityType.id].type,\r\n title: ExtraProps[entityType.id].title(entity),\r\n description: ExtraProps[entityType.id].description(entity),\r\n status: ExtraProps[entityType.id].status(entity),\r\n url: ExtraProps[entityType.id].url(entity),\r\n hasLocation: isArray(entity.locations) && entity.locations.length > 0,\r\n },\r\n });\r\n });\r\n};\r\n\r\nconst compareName = (a, b) => {\r\n if (a.extra.title < b.extra.title) {\r\n return -1;\r\n }\r\n if (a.extra.title > b.extra.title) {\r\n return 1;\r\n }\r\n return 0;\r\n};\r\n\r\nconst cancelTokens = [];\r\n\r\nconst cancelSearch = () => {\r\n cancelTokens.forEach((cancel) => {\r\n cancel();\r\n });\r\n};\r\n\r\nexport default {\r\n /**\r\n * Cancel search.\r\n */\r\n cancel: () => cancelSearch(),\r\n\r\n /**\r\n * Search all endpoints at once.\r\n *\r\n * https://www.storyblok.com/tp/how-to-send-multiple-requests-using-axios\r\n *\r\n * @param term\r\n * @returns {Promise<[]>}\r\n */\r\n search: async ({ term, searchOptions }) => {\r\n cancelSearch();\r\n\r\n const cancelExecutor = (c) => {\r\n cancelTokens.push(c);\r\n };\r\n\r\n const errorHandler = (endpoint) => (err) => {\r\n console.warn(`Unable to call endpoint [${endpoint}]: ${err.message}`);\r\n return null;\r\n };\r\n\r\n const requests = [];\r\n\r\n const newGet = (entityType) => {\r\n return axios\r\n .get(\r\n entityType.endpoint,\r\n makeGet({\r\n searchOptions: searchOptions,\r\n entityType: entityType,\r\n term,\r\n cancelToken: new CancelToken(cancelExecutor),\r\n })\r\n )\r\n .catch(errorHandler(entityType.endpoint));\r\n };\r\n\r\n searchOptions.entityTypes.forEach((entityType) => {\r\n requests.push(newGet(entityType));\r\n });\r\n\r\n const responses = await axios.all(requests);\r\n const results = [];\r\n\r\n searchOptions.entityTypes.forEach((entityType, index) => {\r\n if (isOk(responses[index])) {\r\n spreadExtraProps(entityType, results, responses[index]);\r\n }\r\n });\r\n\r\n results.sort(compareName);\r\n\r\n return results;\r\n },\r\n};\r\n","export const ACTION_SEARCH_BEGIN = 'ACTION_SEARCH_BEGIN';\nexport const ACTION_SEARCH_SUCCESS = 'ACTION_SEARCH_SUCCESS';\nexport const ACTION_SEARCH_ERROR = 'ACTION_SEARCH_ERROR';\nexport const ACTION_SELECT_RESULT_ITEM = 'SELECT_RESULT_ITEM';\nexport const ACTION_DESELECT_RESULT_ITEM = 'DESELECT_RESULT_ITEM';\nexport const ACTION_SELECT_REFERENCE_LAYER_FEATURE = 'ACTION_SELECT_REFERENCE_LAYER_FEATURE';\nexport const ACTION_DESELECT_REFERENCE_LAYER_FEATURE = 'ACTION_DESELECT_REFERENCE_LAYER_FEATURE';\nexport const ACTION_SET_ACTIVE_TOOL_PANEL = 'ACTION_SET_ACTIVE_TOOL_PANEL';\nexport const ACTION_SET_BASE_LAYER = 'ACTION_SET_BASE_LAYER';\nexport const ACTION_SET_REFERENCE_LAYERS = 'ACTION_SET_REFERENCE_LAYERS';\nexport const ACTION_OPEN_FLYOUT_PANEL = 'ACTION_OPEN_FLYOUT_PANEL';\nexport const ACTION_CLOSE_FLYOUT_PANEL = 'ACTION_CLOSE_FLYOUT_PANEL';\n","import {\n ACTION_CLOSE_FLYOUT_PANEL,\n ACTION_DESELECT_REFERENCE_LAYER_FEATURE,\n ACTION_DESELECT_RESULT_ITEM,\n ACTION_OPEN_FLYOUT_PANEL,\n ACTION_SEARCH_BEGIN,\n ACTION_SEARCH_ERROR,\n ACTION_SEARCH_SUCCESS,\n ACTION_SELECT_REFERENCE_LAYER_FEATURE,\n ACTION_SELECT_RESULT_ITEM,\n ACTION_SET_ACTIVE_TOOL_PANEL,\n ACTION_SET_BASE_LAYER,\n ACTION_SET_REFERENCE_LAYERS\n} from './actions-types';\n\n/**\n * Private helper to create actions with a consistent shape. The shape is\n * inspired by the redux community.\n *\n * Ref: https://shorturl.at/cdgNW\n *\n */\nconst action = (type, payload) => {\n return {\n type: type,\n payload: {\n ...payload,\n },\n };\n};\n\nexport const actionSearchBegin = (term, searchOptions) => action(ACTION_SEARCH_BEGIN, {\n term,\n searchOptions\n});\nexport const actionSearchSuccess = results => action(ACTION_SEARCH_SUCCESS, { results });\nexport const actionSearchError = error => action(ACTION_SEARCH_ERROR, { error });\nexport const actionSelectResultItem = ({ index, item, entityLocation, clickCoordinates }) => action(ACTION_SELECT_RESULT_ITEM, {\n item,\n index,\n entityLocation,\n clickCoordinates\n});\nexport const actionDeselectResultItem = () => action(ACTION_DESELECT_RESULT_ITEM);\nexport const actionSetActivePanel = panel => action(ACTION_SET_ACTIVE_TOOL_PANEL, { panel });\nexport const actionSetBaseLayer = layer => action(ACTION_SET_BASE_LAYER, { layer });\nexport const actionSetReferenceLayers = layers => action(ACTION_SET_REFERENCE_LAYERS, { layers });\nexport const actionSelectReferenceLayerFeature = feature => action(ACTION_SELECT_REFERENCE_LAYER_FEATURE, { feature });\nexport const actionDeselectReferenceLayerFeature = () => action(ACTION_DESELECT_REFERENCE_LAYER_FEATURE);\nexport const actionOpenFlyoutPanel = panel => action(ACTION_OPEN_FLYOUT_PANEL, { panel });\nexport const actionCloseFlyoutPanel = () => action(ACTION_CLOSE_FLYOUT_PANEL);\n","export default {\n EntityDetails: 'entityDetails',\n SearchOptions: 'searchOptions'\n}\n","const LayerTypes = {\n OpenStreetMap: 'osm',\n ArcGIS: 'arcgis'\n};\n\nexport {\n LayerTypes\n};\n\nexport default {\n BaseLayers: [\n {\n id: 1,\n type: 'osm',\n title: 'Open Street Maps',\n description: 'description',\n thumbnail: 'images/preview/osm.png',\n maxZoom: 20\n },\n {\n id: 2,\n type: 'arcgis',\n url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer',\n title: 'World Streets',\n attributions: 'Esri, HERE, Garmin, USGS, Intermap, INCREMENT P, NRCan, Esri Japan, METI, Esri China (Hong Kong), Esri Korea, Esri (Thailand), NGCC, (c) OpenStreetMap contributors, and the GIS User Community',\n thumbnail: 'images/preview/world-street.png',\n maxZoom: 18\n },\n {\n id: 9,\n type: 'arcgis',\n url: [\n 'http://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer',\n 'http://services.arcgisonline.com/arcgis/rest/services/Reference/World_Boundaries_and_Places/MapServer'\n ],\n title: 'World Imagery',\n attributions: 'Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community',\n thumbnail: 'images/preview/world-imagery.png',\n maxZoom: 18\n },\n {\n id: 10,\n type: 'arcgis',\n url: [\n 'http://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer',\n 'http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer'\n ],\n title: 'World Topographical',\n attributions: 'Esri, HERE, Garmin, Intermap, increment P Corp., GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), (c) OpenStreetMap contributors, and the GIS User Community',\n thumbnail: 'images/preview/world-topo.png',\n maxZoom: 18\n },\n {\n id: 3,\n type: 'arcgis',\n url: [\n 'https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer',\n 'https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer'\n ],\n title: 'World Ocean',\n attributions: 'Esri, Garmin, GEBCO, NOAA NGDC, and other contributors',\n thumbnail: 'images/preview/world-ocean.png',\n maxZoom: 12\n },\n {\n id: 4,\n type: 'arcgis',\n url: [\n 'https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer',\n 'https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Reference/MapServer'\n ],\n title: 'World Light Gray',\n attributions: 'Esri, HERE, Garmin, (c) OpenStreetMap contributors, and the GIS user community',\n thumbnail: 'images/preview/world-light-gray.png',\n maxZoom: 15\n },\n {\n id: 5,\n type: 'arcgis',\n url: [\n 'https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer',\n 'https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Reference/MapServer',\n ],\n title: 'World Dark Gray',\n attributions: 'Esri, HERE, Garmin, (c) OpenStreetMap contributors, and the GIS user community',\n thumbnail: 'images/preview/world-dark-gray.png',\n maxZoom: 15\n },\n {\n id: 6,\n type: 'arcgis',\n url: [\n 'http://services.arcgisonline.com/arcgis/rest/services/Specialty/DeLorme_World_Base_Map/MapServer',\n ],\n title: 'DeLorne',\n attributions: 'Copyright:(c) 2018 Garmin',\n thumbnail: 'images/preview/delorne.png',\n maxZoom: 12\n },\n {\n id: 7,\n type: 'arcgis',\n url: [\n 'http://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer',\n ],\n title: 'USA Topographical',\n attributions: 'Copyright:© 2013 National Geographic Society, i-cubed',\n thumbnail: 'images/preview/usa-topo.png',\n maxZoom: 16\n },\n {\n id: 8,\n type: 'arcgis',\n url: [\n 'http://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map/MapServer',\n ],\n title: 'National Geographic',\n attributions: 'National Geographic, Esri, Garmin, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.',\n thumbnail: 'images/preview/nat-geo.png',\n maxZoom: 17\n }\n ],\n ReferenceLayers: [\n {\n id: 0,\n type: 'arcgis',\n url: 'https://geodata.hawaii.gov/arcgis/rest/services/ParcelsZoning/MapServer',\n layerId: 25,\n title: 'Statewide TMKs',\n minZoom: 9,\n zIndex: 1000,\n color: 'rgba(54, 168, 186, 0.4)'\n },\n ]\n};\n","export default {\n SearchResults: 'results',\n Layers: 'layers',\n Measure: 'measure',\n Help: 'info',\n};\n","import EntityTypes from './EntityTypes';\nimport Layers from './Layers';\nimport ToolPanels from './ToolPanels';\n\nexport default {\n center: [-157.5321300439421, 20.34323399543934],\n extent: [-162.64613955035261, 18.473150177780255, -154.12279110463427, 22.66149158205188],\n omniBox: {\n bg: 'rgba(255,255,255,1)',\n margin: 16,\n width: 340\n },\n defaultZoom: 8,\n duration: 1000,\n defaultSearchTerm: '',\n //defaultSearchTerm: 'Honolulu Rail Transit Project',\n defaultPanel: ToolPanels.SearchResults,\n baseLayer: 4,\n defaultBaseLayer: Layers.BaseLayers[1],\n defaultSearchOptions: {\n maxResults: 10000,\n entityTypes: Object.values(EntityTypes)\n }\n};\n\n\n\n","/**\n * Initial state to give the map viewer reducer.\n */\nimport FlyoutPanels from '../../../constants/FlyoutPanels';\nimport MapConstants from '../../../constants/MapConstants';\nimport ToolPanels from '../../../constants/ToolPanels';\n\nexport default {\n /**\n * Search state.\n */\n search: {\n countInProgress: 0,\n isSearching: false,\n error: undefined,\n term: MapConstants.defaultSearchTerm,\n results: [],\n },\n\n /**\n * Search options state.\n */\n searchOptions: MapConstants.defaultSearchOptions,\n\n /**\n * Selected result item.\n */\n selection: {\n index: undefined,\n item: undefined,\n hasSelection: false,\n },\n\n /**\n * Map state.\n */\n map: {\n baseLayer: MapConstants.defaultBaseLayer,\n referenceLayers: [],\n maxZoom: MapConstants.defaultBaseLayer.maxZoom,\n },\n\n /**\n * Reference layers feature selection.\n */\n referenceLayerFeature: {\n feature: undefined,\n },\n\n /**\n * OmniBox state.\n */\n omniBox: {\n panel: ToolPanels.SearchResults,\n isFlyoutOpen: false,\n flyOutPanel: FlyoutPanels.SearchOptions\n }\n};\n","/**\n * Returns whether or not the search result is empty.\n *\n * @param term the search term.\n * @param results the search results.\n * @returns {boolean} whether or not the search result is empty.\n */\nexport default (term, results) => {\n if (!term) {\n return false;\n }\n\n return (term.length > 0 && results.length === 0);\n};\n","import produce from 'immer';\nimport {\n ACTION_CLOSE_FLYOUT_PANEL,\n ACTION_DESELECT_REFERENCE_LAYER_FEATURE,\n ACTION_DESELECT_RESULT_ITEM,\n ACTION_OPEN_FLYOUT_PANEL,\n ACTION_SEARCH_BEGIN,\n ACTION_SEARCH_ERROR,\n ACTION_SEARCH_SUCCESS,\n ACTION_SELECT_REFERENCE_LAYER_FEATURE,\n ACTION_SELECT_RESULT_ITEM,\n ACTION_SET_ACTIVE_TOOL_PANEL,\n ACTION_SET_BASE_LAYER,\n ACTION_SET_REFERENCE_LAYERS\n} from './actions-types';\nimport isEmptyResults from './fp/isEmptyResults';\n\n/**\n * State reducer.\n *\n * @param draft {object} an Immer draft state object.\n * @param action {object} the action to reduce state with.\n * @returns {object} new state.\n */\nconst reducer = produce((draft, action = {}) => {\n const { type, payload } = action;\n\n //console.log(`${type}`, payload);\n\n switch (type) {\n case ACTION_SEARCH_BEGIN:\n const { term, searchOptions } = payload;\n draft.search.term = term;\n draft.search.countInProgress = draft.search.countInProgress + 1;\n draft.search.isSearching = draft.search.countInProgress > 0;\n draft.searchOptions = searchOptions;\n return;\n case ACTION_SEARCH_SUCCESS:\n const { results } = payload;\n draft.search.countInProgress = draft.search.countInProgress - 1;\n // only update results when they're are no searches left in progress.\n draft.search.results = draft.search.countInProgress === 0 ? results : draft.search.results;\n draft.search.isSearchResultEmpty = isEmptyResults(draft.search.term, results);\n draft.search.isSearching = draft.search.countInProgress > 0;\n return;\n case ACTION_SEARCH_ERROR:\n const { error } = payload;\n draft.search.error = error.message;\n draft.search.countInProgress = draft.search.countInProgress - 1;\n draft.search.isSearching = draft.search.countInProgress > 0;\n return;\n case ACTION_SELECT_RESULT_ITEM:\n const { index, item, entityLocation, clickCoordinates } = payload;\n draft.selection.index = index;\n draft.selection.item = item;\n draft.selection.entityLocation = entityLocation;\n draft.selection.clickCoordinates = clickCoordinates;\n draft.selection.hasSelection = true;\n return;\n case ACTION_DESELECT_RESULT_ITEM:\n draft.selection.index = undefined;\n draft.selection.item = undefined;\n draft.selection.hasSelection = false;\n return;\n case ACTION_SET_ACTIVE_TOOL_PANEL:\n draft.omniBox.panel = payload.panel;\n return;\n case ACTION_SET_BASE_LAYER:\n const { layer } = payload;\n draft.map.baseLayer = layer;\n draft.map.maxZoom = layer.maxZoom;\n return;\n case ACTION_SET_REFERENCE_LAYERS:\n const { layers } = payload;\n draft.map.referenceLayers = layers;\n return;\n case ACTION_SELECT_REFERENCE_LAYER_FEATURE:\n const { feature } = payload;\n draft.referenceLayerFeature.feature = feature;\n return;\n case ACTION_DESELECT_REFERENCE_LAYER_FEATURE:\n draft.referenceLayerFeature.feature = undefined;\n return;\n case ACTION_OPEN_FLYOUT_PANEL:\n draft.omniBox.isFlyoutOpen = true;\n draft.omniBox.flyOutPanel = payload.panel;\n return;\n case ACTION_CLOSE_FLYOUT_PANEL:\n draft.omniBox.isFlyoutOpen = false;\n draft.omniBox.flyOutPanel = null;\n return;\n default:\n return;\n }\n});\n\nexport default reducer;\n","import PropTypes from 'prop-types';\nimport React, { useEffect } from 'react';\nimport useMapViewerReducer from '../hooks/useMapViewerReducer';\nimport api from './api';\nimport {\n actionSearchBegin,\n actionSearchError,\n actionSearchSuccess\n} from './state/actions';\nimport initialState from './state/initialState';\nimport reducer from './state/reducer';\n\nexport const MapViewerContext = React.createContext(null);\n\nconst MapViewerProvider = ({ children }) => {\n const [state, dispatch] = useMapViewerReducer(reducer, initialState);\n\n useEffect(() => {\n const doSearch = async () => {\n const term = state.search.term;\n const searchOptions = state.searchOptions;\n try {\n dispatch(actionSearchBegin(term, searchOptions));\n const results = await api.search({ term, searchOptions });\n dispatch(actionSearchSuccess(results));\n } catch (err) {\n dispatch(actionSearchError(err));\n }\n };\n doSearch();\n\n return () => {\n api.cancel();\n };\n }, [dispatch]);\n\n return (\n \n {children}\n \n );\n};\n\n/**\n * TODO Document me.\n */\nMapViewerProvider.propTypes = {\n children: PropTypes.node,\n};\n\nMapViewerProvider.defaultProps = {\n children: null,\n};\n\nexport default MapViewerProvider;\n","import Map from 'ol/Map';\nimport View from 'ol/View';\nimport Polygon from 'ol/geom/Polygon';\nimport { transformExtent, transform } from 'ol/proj';\n\nexport const extent = obj => {\n if (obj instanceof Map) {\n return obj.getView().calculateExtent(obj.getSize());\n } else if (obj instanceof Polygon) {\n return obj.getExtent();\n } else if (obj instanceof View) {\n return obj.calculateExtent(obj.getSize());\n } else if (obj instanceof Array) {\n return obj;\n }\n console.warn(`Unable to return extents`, obj);\n};\n\nexport const toLonLatExtent = obj => {\n if (obj instanceof Map) {\n return transformExtent(obj.getView().calculateExtent(obj.getSize()), 'EPSG:3857', 'EPSG:4326');\n } else if (obj instanceof Polygon) {\n return transformExtent(obj.getExtent(), 'EPSG:3857', 'EPSG:4326');\n } else if (obj instanceof View) {\n return transformExtent(obj.calculateExtent(obj.getSize()), 'EPSG:3857', 'EPSG:4326');\n } else if (obj instanceof Array) {\n return transformExtent(obj, 'EPSG:3857', 'EPSG:4326');\n }\n console.warn(`Unable to transform to lon lat extents`, obj);\n};\n\nexport const toWebMercatorExtent = obj => {\n if (obj instanceof Map) {\n return transformExtent(obj.getView().calculateExtent(obj.getSize()), 'EPSG:4326', 'EPSG:3857');\n } else if (obj instanceof Polygon) {\n return transformExtent(obj.getExtent(), 'EPSG:4326', 'EPSG:3857');\n } else if (obj instanceof View) {\n return transformExtent(obj.calculateExtent(obj.getSize()), 'EPSG:4326', 'EPSG:3857');\n } else if (obj instanceof Array) {\n return transformExtent(obj, 'EPSG:4326', 'EPSG:3857');\n }\n console.warn(`Unable to transform to web mercator extents`, obj);\n};\n\nexport const toWebMercatorCenter = array => {\n return transform(array, 'EPSG:4326', 'EPSG:3857');\n};\n\nexport const toLonLatCenter = array => {\n return transform(array, 'EPSG:3857', 'EPSG:4326');\n};\n\nexport const centerOfExtent = extent => {\n const x = extent[0] + (extent[2]-extent[0])/2;\n const y = extent[1] + (extent[3]-extent[1])/2;\n return [x, y];\n};\n","import produce from 'immer';\nimport {\n ACTION_SET_MAP,\n} from './actions-types';\n\n/**\n * State reducer.\n *\n * @param draft {object} an Immer draft state object.\n * @param action {object} the action to reduce state with.\n * @returns {object} new state.\n */\nconst reducer = produce((draft, action = {}) => {\n const { type, payload } = action;\n\n switch (type) {\n\n case ACTION_SET_MAP:\n const { map } = payload;\n draft.map = map;\n return;\n\n default:\n return;\n }\n});\n\nexport default reducer;\n","export const ACTION_SET_MAP = 'ACTION_SET_MAP';\n","import Point from 'ol/geom/Point';\nimport OlMap from 'ol/Map';\nimport OlView from 'ol/View';\nimport PropTypes from 'prop-types';\nimport React, {\n useEffect,\n useReducer,\n} from 'react';\nimport MapConstants from '../../constants/MapConstants';\nimport {\n toWebMercatorCenter,\n toWebMercatorExtent\n} from '../util/transform';\nimport { actionSetMap } from './state/actions';\nimport reducer from './state/reducer';\n\nexport const MapStateContext = React.createContext(null);\n\nconst MapStateProvider = ({ children, id, center, extent, zoom = MapConstants.defaultZoom, maxZoom = 23 }) => {\n const [state, dispatch] = useReducer(reducer, {});\n\n useEffect(() => {\n\n const map = new OlMap({\n target: id,\n layers: [],\n view: new OlView({\n center: [0, 0],\n zoom: zoom,\n minZoom: 1,\n maxZoom: maxZoom,\n })\n });\n\n if (extent) {\n map.getView().fit(toWebMercatorExtent(extent), { padding: [0, 0, 0, 0] });\n } else if (center) {\n const resolution = map.getView().getResolutionForZoom(zoom);\n map.getView().fit(new Point(toWebMercatorCenter(center)), {\n padding: [0, 0, 0, 0],\n minResolution: resolution\n });\n }\n\n dispatch(actionSetMap(map));\n\n return () => {\n map.setTarget(null);\n };\n }, []);\n\n /**\n * Max zoom changed.\n */\n useEffect(() => {\n if (state.map) {\n state.map.getView().setMaxZoom(maxZoom);\n }\n }, [state.map, maxZoom]);\n\n /**\n * Extent changed.\n */\n useEffect(() => {\n if (state.map) {\n if (extent) {\n state.map.getView().fit(toWebMercatorExtent(extent), { padding: [0, 0, 0, 0] });\n }\n }\n }, [state.map, extent]);\n\n return (\n \n {children}\n \n );\n};\n\n/**\n * TODO Document me.\n */\nMapStateProvider.propTypes = {\n id: PropTypes.string,\n initialCenter: PropTypes.arrayOf(PropTypes.number),\n};\n\nMapStateProvider.defaultProps = {\n initialCenter: undefined,\n id: Math.random().toString(36).slice(2),\n};\n\nexport default MapStateProvider;\n","/**\n * Private helper to create actions with a consistent shape. The shape is\n * inspired by the redux community.\n *\n * Ref: https://shorturl.at/cdgNW\n *\n */\nimport { ACTION_SET_MAP } from './actions-types';\n\nconst action = (type, payload) => {\n return {\n type: type,\n payload: {\n ...payload,\n },\n };\n};\n\nexport const actionSetMap = map => action(ACTION_SET_MAP, { map });\n","import { useContext } from 'react';\nimport { MapStateContext } from './MapStateProvider';\n\nconst useMap = () => {\n const [state, dispatch] = useContext(MapStateContext);\n\n return {\n map: state.map\n };\n};\n\nexport default useMap;\n","import { useContext } from 'react';\nimport FlyoutPanels from '../../constants/FlyoutPanels';\nimport MapConstants from '../../constants/MapConstants';\nimport ToolPanels from '../../constants/ToolPanels';\nimport api from './api';\nimport { MapViewerContext } from './MapViewerProvider';\nimport {\n actionCloseFlyoutPanel,\n actionDeselectReferenceLayerFeature,\n actionDeselectResultItem,\n actionOpenFlyoutPanel,\n actionSearchBegin,\n actionSearchError,\n actionSearchSuccess,\n actionSelectReferenceLayerFeature,\n actionSelectResultItem,\n actionSetActivePanel,\n actionSetBaseLayer,\n actionSetReferenceLayers\n} from './state/actions';\n\nconst useMapViewer = () => {\n const [state, dispatch] = useContext(MapViewerContext);\n\n const executeSearch = async (term, searchOptions) => {\n\n if (state.omniBox.flyOutPanel === FlyoutPanels.EntityDetails) {\n dispatch(actionCloseFlyoutPanel());\n dispatch(deselectResultItem());\n }\n\n dispatch(actionSetActivePanel(ToolPanels.SearchResults));\n\n try {\n dispatch(actionSearchBegin(term, searchOptions));\n const results = await api.search({ term, searchOptions });\n dispatch(actionSearchSuccess(results));\n } catch (err) {\n dispatch(actionSearchError(err));\n }\n };\n\n const setActivePanel = panelId => {\n dispatch(actionSetActivePanel(panelId));\n };\n\n const setBaseLayer = layer => {\n dispatch(actionSetBaseLayer(layer));\n };\n\n const setReferenceLayers = layers => {\n dispatch(actionSetReferenceLayers(layers));\n };\n\n const selectResultItem = args => {\n dispatch(actionSelectResultItem(args));\n dispatch(actionDeselectReferenceLayerFeature());\n dispatch(actionOpenFlyoutPanel(FlyoutPanels.EntityDetails));\n };\n\n const deselectResultItem = () => {\n dispatch(actionDeselectResultItem());\n if (state.omniBox.flyOutPanel === FlyoutPanels.EntityDetails) {\n dispatch(actionCloseFlyoutPanel());\n }\n };\n\n const selectReferenceLayerFeature = feature => {\n dispatch(actionDeselectResultItem());\n dispatch(actionSelectReferenceLayerFeature(feature));\n dispatch(actionCloseFlyoutPanel());\n };\n\n const deselectReferenceLayerFeature = () => {\n dispatch(actionDeselectReferenceLayerFeature());\n };\n\n const toggleSearchOptions = () => {\n const { omniBox } = state;\n if (omniBox.isFlyoutOpen && omniBox.flyOutPanel === FlyoutPanels.SearchOptions) {\n dispatch(actionCloseFlyoutPanel());\n } else {\n dispatch(actionOpenFlyoutPanel(FlyoutPanels.SearchOptions));\n }\n };\n\n const reset = async () => {\n deselectResultItem();\n deselectReferenceLayerFeature();\n setActivePanel(MapConstants.defaultPanel);\n setBaseLayer(MapConstants.defaultBaseLayer);\n dispatch(actionCloseFlyoutPanel());\n await executeSearch(MapConstants.defaultSearchTerm, MapConstants.defaultSearchOptions);\n };\n\n return {\n executeSearch: executeSearch,\n selectResultItem: selectResultItem,\n deselectResultItem: deselectResultItem,\n selectReferenceLayerFeature: selectReferenceLayerFeature,\n deselectReferenceLayerFeature: deselectReferenceLayerFeature,\n setActivePanel: setActivePanel,\n setBaseLayer: setBaseLayer,\n setReferenceLayers: setReferenceLayers,\n toggleSearchOptions: toggleSearchOptions,\n reset: reset,\n search: state.search,\n searchOptions: state.searchOptions,\n selection: state.selection,\n omniBox: state.omniBox,\n map: state.map,\n referenceLayerFeature: state.referenceLayerFeature,\n };\n};\n\nexport default useMapViewer;\n","import { useEffect } from 'react';\nimport useMap from '../../../map/context/useMap';\nimport useMapViewer from '../../context/useMapViewer';\n\nconst MapFeatureClickListener = ({}) => {\n const { map } = useMap();\n const { selection: { item: entity }, selectResultItem } = useMapViewer();\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n const clickListener = event => {\n const features = [];\n\n map.forEachFeatureAtPixel(event.pixel, feature => {\n features.push(feature);\n });\n\n if (features[0]) {\n const props = features[0].getProperties();\n selectResultItem({\n index: props['index'],\n item: props['entity'],\n entityLocation: props['entityLocation'],\n clickCoordinates: event.coordinate\n });\n }\n };\n\n map.on('singleclick', clickListener);\n\n return () => {\n map.un('singleclick', clickListener);\n };\n }, [map]);\n\n return null;\n};\n\nexport default MapFeatureClickListener;\n","import { singleClick } from 'ol/events/condition';\nimport Select from 'ol/interaction/Select';\nimport React, {\n useEffect,\n useImperativeHandle,\n useRef\n} from 'react';\nimport useMap from '../../../map/context/useMap';\n\nconst SingleClickSelectInteraction = React.forwardRef(({ onSelect }, ref) => {\n const { map } = useMap();\n const selectRef = useRef(null);\n\n /**\n * Setup the select interaction.\n */\n useEffect(() => {\n if (!map) {\n return;\n }\n\n selectRef.current = new Select({\n condition: singleClick,\n style: null,\n });\n\n selectRef.current.on('select', e => onSelect(e));\n map.addInteraction(selectRef.current);\n\n return () => {\n if (selectRef.current) {\n map.removeInteraction(selectRef.current);\n }\n };\n }, [map, selectRef]);\n\n /**\n * Allow to clear\n */\n useImperativeHandle(ref, () => ({\n clear: () => {\n if (selectRef.current) {\n selectRef.current.getFeatures().clear();\n }\n }\n }), [selectRef]);\n\n return null;\n});\n\nexport default SingleClickSelectInteraction;\n","import React, {\n useEffect,\n useRef\n} from 'react';\nimport useMapViewer from '../../context/useMapViewer';\nimport SingleClickSelectInteraction from './SingleClickSelectInteraction';\n\nconst SelectReferenceLayerFeatureInteraction = () => {\n const { referenceLayerFeature: { feature }, selectReferenceLayerFeature } = useMapViewer();\n const selectRef = useRef(null);\n\n const handleOnSelect = event => {\n if (event.selected[0] && !event.selected[0].get('entity')) {\n const feature = event.selected[0];\n selectReferenceLayerFeature(feature);\n }\n };\n\n /**\n * Clear selections when entity is falsy.\n */\n useEffect(() => {\n if (!feature && selectRef.current) {\n selectRef.current.clear();\n }\n }, [feature]);\n\n return (\n \n );\n};\n\nexport default SelectReferenceLayerFeatureInteraction;\n","const randomId = () => {\n const randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26));\n return randLetter + Date.now();\n};\nexport default randomId;\n","import isArray from 'lodash/isArray';\nimport isString from 'lodash/isString';\nimport TileLayer from 'ol/layer/Tile';\nimport { TileArcGISRest } from 'ol/source';\nimport PropTypes from 'prop-types';\nimport {\n useEffect,\n useRef\n} from 'react';\nimport useMap from '../context/useMap';\nimport randomId from '../util/randomId';\n\nconst ArcGISTileLayer = ({ id, zIndex, opacity, visible, url, attributions }) => {\n const { map } = useMap();\n const layersRef = useRef(null);\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n layersRef.current = [];\n const urls = [];\n\n if (isString(url)) {\n urls.push(url);\n } else if (isArray(url)) {\n urls.push(...url);\n }\n\n urls.forEach(layerUrl => {\n\n const tileLayer = new TileLayer({\n id: id,\n zIndex: zIndex,\n opacity: opacity,\n visible: visible,\n source: new TileArcGISRest({\n attributions: attributions,\n url: layerUrl,\n crossOrigin: 'anonymous',\n }),\n });\n map.getLayers().push(tileLayer);\n layersRef.current.push(tileLayer);\n });\n\n return () => {\n if (layersRef.current) {\n layersRef.current.forEach(layer => map.removeLayer(layer));\n }\n };\n }, [map]);\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n const handler = mapEvent => {\n console.log('getZoom', mapEvent.map.getView().getZoom());\n };\n\n //map.on('moveend', handler);\n\n return () => {\n //map.un('moveend', handler);\n };\n }, [map, layersRef.current]);\n\n useEffect(() => {\n if (layersRef.current) {\n layersRef.current.forEach(layer => {\n layer.setZIndex(zIndex);\n layer.setOpacity(opacity);\n layer.setVisible(visible);\n });\n }\n }, [zIndex, opacity, visible]);\n\n return null;\n};\n\n/**\n * TODO Document me\n *\n * https://openlayers.org/en/latest/apidoc/module-ol_layer_Base-BaseLayer.html\n */\nArcGISTileLayer.propTypes = {\n id: PropTypes.any,\n zIndex: PropTypes.number,\n opacity: PropTypes.number,\n visible: PropTypes.bool,\n};\n\nArcGISTileLayer.defaultProps = {\n id: randomId(),\n zIndex: undefined,\n opacity: undefined,\n visible: true,\n};\n\nexport default ArcGISTileLayer;\n","import TileLayer from 'ol/layer/Tile';\nimport OSM from 'ol/source/OSM';\nimport PropTypes from 'prop-types';\nimport {\n useEffect,\n useRef\n} from 'react';\nimport useMap from '../context/useMap';\nimport randomId from '../util/randomId';\n\nconst OpenStreetMapTileLayer = ({ id, zIndex, opacity, visible }) => {\n const { map } = useMap();\n const layerRef = useRef(null);\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n layerRef.current = new TileLayer({\n id: id,\n zIndex: zIndex,\n opacity: opacity,\n visible: visible,\n minZoom: 1,\n maxZoom: 20,\n source: new OSM(),\n });\n\n map.getLayers().push(layerRef.current);\n\n return () => {\n map.removeLayer(layerRef.current);\n };\n }, [map]);\n\n useEffect(() => {\n if (layerRef.current) {\n layerRef.current.setZIndex(zIndex);\n layerRef.current.setOpacity(opacity);\n layerRef.current.setVisible(visible);\n }\n }, [zIndex, opacity, visible]);\n\n return null;\n};\n\n/**\n * TODO Document me\n *\n * https://openlayers.org/en/latest/apidoc/module-ol_layer_Base-BaseLayer.html\n */\nOpenStreetMapTileLayer.propTypes = {\n id: PropTypes.any,\n zIndex: PropTypes.number,\n opacity: PropTypes.number,\n visible: PropTypes.bool,\n};\n\nOpenStreetMapTileLayer.defaultProps = {\n id: randomId(),\n zIndex: undefined,\n opacity: undefined,\n visible: true,\n};\n\nexport default OpenStreetMapTileLayer;\n","import React from 'react';\nimport Layers, { LayerTypes } from '../../../constants/Layers';\nimport ArcGISTileLayer from '../../../map/layer/ArcGISTileLayer';\nimport OpenStreetMapTileLayer from '../../../map/layer/OpenStreetMapTileLayer';\nimport useMapViewer from '../../context/useMapViewer';\n\nconst BaseLayer = () => {\n const { map: { baseLayer } } = useMapViewer();\n\n return Layers.BaseLayers.map(layer => {\n switch (layer.type) {\n case LayerTypes.OpenStreetMap:\n return (\n \n );\n case LayerTypes.ArcGIS:\n return (\n \n );\n default:\n return null;\n }\n });\n};\n\nexport default BaseLayer;\n","import VectorLayer from 'ol/layer/Vector';\nimport VectorSource from 'ol/source/Vector';\nimport {\n useEffect,\n useRef\n} from 'react';\nimport useMap from '../context/useMap';\n\nconst FeaturesLayer = ({ id, zIndex, opacity, visible, features }) => {\n const { map } = useMap();\n const sourceRef = useRef(null);\n const layerRef = useRef(null);\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n sourceRef.current = new VectorSource({\n features: features\n });\n\n layerRef.current = new VectorLayer({\n id: id,\n zIndex: zIndex,\n opacity: opacity,\n visible: visible,\n source: sourceRef.current\n });\n\n map.getLayers().push(layerRef.current);\n\n\n return () => {\n map.removeLayer(layerRef.current);\n };\n }, [map]);\n\n useEffect(() => {\n if (sourceRef.current === null) {\n return;\n }\n\n sourceRef.current.clear();\n\n if (Array.isArray(features)) {\n features.forEach(f => {\n sourceRef.current.addFeature(f);\n });\n }\n }, [features]);\n\n return null;\n};\n\nexport default FeaturesLayer;\n","import WKT from 'ol/format/WKT';\nimport {\n Fill,\n Icon,\n Stroke,\n Style\n} from 'ol/style';\nimport PropTypes from 'prop-types';\nimport React, {\n useEffect,\n useState\n} from 'react';\nimport EntityTypes from '../../../constants/EntityTypes';\nimport MapConstants from '../../../constants/MapConstants';\nimport useMap from '../../../map/context/useMap';\nimport FeaturesLayer from '../../../map/layer/FeaturesLayer';\nimport useMapViewer from '../../context/useMapViewer';\n\nconst isEntityType = (entityType, entity) => entity.extra.type === entityType;\n\nconst hasLocation = entity => {\n if (Array.isArray(entity.locations)) {\n return entity.locations.length > 0;\n }\n return false;\n};\n\nconst format = new WKT();\n\nconst EntityFeaturesLayer = ({ entityType }) => {\n const { map } = useMap();\n const { search: { results }, selection: { hasSelection, item: entity, entityLocation } } = useMapViewer();\n const [features, setFeatures] = useState([]);\n\n const style = new Style({\n image: new Icon({\n color: EntityTypes[entityType].colorMarker,\n crossOrigin: 'anonymous',\n src: 'images/dot.png',\n }),\n stroke: new Stroke({\n color: 'rgba(0, 100, 0, 0.9)',\n width: 3\n }),\n fill: new Fill({\n color: 'rgba(0, 255, 20, 0.2)'\n })\n });\n\n /**\n * Setup features when search results are updated.\n */\n useEffect(() => {\n const features = [];\n\n results.forEach((entity, index) => {\n if (isEntityType(entityType, entity) && hasLocation(entity)) {\n entity.locations.forEach(location => {\n const feature = format.readFeature(location.geometry, {\n dataProjection: 'EPSG:4326',\n featureProjection: 'EPSG:3857'\n });\n feature.setProperties({ entity, index, entityLocation: location });\n feature.setId(`${entity.id}-${location.id}`);\n feature.setStyle(style);\n features.push(feature);\n });\n }\n });\n\n setFeatures(features);\n }, [results]);\n\n /**\n * When entity is selected pan to it's location.\n */\n useEffect(() => {\n if (!entity) {\n return;\n }\n\n if (entity.extra.type !== entityType) {\n return;\n }\n\n if (entity.extra.hasLocation) {\n const geometry = (entityLocation && entityLocation.geometry) || entity.locations[0].geometry;\n\n const feature = format.readFeatureFromText(geometry, {\n dataProjection: 'EPSG:4326',\n featureProjection: 'EPSG:3857'\n });\n\n const resolution = map.getView().getResolutionForZoom(map.getView().getZoom());\n\n map.getView().fit(feature.getGeometry().getExtent(), {\n padding: [0, 0, 0, MapConstants.omniBox.width * 2],\n duration: 1000,\n minResolution: resolution\n });\n }\n\n }, [entity, hasSelection, map]);\n\n return (\n \n );\n};\n\nEntityFeaturesLayer.propTypes = {\n entityType: PropTypes.string.isRequired,\n};\n\nexport default EntityFeaturesLayer;\n","import Feature from 'ol/Feature';\nimport Point from 'ol/geom/Point';\nimport Circle from 'ol/style/Circle';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport Style from 'ol/style/Style';\nimport React, {\n useEffect,\n useState\n} from 'react';\nimport useMap from '../../../map/context/useMap';\nimport FeaturesLayer from '../../../map/layer/FeaturesLayer';\nimport { toWebMercatorCenter } from '../../../map/util/transform';\n\nconst MyLocationLayer = () => {\n const { map } = useMap();\n const [myLocation, setMyLocation] = useState(null); // array\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n const success = position => {\n if (position.coords) {\n const { longitude, latitude } = position.coords;\n\n const feature = new Feature({\n type: 'icon',\n geometry: new Point(toWebMercatorCenter([longitude, latitude]))\n });\n\n const styles = [\n new Style({\n image: new Circle({\n radius: 14,\n fill: new Fill({\n color: 'rgba(51, 153, 204, 0.3)',\n }),\n }),\n }),\n new Style({\n image: new Circle({\n radius: 6,\n fill: new Fill({\n color: 'rgba(51, 153, 204, 0.9)',\n }),\n stroke: new Stroke({\n color: '#fff',\n width: 2,\n }),\n }),\n }),\n ];\n\n feature.setStyle(styles);\n\n setMyLocation([feature]);\n }\n };\n\n const error = () => {}; // swallow it.\n\n if (!navigator.geolocation) {\n window.alert('Geolocation is not supported by your browser');\n return;\n }\n\n navigator.geolocation.getCurrentPosition(success, error);\n\n }, [map]);\n\n return (\n \n );\n};\n\nexport default MyLocationLayer;\n","import axios from 'axios';\nimport EsriJSON from 'ol/format/EsriJSON';\nimport { Vector as VectorLayer } from 'ol/layer';\nimport { tile as tileStrategy } from 'ol/loadingstrategy';\nimport VectorSource from 'ol/source/Vector';\nimport {\n Fill,\n Stroke,\n Style\n} from 'ol/style';\nimport { createXYZ } from 'ol/tilegrid';\nimport React, { useEffect } from 'react';\nimport { isOk } from '../../map-viewer/context/api';\nimport useMap from '../context/useMap';\n\nconst esriJsonFormat = new EsriJSON();\n\nconst ArcGISFeatureService = ({ url: serviceUrl, layerId, color, minZoom, extraKey = 'extra', extraProperties }) => {\n const { map } = useMap();\n\n useEffect(() => {\n if (!map) {\n return;\n }\n\n const vectorSource = new VectorSource({\n loader: function (extent, resolution, projection) {\n const url = serviceUrl + '/' + layerId + '/query/?f=json&' +\n 'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' +\n encodeURIComponent('{\"xmin\":' + extent[0] + ',\"ymin\":' +\n extent[1] + ',\"xmax\":' + extent[2] + ',\"ymax\":' + extent[3] +\n ',\"spatialReference\":{\"wkid\":102100}}') +\n '&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*' +\n '&outSR=102100';\n\n axios.get(url).then(response => {\n if (isOk(response)) {\n\n const features = esriJsonFormat.readFeatures(response.data, {\n featureProjection: projection\n });\n\n features.forEach(feature => {\n feature.set(extraKey, extraProperties);\n });\n\n if (features.length > 0) {\n vectorSource.addFeatures(features);\n }\n }\n });\n\n },\n strategy: tileStrategy(createXYZ({\n tileSize: 512\n }))\n });\n\n const vector = new VectorLayer({\n minZoom: minZoom,\n source: vectorSource,\n style: function (feature) {\n return new Style({\n fill: new Fill({\n color: color\n }),\n stroke: new Stroke({\n color: 'rgba(110, 110, 110, 255)',\n width: 0.4\n })\n });\n }\n });\n\n map.getLayers().push(vector);\n\n return () => {\n map.removeLayer(vector);\n };\n }, [map]);\n\n return null;\n};\n\nexport default ArcGISFeatureService;\n","import React from 'react';\nimport ArcGISFeatureService from '../../../map/layer/ArcGISFeatureService';\nimport useMapViewer from '../../context/useMapViewer';\n\nconst ReferenceLayers = ({}) => {\n const { map: { referenceLayers } } = useMapViewer();\n\n return referenceLayers.map(layer => (\n \n ));\n};\n\nexport default ReferenceLayers;\n","import { Box, Text } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport EntityTypes from \"../../../../constants/EntityTypes\";\nimport { colorMap } from \"../../../../theme/themeMapping\";\n\nconst DetailTitle = ({ entity, rootMarginBottom = \"medium\" }) => {\n return (\n \n \n {EntityTypes[entity.extra.type].label}\n \n \n {entity.extra.title}\n \n \n );\n};\n\nexport default DetailTitle;\n","import { Text } from \"@modernary/ui-kit-core\";\nimport moment from \"moment\";\nimport React from \"react\";\nimport { colorMap } from \"../../../../theme/themeMapping\";\n\nconst utcDateRegex = /^\\d{4}-\\d{2}-\\d{2}/;\nconst isDate = (str) => utcDateRegex.test(str);\n\nconst formatValue = (value) => {\n if (isDate(value)) {\n return moment(value).format(\"ll\");\n }\n return value;\n};\n\nconst Value = ({ children, fontSize }) => {\n if (!children) {\n return (\n \n —\n \n );\n }\n return (\n \n {formatValue(children)}\n \n );\n};\n\nexport default Value;\n","import React from 'react';\nimport Value from './Value';\n\nconst formatStreetLine2 = (city, state, zipCode) => {\n const parts = [];\n if (city) {\n parts.push(`${city},`);\n }\n parts.push(state, zipCode);\n return parts.join(' ');\n};\n\nconst ValueAddress = ({ entity }) => {\n const { street, city, state, zipCode, island } = entity;\n return (\n <>\n {street || ' '}\n {formatStreetLine2(city, state, zipCode)}\n {island && {island.name}}\n \n );\n};\n\nexport default ValueAddress;\n","import {\n createEmpty,\n extend\n} from 'ol/extent';\nimport WKT from 'ol/format/WKT';\n\nconst format = new WKT();\n\nexport default entity => {\n let ext = createEmpty();\n\n entity.locations.forEach(location => {\n const geometry = format.readGeometryFromText(location.geometry, {\n dataProjection: 'EPSG:4326',\n featureProjection: 'EPSG:3857'\n });\n ext = extend(ext, geometry.getExtent());\n });\n\n return ext;\n};\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport styled from '@emotion/styled/macro';\nimport Color from 'color';\nimport theme, { spacing } from '../theme/theme';\nimport {\n colorMap,\n typeScaleMap\n} from '../theme/themeMapping';\n\nconst paddingHStandard = spacing.screenEdgeMarginH;\nconst paddingVStandard = 22;\nconst bgColor = colorMap.cardBgColor;\n// const bgColorActive = colorMap.transparentHighlight;\nconst hoverColor = colorMap.cardHover;\nconst activeColor = colorMap.cardActive;\nconst bodyFontSize = typeScaleMap.cardBody;\n\n// padding-top: ${(inputHeight - inputFontSize - inputBorderWidth) / 2}px;\n// padding-bottom: ${(inputHeight - inputFontSize - inputBorderWidth) / 2}px;\n\nexport const ItemPanelBase = props => css`\n padding-top: ${props.paddingV != null ? props.paddingV : paddingVStandard}px;\n padding-bottom: ${props.paddingV != null ? props.paddingV : paddingVStandard}px;\n padding-left: ${props.paddingH != null ? props.paddingH : paddingHStandard}px;\n padding-right: ${props.paddingH != null ? props.paddingH : paddingHStandard}px;\n font-size: ${bodyFontSize}px;\n background: ${bgColor};\n color: ${colorMap.normalText};\n`;\n\nexport const ItemPanelClickable = props => css`\n cursor: pointer;\n transition: ${theme.transitions.listItemBg};\n`;\n\nexport const ItemPanelHover = props => css`\n background-color: ${hoverColor};\n`;\n\nexport const ItemPanelClick = props => css`\n background-color: ${Color(hoverColor).darken(.2).toString()};\n`;\n\nconst ItemPanel = styled.div`\n ${ItemPanelBase}\n ${props => props.clickable && !props.isActive && ItemPanelClickable}\n &:hover {\n ${props => props.clickable && !props.isActive && ItemPanelHover}\n }\n &:active {\n ${props => props.clickable && !props.isActive && ItemPanelClick}\n }\n`;\n\nexport default ItemPanel;\n","import React from \"react\";\r\nimport styled from \"@emotion/styled/macro\";\r\nimport { colorMap, layoutSpacing, typeScaleMap } from \"../theme/themeMapping\";\r\nimport { Heading4, CutoffText, DiminishedText } from \"../theme/commonType\";\r\nimport ItemPanel from \"./ItemPanel\";\r\nimport { FlexContainer, FlexItem } from \"./CommonLayout\";\r\nimport { Button, HollowBlueButton } from \"./Buttons\";\r\n\r\n//margin: 0 ${layoutSpacing.listPaddingH}px;\r\nconst ListItemPadV = 20;\r\n// const ListItem = styled(ItemPanel)`\r\n// padding: ${ListItemPadV}px ${layoutSpacing.listPaddingH}px 0;\r\n// `\r\nconst ListItemStyle = styled(ItemPanel)`\r\n padding: ${ListItemPadV}px ${layoutSpacing.listPaddingH}px;\r\n border: 1px solid gainsboro;\r\n margin: 12px 0;\r\n border-radius: 5px;\r\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.13);\r\n border-color: transparent;\r\n &:first-of-type {\r\n margin-top: 0;\r\n }\r\n`;\r\nexport const ListItemTitle = styled(Heading4)`\r\n font-size: ${typeScaleMap.listSearchHeadings}px;\r\n font-weight: 600;\r\n margin-bottom: 12px;\r\n`;\r\nexport const ListItemText = styled.div`\r\n font-size: 14px;\r\n color: ${colorMap.normalText};\r\n margin: 0;\r\n`;\r\nexport const ListItemActions = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n &:not(:first-of-type) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst SearchListSequence = styled.div`\r\n /* & > *:not(:last-child) {\r\n margin-bottom: 16px;\r\n } */\r\n`;\r\n\r\nconst StatusLabel = styled.span`\r\n background-color: #ccc;\r\n color: white;\r\n text-transform: uppercase;\r\n letter-spacing: 0.06em;\r\n font-size: 12px;\r\n font-weight: 500;\r\n padding: 3px 5px;\r\n border-radius: 3px;\r\n`;\r\n\r\nexport const PostedDate = styled.span`\r\n font-weight: 600;\r\n`;\r\nconst InactiveDate = styled(DiminishedText)`\r\n font-weight: 500;\r\n`;\r\n\r\nfunction ListItem({ item, ...props }) {\r\n return (\r\n \r\n \r\n \r\n {item.searchTitleName}\r\n \r\n \r\n {item.searchStatusText}\r\n \r\n \r\n \r\n {item.searchDescriptionText}\r\n \r\n {props.isExpanded && (\r\n \r\n \r\n View in program system\r\n \r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nconst MemoizedItem = React.memo(ListItem);\r\n\r\nexport const SearchListItems = (props) => {\r\n return (\r\n \r\n {props.results &&\r\n props.results.map((item, index) => (\r\n window.location = item.entityUrl}\r\n onClick={() => props.handleItemClick(item.id)}\r\n isExpanded={props.expandedItemId === item.id}\r\n item={item}\r\n />\r\n ))}\r\n \r\n );\r\n};\r\n","import styled from \"@emotion/styled\";\nimport { Absolute, Box, Button, Flex, Icons, Text } from \"@modernary/ui-kit-core\";\nimport isString from \"lodash/isString\";\nimport OLOverlay from \"ol/Overlay\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ListItemTitle } from \"../../../components/SearchListItems\";\nimport useMap from \"../../../map/context/useMap\";\n\nconst OverlayRoot = styled(Absolute)`\n position: absolute;\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n border: 1px solid #cccccc;\n bottom: 12px;\n left: -50px;\n\n &:after,\n &:before {\n top: 100%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n\n &:after {\n border-top-color: white;\n border-width: 10px;\n left: 48px;\n margin-left: -10px;\n }\n\n &:before {\n border-top-color: #cccccc;\n border-width: 11px;\n left: 48px;\n margin-left: -11px;\n }\n`;\n\nconst Title = ({ children }) => {\n return (\n \n {children}\n \n );\n};\n\nconst Overlay = ({ title, position, style, children, onAfterClose }) => {\n const { map } = useMap();\n const overlayRef = useRef(null);\n const elementRef = useRef(null);\n\n /**\n * Setup ol/Overlay\n */\n useEffect(() => {\n if (elementRef.current) {\n overlayRef.current = new OLOverlay({\n element: elementRef.current,\n autoPan: true,\n autoPanAnimation: {\n duration: 250,\n },\n });\n }\n }, [elementRef]);\n\n /**\n * Push overlay onto map.\n */\n useEffect(() => {\n if (!map) {\n return;\n }\n\n if (!overlayRef.current) {\n return;\n }\n\n map.getOverlays().push(overlayRef.current);\n }, [map, overlayRef]);\n\n /**\n * Update position.\n */\n useEffect(() => {\n if (!overlayRef.current) {\n return;\n }\n overlayRef.current.setPosition(position);\n }, [position]);\n\n /**\n * Handle closing overlay.\n */\n const handleOnClickClose = () => {\n overlayRef.current.setPosition(undefined);\n onAfterClose && onAfterClose();\n };\n\n const componentTitle = isString(title) ? (\n {title}\n ) : (\n {title}\n );\n\n return (\n \n \n \n {componentTitle}\n \n \n \n \n \n \n {children}\n \n \n );\n};\n\nexport default Overlay;\n","import { Box } from \"@modernary/ui-kit-core\";\nimport { getCenter } from \"ol/extent\";\nimport WKT from \"ol/format/WKT\";\nimport React, { useEffect, useState } from \"react\";\nimport EntityTypes from \"../../../constants/EntityTypes\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport DetailTitle from \"../../flyout/detail/components/DetailTitle\";\nimport ValueAddress from \"../../flyout/detail/components/ValueAddress\";\nimport extentEntityLocations from \"../util/extentEntityLocations\";\nimport Overlay from \"./Overlay\";\n\nconst format = new WKT();\n\nconst EntityOverlay = () => {\n const {\n selection: { item: entity, clickCoordinates },\n deselectResultItem,\n } = useMapViewer();\n const [position, setPosition] = useState(null);\n\n /**\n * Update position when entity changes.\n */\n useEffect(() => {\n if (!entity) {\n setPosition(undefined);\n return;\n }\n\n if (clickCoordinates) {\n setPosition(clickCoordinates);\n } else if (entity.extra.hasLocation) {\n if (entity.locations[0].centroid) {\n const point = format.readGeometryFromText(entity.locations[0].centroid, {\n dataProjection: \"EPSG:4326\",\n featureProjection: \"EPSG:3857\",\n });\n setPosition(point.getCoordinates());\n } else {\n const extent = extentEntityLocations(entity);\n setPosition(getCenter(extent));\n }\n } else {\n setPosition(undefined);\n }\n }, [entity, clickCoordinates]);\n\n const style = {\n borderTopWidth: 2,\n borderTopColor: entity && EntityTypes[entity.extra.type].colorMarker,\n width: 320,\n };\n\n const title = entity ? : null;\n\n return (\n \n {entity && (\n \n \n \n )}\n \n );\n};\n\nexport default EntityOverlay;\n","import { Text } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport { colorMap } from \"../../../../theme/themeMapping\";\n\nconst Label = ({ children, ...rest }) => {\n return (\n \n {children}\n \n );\n};\n\nexport default Label;\n","import { Flex } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport Label from \"./Label\";\nimport Value from \"./Value\";\n\nconst LABEL_WIDTH = 120;\n\nconst DetailRow = ({ label, value, vertical, children, labelProps }) => {\n return (\n \n {label && (\n \n \n \n )}\n \n {children && children}\n {!children && {value}}\n \n \n );\n};\n\nexport default DetailRow;\n","export default number => new Intl.NumberFormat('en-US').format(number);\n","import { Box, Link } from \"@modernary/ui-kit-core\";\nimport React, { useEffect, useState } from \"react\";\nimport { centerOfExtent } from \"../../../map/util/transform\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport DetailRow from \"../../flyout/detail/components/DetailRow\";\nimport formatNumber from \"../../util/formatNumber\";\nimport Overlay from \"./Overlay\";\n\nconst ReferenceLayerFeatureOverlay = () => {\n const {\n referenceLayerFeature: { feature },\n deselectReferenceLayerFeature,\n } = useMapViewer();\n const [position, setPosition] = useState(null);\n const [data, setData] = useState(null);\n const [title, setTitle] = useState(null);\n\n /**\n * Update position when entity changes.\n */\n useEffect(() => {\n if (!feature) {\n setPosition(undefined);\n setData(undefined);\n return;\n }\n\n //\n // update data\n //\n const data = feature.getProperties();\n setData(data);\n\n //\n // update title\n //\n if (feature.get(\"extra\").layer) {\n setTitle(feature.get(\"extra\").layer.title);\n }\n\n //\n // update position\n //\n const geometry = feature.getGeometry();\n const extent = geometry.getExtent();\n setPosition(centerOfExtent(extent));\n }, [feature]);\n\n const style = {\n width: 300,\n };\n\n const gisAcres = data && formatNumber(Number.parseFloat(data[\"gisacres\"]));\n\n return (\n \n \n {data && (\n <>\n \n \n \n \n qPublic.net\n \n \n \n )}\n \n \n );\n};\n\nexport default ReferenceLayerFeatureOverlay;\n","import styled from '@emotion/styled';\nimport { position } from 'styled-system';\nimport { layout } from '../../styleFunctions/StyleFunctions';\n\nconst MapContainer = styled.div`\n ${position}\n ${layout}\n`;\n\nexport default MapContainer;\n","import 'ol/ol.css';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport MapStateProvider from './context/MapStateProvider';\nimport './Map.css';\nimport MapContainer from './styled/MapContainer';\n\nconst Map = ({ children, id, center, extent, zoom, width, height, maxZoom }) => {\n return (\n \n \n {children}\n \n \n );\n};\n\n/**\n * TODO Document me\n */\nMap.propTypes = {\n id: PropTypes.string.isRequired,\n center: PropTypes.array,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n};\n\nMap.defaultProps = {\n center: undefined,\n width: '100%',\n height: '100%',\n};\n\nexport default Map;\n","import React from 'react';\nimport MapConstants from '../../constants/MapConstants';\nimport Map from '../../map/Map';\nimport useMapViewer from '../context/useMapViewer';\n\nconst ViewerMap = ({ children }) => {\n const { map: { maxZoom } } = useMapViewer();\n\n return (\n \n {children}\n \n );\n};\n\nexport default ViewerMap;\n","import {\n createEmpty,\n extend\n} from 'ol/extent';\nimport WKT from 'ol/format/WKT';\nimport {\n Fill,\n Icon,\n Stroke,\n Style,\n} from 'ol/style';\nimport PropTypes from 'prop-types';\nimport React, {\n useEffect,\n useState\n} from 'react';\nimport EntityTypes from '../../../constants/EntityTypes';\nimport useMap from '../../../map/context/useMap';\nimport FeaturesLayer from '../../../map/layer/FeaturesLayer';\nimport extentEntityLocations from '../util/extentEntityLocations';\n\nconst hasLocation = entity => {\n if (Array.isArray(entity.locations)) {\n return entity.locations.length > 0;\n }\n return false;\n};\n\nconst format = new WKT();\n\nconst EntityLayer = ({ entity }) => {\n const { map } = useMap();\n const [features, setFeatures] = useState([]);\n\n const entityType = entity.extra.type;\n\n const style = new Style({\n image: new Icon({\n color: EntityTypes[entityType].colorMarker,\n crossOrigin: 'anonymous',\n src: 'images/dot.png',\n }),\n stroke: new Stroke({\n color: 'rgba(0, 100, 0, 0.9)',\n width: 3\n }),\n fill: new Fill({\n color: 'rgba(0, 255, 20, 0.2)'\n })\n });\n\n /**\n * Add features.\n */\n useEffect(() => {\n if (!hasLocation(entity)) {\n return;\n }\n\n const features = [];\n\n entity.locations.forEach(location => {\n const feature = format.readFeature(location.geometry, {\n dataProjection: 'EPSG:4326',\n featureProjection: 'EPSG:3857'\n });\n feature.setId(`${entity.id}-${location.id}`);\n feature.setStyle(style);\n features.push(feature);\n });\n\n setFeatures(features);\n }, [entity]);\n\n /**\n * Zoom to entity\n */\n useEffect(() => {\n if (!map) {\n return;\n }\n\n if (!entity) {\n return;\n }\n\n if (!entity.extra.hasLocation) {\n return;\n }\n\n let ext = extentEntityLocations(entity);\n const resolution = map.getView().getResolutionForZoom(map.getView().getZoom());\n const padding = 15;\n\n map.getView().fit(ext, {\n padding: [padding, padding, padding, padding],\n duration: 1000,\n minResolution: resolution\n });\n\n }, [features]);\n\n return (\n \n );\n};\n\nEntityLayer.propTypes = {\n entity: PropTypes.object.isRequired,\n};\n\nexport default EntityLayer;\n","import React from 'react';\nimport Map from '../../../../map/Map';\nimport { toLonLatExtent } from '../../../../map/util/transform';\nimport useMapViewer from '../../../context/useMapViewer';\nimport BaseLayer from '../../../map/layer/BaseLayer';\nimport EntityLayer from '../../../map/layer/EntityLayer';\nimport extentEntityLocations from '../../../map/util/extentEntityLocations';\nimport DetailRow from './DetailRow';\n\nconst DetailMapInsert = ({ entity }) => {\n const { map: { maxZoom } } = useMapViewer();\n\n if (!entity.extra.hasLocation) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n );\n};\n\nexport default DetailMapInsert;\n","import { Box } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport { HollowBlueButton } from \"../../../../components/Buttons\";\nimport EntityTypes from \"../../../../constants/EntityTypes\";\nimport { colors } from \"../../../../theme/theme\";\n\n// This is for the HollowBlueButton because child\n// themeProvider (EHA > Windsor UI-KIT) can't access\n// parent themeprovider values.\nconst style = {\n borderColor: colors.electricBlue,\n color: colors.electricBlue,\n};\n\nconst DetailSourceSystemLink = ({ entity }) => {\n const url = EntityTypes[entity.extra.type].getSourceSystemLink(entity);\n return (\n \n \n View in program system\n \n \n );\n};\n\nexport default DetailSourceSystemLink;\n","import React from 'react';\nimport DetailMapInsert from './components/DetailMapInsert';\nimport DetailRow from './components/DetailRow';\nimport DetailSourceSystemLink from './components/DetailSourceSystemLink';\n\nconst AirPollutionSourceDetail = ({ entity }) => {\n return (\n <>\n \n \n \n \n \n \n );\n};\n\nexport default AirPollutionSourceDetail;\n","import React from 'react';\nimport DetailRow from './DetailRow';\nimport ValueAddress from './ValueAddress';\n\nconst DetailAddress = ({ entity }) => {\n return (\n \n \n \n );\n};\n\nexport default DetailAddress;\n","import React from 'react';\nimport DetailMapInsert from './components/DetailMapInsert';\nimport DetailRow from './components/DetailRow';\nimport DetailSourceSystemLink from './components/DetailSourceSystemLink';\n\nconst EmergencyReleaseDetail = ({ entity }) => {\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default EmergencyReleaseDetail;\n","import React from 'react';\nimport DetailMapInsert from './components/DetailMapInsert';\nimport DetailRow from './components/DetailRow';\nimport DetailSourceSystemLink from './components/DetailSourceSystemLink';\n\nconst RemediationSiteDetail = ({ entity }) => {\n return (\n <>\n \n \n \n \n \n \n );\n};\n\nexport default RemediationSiteDetail;\n","import React from 'react';\nimport DetailMapInsert from './components/DetailMapInsert';\nimport DetailRow from './components/DetailRow';\nimport DetailSourceSystemLink from './components/DetailSourceSystemLink';\n\nconst getOperatorName = entity => {\n if (entity.affiliatedOrganizations && entity.affiliatedOrganizations.length > 0) {\n return entity.affiliatedOrganizations[0].organization.name;\n }\n};\n\nconst UicFacilityDetail = ({ entity }) => {\n return (\n <>\n \n \n \n \n \n );\n};\n\nexport default UicFacilityDetail;\n","import React from 'react';\nimport DetailMapInsert from './components/DetailMapInsert';\nimport DetailRow from './components/DetailRow';\nimport DetailSourceSystemLink from './components/DetailSourceSystemLink';\n\nconst WaterQualityAdvisoryDetail = ({ entity }) => {\n return (\n <>\n \n \n \n \n \n \n \n \n );\n};\n\nexport default WaterQualityAdvisoryDetail;\n","import React from \"react\";\r\nimport DetailMapInsert from \"./components/DetailMapInsert\";\r\nimport DetailRow from \"./components/DetailRow\";\r\nimport DetailSourceSystemLink from \"./components/DetailSourceSystemLink\";\r\nimport moment from \"moment\";\r\nimport { handlerSourceTypes, hwGenerators } from \"../../../constants/HwEnums\";\r\n\r\nconst getLocalMoment = (date) => {\r\n if (date && typeof date === \"string\" && date.length > 10 && !date.toString().endsWith(\"Z\")) {\r\n date += \"Z\";\r\n }\r\n return moment(date);\r\n};\r\n\r\nconst HwHandlersDetail = ({ entity }) => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default HwHandlersDetail;\r\n","export const facilitySiteOwnershipTypes = new Map([\r\n [\"CTG\", { id: \"CTG\", value: \"CTG\", description: \"City Government\", isActive: true }],\r\n [\"FED\", { id: \"FED\", value: \"FED\", description: \"Federal\", isActive: true }],\r\n [\"IND\", { id: \"IND\", value: \"IND\", description: \"Industrial\", isActive: true }],\r\n [\"MIG\", { id: \"MIG\", value: \"MIG\", description: \"Migrated\", isActive: false }],\r\n [\"MS4\", { id: \"MS4\", value: \"MS4\", description: \"MS4\", isActive: true }],\r\n [\"MUN\", { id: \"MUN\", value: \"MUN\", description: \"Municipal\", isActive: true }],\r\n [\"MWD\", { id: \"MWD\", value: \"MWD\", description: \"Municipal or Water District\", isActive: true }],\r\n [\"POF\", { id: \"POF\", value: \"POF\", description: \"Privately Owned Facility\", isActive: true }],\r\n [\"STF\", { id: \"STF\", value: \"STF\", description: \"State Government\", isActive: true }],\r\n]);\r\n","import axios from \"axios\";\r\nimport React, { useDeferredValue, useState } from \"react\";\r\nimport DetailMapInsert from \"./components/DetailMapInsert\";\r\nimport DetailRow from \"./components/DetailRow\";\r\nimport DetailSourceSystemLink from \"./components/DetailSourceSystemLink\";\r\nimport { facilitySiteOwnershipTypes } from \"../../../constants/NpdesEnums\";\r\nimport EntityTypes from \"../../../constants/EntityTypes\";\r\n\r\nconst NpdesFacilitiesDetail = ({ entity }) => {\r\n const [sicCode, setSicCode] = useState(\"\");\r\n const [naicsCode, setNaicsCode] = useState(\"\");\r\n\r\n let index = entity.sicCodes?.findIndex((x) => x.isPrimary) ?? -1;\r\n if (index > -1) {\r\n axios\r\n .get(EntityTypes.npdesFacilities.sicEndpoint + \"/\" + entity.sicCodes[index].sicId)\r\n .then((result) => {\r\n setSicCode(`${result.data.code} - ${result.data.description}`);\r\n });\r\n } else if (sicCode !== \"\") {\r\n setSicCode(\"\");\r\n }\r\n\r\n index = entity.naicsCodes?.findIndex((x) => x.isPrimary) ?? -1;\r\n if (index > -1) {\r\n axios\r\n .get(EntityTypes.npdesFacilities.naicsEndpoint + \"/\" + entity.naicsCodes[index].naicsId)\r\n .then((result) => {\r\n setNaicsCode(`${result.data.code} - ${result.data.description}`);\r\n });\r\n } else if (naicsCode !== \"\") {\r\n setNaicsCode(\"\");\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default NpdesFacilitiesDetail;\r\n","import { BorderBox, Box, Button, Flex, Icons } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport EntityTypes from \"../../../constants/EntityTypes\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport AirPollutionSourceDetail from \"./AirPollutionSourceDetail\";\nimport DetailAddress from \"./components/DetailAddress\";\nimport DetailTitle from \"./components/DetailTitle\";\nimport EmergencyReleaseDetail from \"./EmergencyReleaseDetail\";\nimport RemediationSiteDetail from \"./RemediationSiteDetail\";\nimport UicFacilityDetail from \"./UicFacilityDetail\";\nimport WaterQualityAdvisoryDetail from \"./WaterQualityAdvisoryDetail\";\nimport HwHandlersDetail from \"./HwHandlersDetail\";\nimport NpdesFacilitiesDetail from \"./NpdesFacilitiesDetail\";\n\nconst EntityDetail = ({ entity }) => {\n const { deselectResultItem } = useMapViewer();\n\n if (!entity) {\n return null;\n }\n\n let entityComponent =
Entity not supported: {entity.extra.type}
;\n\n switch (entity.extra.type) {\n case EntityTypes.airPollutionSources.id:\n entityComponent = ;\n break;\n case EntityTypes.uicFacilities.id:\n entityComponent = ;\n break;\n case EntityTypes.remediationSites.id:\n entityComponent = ;\n break;\n case EntityTypes.emergencyReleases.id:\n entityComponent = ;\n break;\n case EntityTypes.waterQualityAdvisories.id:\n entityComponent = ;\n break;\n case EntityTypes.hwHandlers.id:\n entityComponent = ;\n break;\n case EntityTypes.npdesFacilities.id:\n entityComponent = ;\n break;\n default:\n break;\n }\n\n const handleOnClickClose = () => {\n deselectResultItem();\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n {entityComponent}\n \n \n );\n};\n\nexport default EntityDetail;\n","import styled from \"@emotion/styled\";\nimport { Box, Button, Checkbox, Flex, Icon, Icons, Text } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport { ListItemTitle } from \"../../../components/SearchListItems\";\nimport EntityTypes from \"../../../constants/EntityTypes\";\nimport { colors } from \"../../../theme/theme\";\nimport useMapViewer from \"../../context/useMapViewer\";\n\nconst FlexRoot = styled(Flex)`\n &:hover {\n cursor: pointer;\n }\n`;\n\nconst SearchOptions = () => {\n const {\n toggleSearchOptions,\n executeSearch,\n search: { term },\n searchOptions,\n } = useMapViewer();\n\n const isSelected = (entity) =>\n searchOptions.entityTypes.find((e) => e.id === entity.id) !== undefined;\n\n const handleOnToggleEntity = async (entity) => {\n const found = searchOptions.entityTypes.find((e) => e.id === entity.id);\n let nextEntityTypes;\n\n if (found) {\n nextEntityTypes = searchOptions.entityTypes.filter((e) => e.id !== found.id);\n } else {\n nextEntityTypes = [...searchOptions.entityTypes, entity];\n }\n\n const nextSearchOptions = {\n ...searchOptions,\n entityTypes: nextEntityTypes,\n };\n\n await executeSearch(term, nextSearchOptions);\n };\n\n return (\n <>\n \n \n Search Options\n \n \n \n \n \n \n {Object.values(EntityTypes).map((entity) => {\n const isDisabled = searchOptions.entityTypes.length <= 1 && isSelected(entity);\n return (\n !isDisabled && handleOnToggleEntity(entity)}\n mb=\"medium\"\n >\n \n \n \n \n \n \n \n \n {entity.label}\n \n \n {entity.description}\n \n \n \n );\n })}\n \n \n );\n};\n\nexport default SearchOptions;\n","import styled from \"@emotion/styled\";\nimport { Absolute } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport { Flipped, Flipper } from \"react-flip-toolkit\";\nimport FlyoutPanels from \"../../constants/FlyoutPanels\";\nimport useMapViewer from \"../context/useMapViewer\";\nimport EntityDetail from \"./detail/EntityDetail\";\nimport SearchOptions from \"./search/SearchOptions\";\n\nconst FLIP_ID = \"fullscreen\";\n\nconst Root = styled(Absolute)`\n background-color: white;\n width: 100%;\n height: 100%;\n overflow: hidden;\n overflow-y: auto;\n`;\n\nconst HiddenRoot = styled(Root)`\n transform: translateX(0%);\n`;\n\nconst ShowingRoot = styled(Root)`\n transform: translateX(100%);\n`;\n\nconst HiddenRootFlipped = ({ item, flyOutPanel }) => (\n \n \n {flyOutPanel === FlyoutPanels.EntityDetails && }\n {flyOutPanel === FlyoutPanels.SearchOptions && }\n \n \n);\n\nconst ShowingRootFlipped = ({ item, flyOutPanel }) => (\n \n \n {flyOutPanel === FlyoutPanels.EntityDetails && }\n {flyOutPanel === FlyoutPanels.SearchOptions && }\n \n \n);\n\nconst FlyoutRoot = () => {\n const {\n selection: { hasSelection, item },\n omniBox: { isFlyoutOpen, flyOutPanel },\n } = useMapViewer();\n\n return (\n \n {isFlyoutOpen ? (\n \n ) : (\n \n )}\n \n );\n};\n\nexport default FlyoutRoot;\n","import { Box } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\n\nconst EmptyResults = ({ term }) => {\n return (\n \n No results found for: {term}\n \n );\n};\n\nexport default EmptyResults;\n","import { Box } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\n\nconst SearchError = ({ error }) => {\n return {error};\n};\n\nexport default SearchError;\n","import { Icon, Icons } from \"@modernary/ui-kit-core\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport EntityTypes from \"../../constants/EntityTypes\";\n\nconst EntityIndicator = ({ entity, size }) => {\n const type = entity.extra.type;\n return ;\n};\n\nEntityIndicator.propTypes = {\n entity: PropTypes.object.isRequired,\n size: PropTypes.number,\n};\n\nEntityIndicator.defaultProps = {\n size: 16,\n};\n\nexport default EntityIndicator;\n","import styled from \"@emotion/styled\";\nimport { BorderBox, Flex } from \"@modernary/ui-kit-core\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport { ListItemText } from \"../../components/SearchListItems\";\nimport EntityTypes from \"../../constants/EntityTypes\";\nimport { colorMap } from \"../../theme/themeMapping\";\nimport EntityIndicator from \"../components/EntityIndicator\";\nimport useMapViewer from \"../context/useMapViewer\";\n\nconst Root = styled(BorderBox)`\n width: 100%;\n height: 100%;\n border-left: 3px solid transparent;\n transition: background-color 0.3s ease, border-left 0.3s ease;\n overflow: hidden;\n\n &:hover {\n background-color: #ccdefb;\n cursor: pointer;\n border-left: 3px solid #689cf3;\n }\n`;\n\nconst RootSelected = styled(Root)`\n background-color: ${({ isSelected, entityBg }) => (isSelected ? entityBg : undefined)};\n border-left-width: 3px;\n border-left-color: ${({ isSelected, entityBorderColor }) =>\n isSelected ? entityBorderColor : undefined};\n transition: background-color 0.3s ease, border-left 0.3s ease;\n\n &:hover {\n background-color: #bad2fa;\n cursor: pointer;\n border-left: 3px solid #689cf3;\n }\n`;\n\nexport const Title = styled.div`\n margin: 0;\n line-height: 1.35em;\n color: ${colorMap.heading};\n font-size: 15px;\n font-weight: 600;\n`;\n\nconst truncate = (str, len = 20, ellipsis = \"...\") => {\n if (!str) {\n return;\n }\n if (str.length > len) {\n return `${str.substring(0, len - ellipsis.length - 1)} ${ellipsis}`;\n }\n return str;\n};\n\nconst SearchResultItem = ({ index: listIndex, item: entity, style }) => {\n const {\n selectResultItem,\n deselectResultItem,\n selection: { index: selectedIndex },\n } = useMapViewer();\n\n const isSelected = listIndex === selectedIndex;\n\n const handleOnClick = () => {\n isSelected ? deselectResultItem() : selectResultItem({ index: listIndex, item: entity });\n };\n\n const RootComponent = isSelected ? RootSelected : Root;\n\n return (\n \n \n \n {truncate(entity.extra.title, 32)}\n \n {entity.extra.hasLocation && (\n \n \n \n )}\n \n {truncate(entity.extra.description, 120)}\n \n );\n};\n\nSearchResultItem.propTypes = {\n item: PropTypes.object.isRequired,\n};\n\nexport default SearchResultItem;\n","import PropTypes from 'prop-types';\nimport React, {\n useEffect,\n useRef\n} from 'react';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList } from 'react-window';\n\nconst WindowedSearchResults = ({ renderItem, results, isSearchResultEmpty, scrollToIndex }) => {\n const listRef = useRef(null);\n\n /**\n * Scroll to top when results change.\n */\n useEffect(() => {\n if (listRef.current && !isSearchResultEmpty) {\n listRef.current.scrollToItem(0);\n }\n }, [results, isSearchResultEmpty]);\n\n /**\n * Scroll to selected item.\n */\n useEffect(() => {\n if (scrollToIndex >= 0 && listRef.current) {\n listRef.current.scrollToItem(scrollToIndex);\n }\n }, [scrollToIndex]);\n\n return (\n \n {({ height, width }) => {\n return (\n \n {({ index, data, style }) => {\n const { items } = data;\n return renderItem({ item: items[index], style, index });\n }}\n \n );\n }}\n \n );\n};\n\nWindowedSearchResults.propTypes = {\n results: PropTypes.array,\n children: PropTypes.func,\n};\n\nWindowedSearchResults.defaultProps = {\n results: [],\n children: () => null,\n};\n\nexport default WindowedSearchResults;\n","import React from 'react';\r\nimport useMapViewer from '../context/useMapViewer';\r\nimport EmptyResults from './EmptyResults';\r\nimport SearchError from './SearchError';\r\nimport SearchResultItem from './SearchResultItem';\r\nimport WindowedSearchResults from './WindowedSearchResults';\r\n\r\nconst SearchResults = () => {\r\n const { search: { results, error, term, isSearchResultEmpty }, selection: { index } } = useMapViewer();\r\n\r\n if (isSearchResultEmpty) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (error) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n (\r\n \r\n )} />\r\n );\r\n};\r\n\r\nexport default SearchResults;\r\n","import styled from \"@emotion/styled\";\nimport { Box, Icon, Icons, Text, TextInput } from \"@modernary/ui-kit-core\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { fromEvent } from \"rxjs\";\n\nimport { debounceTime, map } from \"rxjs/operators\";\nimport ToolPanels from \"../../constants/ToolPanels\";\nimport { colors } from \"../../theme/theme\";\nimport useMapViewer from \"../context/useMapViewer\";\nimport formatNumber from \"../util/formatNumber\";\n\nconst SearchOptionsIcon = styled(Icon)`\n &:hover {\n cursor: pointer;\n }\n`;\n\nconst SearchInput = () => {\n const {\n executeSearch,\n toggleSearchOptions,\n search: { isSearching, results, term },\n omniBox: { panel },\n searchOptions,\n } = useMapViewer();\n const [value, setValue] = useState(term);\n const inputRef = useRef(null);\n\n /**\n * Bind keyup and debounce calls to the search api.\n */\n useEffect(() => {\n const subscription = fromEvent(inputRef.current, \"keyup\")\n .pipe(\n map((e) => e.currentTarget.value),\n debounceTime(350)\n )\n .subscribe((term) => executeSearch(term, searchOptions));\n\n return () => subscription.unsubscribe();\n }, [inputRef, executeSearch]);\n\n /**\n * Save input value to local state.\n */\n const handleOnChange = async (text) => {\n if (!text) {\n await executeSearch(\"\", searchOptions);\n }\n setValue(text);\n };\n\n /**\n * Updates the input value from context state.\n */\n useEffect(() => {\n setValue(term);\n }, [term]);\n\n /**\n * Focus input on mount.\n */\n useEffect(() => {\n inputRef.current.focus();\n }, []);\n\n const addonEnd = (\n <>\n \n \n \n {isSearching && }\n \n );\n\n return (\n <>\n }\n addonEnd={addonEnd}\n ref={inputRef}\n placeholder=\"Search\"\n variant={[\"default\", \"search\"]}\n value={value}\n onChange={handleOnChange}\n />\n {panel === ToolPanels.SearchResults && (\n \n \n {`Search Results (${formatNumber(results.length)})`}\n \n \n )}\n \n );\n};\n\nexport default SearchInput;\n","import { Box, Icon, Icons } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport SearchInput from \"./SearchInput\";\n\nconst SearchBar = () => {\n return (\n \n \n \n );\n};\n\nexport default SearchBar;\n","import { Button } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport ToolPanels from \"../../../constants/ToolPanels\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport formatNumber from \"../../util/formatNumber\";\n\nconst ShowResultsButton = () => {\n const {\n search: { results },\n setActivePanel,\n } = useMapViewer();\n\n const handleOnClick = () => setActivePanel(ToolPanels.SearchResults);\n\n return (\n \n Search Results ({formatNumber(results.length)})\n \n );\n};\n\nexport default ShowResultsButton;\n","import styled from \"@emotion/styled/macro\";\nimport { Flex } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport { ListItemText } from \"../../../components/SearchListItems\";\nimport ShowResultsButton from \"./ShowResultsButton\";\n\nexport const HelpHeading1 = styled(ListItemText)`\n font-size: 20px;\n font-weight: 600;\n margin-bottom: 12px;\n margin-top: 8px;\n`;\nexport const HelpHeading2 = styled(ListItemText)`\n font-size: 15px;\n font-weight: 600;\n margin-top: 4px;\n margin-bottom: 4px;\n`;\nexport const HelpText = styled(ListItemText)`\n margin-bottom: 12px;\n`;\n\nconst HelpPanel = ({}) => {\n return (\n \n \n \n \n \n Getting Started\n There are two ways to find a site:\n\n Search\n \n Enter any identifying information into the keyword search, and matching sites will be\n returned to the results list and map, if site locations exist.\n \n\n Map\n \n Locate sites near a specific area of interest using the move and tools provided on the\n map.\n \n\n Toolbar\n\n Home\n Resets the map.\n\n Location\n Zoom to your location on the map.\n\n Layers\n Options to change base layers and reference layers.\n \n \n );\n};\n\nexport default HelpPanel;\n","import styled from \"@emotion/styled\";\nimport { BorderBox, Checkbox, Flex, SingleSelect, Text } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport Layers from \"../../../constants/Layers\";\nimport { colors } from \"../../../theme/theme\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport ShowResultsButton from \"./ShowResultsButton\";\n\nconst IMAGE_SIZE = 40;\nconst IMAGE_FACTOR = 1.2;\nconst BORDER_WIDTH = 1;\n\nconst FlexSelectable = styled(Flex)`\n &:hover {\n cursor: pointer;\n }\n`;\n\nconst TextLabel = ({ children }) => (\n \n {children}\n \n);\n\nconst LayerImage = ({ layer, useShadow = true }) => (\n \n \n \n);\n\nconst LayerOption = ({ layer, setBaseLayer }) => (\n \n \n \n \n \n {layer.title}\n \n \n);\n\nconst LayerSelection = ({ layer }) => (\n \n \n \n \n \n {layer.title}\n \n \n);\n\nexport const Heading = ({ children }) => (\n \n {children}\n \n);\n\nconst LayersToolPanel = ({}) => {\n const {\n map: { baseLayer, referenceLayers },\n setBaseLayer,\n setReferenceLayers,\n } = useMapViewer();\n\n const isReferenceLayerSelected = (layer) => {\n return referenceLayers.find((referenceLayer) => referenceLayer.id === layer.id) !== undefined;\n };\n\n const toggleReferenceLayer = (layer) => {\n let newRefLayers;\n if (isReferenceLayerSelected(layer)) {\n newRefLayers = referenceLayers.filter((referenceLayer) => referenceLayer.id !== layer.id);\n } else {\n newRefLayers = [...referenceLayers, layer];\n }\n setReferenceLayers(newRefLayers);\n };\n\n return (\n \n \n \n \n \n Base Layer\n layer.id}\n renderOption={({ item: layer }) => (\n \n )}\n renderSelection={({ item: layer }) => }\n placeholder=\"Base Layer\"\n variant=\"xlarge\"\n />\n \n \n Reference Layers\n {Layers.ReferenceLayers.map((layer) => (\n toggleReferenceLayer(layer)}\n >\n \n \n \n \n \n \n \n {layer.title}\n \n \n ))}\n \n \n );\n};\n\nexport default LayersToolPanel;\n","import { Flex } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport ShowResultsButton from \"./ShowResultsButton\";\n\nconst MeasurePanel = ({}) => {\n return (\n \n \n \n \n Measure!\n \n );\n};\n\nexport default MeasurePanel;\n","import styled from \"@emotion/styled\";\nimport { Badge, Flex, Icon } from \"@modernary/ui-kit-core\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\n\nconst Root = styled(Flex.Item)`\n &:hover {\n background-color: #0966af;\n cursor: pointer;\n }\n`;\n\nconst ToolBarItem = ({ iconName, onClick, title, badgeLabel }) => {\n if (badgeLabel) {\n return (\n \n \n \n \n \n );\n }\n\n return (\n \n \n \n );\n};\n\nToolBarItem.propTypes = {\n iconName: PropTypes.string.isRequired,\n};\n\nexport default ToolBarItem;\n","import { Icons } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport ToolPanels from \"../../../constants/ToolPanels\";\nimport useMap from \"../../../map/context/useMap\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport ToolBarItem from \"./ToolBarItem\";\n\nconst HelpToolBarItem = () => {\n const { map } = useMap();\n const { setActivePanel } = useMapViewer();\n\n const handleOnClick = async () => {\n if (!map) {\n return;\n }\n\n setActivePanel(ToolPanels.Help);\n };\n\n return ;\n};\n\nexport default HelpToolBarItem;\n","import { Icons } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport MapConstants from \"../../../constants/MapConstants\";\nimport useMap from \"../../../map/context/useMap\";\nimport { toWebMercatorExtent } from \"../../../map/util/transform\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport ToolBarItem from \"./ToolBarItem\";\n\nconst HomeToolBarItem = () => {\n const { map } = useMap();\n const { reset } = useMapViewer();\n\n const handleOnClick = async () => {\n if (!map) {\n return;\n }\n\n map.getView().fit(toWebMercatorExtent(MapConstants.extent), {\n padding: [0, 0, 0, 0],\n duration: 1000,\n });\n\n await reset();\n };\n\n return ;\n};\n\nexport default HomeToolBarItem;\n","import { Icons } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport ToolPanels from \"../../../constants/ToolPanels\";\nimport useMap from \"../../../map/context/useMap\";\nimport useMapViewer from \"../../context/useMapViewer\";\nimport ToolBarItem from \"./ToolBarItem\";\n\nconst LayersToolBarItem = () => {\n const { map } = useMap();\n const {\n map: { referenceLayers },\n setActivePanel,\n } = useMapViewer();\n\n const handleOnClick = async () => {\n if (!map) {\n return;\n }\n\n setActivePanel(ToolPanels.Layers);\n };\n\n return (\n \n );\n};\n\nexport default LayersToolBarItem;\n","import { Icons } from \"@modernary/ui-kit-core\";\nimport Point from \"ol/geom/Point\";\nimport React from \"react\";\nimport MapConstants from \"../../../constants/MapConstants\";\nimport useMap from \"../../../map/context/useMap\";\nimport { toWebMercatorCenter } from \"../../../map/util/transform\";\nimport ToolBarItem from \"./ToolBarItem\";\n\nconst MyLocationToolBarItem = () => {\n const { map } = useMap();\n\n const success = (position) => {\n if (position.coords) {\n const { longitude, latitude } = position.coords;\n const resolution = map.getView().getResolutionForZoom(14);\n map.getView().fit(new Point(toWebMercatorCenter([longitude, latitude])), {\n padding: [0, 0, 0, MapConstants.omniBox.width * 2],\n minResolution: resolution,\n duration: MapConstants.duration,\n });\n }\n };\n\n const error = () => {\n window.alert(\"Unable to retrieve your location\");\n };\n\n const handleOnClick = () => {\n if (!map) {\n return;\n }\n\n if (!navigator.geolocation) {\n window.alert(\"Geolocation is not supported by your browser\");\n return;\n }\n\n navigator.geolocation.getCurrentPosition(success, error);\n };\n\n return (\n \n );\n};\n\nexport default MyLocationToolBarItem;\n","import { Flex } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport HelpToolBarItem from \"./buttons/HelpToolBarItem\";\nimport HomeToolBarItem from \"./buttons/HomeToolBarItem\";\nimport LayersToolBarItem from \"./buttons/LayersToolBarItem\";\nimport MyLocationToolBarItem from \"./buttons/MyLocationToolBarItem\";\n\nconst ToolBar = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default ToolBar;\n","import { Absolute, Flex } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport MapConstants from \"../constants/MapConstants\";\nimport ToolPanels from \"../constants/ToolPanels\";\nimport useMapViewer from \"./context/useMapViewer\";\nimport FlyoutRoot from \"./flyout/FlyoutRoot\";\nimport SearchResults from \"./results/SearchResults\";\nimport SearchBar from \"./search/SearchBar\";\nimport HelpPanel from \"./tools/panels/HelpPanel\";\nimport LayersToolPanel from \"./tools/panels/LayersToolPanel\";\nimport MeasurePanel from \"./tools/panels/MeasurePanel\";\nimport ToolBar from \"./tools/ToolBar\";\n\nconst MapOmniBox = () => {\n const {\n omniBox: { panel },\n } = useMapViewer();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n {panel === ToolPanels.SearchResults && }\n {panel === ToolPanels.Layers && }\n {panel === ToolPanels.Help && }\n {panel === ToolPanels.Measure && }\n \n \n \n \n );\n};\n\nexport default MapOmniBox;\n","import styled from \"@emotion/styled\";\nimport { createTheme, ThemeProvider } from \"@modernary/ui-kit-core\";\nimport React from \"react\";\nimport SmallerHeader from \"./components/SmallerHeader\";\nimport EntityTypes from \"./constants/EntityTypes\";\nimport MapViewerProvider from \"./map-viewer/context/MapViewerProvider\";\nimport MapFeatureClickListener from \"./map-viewer/map/interaction/MapFeatureClickListener\";\nimport SelectReferenceLayerFeatureInteraction from \"./map-viewer/map/interaction/SelectReferenceLayerFeatureInteraction\";\nimport BaseLayer from \"./map-viewer/map/layer/BaseLayer\";\nimport EntityFeaturesLayer from \"./map-viewer/map/layer/EntityFeaturesLayer\";\nimport MyLocationLayer from \"./map-viewer/map/layer/MyLocationLayer\";\nimport ReferenceLayers from \"./map-viewer/map/layer/ReferenceLayers\";\nimport EntityOverlay from \"./map-viewer/map/overlay/EntityOverlay\";\nimport ReferenceLayerFeatureOverlay from \"./map-viewer/map/overlay/ReferenceLayerFeatureOverlay\";\nimport ViewerMap from \"./map-viewer/map/ViewerMap\";\nimport MapOmniBox from \"./map-viewer/MapOmniBox\";\n\nconst Root = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\nconst Header = styled.div`\n flex: 0;\n`;\nconst Body = styled.div`\n flex: 1;\n`;\n\nconst options = {\n fonts: {\n sans: \"AvenirNext\",\n serif: \"serif\",\n monospace: \"monospace\",\n },\n};\n\nconst MapView = () => {\n return (\n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n );\n};\n\nexport default MapView;\n","import React from 'react';\nimport styled from '@emotion/styled/macro';\nimport { spacing } from '../theme/theme';\nimport { colorMap } from '../theme/themeMapping';\nimport { CardHeading } from './Card';\nimport ItemPanel from './ItemPanel';\n\nconst separatorWidth = 1;\nconst separatorColor = colorMap.lightSeparator;\nconst headingMargin = spacing.small;\nconst cardActive = colorMap.cardActive;\n\nconst SplitSelectIndexOuter = styled(ItemPanel)`\n ${props => props.borderBottom ? `border-bottom: ${separatorWidth}px solid ${separatorColor}` : ''};\n ${props => props.isActive ? `background-color: ${cardActive};` : ''};\n`\n\nconst SplitSelectIndexHeading = styled(CardHeading)`\n margin-bottom: ${headingMargin}px;\n ${props => props.isActive && `color: ${colorMap.normalText};`}\n`;\nconst SplitSelectIndexBody = styled.p`\n margin: 0;\n`\n\nexport const SplitSelectIndex = ({heading, children, ...rest}) => {\n return (\n <>\n \n {heading && \n {heading}\n }\n {children && \n {children}\n }\n \n \n )\n}","import { layoutSpacing, colorMap, bgElevations, typeScaleMap } from \"./theme/themeMapping\";\nimport styled from \"@emotion/styled/macro\";\nimport { Column } from \"./components/CommonLayout\";\nimport css from \"@emotion/css\";\nimport { Heading4 } from \"./theme/commonType\";\n\nconst ShadowBoxStyle = () => css`\n position: relative;\n z-index: 1;\n`;\n\nconst ShadowBoxBottomStyle = () => css`\n ${ShadowBoxStyle()}\n box-shadow: 0px 2px 3px -1px rgba(0,0,0,.17);\n`;\n\nconst ShadowBoxRightStyle = () => css`\n ${ShadowBoxStyle()}\n box-shadow: 2px 0px 3px -1px rgba(0,0,0,.17);\n`;\n\nexport const ShadowBoxBottom = styled.div`\n ${ShadowBoxBottomStyle}\n`;\n\nexport const ShadowBoxRight = styled.div`\n ${ShadowBoxRightStyle}\n`;\n\nexport const HeaderContainer = styled.div`\n border-bottom: 2px solid ${colorMap.activeHighlight};\n`;\n\nexport const ListColumn = styled(Column)`\n ${ShadowBoxRightStyle}\n max-width: ${({ fillWidth }) => fillWidth ? 'none' : '300px'};\n`;\n\nexport const ResultsColumn = styled(Column)`\n overflow-x: hidden;\n overflow-y: auto;\n ${props => props.usePadding && `\n padding-top: ${layoutSpacing.listPaddingV}px;\n padding-bottom: ${layoutSpacing.listPaddingV}px;\n padding-left: ${layoutSpacing.listPaddingH}px;\n padding-right: ${layoutSpacing.listPaddingH}px;\n `}\n background-color: ${bgElevations.b1};\n`;\n\nexport const ListContainer = styled.div`\n width: 100%;\n flex: 1;\n position: relative;\n /* background-color: ${colorMap.listBackground}; */\n /* padding: ${layoutSpacing.listPaddingV}px ${layoutSpacing.listPaddingH}px; */\n`;\n\nexport const ResultsCountBox = styled.div`\n padding: 24px 0;\n font-size: ${typeScaleMap.listSearchHeadings}px;\n color: ${colorMap.subduedHeading};\n`;\n\nexport const SelectACategoryPrompt = styled(Heading4)`\n padding: ${layoutSpacing.listPaddingV}px ${layoutSpacing.listPaddingH}px;\n color: ${colorMap.subduedHeading};\n`;\n\nexport const MatchedQuery = styled.span`\n font-weight: 600;\n /* font-style: italic; */\n`;\n","import { css } from \"@emotion/core\";\r\nimport styled from \"@emotion/styled/macro\";\r\nimport axios from \"axios\";\r\nimport moment from \"moment\";\r\nimport React, { useCallback, useEffect, useState } from \"react\";\r\nimport { Columns, NoWrapColumns } from \"./components/CommonLayout\";\r\nimport { SearchListItems } from \"./components/SearchListItems\";\r\nimport SearchBar from \"./components/SearchBar\";\r\nimport SmallerHeader from \"./components/SmallerHeader\";\r\nimport { SplitSelectIndex } from \"./components/SplitSelect\";\r\nimport EntityTypes from \"./constants/EntityTypes\";\r\nimport { SearchConsumer } from \"./context/SearchContext\";\r\nimport { Heading4 } from \"./theme/commonType\";\r\nimport { colors, spacing } from \"./theme/theme\";\r\nimport {\r\n ListColumn,\r\n HeaderContainer,\r\n SelectACategoryPrompt,\r\n ResultsColumn,\r\n ResultsCountBox,\r\n ListContainer,\r\n MatchedQuery,\r\n} from \"./SearchViewUI\";\r\nimport { hwCounties, hwGenerators } from \"./constants/HwEnums\";\r\n\r\nconst SearchCategories = styled.ul`\r\n display: flex;\r\n flex-direction: column;\r\n margin: 0;\r\n padding: 0;\r\n`;\r\nconst titleFieldKey = \"searchTitleName\";\r\nconst descriptionFieldKey = \"searchDescriptionText\";\r\nconst statusFieldKey = \"searchStatusText\";\r\nconst entityUrlFieldKey = \"entityUrl\";\r\n// TODO: Abstract out and improve our handling our dates/conversion to/from UTC.\r\nexport const getLocalMoment = (date) => {\r\n if (date && typeof date === \"string\" && date.length > 10 && !date.toString().endsWith(\"Z\")) {\r\n date += \"Z\";\r\n }\r\n return moment(date);\r\n};\r\nconst setIslandName = (entity) => {\r\n if (!entity._islandName) {\r\n if (entity.island) {\r\n entity._islandName = entity.island.name;\r\n } else {\r\n entity._islandName = \"\";\r\n }\r\n }\r\n};\r\n\r\nconst categories = [\r\n {\r\n id: \"emergencyReleases\",\r\n defaultParams: {},\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/iheer/#!/incident/${this.id}/details/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n return `${this.releaseName} (${this.caseNumber})`;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n setIslandName(this);\r\n return `${this._islandName} - ${this.summary}`;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Reported ${getLocalMoment(this.reportedOn).format(\r\n \"MM/D/YY h:mm A zz\"\r\n )}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n {\r\n id: \"waterQualityAdvisories\",\r\n defaultParams: {},\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/cwb/#!/event/${this.id}/details/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n return this.title;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n setIslandName(this);\r\n return `${this._islandName} - ${this.description}`;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Posted ${getLocalMoment(this.postedDate).format(\"ll\")}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n {\r\n id: \"uicFacilities\",\r\n defaultParams: {},\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/sdwb/#!/facility/${this.id}/details/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n if (\r\n this.affiliatedOrganizations &&\r\n this.affiliatedOrganizations.length > 0 &&\r\n this.affiliatedOrganizations[0].facility\r\n ) {\r\n return this.affiliatedOrganizations[0].facility.name;\r\n }\r\n return this.name;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n if (!this._operatedBy) {\r\n if (\r\n this.affiliatedOrganizations &&\r\n this.affiliatedOrganizations.length > 0 &&\r\n this.affiliatedOrganizations[0].organization\r\n ) {\r\n this._operatedBy = ` - ${this.affiliatedOrganizations[0].organization.name}`;\r\n } else {\r\n this._operatedBy = \"\";\r\n }\r\n }\r\n if (!this._locatedAt) {\r\n if (this.street && this.city && this.zipCode) {\r\n this._locatedAt = ` - located at ${this.street} ${this.city} ${this.zipCode}`;\r\n } else {\r\n this._locatedAt = \"\";\r\n }\r\n }\r\n\r\n setIslandName(this);\r\n return this._islandName + this._operatedBy + this._locatedAt;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Last Updated ${getLocalMoment(this.updatedOn).format(\"ll\")}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n {\r\n id: \"remediationSites\",\r\n defaultParams: {},\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/iheer/#!/site/${this.id}/details/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n return this.name;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n if (!this._locatedAt) {\r\n if (this.street && this.city && this.zipCode) {\r\n this._locatedAt = ` - located at ${this.street} ${this.city} ${this.zipCode}`;\r\n } else if (this.locationDescription) {\r\n this._locatedAt = ` - located at ${this.locationDescription}`;\r\n } else {\r\n this._locatedAt = \"\";\r\n }\r\n }\r\n\r\n setIslandName(this);\r\n return this._islandName + this._locatedAt;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Last Updated ${getLocalMoment(this.updatedOn).format(\"ll\")}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n {\r\n id: \"airPollutionSources\",\r\n defaultParams: { type: \"Facility\" },\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/cab/#!/facilitySite/${this.id}/details/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n return `${this.name} (${this.number})`;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n if (!this._permittee) {\r\n if (\r\n this.affiliatedOrganizations &&\r\n this.affiliatedOrganizations.length > 0 &&\r\n this.affiliatedOrganizations[0].organization\r\n ) {\r\n this._permittee = ` - ${this.affiliatedOrganizations[0].organization.name}`;\r\n } else {\r\n this._permittee = \"\";\r\n }\r\n }\r\n if (!this._locatedAt) {\r\n if (this.street && this.city && this.zipCode) {\r\n this._locatedAt = ` - located at ${this.street} ${this.city} ${this.zipCode}`;\r\n } else {\r\n this._locatedAt = \"\";\r\n }\r\n }\r\n setIslandName(this);\r\n return this._islandName + this._permittee + this._locatedAt;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Last Updated ${getLocalMoment(this.updatedOn).format(\"ll\")}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n {\r\n id: \"hwHandlers\",\r\n defaultParams: {\r\n orderBy: [{ propertyName: \"number\", isDescending: false }],\r\n take: 500,\r\n skip: 0,\r\n },\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/hw/handler/${this.id}/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n return `${this.number} - ${this.name}`;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n if (!this._generator) {\r\n this._generator = hwGenerators.get(this.federalWasteGenerator)?.longDescription;\r\n this._generator = this._generator ? ` - ${this._generator}` : \"\";\r\n }\r\n if (!this._locatedAt) {\r\n if (this.locationStreet1 && this.locationCity && this.locationZip) {\r\n this._locatedAt = ` - located at ${this.locationStreet1} ${this.locationCity} ${this.locationZip}`;\r\n } else {\r\n this._locatedAt = \"\";\r\n }\r\n }\r\n if (!this._islandName) this._islandName = hwCounties.get(this.countyCode)?.description;\r\n\r\n return this._islandName + this._generator + this._locatedAt;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Received ${getLocalMoment(this.receiveDate).format(\"ll\")}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n {\r\n id: \"npdesFacilities\",\r\n defaultParams: {\r\n hasLocations: true,\r\n hasPermits: true,\r\n },\r\n addListViewFields: (item) => {\r\n Object.defineProperties(item, {\r\n [entityUrlFieldKey]: {\r\n get: function () {\r\n return `https://eha-cloud.doh.hawaii.gov/cwb/#!/facilitySite/${this.id}/details/view`;\r\n },\r\n },\r\n [titleFieldKey]: {\r\n get: function () {\r\n return this.name;\r\n },\r\n },\r\n [descriptionFieldKey]: {\r\n get: function () {\r\n if (!this._locatedAt) {\r\n if (this.street && this.city && this.state && this.zipCode) {\r\n this._locatedAt = ` - located at ${this.street} ${this.city} ${this.state} ${this.zipCode}`;\r\n } else {\r\n this._locatedAt = ` - located at ${this.locationDescription}`;\r\n }\r\n }\r\n setIslandName(this);\r\n return `${this._islandName} ${this._locatedAt}`;\r\n },\r\n },\r\n [statusFieldKey]: {\r\n get: function () {\r\n if (!this._statusField) {\r\n this._statusField = `Last Updated ${getLocalMoment(this.updatedOn).format(\"ll\")}`;\r\n }\r\n return this._statusField;\r\n },\r\n },\r\n });\r\n },\r\n },\r\n].map((category) => ({\r\n ...category,\r\n name: EntityTypes[category.id].label,\r\n endpoint: EntityTypes[category.id].endpoint,\r\n description: EntityTypes[category.id].description,\r\n}));\r\n\r\nconst getCategory = (id) => categories.find((x) => x.id === id);\r\n\r\nconst SearchView = (props) => {\r\n // const [selectedCategory, selectCategory] = useState();\r\n const [expandedItemId, setExpandedItemId] = useState(null);\r\n const [searchStatus, setSearchStatus] = useState();\r\n const [searchResults, setSearchResults] = useState(\"\");\r\n const [searchResultsCategory, setResultsCategory] = useState(\"\");\r\n let [searchQuery, setSearchQuery] = useState(\"\");\r\n if (props.updateQuery) {\r\n searchQuery = props.query;\r\n setSearchQuery = props.updateQuery;\r\n }\r\n\r\n const selectedCategory = props.match.params.category;\r\n\r\n function handleItemClick(id) {\r\n setExpandedItemId(id !== expandedItemId ? id : null);\r\n }\r\n\r\n const doQuery = useCallback(() => {\r\n if (selectedCategory) {\r\n const category = getCategory(selectedCategory);\r\n const endpoint = category.endpoint;\r\n const params = { params: { ...category.defaultParams, keywords: searchQuery } };\r\n setSearchStatus(\"searching\");\r\n return setTimeout(() => {\r\n axios.get(endpoint, params).then((results) => {\r\n setSearchStatus(\"complete\");\r\n setResultsCategory(selectedCategory);\r\n // const results = advisories.filter(x => matchesQuery(x, searchQuery));\r\n // setSearchResults(advisories.slice(floor));\r\n // it'd be nice if they were all paged and we could rely on list at some point.\r\n let list = [];\r\n if (results.data) {\r\n if (results.data.list) list = results.data.list;\r\n else if (results.data.value) list = results.data.value;\r\n else list = results.data;\r\n }\r\n list.forEach((item) => {\r\n category.addListViewFields(item);\r\n });\r\n setSearchResults(list);\r\n // props.history.push({ ...props.location, search: '?q=' + searchQuery});\r\n });\r\n }, 300);\r\n } else setSearchStatus(null);\r\n }, [searchQuery, selectedCategory]);\r\n\r\n useEffect(() => {\r\n const id = doQuery(searchQuery);\r\n return () => {\r\n clearTimeout(id);\r\n };\r\n }, [selectedCategory, searchQuery, doQuery]);\r\n\r\n // wipe expanded-item state when screen changes significantly\r\n useEffect(() => {\r\n setExpandedItemId(null);\r\n }, [selectedCategory, searchResults]);\r\n\r\n const placeholder = selectedCategory\r\n ? `Search ${getCategory(selectedCategory).name}`\r\n : \"Keyword Search\";\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {!selectedCategory && Select:}\r\n \r\n \r\n \r\n {categories.map((cat, index) => (\r\n navigate(cat.id)}>\r\n onClick={() => props.history.push(`/search/${cat.id}`)}\r\n >\r\n {cat.description}\r\n \r\n ))}\r\n \r\n \r\n {searchStatus && (\r\n \r\n \r\n \r\n {searchStatus === \"searching\" ? (\r\n <>Searching...\r\n ) : (\r\n <>\r\n \r\n Showing {searchResults && {searchResults.length}}{\" \"}\r\n {getCategory(selectedCategory).name}\r\n \r\n {searchQuery && (\r\n \r\n {\" \"}\r\n matching {searchQuery}\r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n {searchResultsCategory === selectedCategory && (\r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport const ContextualSearchView = (props) => (\r\n \r\n {({ query, updateQuery }) => }\r\n \r\n);\r\n\r\nexport default SearchView;\r\n","import { lineHeightMap, colorMap } from \"../theme/themeMapping\";\nimport { colors } from \"../theme/theme\";\n\nconst GlobalStyles = `\n body {\n line-height: ${lineHeightMap.body};\n color: ${colorMap.normalText};\n }\n .rsm-svg {\n fill: ${colors.electricBlue};\n &:focus, & *:focus {\n outline: 0;\n }\n }\n`\n\nexport default GlobalStyles;","import { ThemeProvider } from 'emotion-theming';\nimport React from 'react';\nimport { Route } from 'react-router-dom';\nimport { MainContextProvider } from './context/MainContext';\nimport { SearchProvider } from './context/SearchContext';\nimport MainView from './MainView';\nimport MapView from './MapView';\nimport { ContextualSearchView } from './SearchView';\nimport theme from './theme/theme';\nimport { Global } from '@emotion/core';\nimport GlobalStyles from './style/GlobalStyles';\n\n// const redirectIndex = {\n// searchCategory: (id) => `/search/${id}`\n// }\n\nfunction App(props) {\n // const [redirectPath, setRedirectPath] = useState();\n // const doRedirect = (index, ...args) => setRedirectPath(redirectIndex[index](...args));\n\n return (\n \n \n \n \n {/* {redirectPath\n ? (\n \n )\n : ( */}\n <>\n \n \n doRedirect('searchCategory', cat)}\n />\n \n \n {/* )} */}\n \n \n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './style/index.scss';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}