{"version":3,"sources":["components/Button/Button.module.css","components/AccountAvatar/AccountAvatar.module.css","components/SiteHeader/SiteHeader.module.css","components/Pressable/Pressable.module.css","components/AppFooter/AppFooter.module.css","components/BlockError/BlockError.module.css","components/Copy/Copy.module.css","components/SelectInput/SelectInput.module.css","components/RadioList/RadioList.module.css","components/GenerateReportDialog/GenerateReportDialog.module.css","routes/app/index.module.css","components/BenchmarkingChart/BenchmarkingChart.module.css","components/CheckboxInput/CheckboxInput.module.css","components/FacilityRiskFilter/FacilityRiskFilter.module.css","components/FilterAndSort/FilterAndSort.module.css","routes/app/Benchmarking/Benchmarking.module.css","components/CalculatorOptionalForm/CalculatorOptionalForm.module.css","components/TextInput/TextInput.module.css","components/InvestmentCalculator/InvestmentCalculator.module.css","routes/app/Calculator/Calculator.module.css","components/VerticalTabContainer/VerticalTabContainer.module.css","components/FacilityListItemTabs/IdentifyRiskTabGroup/IdentifyRiskTabGroup.module.css","components/NoAssessment/NoAssessment.module.css","components/FacilityListItemTabs/TakeActionTabGroup/TakeActionTabGroup.module.css","components/FacilityListItemTabs/TrackProgressTabGroup/TrackProgressTabGroup.module.css","components/FacilityReportDialog/FacilityReportDialog.module.css","components/Alert/Alert.module.css","components/FolderAssignDialog/FolderAssignDialog.module.css","components/FacilityListItem/FacilityListItem.module.css","components/NoFacilities/NoFacilities.module.css","routes/app/Dashboard/Dashboard.module.css","routes/app/Facilities/Facilities.module.css","components/ReportingYearsList/ReportingYearsList.module.css","routes/app/Facility/Facility.module.css","components/FormHelp/FormHelp.module.css","routes/app/FacilityCreate/FacilityCreate.module.css","routes/app/FacilityEdit/FacilityEdit.module.css","components/FacilityForm/FacilityForm.module.css","routes/app/ReportingYearCreate/ReportingYearCreate.module.css","routes/app/ReportingYearEdit/ReportingYearEdit.module.css","components/RiskAnalysisChart/RiskAnalysisChart.module.css","routes/app/RiskAnalysis/RiskAnalysis.module.css","routes/index.module.css","components/ImageRotator/ImageRotator.module.css","components/RouteContentScrollable/RouteContentScrollable.module.css","components/SiteFooter/SiteFooter.module.css","routes/marketing/Home/Home.module.css","routes/marketing/Account/Account.module.css","components/UserInviteDialog/UserInviteDialog.module.css","routes/marketing/ForgotPassword/ForgotPassword.module.css","routes/marketing/Invitation/Invitation.module.css","components/JourneyStepBubble/JourneyStepBubble.module.css","routes/marketing/HowItWorks/HowItWorks.module.css","routes/marketing/Login/Login.module.css","routes/marketing/Registration/Registration.module.css","routes/marketing/ResetPassword/ResetPassword.module.css","routes/marketing/User/User.module.css","routes/marketing/VerificationRequired/VerificationRequired.module.css","routes/marketing/VerifyAccount/VerifyAccount.module.css","routes/marketing/Cookies/Cookies.module.css","components/FacilityListItemTabs/Tabs.module.css","hooks/useThemeManager.tsx","clients/auth/schema.ts","constants/env.ts","constants/events.ts","clients/helpers.ts","utils/eventBus.ts","clients/request.ts","clients/auth/auth.ts","hooks/useAuth.tsx","styles/components/Button.ts","styles/theme.ts","styles/foundations/colors.ts","styles/foundations/fonts.ts","styles/foundations/tokens.ts","components/ChakraProvider/ChakraProvider.tsx","components/EmotionProvider/EmotionProvider.tsx","components/AppProviders/AppProviders.tsx","components/PreventIframe/PreventIframe.tsx","components/Icons/BrandContact.tsx","components/Icons/Facilities.tsx","components/Icons/FacilityDashboard.tsx","components/Icons/FacilityFolders.tsx","components/Icons/HelpQuestionMark.tsx","components/Icons/RiskAnalysis.tsx","components/Icons/BrandFaqs.tsx","components/Icons/BrandResources.tsx","components/Icons/Loader.tsx","components/Button/Button.tsx","clients/api/version.ts","hooks/useMaintenance.ts","components/Icon/Icon.tsx","components/AccountAvatar/AccountAvatar.tsx","components/SiteSubHeader/SiteSubHeader.tsx","clients/api/upload.ts","components/UploadStatus/UploadStatus.tsx","components/SiteHeader/SiteHeader.tsx","components/Pressable/Pressable.tsx","components/UpdateCookiePrefButton/UpdateCookiePrefButton.tsx","components/AppFooter/AppFooter.tsx","components/Copy/Copy.tsx","components/BlockError/BlockError.tsx","components/LoadingSpinner/LoadingSpinner.tsx","components/Maintenance/Maintenance.tsx","components/Route/Route.tsx","clients/api/user.ts","components/SelectInput/SelectInput.tsx","components/AccountSelector/AccountSelector.tsx","clients/api/account.ts","clients/api/v5.folders.ts","components/Dialog/Dialog.tsx","components/RadioList/RadioList.tsx","hooks/useAsyncState.ts","utils/chart/utils.ts","utils/chart/benchmarkingChartDataGenerator.ts","utils/chart/incomingRiskChartDataGenerator.ts","utils/chart/outgoingRiskChartDataGenerator.ts","utils/chart/revenueRiskChartDataGenerator.ts","utils/chart/riskAnalysisChartDataGenerator.ts","utils/chart/riskFactorChartDataGenerator.ts","utils/chart/riskSourceChartDataGenerator.ts","utils/number.ts","utils/chart/waterWithdrawalChartDataGenerator.ts","utils/string.ts","components/GenerateReportDialog/GenerateReportDialog.tsx","components/SidebarNav/NavLink.tsx","components/SidebarNav/SidebarNav.tsx","hooks/useAsyncFormState.tsx","hooks/useFilterAndSort/useFilterAndSort.tsx","clients/api/v5.aggregates.ts","hooks/useDeepCompare.ts","hooks/useFacilityRiskFilter.tsx","components/BenchmarkingChart/BenchmarkingChart.tsx","components/CheckboxInput/CheckboxInput.tsx","components/FacilityRiskFilter/SectionInfo.tsx","components/FacilityRiskFilter/FacilityRiskFilter.tsx","hooks/useFilterAndSort/utils.ts","components/FilterAndSort/FilterAndSort.tsx","routes/app/Benchmarking/Benchmarking.tsx","clients/api/v5.referenceData.ts","clients/api/v5.facility.ts","components/TextInput/TextInput.tsx","components/CalculatorOptionalForm/CalculatorOptionalForm.tsx","components/InvestmentCalculator/OptionalExpensesSavingsYear.ts","components/InvestmentCalculator/CashFlowModel.ts","components/InvestmentCalculator/CalculatorResults.ts","components/InvestmentCalculator/InvesetmentCalculatorService.ts","components/InvestmentCalculator/utils.ts","components/InvestmentCalculator/InvestmentCalculator.tsx","utils/chart/paybackPeriodChartDataGenerator.ts","routes/app/Calculator/Calculator.tsx","components/VerticalTabContainer/VerticalTabContainer.tsx","components/FacilityListItemTabs/IdentifyRiskTabGroup/Tabs/TotalRisk.tsx","components/FacilityListItemTabs/IdentifyRiskTabGroup/Tabs/IncomingRisk.tsx","components/FacilityListItemTabs/IdentifyRiskTabGroup/Tabs/OutgoingRisk.tsx","components/FacilityListItemTabs/IdentifyRiskTabGroup/Tabs/RevenueRisk.tsx","components/FacilityListItemTabs/IdentifyRiskTabGroup/IdentifyRiskTabGroup.tsx","components/FacilityListItemTabs/SetTargetsTabGroup/Tabs/WaterWithdrawalRisk.tsx","components/FacilityListItemTabs/SetTargetsTabGroup/SetTargetsTabGroup.tsx","components/NoAssessment/NoAssessment.tsx","constants/journey.ts","components/FacilityListItemTabs/TakeActionTabGroup/Tabs/BusinessCase.tsx","components/FacilityListItemTabs/TakeActionTabGroup/Tabs/CaseStudies.tsx","components/FacilityListItemTabs/TakeActionTabGroup/Tabs/Checklist.tsx","components/FacilityListItemTabs/TakeActionTabGroup/Tabs/InvestmentCalculator.tsx","components/FacilityListItemTabs/TakeActionTabGroup/Tabs/Scenario.tsx","components/StepsTable/StepsTable.tsx","components/FacilityListItemTabs/TakeActionTabGroup/Tabs/ToolsAndResources.tsx","components/FacilityListItemTabs/TakeActionTabGroup/TakeActionTabGroup.tsx","components/FacilityListItemTabs/TrackProgressTabGroup/Tabs/AbsoluteVolume.tsx","components/FacilityListItemTabs/TrackProgressTabGroup/Tabs/ProductionBasis.tsx","components/FacilityListItemTabs/TrackProgressTabGroup/Tabs/RevenueBasis.tsx","components/FacilityListItemTabs/TrackProgressTabGroup/TrackProgressTabGroup.tsx","components/Alert/Alert.tsx","components/FacilityReportDialog/FacilityReportDialog.tsx","components/FolderAssignDialog/FolderAssignDialog.tsx","components/FacilityListItem/FacilityListItem.tsx","components/NoFacilities/NoFacilities.tsx","components/FacilityList/FacilityList.tsx","routes/app/Dashboard/Dashboard.tsx","routes/app/Facilities/Facilities.tsx","routes/app/Enterprise/Enterprise.tsx","components/ModalDialog/ModalDialog.tsx","components/ReportingYearsList/ReportingYearsList.tsx","routes/app/Facility/Facility.tsx","clients/api/classification.ts","clients/api/country.ts","components/FacilityForm/Helpers/FacilityTabFooter/FacilityTabFooter.tsx","constants/years.ts","constants/errors.ts","components/FacilityForm/validation.ts","components/FormHelp/FormHelp.tsx","hooks/useFormHelp.ts","routes/app/FacilityCreate/helpers.ts","routes/app/FacilityCreate/FacilityCreate.tsx","routes/app/FacilityEdit/FacilityEdit.tsx","routes/app/FolderManager/FolderMutateModal.tsx","components/AddFolderFacilityModal/AddFolderFacilityModal.tsx","routes/app/FolderManager/FacilityItem.tsx","routes/app/FolderManager/FolderDeletePopover.tsx","clients/api/v5.transfers.ts","routes/app/FolderManager/TransferModal.tsx","routes/app/FolderManager/FolderItemContents.tsx","routes/app/FolderManager/FolderItem.tsx","components/TransferStatusTag/TransferStatusTag.tsx","routes/app/FolderManager/FolderList.tsx","routes/app/FolderManager/TransferListItem.tsx","routes/app/FolderManager/TransferList.tsx","routes/app/FolderManager/TransfersGroup.tsx","routes/app/FolderManager/FolderManager.tsx","hooks/useQueryParams.ts","utils/array.ts","components/FacilityForm/Tabs/Carousel/Carousel.tsx","components/FacilityForm/AssessmentCarousel/AssessmentCarousel.tsx","components/FacilityForm/Helpers/FacilityTabNavigator/FacilityTabNavigator.tsx","components/FacilityForm/Tabs/BusinessInformation/BusinessInformation.tsx","components/FacilityForm/Tabs/FacilityDetails/FacilityDetails.tsx","components/FacilityForm/Tabs/Pollutants/Pollutants.tsx","components/FacilityForm/utils.tsx","components/FacilityForm/Tabs/RegulationReputation/RegulationReputation.tsx","components/FacilityForm/Tabs/WaterQuality/WaterQuality.tsx","components/FacilityForm/WrmForm/WrmForm.tsx","components/FacilityForm/Helpers/FacilityTabNavigator/useTabNavigator.ts","routes/app/ReportingYearCreate/ReportingYearCreate.tsx","routes/app/ReportingYearEdit/ReportingYearEdit.tsx","components/RiskAnalysisChart/RiskAnalysisChart.tsx","routes/app/RiskAnalysis/RiskAnalysis.tsx","components/ActiveUploadCard/ActiveUploadCard.tsx","routes/app/Upload/RowResultListItem.tsx","routes/app/Upload/RowResultsList.tsx","routes/app/Upload/Upload.tsx","components/Uploader/Uploader.tsx","routes/app/Uploads/Uploads.tsx","routes/app/routes.tsx","routes/app/index.tsx","components/Helmet/Helmet.tsx","components/ImageRotator/ImageRotator.tsx","components/RouteContentScrollable/RouteContentScrollable.tsx","components/SiteFooter/SiteFooter.tsx","constants/partners.ts","utils/readCookie.ts","routes/marketing/Home/Home.tsx","constants/animations.ts","components/UserInviteDialog/UserInviteDialog.tsx","routes/marketing/Account/Account.tsx","components/PageHeader/PageHeader.tsx","routes/marketing/Contact/validation.ts","routes/marketing/Dashboard/Dashboard.tsx","routes/marketing/Faq/Faq.tsx","routes/marketing/ForgotPassword/ForgotPassword.tsx","routes/marketing/Invitation/Invitation.tsx","components/JourneyStepBubble/JourneyStepBubble.tsx","routes/marketing/HowItWorks/HowItWorks.tsx","routes/marketing/Login/Login.tsx","constants/countries.ts","routes/marketing/Registration/Registration.tsx","routes/marketing/ResetPassword/ResetPassword.tsx","routes/marketing/User/User.tsx","routes/marketing/VerificationRequired/VerificationRequired.tsx","hooks/useEffectOnce.ts","routes/marketing/VerifyAccount/VerifyAccount.tsx","routes/marketing/Resources/Resources.tsx","components/Raindrop/Raindrop.tsx","hooks/useScrollToAnchor.tsx","routes/marketing/About/About.tsx","routes/marketing/TakeAction/TakeAction.tsx","components/Link/Link.tsx","routes/marketing/Methodology/Methodology.tsx","routes/marketing/TermsOfService/TermsOfService.tsx","routes/marketing/Cookies/Cookies.tsx","routes/marketing/routes.ts","routes/marketing/Logout/Logout.tsx","routes/marketing/Contact/Contact.tsx","clients/api/contact.ts","routes/marketing/DevelopmentPartners/DevelopmentPartners.tsx","routes/marketing/index.tsx","routes/index.tsx","index.tsx","utils/cookieConsent.ts","components/FacilityForm/Tabs/Tabs.module.css","components/FacilityForm/Helpers/FacilityTabNavigator/FacilityTabNavigator.module.css","components/FacilityList/FacilityList.module.css"],"names":["module","exports","DEFAULT_PROPERTIES","showSidebar","showSubheader","ThemeManagerContext","React","createContext","ThemeManagerProvider","children","useState","state","setState","Provider","value","setThemeProperties","values","resetThemeProperties","PASSWORD_VALIDATOR","loginFormSchema","yup","email","required","password","registrationFormSchema","firstName","trim","lastName","companyName","jobTitle","country","matches","confirmPassword","oneOf","acceptTerms","explicitOptIn","forgotPasswordFormSchema","resetPasswordFormSchema","resetPasswordCode","code","getBaseUrl","append","baseUrl","process","REACT_APP_API_BASE_URL","EventType","environments","development","apiUrl","authUrl","waaApiUrl","tokenCallbackUrl","appVersion","styleNonce","maxReportingYear","production","Env","Object","assign","REACT_APP_APP_VERSION","appVerison","REACT_APP_STYLE_NONCE","REACT_APP_UNDER_MAINTENANCE_MESSAGE","underMaintenance","underMaintenanceMessage","REACT_APP_FUTURE_MAINTENANCE_MESSAGE","futureMaintenance","futureMaintenanceMessage","LOCAL_STORAGE_KEYS","SESSION_INVALID","SessionInvalid","eventBus","event","callback","document","addEventListener","dispatchEvent","CustomEvent","type","detail","removeEventListener","getTokenInStorage","window","localStorage","getItem","TOKEN","getUserIdInStorage","USER","getAccountIdInStorage","ACCOUNT","setAccountIdInStorage","id","setItem","clearStorage","removeItem","urlWithAccountId","url","accountIdOverride","accountId","getAuthHeaders","token","Authorization","rawRequest","input","init","controller","AbortController","requestTimer","setTimeout","abort","fetch","signal","finally","clearTimeout","httpRequest","options","headers","Headers","body","method","JSON","stringify","data","payload","then","response","requestSuccess","catch","error","requestError","json","ok","status","errors","metadata","metaData","field","message","get","post","put","del","raw","login","request","username","logout","Promise","resolve","register","form","forgotPassword","resetPassword","verifyAccount","fetchUser","AuthContext","AuthProvider","props","queryClient","useQueryClient","isAuthenticated","isLoading","userId","undefined","setData","a","client","id_token","result","accountIds","Set","accounts","map","sort","primary","has","path","location","replace","switchAccounts","removeQueries","useAuth","useContext","Button","baseStyle","variants","brand","bg","color","border","borderColor","_hover","position","transition","borderRadius","fontSize","textAlign","textTransform","lineHeight","padding","cursor","textDecoration","boxShadow","_active","_focus","outline","_disabled","bgColor","defaultProps","variant","theme","extendTheme","colors","secondary","secondaryLight","blue","darkBlue","lightBlue","teal","green","darkGreen","50","100","200","300","400","500","600","700","800","900","fonts","heading","semanticTokens","default","_dark","inverted","emphasized","muted","subtle","accent","success","components","ChakraProvider","EmotionCacheProvider","nonce","cache","createCache","key","QueryClient","defaultOptions","queries","retry","refetchOnWindowFocus","staleTime","AppProviders","PreventIframe","useEffect","top","href","displayName","MemoSvgBrandContact","viewBox","data-testid","fillRule","d","x","y","xmlSpace","className","fill","clipPath","MemoSvgBrandFaqs","MemoSvgBrandResources","MemoSvgLoader","x1","x2","y1","y2","offset","stopColor","stopOpacity","transform","stroke","strokeWidth","attributeName","dur","from","repeatCount","to","cx","cy","r","classnames","bind","styles","as","light","disabled","buttonProps","isBaseButton","createElement","Loader","height","width","checkVersion","toFixed","DEFAULT_MAINTENANCE_MESSAGES","useMaintenance","useQuery","enabled","hasActiveMaintenance","maintenance","hasFutureMaintenance","upcomingMaintenance","maintenanceMessage","Icon","forwardRef","ref","size","MdiIcon","h","w","AccountAvatar","mdiAccountCircleOutline","justify-content","whiteSpace","flex","minW","fontWeight","isTruncated","mt","mdiAccountBoxOutline","mdiAccountCogOutline","onClick","mdiLogout","SiteSubHeader","hasUpcomingMaintenance","isCurrentlyUnderMaintenance","in","offsetY","minH","justifyContent","alignItems","p","maxW","mdiAlert","mr","dangerouslySetInnerHTML","__html","sx","textDecor","postWrmBatchUpload","file","formData","FormData","name","delete","getActiveBatchUploads","deleteActiveBatchUploadRow","uploadId","rowId","UploadStatus","timeout","useRef","display","setDisplay","Boolean","isFetching","refetch","check","useCallback","checking","isSuccess","uploads","statuses","upload","hasErrors","find","u","errorCount","current","hasArrow","label","aria-label","Link","icon","mdiProgressUpload","style","bottom","right","backgroundColor","mdiAlertCircle","mdiRefresh","spin","LINKS","About","FAQ","Resources","Explore","Methodology","ACCOUNT_LINKS","Profile","User","Account","Navigation","CustomLink","component","entries","subLabel","subValue","SiteHeader","isOpen","setIsOpen","useLocation","shouldShowSubheader","pathname","includes","HeaderLink","direction","base","lg","minHeight","px","py","zIndex","below","left","mdiMenu","src","alt","above","placement","mdiAlertOutline","onClose","Flex","Stack","flexDirection","Pressable","UpdateCookiePrefButton","OneTrust","IsInitialized","LoadBanner","console","log","Init","OnConsentChanged","ToggleInfoDisplay","AppFooter","target","rel","Date","getFullYear","Copy","align","combinedClassName","BlockError","title","LoadingSpinner","Maintenance","spacing","mb","maxWidth","Route","referrer","editUserFormSchema","getUserAccounts","resendVerificationEmail","SelectInput","items","placeholder","onChange","loading","selectedItemObject","useSelect","onSelectedItemChange","changes","selectedItem","initialSelectedItem","itemToString","item","getToggleButtonProps","getMenuProps","getItemProps","empty","inputError","mdiChevronDown","open","index","selected","AccountSelector","hideWhileSingle","length","acceptInvite","invitationId","deleteUserFromAccount","getFolders","createFolder","folderName","deleteFolder","folderId","getFolderAggregates","generateFolderPDFReport","Dialog","description","motionPreset","leastDestructiveRef","isCentered","pb","RadioList","v","checked","e","useAsyncState","DEFAULT_CHART","chart","text","legend","credits","exporting","RISK_COLOR_MAP","high","medium","low","none","STRESS_COLOR_MAP","High","Low","COLOR_MAP","R","Y","G","N","WITHDRAWAL_RISK_SUGGESTION_MAP","getRegressionLineV3","xData","yData","revenueSlope","regressionLine","slope","array","i","waterIntensity","waterIntensityAverage","reduce","acc","c","getSlopeV3","b","getColorByFacilityRank","rank","BENCHMARKING_TYPE_OPTIONS","BENCHMARKING_INTENSITY_OPTIONS","benchmarkingChartDataGenerator","aggregates","hiddenAggregates","displayState","intensity","showOrgAvg","showSectorAvg","filteredAggregates","filter","f","facilityId","getDots","facilities","dots","facility","facilityName","twoByTwoQuadrant","idx","facilityRank","dot","push","Number","organizationalAverageData","organizationalAverage","sortFunc","sectorId","sector3Id","isSector","every","filteredAggregatesData","sectorAverage","sectorWaterUsePerRevenue","animation","xAxis","plotOptions","scatter","dataLabels","shadow","formatter","this","point","allowOverlap","verticalAlign","inside","useHTML","format","marker","radius","symbol","lineColor","line","enableMouseTracking","series","yAxis","squareSymbol","symbolHeight","symbolWidth","symbolPadding","symbolRadius","tooltip","headerFormat","pointFormat","shared","visible","incomingRiskChartDataGenerator","attributes","categories","gridLineDashStyle","pointFormatter","stackTotal","column","stacking","outgoingRiskChartDataGenerator","revenueRiskChartDataGenerator","softMax","riskAnalysisChartDataGenerator","hiddenFacilities","twoByTwoXAxis","isNaN","twoByTwoYAxis","node","toLowerCase","first","second","third","fourth","gridLineWidth","startOnTick","endOnTick","tickLength","plotLines","dashStyle","labels","tickPositioner","maxDeviation","Math","max","abs","dataMax","dataMin","chartWidth","separation","ticks","riskFactorChartDataGenerator","pie","center","showInLegend","connectorPadding","distance","segment1","segment2","innerSize","round","percentage","riskSourceChartDataGenerator","asCommaSeparatedString","decimals","Intl","NumberFormat","maximumFractionDigits","minimumFractionDigits","formatAsCurrency","opts","currency","waterWithdrawalChartDataGenerator","riskLevel","level","suggestion","stackLabels","total","stack","escapeQuotes","string","sorter","natsort","GenerateReportDialog","reportType","setReportType","selectedFolder","setSelectedFolder","riskAnalysisChart","benchmarkingChart","isLoadingFacilities","facilityData","facilityError","handleGenerate","getSVG","Error","folders","useMemo","facilitiesInFolder","riskAnalysisChartOptions","benchmarkingChartOptions","highcharts","Highcharts","NavLink","isExternal","variantCssVars","RRNavLink","borderLeft","borderBottomColor","fontFamily","activeStyle","SidebarNav","isGenerateReportOpen","setIsGenerateReportOpen","md","overflow","pl","mdiFinance","borderTop","borderLeftColor","mdiDomain","mdiFolderMultipleOutline","mdiChartLine","mdiFileUploadOutline","gap","exact","mdiFileOutline","preventDefault","mdiPlusCircleOutline","mdiHelp","DEFAULT_STATE","deleteState","saveState","AsyncFormContext","AsyncFormStateProvider","internalFilterState","setInternalFilterState","resetState","useAsyncFormState","FilterAndSortContext","FilterAndSortProvider","setFilterState","useFilterAndSort","getAggregates","useDeepCompareMemoize","equal","useDeepCompareMemo","dependencies","VISIBILITY_STATE","FacilityRiskFilterContext","FacilityRiskFilterProvider","setHiddenAggregates","sortedAggregates","allAggregates","toggleFacilityVisibility","set","add","toggleVisibility","VISIBLE","useFacilityRiskFilter","BenchmarkingChart","setDisplayState","s","hidden","CheckboxInput","isChecked","readOnly","points","Danger","Warning","Success","Primary","SECTIONS","filterKey","Info","SectionInfo","FacilityRiskFilterSection","section","onToggle","openInfo","setOpenInfo","mdiChevronRight","aggregate","waaFacility","FacilityRiskFilter","activeSection","setActiveSection","handleToggle","reducedAggregates","danger","warning","amp","String","fromCharCode","SORTING_OPTIONS","prop","filterState","filtered","countryId","facilityLabel","sortId","aProp","bProp","reverse","SORT","FilterAndSort","hideSort","filterData","countriesDedupe","sectorsDedupe","countryName","countries","sectorName","sectors","BenchmarkingWrapper","tabStyles","tabs","tab","active","Benchmarking","folderData","isLoadingFolders","cacheTime","getReferenceData","getFacilitiesList","getFacility","deleteFacility","getFacilityReportingYears","createFacilityReportingYear","query","URLSearchParams","toString","updateFacilityReportingYear","reportingYearId","addFacilityFolderAssociation","removeFacilityFolderAssociation","TextInput","calculatorOptionalFormSchemaProps","year","calculatorOptionalFormSchema","CalculatorOptionalForm","minYear","list","startingYear","years","Array","_","useForm","defaultValues","resolver","yupResolver","control","handleSubmit","reset","formState","isDirty","onSubmit","random","substr","l","mdiClose","defaultValue","render","OptionalExpensesSavingsYear","expenseAmount","savingsAmount","expenses","savings","CashFlowModel","initialAmount","initialYear","waterSaved","discountRate","incomingIncrease","outgoingIncrease","waterUnitsMap","optionalExpensesSavingsYears","cashFlowArray","cashFlowArrayRiskAdjusted","discountedCashFlowArray","discountedCashFlowArrayRiskAdjusted","npvArray","npvArrayRiskAdjusted","volumeUnitFactor","incomingWaterQuantityUnitId","factor","amount","getOptionalExpensesSavingsMap","getCashFlowArray","getCashFlowArrayRiskAdjusted","getDiscountedCashFlowArray","getNPVArray","numOfTerms","cashFlowAmount","incomingWaterUnitPrice","pow","outgoingWaterUnitPrice","getOtherExpensesSavings","outgoingPrice","charts","outgoingWaterRiskChart","incomingPrice","incomingWaterRiskChart","cashFlow","discountPercent","discountedCashFlow","CalculatorResults","initialInvestment","investmentName","waterReductionImpact","expensesTotal","savingsTotal","outgoingPriceRiskAdjusted","incomingPriceRiskAdjusted","combinedPriceRiskAdjusted","twoYearIRRConventional","fiveYearIRRConventional","tenYearIRRConventional","twentyYearIRRConventional","twoYearIRRRiskAdjusted","fiveYearIRRRiskAdjusted","tenYearIRRRiskAdjusted","twentyYearIRRRiskAdjusted","npvArrayConventional","paybackPeriodConventional","paybackPeriodRiskAdjusted","getIRRForCashFlow","slice","getPaybackPeriod","annualizedIncomingWaterQuantity","getTotalAmount","positive","negative","numberOfTries","forEach","fn","seekZero","rate","rrate","npv","amountList","totalAmount","InvestmentCalculatorService","referenceData","mapCalculatorPdfRequestData","calculatorResults","irrYear","npvYear","waterUnit","paybackPeriodChartString","facilityCity","cityName","facilityState","regionName","facilityCountry","projectName","date","toLocaleDateString","capitalInvestmentAmount","formatValueForExport","capitalInvestmentYear","waterSavedPerYearAmount","waterSavedPerYearUnit","projectedWaterCostIncreaseIncoming","projectedWaterCostIncreaseOutgoing","operatingExpenses","exp","operatingSavings","sav","incomingWaterCostPerUnit","outgoingWaterCostPerUnit","combinedWaterCostPerUnit","totalOperationalExpenses","totalOperationalSavings","incomingQuantityRiskAdjustedPricePerUnit","outgoingRiskAdjustedWaterPricePerUnit","inAndOutTotalRiskAdjustedPrice","estimatedAnnualWaterReduction","annualWaterReductionImpact","netPresentYear","conventionalPaybackPeriod","riskAdjustedPaybackPeriod","year2NPVConventional","year5NPVConventional","year10NPVConventional","year20NPVConventional","year2NPVRiskAdjusted","year5NPVRiskAdjusted","year10NPVRiskAdjusted","year20NPVRiskAdjusted","year2IRRConventional","year5IRRConventional","year10IRRConventional","year20IRRConventional","year2IRRRiskAdjusted","year5IRRRiskAdjusted","year10IRRRiskAdjusted","year20IRRRiskAdjusted","svgChart","precision","valueAsNumber","parseFloat","investmentCalculatorSchemaProperties","investmentCalculatorSchema","InvestmentCalculator","paybackPeriodChart","selectors","setSelectors","setCalculatorResults","waterUnits","unit","unitId","calculatorService","savingsAndExpenses","setSavingsAndExpenses","projectYears","currentYear","getInvestmentYears","watch","projectYear","expense","saving","calculateResults","onDownload","conventional","riskAdjusted","tickInterval","DateTime","now","toLocaleString","colSpan","Calculator","match","params","facilitiesError","isLoadingReferenceData","referenceDataError","VerticalTabContainer","activeTab","setActiveTab","TotalRisk","riskSource","waterRiskPremiumIncomingOutgoingChart","riskFactor","waterRiskPremiumScarcityQualityChart","legendYears","legendColors","usdPerYear","rowKey","riskAdjustedPricing","IncomingRisk","score","individualQuantityRiskLevel","arr","strong","number","OutgoingRisk","individualQualityRiskLevel","RevenueRisk","revenueRiskChart","individualRevenueRiskLevel","TABS","IdentifyRiskTabGroup","activeTabIndex","WaterWithdrawalRisk","sustainableWaterAllocationChart","stressLevel","wriWaterStressCategory","toUpperCase","SetTargetsTabGroup","NoAssessment","facilityReportingYearId","marginRight","JourneyStep","JourneyTitles","Identify","Target","Implement","Track","TIMELINE_COLORS","BusinessCase","guide","Content","nodeValue","marginBottom","my","borderBottom","borderRight","resolveBullets","Enterprise","Tangible","guideNodeId","Individual","Intangible","hasOwnProperty","Bullet","caseStudyImages","CaseStudies","caseStudies","zip","Header","header","content","ChecklistItem","Checklist","sections","SiteManagement","CheckBox","WaterManagementPractices","TargetSetting","WaterStewardship","allowToggle","boxSize","InvestmentCalculatorTab","Scenario","maturity","graphUrl","StepsTable","steps","step","stepNumber","Description","Examples","Tools","nodeValueLink","ToolsAndResources","Step","TakeActionTabGroup","waaWaterMaturity","normalizedMaturity","isError","guideNodes","nodeName","parseGuide","waaScore","checklist","justifySelf","alignSelf","AbsoluteVolume","potWaterVolume","footerFormat","ProductionBasis","potWaterIntensityProduction","RevenueBasis","potWaterIntensityRevenue","TrackProgressTabGroup","Alert","require","FacilityReportDialog","riskSourceChartComponent","riskFactorChartComponent","incomingChartComponent","outgoingChartComponent","revenueChartComponent","waterWithdrawalChartComponent","aggregateResult","riskFactorSvgChart","riskSourceSvgChart","incomingSvgChart","outgoingSvgChart","revenueSvgChart","waterWithdrawalSvgChart","reportingYear","FolderAssignDialog","onSave","facilityFolderId","asyncState","setAsyncState","handleCreateFolder","refetchQueries","hideActions","folder","ViewTabs","FacilityListItem","history","useHistory","showAverageWaterStress","openModalView","setOpenModalView","currentOpenView","setCurrentOpenView","isGeneratingReport","setIsGeneratingReport","IDENTIFY_RISK","tableStyles","noOfLines","trigger","mdiHelpCircleOutline","isLazy","closeOnSelect","IconButton","rightIcon","mdiDotsVertical","stopPropagation","mdiCardSearchOutline","mdiFolderOutline","mdiFileDownloadOutline","SET_TARGETS","TAKE_ACTION","TRACK_PROGRESS","incoming","incomingOutgoingWaterTotal","stress","overallWaterStressCategory","premium","waterRiskPremium","risk","revenueAtRiskPercentage","leftIcon","iconSpacing","NoFacilities","pt","FacilityList","filteredFacilities","DashboardWrapper","Dashboard","block","noFacilities","FILTER_OPTIONS","modelingOnly","FacilitiesListItem","hasWrmData","mdiAlertOctagon","Facilities","isSubmitting","setIsSubmitting","dir","sortState","setSortState","sortedFacilities","desc","handleExport","flexBasis","mdiDownloadBoxOutline","ModalDialog","confirmButtonText","cancelButtonText","onConfirm","cancelRef","ml","ReportingYearsList","toast","useToast","useBoolean","isLoadingDelete","setIsLoadingDelete","isDeleting","setIsDeleting","some","processed","reportingYears","handleDelete","on","deleteFacilityReportingYear","invalidateQueries","isClosable","off","mdiPlus","colorScheme","vertical","mdiSync","rotate","mdiPencilOutline","mdiTrashCanOutline","Facility","mdiChevronDoubleLeft","mdiMapMarkerOutline","mdiLabelOutline","getClassifications","parent","getCountries","getRegions","getCities","regionId","FacilityTabFooter","onNext","onBack","onCancel","onDelete","backButtonText","nextButtonText","canNext","canBack","isSaving","marginLeft","UploadFlowError","endingYear","REPORTING_YEARS","_v","k","transformEmptyString","optionalOneOf","facilityInformationSchemaProperties","cityId","sector1Id","sector2Id","facilityInformationSchema","facilityDetailsSchemaProperties","incomingWaterTimePeriod","incomingWaterQuantity","incomingWaterQuantityUnit","incomingWaterPrice","incomingWaterPriceCurrencyCode","incomingWaterPriceUnit","incomingWaterSource","waterWithdrawalReplenishment","waterWithdrawalAnnualizedVolumetricBenefit","when","is","typeError","otherwise","waterWithdrawalAnnualizedVolumetricBenefitUOMId","waterWithdrawalSupportingReplenishmentWaterFund","waterWithdrawalReplenishmentDurationInYears","waterWithdrawalThirdPartyVerified","waterWithdrawalThirdPartyVerifier","outgoingWaterTimePeriod","outgoingWaterQuantity","outgoingWaterQuantityUnit","outgoingWaterPrice","outgoingWaterPriceCurrencyCode","outgoingWaterPriceUnit","outgoingWaterTreatmentSource","facilityOutput","facilityOutputUnitsOfMeasure","projectedFacilityOutputIncrease","moreThan","businessInformationSchemaProperties","droughScenario","projectedIncomingWaterPriceIncrease","notRequired","projectedIncomingWaterQuantityIncrease","projectedOutgoingWaterPriceIncrease","projectedOutgoingWaterQuantityIncrease","revenue","revenueCurrencyCode","test","projectedRevenueIncrease","revenueLostDueToWaterScarcity","regulationReputationSchemaProperties","regulationOfWaterInLocalCommunityQuestion","facilityEnvironmentalReputationQuestion","dependingSameWaterSourceQuestion","exemptWaterRestrictionQuestion","ngoLocalPressureQuestion","waterQualitySchemaProperties","incomingWaterQualityComparison","alternativeWaterSourceQuestion","outgoingWaterOnsiteTreatmentCapacity","outgoingWaterOffsiteTreatmentCapacity","incomingWaterImpairmentSalinity","incomingWaterImpairmentOrganics","incomingWaterImpairmentSuspendedSolids","incomingWaterImpairmentTaste","incomingWaterImpairmentOdor","pollutantsSchemaProperties","ownOutgoingWaterStandards","pollutants","of","shape","threshold","concentration","facilityDilutionFactor","min","waterActionAssessmentAnswersSchemaProperties","assessment","questionnaireId","reportingyearId","nullable","assessmentAnswers","facilityFormSchema","FormHelpButton","formHelp","setHelpKey","FormHelpText","helpKey","mdiWindowClose","FormHelpTooltip","useFormHelp","setKey","newKey","mapDefaultFacilityFormValues","seed","toLocaleLowerCase","FacilityCreate","isCancelling","setIsCancelling","uploadResults","isUploadResolutionFlow","rowResults","mode","isValid","countriesData","isLoadingCountries","countriesDataStatus","regionData","isLoadingRegions","regionsDataStatus","regions","cityData","isLoadingCities","citiesDataStatus","citys","sectorsLevelOneData","isLoadingClassificationsLevelOne","sectorsLevelOneDataStatus","sectorsLevelOne","sectorsLevelTwoData","isLoadingClassificationsLevelTwo","sectorsLevelTwoDataStatus","sectorsLevelTwo","sectorsLevelThreeData","isLoadingClassificationsLevelThree","sectorsLevelThreeDataStatus","sectorsLevelThree","replaceState","errorType","Assessment","hasFormError","rules","localName","val","fkSector","go","FacilityEdit","createFolderFormSchema","defined","RESOLVER","FolderMutateModal","setIsLoading","autoFocus","tabIndex","isInvalid","isDisabled","AddFolderFacilityModal","selectedFacilityId","setSelectedFacilityId","selectedFacility","ff","onAddFacility","m","defaultChecked","FacilityItem","handleRemoveFacility","mdiFolderRemoveOutline","FolderDeletePopover","handleDeleteFolder","mdiTrashCan","getTransfers","createTransfer","assetId","transferToUsername","schema","TransferModal","handleTransferFolder","mdiTransferUp","FolderItemContents","isFrozen","isMutating","setIsMutating","isTransferring","setIsTransferring","isAddingToFolder","setIsAddingToFolder","hasChildren","offsetX","mdiFolderEdit","mdiTextBoxSearchOutline","shouldWrapChildren","STATUS_COLOR","FolderItem","_last","data-open","isExpanded","_expanded","borderY","mdiFolderOpenOutline","FolderList","frozen","accordionIndex","setAccordionIndex","folderRes","facilitiesRes","sortedFolders","STATUS_ICON","transferred","mdiCheckAll","failed","mdiProgressAlert","accepted","mdiCheck","declined","mdiCancel","queued","TransferStatusTag","getStatusText","TransferListItem","transfer","handleReaction","reaction","transferId","assetName","facilityCount","mdiAccountArrowRightOutline","transferFromName","transferFromUsername","closeOnBlur","closeOnEsc","TransferList","transfers","mdiTransferDown","mdiHistory","TransfersGroup","showPast","other","mdiSwapHorizontal","transferToUserId","outgoing","transferFromUserId","FolderManager","previous","isCreating","setIsCreating","isViewingPast","setIsViewingPast","refetchInterval","onSettled","t","toggle","mdiArrowUp","mdiArrowDown","useQueryParams","search","compareByProp","Carousel","assessmentId","questions","useFormContext","answers","sortedQuestions","slideshow","question","conditional","parentConditionChoiceId","parentConditionChoiceValue","questionsCount","activeQuestionIndex","setActiveQuestionIndex","questionId","displayText","displaySubText","questionChoices","questionChoiceId","AssessmentCarousel","cat","flat","q","FacilityTabNavigator","tabNavigator","tabsInError","clickToNavigate","setActiveTabIndex","hasError","clickable","BusinessInformation","currencies","revenueLostOptions","FacilityDetails","availableYears","isEditing","hasWaterWithdrawalReplenishment","hasWaterWithdrawalThirdPartyVerified","timePeriods","timePeriodOptions","locationOfWaterSourceOptions","locationOfWaterTreatmentOptions","TabStatus","Pollutants","fields","useFieldArray","keyName","hiddenPollutantFields","pollutant","casNumber","pollutantName","fieldName","RegulationReputation","regulationOfWaterInLocalCommunityQuestionOptions","facilityEnvironmentalReputationQuestionOptions","dependingSameWaterSourceQuestionOptions","waterRestrictionQuestionOptions","WaterQuality","incomingWaterQualityComparisonOptions","alternativeWaterSourceQuestionOptions","thirdPartyCapacityOptions","TAB_MAP","urlQueryParam","TAB_INPUT_MAP","facilityPollutants","getValueAsNumber","converted","getValueAsBoolean","jiggle","keyframes","WrmForm","defaultPollutants","hydrateWith","uploadErrorType","initialTabKey","initialTab","initializedIndex","onNextTab","useTabNavigator","isAssessmentError","isLoadingClassifications","mappedDefaultValues","hydrationData","questionaireId","answer","mapDefaultReportingYearFormValues","methods","keys","handleSave","getElementById","scrollTo","behavior","formReferenceData","out","option","hasSubmitError","isSubmitted","isSubmitSuccessful","hasConflictError","animationDelay","ReportingYearCreate","facilityQuery","yearsQuery","assessmentEntries","cleanedEntries","batchUploadRowId","yearsData","takenYears","ry","ReportingYearEdit","getFacilityReportingYear","RiskAnalysisChart","RiskAnalysisWrapper","RiskAnalysis","convertColorKeyToVarName","colorKey","ActiveUploadCard","processedCount","totalRowCount","fileName","fileHash","canInspect","isNotProcessed","percent","statusColor","ERROR","INIT","SUCCESS","handleDeleteUpload","trackColor","thickness","capIsRound","mdiCloudRemove","mdiCloudSyncOutline","mdiCloudCheck","mdiFileDocumentOutline","mdiCloudCheckOutline","mdiCloudRemoveOutline","mdiWrenchCog","UPLOAD_STATUS_COLOR","RowResultsListItem","parseError","row","errorJson","rowJson","tableColor","rowErrors","parse","parseErrors","mdiMerge","General","RowResultsList","rows","headerIcon","headerText","divider","Upload","filteredRows","initialScale","processedWithErrors","validatedWithErrors","mdiTableAlert","validated","mdiTableSync","mdiTableCheck","Uploader","asyncUploadState","setAsyncUploadState","fileRef","canUpload","setCanUpload","handleUpload","files","at","handleDownload","borderBottomRadius","borderTopRadius","LegacyButton","Uploads","useDisclosure","onOpen","shouldShowAlertStatus","shouldShowUploader","createdDate","completed","incomplete","delay","routes","App","themeManager","verified","route","HELMET_DEFAULTS","defaultTitle","titleTemplate","Helmet","images","ImageRotator","transitions","useTransition","opacity","enter","leave","config","molasses","interval","setInterval","clearInterval","div","backgroundImage","RouteContentScrollable","SiteFooter","solid","PARTNERS","image","checkCookieValue","cookieName","checkValue","cookieValue","parts","cookie","split","pop","getCookieValue","p1","parseInt","PopperContainer","IdentifyPopper","pr","maxH","ImplementPopper","TargetPopper","TrackPopper","Home","popoverVisible","setPopoverVisible","ytCookieActive","setYtCookieActive","checksPerformed","checkCookie","socialCookie","intervalId","handleJourneyClick","pointerEvents","centerContent","columns","ratio","frameBorder","allow","referrerPolicy","BrandFaqs","BrandResources","BrandContact","sm","partner","STEPS","subtitle","JourneyIcon","FADE_IN_DOWN","OPTIONS","UserInviteDialog","isShare","inviteType","setInviteType","handleInviteUser","externalInvite","consolidateAccount","internalInvite","isInvitingUser","setIsInvitingUser","currentAccount","users","currentAccountUser","removeUserFromAccount","uid","accountNumber","PageHeader","Title","Subtitle","Actions","actions","fit","background","contactFormSchemaProperties","company","city","comments","requiredMiddleName","contactFormSchema","FaqItem","Faq","defaultIndex","RRLink","ForgotPassword","role","autoComplete","Invitation","getInvite","animate","useSpring","userName","accountName","JourneyStepBubble","RainDrop","numberOnly","Section","STEP_COLLECTION","HowItWorks","tagIndex","findIndex","hash","setStep","COUNTRY_MAP","AFG","ALB","DZA","ASM","AND","AGO","AIA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BIH","BWA","BRA","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","COL","COM","COK","CRI","CIV","HRV","CUB","CYP","CZE","COD","DNK","DJI","DMA","DOM","TLS","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FJI","FIN","FRA","GUF","PYF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GIN","GNB","GUY","HTI","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JOR","KAZ","KEN","KIR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","PRK","MNP","NOR","OMN","PAK","PLW","PAN","PNG","PRY","PER","PHL","POL","PRT","PRI","QAT","COG","REU","ROU","RUS","RWA","KNA","LCA","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SVK","SVN","SLB","SOM","ZAF","KOR","ESP","LKA","SDN","SUR","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","URY","UZB","VUT","VEN","VNM","VIR","YEM","ZMB","ZWE","ResetPassword","submission","setSubmission","setIsSaving","mdiAccountCircle","aria-disabled","VerificationRequired","handleResend","VerifyAccount","effect","useParams","REPORTS","order","ARTICLES","TOOLS","SIZES","Resource","resource","backgroundRepeat","backgroundSize","backgroundClip","bgGradient","Raindrop","borderRightRadius","borderBottomLeftRadius","useScrollToAnchor","element","scrollIntoView","KEY_MILESTONES","2014","2015","2017","2019","2021","2024","INPUT_ACTION","OUTPUT_ACTION","ActionItem","hasImage","TARGET_STRATEGIES","decrease","strategy","TAKE_ACTION_STAGES","stage","reason","shouldShowExpiredBanner","setShouldShowExpiredBanner","registerUser","abbr","flexDir","isRequired","htmlFor","backgroundPosition","isEven","report","article","tool","fontStyle","action","listItemStyle","paddingTop","terminate","checkConsentAndUpdateContent","otIniGrps","otGetInitialGrps","OptanonWrapperCount","OnetrustActiveGroups","eraseCookie","domainName","hostname","ecoDeleteCookie","pathArray","currentPath","join","iniOptGrpId","otDomainGrps","Optanon","GetDomainData","Groups","OptanonActiveGroups","reload","otDeletedGrpIds","missingGroupIds","currentGroupIds","getMissingGroupIds","group","CustomGroupId","Cookies","Name","Hosts","host","HostId","otDeleteCookie","ReactDOM","StrictMode"],"mappings":"mGACAA,EAAOC,QAAU,CAAC,aAAa,UAAU,kBAAkB,UAAU,eAAe,UAAU,YAAY,UAAU,gBAAgB,UAAU,UAAU,UAAU,QAAQ,UAAU,YAAY,UAAU,kBAAkB,cAAc,eAAe,0CAA0C,iBAAiB,UAAU,OAAS,uBAAuB,SAAW,yBAAyB,MAAQ,sBAAsB,eAAiB,+BAA+B,UAAY,0BAA0B,QAAU,wBAAwB,UAAY,0BAA0B,OAAS,yB,oBCAvkBD,EAAOC,QAAU,CAAC,kBAAkB,UAAU,YAAY,UAAU,QAAQ,UAAU,eAAe,0CAA0C,cAAgB,qCAAqC,QAAU,+BAA+B,KAAO,4BAA4B,SAAW,gCAAgC,UAAY,iCAAiC,MAAQ,6BAA6B,KAAO,4BAA4B,WAAa,kCAAkC,eAAiB,sCAAsC,QAAU,iC,oBCAhiBD,EAAOC,QAAU,CAAC,kBAAkB,cAAc,YAAY,UAAU,eAAe,0CAA0C,YAAY,QAAQ,WAAa,+BAA+B,SAAW,6BAA6B,QAAU,4BAA4B,O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danger-color\":\"#D93942\",\"danger-bg\":\"#f2b9bd\",\"danger-border\":\"#bb242c\",\"text-03\":\"#6B7480\",\"ui-04\":\"#E9ECEF\",\"std-white\":\"#FFFFFF\",\"std-transparent\":\"transparent\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"btn-extra-dark\":\"#00435A\",\"button\":\"Button_button__3IlDe\",\"disabled\":\"Button_disabled__1Z6Tp\",\"light\":\"Button_light__OwrU5\",\"submittingIcon\":\"Button_submittingIcon__2KOaQ\",\"isLoading\":\"Button_isLoading__2ZS7V\",\"primary\":\"Button_primary__2MCyp\",\"secondary\":\"Button_secondary__3uh2F\",\"danger\":\"Button_danger__1Elrk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-dark\":\"#005075\",\"std-white\":\"#FFFFFF\",\"ui-03\":\"#F1F3F5\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"accountAvatar\":\"AccountAvatar_accountAvatar__2oJUV\",\"trigger\":\"AccountAvatar_trigger__J-Zmd\",\"menu\":\"AccountAvatar_menu__1xS9B\",\"openIcon\":\"AccountAvatar_openIcon__1wTuu\",\"personals\":\"AccountAvatar_personals__1ok1Z\",\"links\":\"AccountAvatar_links__1gKbv\",\"link\":\"AccountAvatar_link__17NkR\",\"linkButton\":\"AccountAvatar_linkButton__Jqljl\",\"linkButtonIcon\":\"AccountAvatar_linkButtonIcon__1wqxg\",\"divider\":\"AccountAvatar_divider__2b4Sv\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-transparent\":\"transparent\",\"std-white\":\"#FFFFFF\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"screen-lg\":\"992px\",\"siteHeader\":\"SiteHeader_siteHeader__2D8Xi\",\"brandImg\":\"SiteHeader_brandImg__cdtVH\",\"actions\":\"SiteHeader_actions__1eZ_9\",\"action\":\"SiteHeader_action__1iBhI\",\"links\":\"SiteHeader_links__GbBuw\",\"link\":\"SiteHeader_link__yQsCk\",\"menu\":\"SiteHeader_menu__2w5h7\",\"divider\":\"SiteHeader_divider__3QRJx\",\"authActions\":\"SiteHeader_authActions__2lWx3\",\"authButton\":\"SiteHeader_authButton__3cum2\",\"animate\":\"SiteHeader_animate__2G9EI\",\"fadeInDown\":\"SiteHeader_fadeInDown__1nsja\",\"hideXs\":\"SiteHeader_hideXs__1f3jv\",\"hideLg\":\"SiteHeader_hideLg__2onIW\",\"active\":\"SiteHeader_active__1sQXM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"pressable\":\"Pressable_pressable__2wPrh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-dark\":\"#005075\",\"screen-lg\":\"992px\",\"appFooter\":\"AppFooter_appFooter__3v_1u\",\"links\":\"AppFooter_links__MC0iB\",\"section\":\"AppFooter_section__1te9X\",\"break\":\"AppFooter_break__fznma\",\"button\":\"AppFooter_button__EsA7K\",\"footerLinksWrapper\":\"AppFooter_footerLinksWrapper__175m8\",\"footerLinksRow\":\"AppFooter_footerLinksRow__I7I_v\",\"footerBottomLinksRow\":\"AppFooter_footerBottomLinksRow__2ONp7\",\"footerLink\":\"AppFooter_footerLink__19fef\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ui-05\":\"#DEE2E6\",\"blockError\":\"BlockError_blockError__2pcAd\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"screen-lg\":\"992px\",\"std-white\":\"#FFFFFF\",\"std-text\":\"#333333\",\"brand-blue-light\":\"#5EB6E4\",\"copy\":\"Copy_copy__1Cc5p\",\"center\":\"Copy_center__3UyzT\",\"h1\":\"Copy_h1__3_Vk7\",\"h2\":\"Copy_h2__2OYHm\",\"h3\":\"Copy_h3__29z_j\",\"h4\":\"Copy_h4__3IhFN\",\"p\":\"Copy_p__2wKoL\",\"right\":\"Copy_right__1MPM7\",\"left\":\"Copy_left__33rOA\",\"white\":\"Copy_white___cooH\",\"blueLight\":\"Copy_blueLight__2dVbE\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-light\":\"#5EB6E4\",\"text-01\":\"#333333\",\"ui-07\":\"#B7B7B7\",\"ui-06\":\"#CED4DA\",\"ui-03\":\"#F1F3F5\",\"danger\":\"#D93942\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"selectInput\":\"SelectInput_selectInput__3kbHc\",\"input\":\"SelectInput_input__1Uo7z\",\"inputError\":\"SelectInput_inputError__2K6Z0\",\"loading\":\"SelectInput_loading__2UJqZ\",\"text\":\"SelectInput_text__2ALV6\",\"empty\":\"SelectInput_empty__3tsO_\",\"icon\":\"SelectInput_icon__3iACz\",\"open\":\"SelectInput_open__CJsD9\",\"menu\":\"SelectInput_menu__3uztT\",\"menuItem\":\"SelectInput_menuItem__1OzK-\",\"selected\":\"SelectInput_selected__2s2e4\",\"error\":\"SelectInput_error__3bIOH\",\"disabled\":\"SelectInput_disabled__1XTO6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"danger\":\"#D93942\",\"radioList\":\"RadioList_radioList__1sY8P\",\"radioListItem\":\"RadioList_radioListItem__1-2FZ\",\"radioListLabel\":\"RadioList_radioListLabel__LJHKN\",\"radioListInput\":\"RadioList_radioListInput__1BUJq\",\"error\":\"RadioList_error__3ywb0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"ui-03\":\"#F1F3F5\",\"generateReportDialog\":\"GenerateReportDialog_generateReportDialog__1RFTd\",\"actions\":\"GenerateReportDialog_actions__15Db3\",\"input\":\"GenerateReportDialog_input__D7V28\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"app\":\"app_app__2rSuK\",\"content\":\"app_content__1GhJA\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"BenchmarkingChart_header__2-XYF\",\"switch\":\"BenchmarkingChart_switch__2C0SM\",\"legend\":\"BenchmarkingChart_legend__2LG8D\",\"legendItem\":\"BenchmarkingChart_legendItem__U_-jV\",\"toggle\":\"BenchmarkingChart_toggle__2ltJ_\",\"hidden\":\"BenchmarkingChart_hidden__2UHW-\",\"swatch\":\"BenchmarkingChart_swatch__34vkv\",\"org\":\"BenchmarkingChart_org__nQ8np\",\"sector\":\"BenchmarkingChart_sector__2a5XJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-light\":\"#5EB6E4\",\"text-01\":\"#333333\",\"ui-07\":\"#B7B7B7\",\"ui-06\":\"#CED4DA\",\"danger\":\"#D93942\",\"checkboxInput\":\"CheckboxInput_checkboxInput__12zNz\",\"checkboxContainer\":\"CheckboxInput_checkboxContainer__N53Ia\",\"svgContainer\":\"CheckboxInput_svgContainer__JZhtx\",\"wave\":\"CheckboxInput_wave__33Vpa\",\"label\":\"CheckboxInput_label__IOfxr\",\"error\":\"CheckboxInput_error__1xMO_\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ui-03\":\"#F1F3F5\",\"ui-07\":\"#B7B7B7\",\"std-white\":\"#FFFFFF\",\"brand-blue-light\":\"#5EB6E4\",\"elevation-01\":\"0px 1px 6px 0px rgba(30, 41, 55, 0.06)\",\"dangerColor\":\"#D93942\",\"warningColor\":\"#F0AF3B\",\"successColor\":\"#58AF4C\",\"facilityRiskFilter\":\"FacilityRiskFilter_facilityRiskFilter__Nq5dJ\",\"sidebarHeader\":\"FacilityRiskFilter_sidebarHeader__2UNay\",\"section\":\"FacilityRiskFilter_section__1RLBV\",\"sectionHeader\":\"FacilityRiskFilter_sectionHeader__Lc1Ok\",\"icon\":\"FacilityRiskFilter_icon__1IWAU\",\"open\":\"FacilityRiskFilter_open__C-axh\",\"danger\":\"FacilityRiskFilter_danger__2Vabu\",\"warning\":\"FacilityRiskFilter_warning__33-ot\",\"success\":\"FacilityRiskFilter_success__1gMbt\",\"sectionContent\":\"FacilityRiskFilter_sectionContent__1F1m-\",\"sectionLineItem\":\"FacilityRiskFilter_sectionLineItem__m6jNq\",\"sectionLineItemTitleBar\":\"FacilityRiskFilter_sectionLineItemTitleBar__3kqAR\",\"additionalInfo\":\"FacilityRiskFilter_additionalInfo__7sf4T\",\"sectionLineItemLabel\":\"FacilityRiskFilter_sectionLineItemLabel__aHvla\",\"infoAction\":\"FacilityRiskFilter_infoAction__1qhi-\",\"empty\":\"FacilityRiskFilter_empty__2rdhC\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"screen-lg\":\"992px\",\"filterAndSort\":\"FilterAndSort_filterAndSort__I-zBj\",\"filterAndSortTitle\":\"FilterAndSort_filterAndSortTitle__19TbW\",\"filtering\":\"FilterAndSort_filtering__WuoHS\",\"sorting\":\"FilterAndSort_sorting__2oWZy\",\"options\":\"FilterAndSort_options__yts-Z\",\"filterOption\":\"FilterAndSort_filterOption__1scpt\",\"sortOption\":\"FilterAndSort_sortOption__14RVw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"std-white\":\"#FFFFFF\",\"ui-03\":\"#F1F3F5\",\"screen-lg\":\"992px\",\"screen-xl\":\"1200px\",\"benchmarking\":\"Benchmarking_benchmarking__ezHBL\",\"tabs\":\"Benchmarking_tabs__1oLlt\",\"header\":\"Benchmarking_header__3gQwx\",\"filterAndSort\":\"Benchmarking_filterAndSort__ViTLv\",\"content\":\"Benchmarking_content__2mSDc\",\"charts\":\"Benchmarking_charts__2qinn\",\"sidebar\":\"Benchmarking_sidebar__g5Ef4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ui-03\":\"#F1F3F5\",\"ui-04\":\"#E9ECEF\",\"elevation-01\":\"0px 1px 6px 0px rgba(30, 41, 55, 0.06)\",\"list\":\"CalculatorOptionalForm_list__2uFeA\",\"listItem\":\"CalculatorOptionalForm_listItem__1FRog\",\"remove\":\"CalculatorOptionalForm_remove__qReNS\",\"row\":\"CalculatorOptionalForm_row__3aU8p\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ui-04\":\"#E9ECEF\",\"ui-07\":\"#B7B7B7\",\"text-01\":\"#333333\",\"danger\":\"#D93942\",\"textInput\":\"TextInput_textInput__3W5JC\",\"inputError\":\"TextInput_inputError__2tUtG\",\"disabled\":\"TextInput_disabled___VjwF\",\"error\":\"TextInput_error__9B3zk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-light\":\"#5EB6E4\",\"ui-03\":\"#F1F3F5\",\"ui-04\":\"#E9ECEF\",\"elevation-01\":\"0px 1px 6px 0px rgba(30, 41, 55, 0.06)\",\"investmentCalculator\":\"InvestmentCalculator_investmentCalculator__3iq5U\",\"panels\":\"InvestmentCalculator_panels__2NGQb\",\"panel\":\"InvestmentCalculator_panel__NmOca\",\"panelHeader\":\"InvestmentCalculator_panelHeader__2vjN2\",\"panelSection\":\"InvestmentCalculator_panelSection__3gDxo\",\"innerSection\":\"InvestmentCalculator_innerSection__3gFv6\",\"row\":\"InvestmentCalculator_row__egBkE\",\"tables\":\"InvestmentCalculator_tables__1CYTs\",\"full\":\"InvestmentCalculator_full__xCFrP\",\"table\":\"InvestmentCalculator_table__1YoN-\",\"resultTable\":\"InvestmentCalculator_resultTable__7jd-3\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-light\":\"#5EB6E4\",\"ui-03\":\"#F1F3F5\",\"ui-04\":\"#E9ECEF\",\"elevation-01\":\"0px 1px 6px 0px rgba(30, 41, 55, 0.06)\",\"calculator\":\"Calculator_calculator__p9z-W\",\"header\":\"Calculator_header__7uNpJ\",\"content\":\"Calculator_content__3wph_\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"ui-03\":\"#F1F3F5\",\"brand-blue-light\":\"#5EB6E4\",\"text-blue\":\"#00435a\",\"screen-sm\":\"576px\",\"screen-lg\":\"992px\",\"verticalTabContainer\":\"VerticalTabContainer_verticalTabContainer__1xsx-\",\"selector\":\"VerticalTabContainer_selector__1xaPi\",\"tabs\":\"VerticalTabContainer_tabs__OB87f\",\"shadow\":\"VerticalTabContainer_shadow__1SrB4\",\"tabContent\":\"VerticalTabContainer_tabContent__3tMcn\",\"tab\":\"VerticalTabContainer_tab__15yue\",\"active\":\"VerticalTabContainer_active__1XH6i\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"animate\":\"IdentifyRiskTabGroup_animate__PHG0U\",\"fadeInDown\":\"IdentifyRiskTabGroup_fadeInDown__2j_dX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-dark\":\"#005075\",\"noAssessment\":\"NoAssessment_noAssessment__2aMvL\",\"header\":\"NoAssessment_header__2Oswg\",\"subheader\":\"NoAssessment_subheader__1dkek\",\"actions\":\"NoAssessment_actions__1N7um\",\"action\":\"NoAssessment_action__1A7kp\",\"link\":\"NoAssessment_link__114bs\",\"help\":\"NoAssessment_help__6x-w9\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"animate\":\"TakeActionTabGroup_animate__3jGdf\",\"fadeInDown\":\"TakeActionTabGroup_fadeInDown__3pf5b\",\"header\":\"TakeActionTabGroup_header__vO1MQ\",\"headline\":\"TakeActionTabGroup_headline__3qZA9\",\"subheadline\":\"TakeActionTabGroup_subheadline__1DjME\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"animate\":\"TrackProgressTabGroup_animate__3FQxg\",\"fadeInDown\":\"TrackProgressTabGroup_fadeInDown__31O5x\",\"header\":\"TrackProgressTabGroup_header__3eyJF\",\"headline\":\"TrackProgressTabGroup_headline__1vDra\",\"subheadline\":\"TrackProgressTabGroup_subheadline__1tiAl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"facilityReportDialog\":\"FacilityReportDialog_facilityReportDialog__3BzJu\",\"content\":\"FacilityReportDialog_content__VBnVF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-transparent\":\"transparent\",\"dangerColor\":\"#D93942\",\"danger-bg\":\"#f2b9bd\",\"danger-border\":\"#bb242c\",\"successColor\":\"#58AF4C\",\"success-bg\":\"#cbe7c7\",\"success-border\":\"#468b3d\",\"infoColor\":\"#5CB1D5\",\"info-bg\":\"#d6ebf4\",\"info-border\":\"#349dca\",\"warningColor\":\"#F0AF3B\",\"warning-bg\":\"#fbe9c9\",\"warning-border\":\"#e69a12\",\"alert\":\"Alert_alert__22YmR\",\"danger\":\"Alert_danger__2KVP8\",\"success\":\"Alert_success__2xFKV\",\"info\":\"Alert_info__zAuRT\",\"warning\":\"Alert_warning__1ACmJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"FolderAssignDialog_footer__boX-R\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"ui-05\":\"#DEE2E6\",\"ui-03\":\"#F1F3F5\",\"ui-06\":\"#CED4DA\",\"brand-blue-light\":\"#5EB6E4\",\"brand-blue-dark\":\"#005075\",\"text-blue\":\"#00435a\",\"elevation-01\":\"0px 1px 6px 0px rgba(30, 41, 55, 0.06)\",\"screen-lg\":\"992px\",\"screen-xl\":\"1200px\",\"facilityListItem\":\"FacilityListItem_facilityListItem__2hS7T\",\"tabHeader\":\"FacilityListItem_tabHeader___c4Vf\",\"row\":\"FacilityListItem_row__3XvF1\",\"cell\":\"FacilityListItem_cell__3liRT\",\"cellContent\":\"FacilityListItem_cellContent__1al-v\",\"cellValue\":\"FacilityListItem_cellValue__2epNb\",\"title\":\"FacilityListItem_title__2cDY6\",\"smallText\":\"FacilityListItem_smallText__2qLeM\",\"footer\":\"FacilityListItem_footer__3Wyxz\",\"switchGroup\":\"FacilityListItem_switchGroup__3w6mk\",\"footerLink\":\"FacilityListItem_footerLink__1MnT9\",\"footerIcon\":\"FacilityListItem_footerIcon__y4OD3\",\"loadingOverlay\":\"FacilityListItem_loadingOverlay__1EdA8\",\"actionGroup\":\"FacilityListItem_actionGroup__3UeyJ\",\"leftActions\":\"FacilityListItem_leftActions__205hA\",\"rightActions\":\"FacilityListItem_rightActions__2T6xP\",\"action\":\"FacilityListItem_action__3Wl5P\",\"active\":\"FacilityListItem_active__3wkGr\",\"inactive\":\"FacilityListItem_inactive__1A5u-\",\"rowContent\":\"FacilityListItem_rowContent__3ZkiJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-dark\":\"#005075\",\"noFacilities\":\"NoFacilities_noFacilities__2nQ0B\",\"header\":\"NoFacilities_header__XMwbH\",\"subheader\":\"NoFacilities_subheader__TSgbT\",\"actions\":\"NoFacilities_actions__XWdjm\",\"action\":\"NoFacilities_action__1eBnm\",\"link\":\"NoFacilities_link__HCzCZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Dashboard_content__C490A\",\"header\":\"Dashboard_header__-CvMP\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"brand-blue-dark\":\"#005075\",\"danger\":\"#D93942\",\"ui-03\":\"#F1F3F5\",\"text-01\":\"#333333\",\"actions\":\"Facilities_actions__1rhoJ\",\"sort\":\"Facilities_sort__3Dw-T\",\"download\":\"Facilities_download__15tv7\",\"downloadIcon\":\"Facilities_downloadIcon__MobTU\",\"list\":\"Facilities_list__19mLH\",\"listItem\":\"Facilities_listItem__3mkVT\",\"edit\":\"Facilities_edit__trEVs\",\"link\":\"Facilities_link__2r_0n\",\"content\":\"Facilities_content__3Frhn\",\"titleBar\":\"Facilities_titleBar__1eOqS\",\"titleBarSecondary\":\"Facilities_titleBarSecondary__2lyAh\",\"extended\":\"Facilities_extended__13IJW\",\"icon\":\"Facilities_icon__1pAtP\",\"open\":\"Facilities_open__-Ts8x\",\"alert\":\"Facilities_alert__ajlgt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue\":\"#007AC9\",\"brand-blue-dark\":\"#005075\",\"brand-blue-light\":\"#5EB6E4\",\"std-white\":\"#FFFFFF\",\"reportingYearsList\":\"ReportingYearsList_reportingYearsList__26Ozm\",\"noReportingYears\":\"ReportingYearsList_noReportingYears__8Hapf\",\"header\":\"ReportingYearsList_header__2qyBS\",\"subheader\":\"ReportingYearsList_subheader__2_3_e\",\"actions\":\"ReportingYearsList_actions__ppHfH\",\"link\":\"ReportingYearsList_link__2ahaD\",\"buttonGroup\":\"ReportingYearsList_buttonGroup__KEHoE\",\"action\":\"ReportingYearsList_action__22khA\",\"fluid\":\"ReportingYearsList_fluid__2_Ueq\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue\":\"#007AC9\",\"brand-blue-dark\":\"#005075\",\"std-white\":\"#FFFFFF\",\"facility\":\"Facility_facility__39vOt\",\"header\":\"Facility_header__3E1zp\",\"left\":\"Facility_left__9JcNo\",\"right\":\"Facility_right__6cwWM\",\"name\":\"Facility_name__3c0Jq\",\"location\":\"Facility_location__2ofGv\",\"folder\":\"Facility_folder__2zX-C\",\"button-group\":\"Facility_button-group__2DUE7\",\"action\":\"Facility_action__1Iw9a\",\"shadow\":\"Facility_shadow__3bMz4\",\"tabContent\":\"Facility_tabContent__Evvwn\",\"tabs\":\"Facility_tabs__3xWvk\",\"tab\":\"Facility_tab__2t-is\",\"active\":\"Facility_active__aeRaG\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"button\":\"FormHelp_button__3UERG\",\"text\":\"FormHelp_text__2AhCH\",\"close\":\"FormHelp_close__2pOhI\",\"tooltip\":\"FormHelp_tooltip__1RBxe\",\"top\":\"FormHelp_top__1oIv0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"ui-03\":\"#F1F3F5\",\"ui-07\":\"#B7B7B7\",\"facility\":\"FacilityCreate_facility__1sxNJ\",\"loading\":\"FacilityCreate_loading__3lCnh\",\"formContainer\":\"FacilityCreate_formContainer__1E72f\",\"header\":\"FacilityCreate_header__2ap09\",\"content\":\"FacilityCreate_content__3MkIJ\",\"formGroup\":\"FacilityCreate_formGroup__BtS1r\",\"formGroupTitle\":\"FacilityCreate_formGroupTitle__1Guh1\",\"row\":\"FacilityCreate_row__2QEDX\",\"label\":\"FacilityCreate_label__2fIkq\",\"inputGroup\":\"FacilityCreate_inputGroup__1o6Zy\",\"input\":\"FacilityCreate_input__1SyDy\",\"inputField\":\"FacilityCreate_inputField__2HT06\",\"checkbox\":\"FacilityCreate_checkbox__Ma2PJ\",\"footer\":\"FacilityCreate_footer__1j4II\",\"table\":\"FacilityCreate_table__20KQO\",\"tabContent\":\"FacilityCreate_tabContent__3Y7Eg\",\"active\":\"FacilityCreate_active__2mAWe\",\"question\":\"FacilityCreate_question__Wq0sI\",\"questionGroupTitle\":\"FacilityCreate_questionGroupTitle__1uiQw\",\"cardStack\":\"FacilityCreate_cardStack__1ef9y\",\"card\":\"FacilityCreate_card__2Q4W6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"ui-03\":\"#F1F3F5\",\"ui-07\":\"#B7B7B7\",\"facility\":\"FacilityEdit_facility__ycwqZ\",\"loading\":\"FacilityEdit_loading__1KFPj\",\"formContainer\":\"FacilityEdit_formContainer__2hk7V\",\"header\":\"FacilityEdit_header__3NobM\",\"content\":\"FacilityEdit_content__11vi0\",\"formGroup\":\"FacilityEdit_formGroup__1oDOQ\",\"formGroupTitle\":\"FacilityEdit_formGroupTitle__26Nvl\",\"row\":\"FacilityEdit_row__33Nuh\",\"label\":\"FacilityEdit_label__2Nd6B\",\"inputGroup\":\"FacilityEdit_inputGroup__Ofovr\",\"input\":\"FacilityEdit_input__2xw2C\",\"inputField\":\"FacilityEdit_inputField__J1_4H\",\"checkbox\":\"FacilityEdit_checkbox__3vtEq\",\"footer\":\"FacilityEdit_footer__3XttG\",\"table\":\"FacilityEdit_table__3Ameg\",\"tabContent\":\"FacilityEdit_tabContent__2IbHQ\",\"active\":\"FacilityEdit_active__33UJe\",\"question\":\"FacilityEdit_question__MUdhA\",\"questionGroupTitle\":\"FacilityEdit_questionGroupTitle__29sSF\",\"cardStack\":\"FacilityEdit_cardStack__1cx7y\",\"card\":\"FacilityEdit_card__2z_GH\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"dangerColor\":\"#D93942\",\"content\":\"FacilityForm_content__1n5dl\",\"alert\":\"FacilityForm_alert__3F17Q\",\"required\":\"FacilityForm_required__3-K59\",\"requiredExp\":\"FacilityForm_requiredExp__2Nxhm\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"facility\":\"ReportingYearCreate_facility__3HrJ4\",\"loading\":\"ReportingYearCreate_loading__3TlNj\",\"header\":\"ReportingYearCreate_header__1OtNs\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"facility\":\"ReportingYearEdit_facility__1NUfz\",\"loading\":\"ReportingYearEdit_loading__3iEMG\",\"header\":\"ReportingYearEdit_header__33NWM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"riskChart\":\"RiskAnalysisChart_riskChart__1f_QB\",\"toggle-chart\":\"RiskAnalysisChart_toggle-chart__3bowR\",\"twoByTwo\":\"RiskAnalysisChart_twoByTwo__3ipjc\",\"borderRight\":\"RiskAnalysisChart_borderRight__SgjgB\",\"borderLeft\":\"RiskAnalysisChart_borderLeft__3NgM6\",\"labelBg\":\"RiskAnalysisChart_labelBg__1-pZ1\",\"chartLabels\":\"RiskAnalysisChart_chartLabels__1wrbH\",\"label\":\"RiskAnalysisChart_label__3Nko7\",\"yAxisLabel\":\"RiskAnalysisChart_yAxisLabel__1oLXx\",\"vertical\":\"RiskAnalysisChart_vertical__w-6DJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"std-white\":\"#FFFFFF\",\"ui-03\":\"#F1F3F5\",\"screen-lg\":\"992px\",\"screen-xl\":\"1200px\",\"riskAnalysis\":\"RiskAnalysis_riskAnalysis__2zdVZ\",\"tabs\":\"RiskAnalysis_tabs__27jN0\",\"header\":\"RiskAnalysis_header__3ym6d\",\"filterAndSort\":\"RiskAnalysis_filterAndSort__2sdid\",\"content\":\"RiskAnalysis_content__3tCMw\",\"charts\":\"RiskAnalysis_charts__VV3A0\",\"sidebar\":\"RiskAnalysis_sidebar__QWMP0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"screen-lg\":\"992px\",\"app\":\"routes_app__1HALK\",\"header\":\"routes_header__3Btkh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-transparent\":\"transparent\",\"screen-xs\":\"0\",\"screen-lg\":\"992px\",\"imageRotator\":\"ImageRotator_imageRotator__3GHwc\",\"image\":\"ImageRotator_image__z4xG0\",\"gradient\":\"ImageRotator_gradient__5dJQj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"routeContentScrollable\":\"RouteContentScrollable_routeContentScrollable__3vYu0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-dark\":\"#005075\",\"screen-xs\":\"0\",\"screen-lg\":\"992px\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"siteFooterGroup\":\"SiteFooter_siteFooterGroup__-v8Cd\",\"solid\":\"SiteFooter_solid__2NmHn\",\"siteFooter\":\"SiteFooter_siteFooter__3hvqh\",\"section\":\"SiteFooter_section__2xmAM\",\"footerLink\":\"SiteFooter_footerLink__2ofke\",\"button\":\"SiteFooter_button__37wX0\",\"footerLinksWrapper\":\"SiteFooter_footerLinksWrapper__10mHl\",\"footerLinksRow\":\"SiteFooter_footerLinksRow__1AZj6\",\"footerBottomLinksRow\":\"SiteFooter_footerBottomLinksRow__3LfdM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-dark\":\"#005075\",\"screen-xs\":\"0\",\"screen-lg\":\"992px\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"jumbotron\":\"Home_jumbotron__3w-TZ\",\"jumbotronText\":\"Home_jumbotronText__3HZtP\",\"jumbotronSubheader\":\"Home_jumbotronSubheader__1QDcS\",\"jumbotronImage\":\"Home_jumbotronImage__2d9Kl\",\"getStarted\":\"Home_getStarted__2irOO\",\"headerContent\":\"Home_headerContent__37MFo\",\"subheader\":\"Home_subheader__1sq6C\",\"getStartedFooter\":\"Home_getStartedFooter__17Hn5\",\"actions\":\"Home_actions__2vRXn\",\"actionGroup\":\"Home_actionGroup__1sQpj\",\"action\":\"Home_action__1I1p8\",\"bubble\":\"Home_bubble__tDQ5D\",\"segments\":\"Home_segments__2XDWy\",\"segment\":\"Home_segment__BB951\",\"segmentText\":\"Home_segmentText__2ocAC\",\"segmentSubheader\":\"Home_segmentSubheader__39gp2\",\"explore\":\"Home_explore__3qwxB\",\"exploreSections\":\"Home_exploreSections__1OBSM\",\"exploreSection\":\"Home_exploreSection__2j3_x\",\"exploreTile\":\"Home_exploreTile__3PXP2\",\"exploreIcon\":\"Home_exploreIcon__3GZdC\",\"partners\":\"Home_partners__2e6rk\",\"header\":\"Home_header__29ZuB\",\"partnerList\":\"Home_partnerList__1deDR\",\"partner\":\"Home_partner__27Pk1\",\"onetrust-yt-containerdata\":\"Home_onetrust-yt-containerdata__uG7AM\",\"onetrust-yt-title\":\"Home_onetrust-yt-title__1b86M\",\"onetrust-yt-subtitle\":\"Home_onetrust-yt-subtitle__1sFG_\",\"bold-text\":\"Home_bold-text__w7V_K\",\"button\":\"Home_button__35Lv_\",\"bottom-text\":\"Home_bottom-text__2Xmu-\",\"underline\":\"Home_underline__37xaD\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"ui-03\":\"#F1F3F5\",\"brand-blue-dark\":\"#005075\",\"screen-lg\":\"992px\",\"scrollable\":\"Account_scrollable__1lABV\",\"account\":\"Account_account__2vnxE\",\"sidearm\":\"Account_sidearm__3zLmq\",\"icon\":\"Account_icon__3b0EN\",\"companyName\":\"Account_companyName__U9xDy\",\"accountNumber\":\"Account_accountNumber__2r939\",\"accountBox\":\"Account_accountBox__3AkRh\",\"buttonSubmit\":\"Account_buttonSubmit__3m2jN\",\"error\":\"Account_error__xVG2Z\",\"success\":\"Account_success__1H_Pz\",\"accountUsers\":\"Account_accountUsers__3e3rp\",\"accountUser\":\"Account_accountUser__2vqGl\",\"info\":\"Account_info__28ivK\",\"name\":\"Account_name__1MMOq\",\"email\":\"Account_email__25ErN\",\"actions\":\"Account_actions__fCxuo\",\"alert\":\"Account_alert__1Ls3X\",\"basicButton\":\"Account_basicButton__3HwZY\",\"addFolder\":\"Account_addFolder__4b26O\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"userInviteDialog\":\"UserInviteDialog_userInviteDialog__2-fz9\",\"footer\":\"UserInviteDialog_footer__2Brcr\",\"error\":\"UserInviteDialog_error__3kQP2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"std-transparent\":\"transparent\",\"scrollable\":\"ForgotPassword_scrollable__1hsCd\",\"forgotPassword\":\"ForgotPassword_forgotPassword__1YBSq\",\"forgotPasswordBox\":\"ForgotPassword_forgotPasswordBox__3NRJr\",\"forgotPasswordForm\":\"ForgotPassword_forgotPasswordForm__21Ikc\",\"error\":\"ForgotPassword_error__36QqW\",\"buttonSubmit\":\"ForgotPassword_buttonSubmit__3lBIR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"std-transparent\":\"transparent\",\"gray-300\":\"undefined\",\"gray-900\":\"undefined\",\"gray-500\":\"undefined\",\"red-600\":\"undefined\",\"scrollable\":\"Invitation_scrollable__1WRx6\",\"pendingInvite\":\"Invitation_pendingInvite__1iXyc\",\"pendingInviteBox\":\"Invitation_pendingInviteBox__dJ80r\",\"error\":\"Invitation_error__23HeJ\",\"success\":\"Invitation_success__1Pq1t\",\"actions\":\"Invitation_actions__1OLiw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"journeyStepBubble\":\"JourneyStepBubble_journeyStepBubble__37YBO\",\"journeyStepBubbleText\":\"JourneyStepBubble_journeyStepBubbleText__10r2u\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue\":\"#007AC9\",\"brand-blue-light\":\"#5EB6E4\",\"brand-blue-dark\":\"#005075\",\"ui-03\":\"#F1F3F5\",\"screen-xs\":\"0\",\"screen-lg\":\"992px\",\"elevation-04\":\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\",\"journey\":\"HowItWorks_journey__2Bff5\",\"progress\":\"HowItWorks_progress__suKC5\",\"group\":\"HowItWorks_group__uveFu\",\"bar\":\"HowItWorks_bar__3cnYt\",\"drops\":\"HowItWorks_drops__3U41c\",\"step\":\"HowItWorks_step__1Msez\",\"active\":\"HowItWorks_active__286dF\",\"raindrop\":\"HowItWorks_raindrop__3FK7N\",\"number\":\"HowItWorks_number__12ypM\",\"section\":\"HowItWorks_section__1Gu9G\",\"pageHeader\":\"HowItWorks_pageHeader__2wUih\",\"sectionHeader\":\"HowItWorks_sectionHeader__u_G_1\",\"icon\":\"HowItWorks_icon__2i9ng\",\"iconXs\":\"HowItWorks_iconXs__RU5OJ\",\"contentSection\":\"HowItWorks_contentSection__3A_tJ\",\"contentHeader\":\"HowItWorks_contentHeader__2NEic\",\"contentIcon\":\"HowItWorks_contentIcon__1Tk_K\",\"bubble\":\"HowItWorks_bubble__1vsLH\",\"contentText\":\"HowItWorks_contentText__2arzo\",\"content\":\"HowItWorks_content__3AXg7\",\"title\":\"HowItWorks_title__3bpuV\",\"stepTitle\":\"HowItWorks_stepTitle__2e4ln\",\"sectionIcon\":\"HowItWorks_sectionIcon__1-fzZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"text-01\":\"#333333\",\"brand-blue-dark\":\"#005075\",\"screen-lg\":\"992px\",\"scrollable\":\"Login_scrollable__1za4b\",\"login\":\"Login_login__133sT\",\"sidearm\":\"Login_sidearm__CDK20\",\"loginBox\":\"Login_loginBox__39b5I\",\"loginForm\":\"Login_loginForm__DTtOi\",\"input\":\"Login_input__3_RvR\",\"forgotPasswordBox\":\"Login_forgotPasswordBox__3CQaG\",\"forgotPassword\":\"Login_forgotPassword__8bPZA\",\"buttonSubmit\":\"Login_buttonSubmit__3QZwu\",\"error\":\"Login_error__g2MEt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-dark\":\"#005075\",\"screen-lg\":\"992px\",\"scrollable\":\"Registration_scrollable__2yoU6\",\"registration\":\"Registration_registration__2w-n6\",\"sidearm\":\"Registration_sidearm__2X0ac\",\"registrationBox\":\"Registration_registrationBox__3KvDR\",\"registrationForm\":\"Registration_registrationForm__2g7bd\",\"input\":\"Registration_input__32llV\",\"buttonSubmit\":\"Registration_buttonSubmit__2uJu9\",\"error\":\"Registration_error__3v2tq\",\"success\":\"Registration_success__BR0sg\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"std-transparent\":\"transparent\",\"gray-300\":\"undefined\",\"gray-900\":\"undefined\",\"gray-500\":\"undefined\",\"red-600\":\"undefined\",\"scrollable\":\"ResetPassword_scrollable__yeCZc\",\"resetPassword\":\"ResetPassword_resetPassword__3yP7x\",\"resetPasswordBox\":\"ResetPassword_resetPasswordBox__25JWv\",\"resetPasswordForm\":\"ResetPassword_resetPasswordForm__1E3GQ\",\"error\":\"ResetPassword_error__217LH\",\"buttonSubmit\":\"ResetPassword_buttonSubmit__m_pAm\",\"success\":\"ResetPassword_success__wV4Ld\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"brand-blue-dark\":\"#005075\",\"screen-lg\":\"992px\",\"scrollable\":\"User_scrollable__dd-Iu\",\"user\":\"User_user__3qM4l\",\"sidearm\":\"User_sidearm__37CSv\",\"icon\":\"User_icon__BRSii\",\"userName\":\"User_userName__2Yahi\",\"companyName\":\"User_companyName__PEwKt\",\"userBox\":\"User_userBox__3UbGi\",\"userForm\":\"User_userForm__SGdBw\",\"input\":\"User_input__zSctK\",\"buttonSubmit\":\"User_buttonSubmit__1BCsY\",\"error\":\"User_error__3M11x\",\"success\":\"User_success__kUvbL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"std-transparent\":\"transparent\",\"gray-300\":\"undefined\",\"gray-900\":\"undefined\",\"gray-500\":\"undefined\",\"red-600\":\"undefined\",\"scrollable\":\"VerificationRequired_scrollable__yveAv\",\"verificationRequired\":\"VerificationRequired_verificationRequired__eg9oN\",\"verificationRequiredBox\":\"VerificationRequired_verificationRequiredBox__1bENH\",\"error\":\"VerificationRequired_error__3s3bw\",\"success\":\"VerificationRequired_success__8FDsT\",\"actions\":\"VerificationRequired_actions__2DQVa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"std-white\":\"#FFFFFF\",\"std-transparent\":\"transparent\",\"brand-blue\":\"#007AC9\",\"scrollable\":\"VerifyAccount_scrollable__3IC1E\",\"verifyAccount\":\"VerifyAccount_verifyAccount__3pW6x\",\"loader\":\"VerifyAccount_loader__1OF5L\",\"verifyAccountBox\":\"VerifyAccount_verifyAccountBox__3RglR\",\"success\":\"VerifyAccount_success__1p6Lr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"button\":\"Cookies_button__fMMpV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"facilityTargetTab\":\"Tabs_facilityTargetTab__Vi5Wu\",\"chartContainer\":\"Tabs_chartContainer__3XC5j\",\"chartContainerPane\":\"Tabs_chartContainerPane__Lf_xG\",\"header\":\"Tabs_header__1vS5Q\",\"twoUp\":\"Tabs_twoUp__2xAf2\",\"img\":\"Tabs_img__34DyW\",\"chart\":\"Tabs_chart__BhK7Q\",\"legend\":\"Tabs_legend__3LaDD\",\"waterWithdrawalLegend\":\"Tabs_waterWithdrawalLegend__Debf2\",\"legendHeader\":\"Tabs_legendHeader__Jw_Tt\",\"legendItem\":\"Tabs_legendItem__17CAD\",\"totalRiskLegend\":\"Tabs_totalRiskLegend__18HhE\",\"inOut\":\"Tabs_inOut__xJ7ch\",\"sourceOfRisk\":\"Tabs_sourceOfRisk__3WZZO\",\"incomingLegend\":\"Tabs_incomingLegend__3cAH4\",\"icon\":\"Tabs_icon__1zsa3\",\"high\":\"Tabs_high__e-Fzl\",\"medium\":\"Tabs_medium__10sPD\",\"low\":\"Tabs_low__2z2T-\",\"score\":\"Tabs_score__1AUi2\",\"danger\":\"Tabs_danger__XALeT\",\"warning\":\"Tabs_warning__1Kl1S\",\"success\":\"Tabs_success__3yYp5\",\"legendTable\":\"Tabs_legendTable__10MtB\",\"single\":\"Tabs_single__1Ci1H\",\"legendTableHeader\":\"Tabs_legendTableHeader__2AMvI\",\"strong\":\"Tabs_strong__3_sdK\",\"label\":\"Tabs_label__pfBG5\",\"benefitMatrix\":\"Tabs_benefitMatrix__xEDqz\",\"tilt\":\"Tabs_tilt__2Qqdy\",\"center\":\"Tabs_center__2V1_l\"};","import React, { ReactNode, useState } from 'react';\r\n\r\nconst DEFAULT_PROPERTIES = {\r\n showSidebar: true,\r\n showSubheader: true,\r\n};\r\n\r\ntype ThemeManagerContextMethods = {\r\n setThemeProperties: (values: Partial) => void;\r\n resetThemeProperties: () => void;\r\n};\r\n\r\ntype ThemeManagerContextPropsType = {\r\n showSidebar: boolean;\r\n showSubheader: boolean;\r\n subheaderVariant?: 'waa' | 'wrm';\r\n};\r\n\r\ntype ThemeManagerContextProps = ThemeManagerContextMethods &\r\n ThemeManagerContextPropsType;\r\n\r\nconst ThemeManagerContext = React.createContext<\r\n Partial\r\n>({});\r\n\r\nfunction ThemeManagerProvider({ children }: { children: ReactNode }) {\r\n const [state, setState] = useState({\r\n showSidebar: true,\r\n showSubheader: true,\r\n });\r\n\r\n const setThemeProperties = (\r\n values: Partial\r\n ) => {\r\n setState({\r\n ...state,\r\n ...values,\r\n });\r\n };\r\n\r\n const resetThemeProperties = () => {\r\n setState(DEFAULT_PROPERTIES);\r\n };\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nconst useThemeManager = () => React.useContext(ThemeManagerContext);\r\n\r\nexport { ThemeManagerProvider, useThemeManager };\r\n","import * as yup from 'yup';\r\n\r\nconst PASSWORD_VALIDATOR = /(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)[A-Za-z\\d].{7,}/;\r\n\r\nexport const loginFormSchema = yup\r\n .object({\r\n email: yup.string().required('Required'),\r\n password: yup.string().required('Required'),\r\n })\r\n .required();\r\n\r\nexport type LoginFormSchemaPayload = yup.InferType;\r\n\r\nexport const registrationFormSchema = yup\r\n .object({\r\n firstName: yup.string().trim().required('Required'),\r\n lastName: yup.string().trim().required('Required'),\r\n companyName: yup.string().trim().required('Required'),\r\n jobTitle: yup.string().trim().required('Required'),\r\n country: yup.string().trim().required('Required'),\r\n email: yup.string().trim().email().required('Required'),\r\n password: yup\r\n .string()\r\n .trim()\r\n .matches(\r\n PASSWORD_VALIDATOR,\r\n 'Must contain 8 characters including 1 uppercase, 1 lowercase, and 1 number'\r\n )\r\n .required('Required'),\r\n confirmPassword: yup\r\n .string()\r\n .trim()\r\n .oneOf([yup.ref('password')], 'Passwords must match')\r\n .required('Required'),\r\n acceptTerms: yup.boolean().oneOf([true], 'Required').required('Required'),\r\n explicitOptIn: yup.boolean(),\r\n })\r\n .required();\r\n\r\nexport type RegisterFormSchemaPayload = yup.InferType<\r\n typeof registrationFormSchema\r\n>;\r\n\r\nexport const forgotPasswordFormSchema = yup\r\n .object({\r\n email: yup.string().trim().email().required('Required'),\r\n })\r\n .required();\r\n\r\nexport type ForgotPasswordSchemaPayload = yup.InferType<\r\n typeof forgotPasswordFormSchema\r\n>;\r\n\r\nexport const resetPasswordFormSchema = yup\r\n .object({\r\n resetPasswordCode: yup.string().trim().required('Required'),\r\n password: yup\r\n .string()\r\n .trim()\r\n .matches(\r\n PASSWORD_VALIDATOR,\r\n 'Must contain 8 characters including 1 uppercase, 1 lowercase, and 1 number'\r\n )\r\n .required('Required'),\r\n confirmPassword: yup\r\n .string()\r\n .trim()\r\n .oneOf([yup.ref('password')], 'Passwords must match')\r\n .required('Required'),\r\n })\r\n .required();\r\n\r\nexport type ResetPasswordSchemaPayload = yup.InferType<\r\n typeof resetPasswordFormSchema\r\n>;\r\n\r\nexport const verifyAccountFormSchema = yup\r\n .object({\r\n code: yup.string().trim().required('Required'),\r\n })\r\n .required();\r\n\r\nexport type VerifyAccountSchemaPayload = yup.InferType<\r\n typeof verifyAccountFormSchema\r\n>;\r\n","export type EnvType = {\r\n baseUrl: string;\r\n apiUrl: string;\r\n authUrl: string;\r\n waaApiUrl: string;\r\n tokenCallbackUrl: string;\r\n appVersion: number;\r\n styleNonce: string;\r\n maxReportingYear: number;\r\n underMaintenance?: boolean;\r\n underMaintenanceMessage?: string;\r\n futureMaintenance?: boolean;\r\n futureMaintenanceMessage?: string;\r\n};\r\n\r\nexport function getEnv(): string {\r\n return process.env.NODE_ENV;\r\n}\r\n\r\nfunction getBaseUrl(append = '') {\r\n const baseUrl = process.env.REACT_APP_API_BASE_URL;\r\n\r\n return `${\r\n baseUrl ?? 'https://mkt-swn-webapp-endpoint-001-d.azureedge.net/'\r\n }/${append}`;\r\n}\r\n\r\nconst environments: Record = {\r\n development: {\r\n baseUrl: 'https://mkt-swn-webapp-endpoint-001-d.azureedge.net/',\r\n apiUrl: getBaseUrl('api'),\r\n authUrl: getBaseUrl('api'),\r\n waaApiUrl: getBaseUrl('api'),\r\n tokenCallbackUrl: getBaseUrl('api'),\r\n appVersion: 5.0,\r\n styleNonce:\r\n 'jylglkaiwvwcbvqlsrxwdicdznqsjwhmallrsaisisjsafzfzlogtjfjtoquzussogipopejpizkxzwopvrmisiaepmavxexezeevnbzrpzviomxzibusfjwngxpuvze',\r\n maxReportingYear: 2023,\r\n },\r\n production: {\r\n baseUrl: 'https://www.smartwaternavigator.com/',\r\n apiUrl: 'https://api.waterriskmonetizer.com/api',\r\n authUrl: 'https://api.waterriskmonetizer.com/api',\r\n waaApiUrl: 'https://api.waterriskmonetizer.com/api',\r\n tokenCallbackUrl: 'https://eclmktgwrmweb-dev.azurewebsites.net',\r\n appVersion: 5.0,\r\n styleNonce:\r\n 'nomdnergtrjqyxgfnzrnsprasrnkvjteiydtqzhinrsmdlbrdpvbpzerjytcmwybxweaktmncnepvzpxfsvtaqyporsnklkxyqaxfxlttgcdepxqqtektdxpicwidnae',\r\n maxReportingYear: 2023,\r\n },\r\n};\r\n\r\nconst isDev = getEnv() === 'development';\r\n\r\nexport const Env: EnvType = Object.assign(\r\n {},\r\n environments[isDev ? 'development' : 'production'],\r\n {\r\n ...(process.env.REACT_APP_BASE_URL && {\r\n baseUrl: process.env.REACT_APP_BASE_URL,\r\n }),\r\n ...(process.env.REACT_APP_API_URL && {\r\n apiUrl: process.env.REACT_APP_API_URL,\r\n }),\r\n ...(process.env.REACT_APP_AUTH_API_URL && {\r\n authUrl: process.env.REACT_APP_AUTH_API_URL,\r\n }),\r\n ...(process.env.REACT_APP_WAA_API_URL && {\r\n waaApiUrl: process.env.REACT_APP_WAA_API_URL,\r\n }),\r\n ...(process.env.REACT_APP_TOKEN_CALLBACK_URL && {\r\n tokenCallbackUrl: process.env.REACT_APP_TOKEN_CALLBACK_URL,\r\n }),\r\n ...(process.env.REACT_APP_APP_VERSION && {\r\n appVerison: process.env.REACT_APP_APP_VERSION,\r\n }),\r\n ...(process.env.REACT_APP_STYLE_NONCE && {\r\n styleNonce: process.env.REACT_APP_STYLE_NONCE,\r\n }),\r\n ...(process.env.REACT_APP_MAX_REPORTING_YEAR && {\r\n maxReportingYear: process.env.REACT_APP_MAX_REPORTING_YEAR,\r\n }),\r\n\r\n // Dev Overrides\r\n ...(process.env.REACT_APP_UNDER_MAINTENANCE_MESSAGE &&\r\n process.env.REACT_APP_UNDER_MAINTENANCE_MESSAGE !== '' && {\r\n underMaintenance: true,\r\n underMaintenanceMessage:\r\n process.env.REACT_APP_UNDER_MAINTENANCE_MESSAGE,\r\n }),\r\n ...(process.env.REACT_APP_FUTURE_MAINTENANCE_MESSAGE &&\r\n process.env.REACT_APP_FUTURE_MAINTENANCE_MESSAGE !== '' && {\r\n futureMaintenance: true,\r\n futureMaintenanceMessage:\r\n process.env.REACT_APP_FUTURE_MAINTENANCE_MESSAGE,\r\n }),\r\n }\r\n);\r\n","export enum EventType {\r\n SessionInvalid = 'session::invalid',\r\n Notification = 'notification',\r\n}\r\n\r\nexport type Event =\r\n | {\r\n type: EventType.Notification;\r\n detail: {\r\n message: string;\r\n };\r\n }\r\n | {\r\n type: EventType.SessionInvalid;\r\n detail?: never;\r\n };\r\n\r\nexport const SESSION_INVALID = EventType.SessionInvalid;\r\n","import { Env } from 'src/constants/env';\r\n\r\nexport enum LOCAL_STORAGE_KEYS {\r\n TOKEN = '__ECOLAB_WAP_TOKEN__',\r\n USER = '__ECOLAB_WAP_USER__',\r\n ACCOUNT = '__ECOLAB_WAP_ACCOUNT__',\r\n}\r\n\r\nexport function getTokenInStorage() {\r\n return window.localStorage.getItem(LOCAL_STORAGE_KEYS.TOKEN);\r\n}\r\n\r\nexport function setTokenInStorage(id_token: string) {\r\n window.localStorage.setItem(LOCAL_STORAGE_KEYS.TOKEN, id_token);\r\n return getTokenInStorage();\r\n}\r\n\r\nexport function removeTokenInStorage() {\r\n window.localStorage.removeItem(LOCAL_STORAGE_KEYS.TOKEN);\r\n}\r\n\r\nexport function getUserIdInStorage() {\r\n return window.localStorage.getItem(LOCAL_STORAGE_KEYS.USER);\r\n}\r\n\r\nexport function setUserIdInStorage(id: string) {\r\n window.localStorage.setItem(LOCAL_STORAGE_KEYS.USER, `${id}`);\r\n return getUserIdInStorage();\r\n}\r\n\r\nexport function removeUserIdInStorage() {\r\n window.localStorage.removeItem(LOCAL_STORAGE_KEYS.USER);\r\n}\r\n\r\nexport function getAccountIdInStorage() {\r\n return window.localStorage.getItem(LOCAL_STORAGE_KEYS.ACCOUNT);\r\n}\r\n\r\nexport function setAccountIdInStorage(id: string) {\r\n window.localStorage.setItem(LOCAL_STORAGE_KEYS.ACCOUNT, `${id}`);\r\n return getAccountIdInStorage();\r\n}\r\n\r\nexport function removeAccountIdInStorage() {\r\n window.localStorage.removeItem(LOCAL_STORAGE_KEYS.ACCOUNT);\r\n}\r\n\r\nexport function clearStorage() {\r\n removeAccountIdInStorage();\r\n removeUserIdInStorage();\r\n removeTokenInStorage();\r\n}\r\n\r\nexport function urlWithAccountId(url: string, accountIdOverride?: string) {\r\n const accountId = localStorage.getItem(LOCAL_STORAGE_KEYS.ACCOUNT);\r\n\r\n return `${Env.apiUrl}/v5/accounts/${accountIdOverride ?? accountId}/${url}`;\r\n}\r\n","import { Event } from '../constants/events';\r\n\r\nexport const eventBus = {\r\n on(event: string, callback: () => void) {\r\n document.addEventListener(event, callback);\r\n },\r\n dispatch(event: Event) {\r\n document.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event.detail })\r\n );\r\n },\r\n remove(event: string, callback: () => void) {\r\n document.removeEventListener(event, callback);\r\n },\r\n};\r\n","import { SESSION_INVALID } from 'src/constants/events';\r\nimport { eventBus } from 'src/utils/eventBus';\r\nimport { getTokenInStorage } from './helpers';\r\nimport { Api$ApplicationError, Api$Task, TaskResult } from './types';\r\n\r\nexport function getDefaultHeaders() {\r\n return {\r\n 'Content-Type': 'application/json',\r\n };\r\n}\r\n\r\nexport function getAuthHeaders() {\r\n const token = getTokenInStorage();\r\n\r\n return {\r\n ...getDefaultHeaders(),\r\n\r\n // Attach token to headers if token exists\r\n ...(token\r\n ? {\r\n Authorization: `Bearer ${token}`,\r\n }\r\n : {}),\r\n };\r\n}\r\n\r\nfunction rawRequest(\r\n input: RequestInfo,\r\n init?: RequestInit | undefined\r\n): Promise {\r\n const controller = new AbortController();\r\n const requestTimer = setTimeout(() => controller.abort(), 120000);\r\n\r\n return fetch(input, {\r\n ...init,\r\n signal: controller.signal,\r\n }).finally(() => {\r\n clearTimeout(requestTimer);\r\n });\r\n}\r\n\r\nfunction httpRequest(\r\n options:\r\n | {\r\n method: 'GET' | 'DELETE';\r\n url: string;\r\n headers?: Record;\r\n }\r\n | {\r\n method: 'POST' | 'PUT';\r\n url: string;\r\n payload: U;\r\n headers?: Record;\r\n }\r\n): Api$Task {\r\n const headers = new Headers({\r\n ...getDefaultHeaders(),\r\n ...getAuthHeaders(),\r\n });\r\n\r\n const body =\r\n options.method === 'POST' || options.method === 'PUT'\r\n ? {\r\n body: JSON.stringify({ data: options.payload }),\r\n }\r\n : {};\r\n\r\n return rawRequest(options.url, {\r\n method: options.method,\r\n headers,\r\n ...body,\r\n })\r\n .then((response: Response) => requestSuccess(response))\r\n .catch((error: Error) => requestError(error));\r\n}\r\n\r\nexport function requestSuccess(response: Response) {\r\n return response.json().then((json) => {\r\n if (!response.ok && response.status === 401) {\r\n eventBus.dispatch({ type: SESSION_INVALID });\r\n }\r\n\r\n return response.ok\r\n ? ({\r\n status: 'success',\r\n code: response.status,\r\n value: json,\r\n } as TaskResult)\r\n : ({\r\n status: 'error',\r\n code: response.status,\r\n value: {\r\n type: 'Exception',\r\n errors: json.errors,\r\n metadata: json.metaData,\r\n },\r\n } as TaskResult);\r\n });\r\n}\r\n\r\nexport function requestError(error: Error) {\r\n return {\r\n status: 'error',\r\n code: 500,\r\n value: {\r\n type: 'Exception',\r\n errors: [\r\n {\r\n field: '',\r\n message: error.message ?? 'Something went wrong.',\r\n },\r\n ],\r\n metadata: {},\r\n },\r\n } as TaskResult;\r\n}\r\n\r\nexport function get(url: string): Api$Task {\r\n return httpRequest({\r\n method: 'GET',\r\n url,\r\n });\r\n}\r\n\r\nexport function post(\r\n url: string,\r\n payload?: Payload\r\n): Api$Task {\r\n return httpRequest({ method: 'POST', url, payload: payload ?? {} });\r\n}\r\n\r\nexport function put(\r\n url: string,\r\n payload: Payload\r\n): Api$Task {\r\n return httpRequest({ method: 'PUT', url, payload: payload ?? {} });\r\n}\r\n\r\nexport function del(url: string): Api$Task {\r\n return httpRequest({\r\n method: 'DELETE',\r\n url,\r\n });\r\n}\r\n\r\nexport default {\r\n get,\r\n post,\r\n put,\r\n del,\r\n raw: rawRequest,\r\n};\r\n","import { User } from 'src/types/user';\r\nimport { Env } from '../../constants/env';\r\nimport { WrappedResponse } from '../types';\r\nimport request from '../request';\r\nimport { clearStorage } from '../helpers';\r\nimport {\r\n ForgotPasswordSchemaPayload,\r\n LoginFormSchemaPayload,\r\n RegisterFormSchemaPayload,\r\n ResetPasswordSchemaPayload,\r\n VerifyAccountSchemaPayload,\r\n} from './schema';\r\n\r\nexport type LoginResponseType = {\r\n user_id: number;\r\n id_token: string;\r\n};\r\nfunction login({ email, password }: LoginFormSchemaPayload) {\r\n return request.post<\r\n LoginResponseType,\r\n { username: string; password: string }\r\n >(`${Env.authUrl}/v5/auth/token`, {\r\n username: email, // TODO: change when endpoint takes `email` as a prop instead of `username`\r\n password,\r\n });\r\n}\r\n\r\nfunction logout() {\r\n clearStorage();\r\n return Promise.resolve();\r\n}\r\n\r\nexport type RegisterResponseType = {};\r\nfunction register(form: RegisterFormSchemaPayload) {\r\n return request.post(\r\n `${Env.authUrl}/v5/users/registration`,\r\n form\r\n );\r\n}\r\n\r\nexport type ForgotPasswordResponseType = {};\r\nfunction forgotPassword(form: ForgotPasswordSchemaPayload) {\r\n return request.post(\r\n `${Env.authUrl}/v5/users/forgot-password`,\r\n form\r\n );\r\n}\r\n\r\nexport type ResetPasswordResponseType = {};\r\nfunction resetPassword({\r\n resetPasswordCode,\r\n ...form\r\n}: ResetPasswordSchemaPayload) {\r\n return request.post<\r\n ResetPasswordResponseType,\r\n Omit\r\n >(`${Env.authUrl}/v5/users/change-password/${resetPasswordCode}`, form);\r\n}\r\n\r\nexport type VerifyAccountResponseType = {};\r\nfunction verifyAccount({ code }: VerifyAccountSchemaPayload) {\r\n return request.post(\r\n `${Env.authUrl}/v5/users/verify/${code}`,\r\n {}\r\n );\r\n}\r\n\r\nexport type FetchUserResponseType = WrappedResponse;\r\nfunction fetchUser() {\r\n return request.get(`${Env.apiUrl}/v5/users/user`);\r\n}\r\n\r\nexport default {\r\n login,\r\n logout,\r\n register,\r\n forgotPassword,\r\n resetPassword,\r\n verifyAccount,\r\n fetchUser,\r\n};\r\n","import React, { useState } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport {\r\n FetchUserResponseType,\r\n ForgotPasswordResponseType,\r\n LoginResponseType,\r\n RegisterResponseType,\r\n ResetPasswordResponseType,\r\n VerifyAccountResponseType,\r\n} from 'src/clients/auth/auth';\r\n\r\nimport { Api$Task } from 'src/clients/types';\r\n\r\nimport {\r\n client,\r\n ForgotPasswordSchemaPayload,\r\n LoginFormSchemaPayload,\r\n RegisterFormSchemaPayload,\r\n ResetPasswordSchemaPayload,\r\n VerifyAccountSchemaPayload,\r\n} from '../clients/auth';\r\nimport {\r\n getAccountIdInStorage,\r\n getTokenInStorage,\r\n getUserIdInStorage,\r\n setAccountIdInStorage,\r\n setTokenInStorage,\r\n setUserIdInStorage,\r\n} from '../clients/helpers';\r\n\r\ntype AuthContextMethods = {\r\n login: (props: LoginFormSchemaPayload) => Api$Task;\r\n logout: (path?: string) => void;\r\n register: (\r\n props: RegisterFormSchemaPayload\r\n ) => Api$Task;\r\n forgotPassword: (\r\n props: ForgotPasswordSchemaPayload\r\n ) => Api$Task;\r\n resetPassword: (\r\n props: ResetPasswordSchemaPayload\r\n ) => Api$Task;\r\n verifyAccount: (\r\n props: VerifyAccountSchemaPayload\r\n ) => Api$Task;\r\n fetchUser: () => Api$Task;\r\n switchAccounts: (id: string) => void;\r\n};\r\n\r\ntype AuthContextPropsType = {\r\n isAuthenticated: boolean;\r\n isLoading: boolean;\r\n userId?: string;\r\n accountId?: string;\r\n};\r\n\r\ntype AuthContextProps = AuthContextMethods & AuthContextPropsType;\r\n\r\nconst AuthContext = React.createContext>({});\r\n\r\nfunction AuthProvider(props: any) {\r\n const queryClient = useQueryClient();\r\n const [data, setData] = useState({\r\n isAuthenticated: !!getTokenInStorage(),\r\n isLoading: false,\r\n userId: getUserIdInStorage() ?? undefined,\r\n accountId: getAccountIdInStorage() ?? undefined,\r\n });\r\n\r\n const login = async (form: LoginFormSchemaPayload) => {\r\n const response = await client.login(form);\r\n\r\n if (response.status === 'success') {\r\n setTokenInStorage(response.value.id_token);\r\n setData({\r\n ...data,\r\n isAuthenticated: true,\r\n });\r\n }\r\n\r\n return response;\r\n };\r\n\r\n const register = async (form: RegisterFormSchemaPayload) => {\r\n return await client.register(form);\r\n };\r\n\r\n const forgotPassword = async (form: ForgotPasswordSchemaPayload) => {\r\n return await client.forgotPassword(form);\r\n };\r\n\r\n const resetPassword = async (form: ResetPasswordSchemaPayload) => {\r\n return await client.resetPassword(form);\r\n };\r\n\r\n const verifyAccount = async (form: VerifyAccountSchemaPayload) => {\r\n return await client.verifyAccount(form);\r\n };\r\n\r\n const fetchUser = async () => {\r\n const response = await client.fetchUser();\r\n\r\n if (response.status === 'success') {\r\n const { data: result } = response.value;\r\n\r\n let accountId;\r\n\r\n const accountIds = new Set(result.accounts.map((a) => a.accountId));\r\n const accounts = result.accounts.sort((a) => (a.primary ? -1 : 1));\r\n\r\n if (data.accountId && accountIds.has(data.accountId)) {\r\n accountId = data.accountId;\r\n } else {\r\n accountId = accounts[0].accountId;\r\n }\r\n\r\n setData({\r\n ...data,\r\n userId: setUserIdInStorage(`${result.userId}`) ?? undefined,\r\n accountId: data.accountId\r\n ? data.accountId\r\n : setAccountIdInStorage(`${accountId}`) ?? undefined,\r\n });\r\n }\r\n\r\n return response;\r\n };\r\n\r\n const logout = async (path: string = '/') => {\r\n await client.logout();\r\n window.location.replace(path);\r\n };\r\n\r\n const switchAccounts = (accountId: string) => {\r\n if (data.accountId !== accountId) {\r\n setAccountIdInStorage(accountId);\r\n\r\n queryClient.removeQueries();\r\n\r\n setData({\r\n ...data,\r\n accountId: accountId,\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nconst useAuth = () => React.useContext(AuthContext);\r\n\r\nexport { AuthProvider, useAuth };\r\n","import type { ComponentSingleStyleConfig } from '@chakra-ui/theme';\r\n\r\nconst Button: ComponentSingleStyleConfig = {\r\n baseStyle: {},\r\n variants: {\r\n brand: {\r\n bg: 'brand.primary',\r\n color: 'white',\r\n border: '1px solid',\r\n borderColor: 'brand.primary',\r\n\r\n _hover: {\r\n bg: 'brand.secondary',\r\n color: 'white',\r\n border: '1px solid',\r\n borderColor: 'brand.secondary',\r\n },\r\n },\r\n primary: {\r\n position: 'relative',\r\n border: '2px solid',\r\n transition: 'all 200ms',\r\n borderRadius: '0.375rem',\r\n fontSize: '1rem',\r\n textAlign: 'center',\r\n textTransform: 'uppercase',\r\n lineHeight: '1rem',\r\n padding: '0.75rem 40px',\r\n cursor: 'pointer',\r\n textDecoration: 'none',\r\n boxShadow: 'base',\r\n bg: 'brand.darkBlue',\r\n borderColor: 'brand.darkBlue',\r\n color: 'white',\r\n\r\n _hover: {\r\n boxShadow: 'md',\r\n },\r\n\r\n _active: {\r\n boxShadow: 'inner',\r\n },\r\n\r\n _focus: {\r\n outline: '-webkit-focus-ring-color auto 0',\r\n },\r\n\r\n _disabled: {\r\n cursor: 'not-allowed',\r\n boxShadow: 'none',\r\n bgColor: 'gray.300',\r\n },\r\n },\r\n },\r\n defaultProps: {\r\n variant: 'solid',\r\n },\r\n};\r\n\r\nexport default Button;\r\n","import { extendTheme } from '@chakra-ui/react';\r\nimport { colors, fonts, semanticTokens } from './foundations';\r\nimport { Button } from './components';\r\n\r\nexport const theme = extendTheme({\r\n colors,\r\n fonts,\r\n semanticTokens,\r\n components: {\r\n Button,\r\n },\r\n});\r\n","export default {\r\n brand: {\r\n primary: '#005075',\r\n secondary: '#5EB6E4',\r\n secondaryLight: '#8acaeb',\r\n\r\n blue: '#007AC9',\r\n darkBlue: '#005075',\r\n lightBlue: '#5EB6E4',\r\n teal: '#70CACB',\r\n green: '#58A618',\r\n darkGreen: '#275E37',\r\n },\r\n primary: {\r\n 50: '#dbf9ff',\r\n 100: '#afe8ff',\r\n 200: '#80d7ff',\r\n 300: '#51c7fe',\r\n 400: '#2bb6fc',\r\n 500: '#1b9de3',\r\n 600: '#0d7ab2',\r\n 700: '#005780',\r\n 800: '#00344f',\r\n 900: '#00121f',\r\n },\r\n};\r\n","export default {\r\n heading: `'Interstate', -apple-system, system-ui, sans-serif`,\r\n body: `'Interstate', -apple-system, system-ui, sans-serif`,\r\n};\r\n","export default {\r\n colors: {\r\n 'bg-canvas': {\r\n default: 'gray.50',\r\n _dark: 'gray.900',\r\n },\r\n 'bg-surface': {\r\n default: 'white',\r\n _dark: 'gray.800',\r\n },\r\n 'bg-subtle': {\r\n default: 'gray.50',\r\n _dark: 'gray.700',\r\n },\r\n 'bg-muted': {\r\n default: 'gray.100',\r\n _dark: 'gray.600',\r\n },\r\n default: {\r\n default: 'gray.900',\r\n _dark: 'white',\r\n },\r\n inverted: {\r\n default: 'white',\r\n _dark: 'gray.900',\r\n },\r\n emphasized: {\r\n default: 'gray.700',\r\n _dark: 'gray.100',\r\n },\r\n muted: {\r\n default: 'gray.600',\r\n _dark: 'gray.300',\r\n },\r\n subtle: {\r\n default: 'gray.500',\r\n _dark: 'gray.400',\r\n },\r\n border: {\r\n default: 'gray.300',\r\n _dark: 'gray.700',\r\n },\r\n accent: {\r\n default: 'brand.500',\r\n _dark: 'brand.200',\r\n },\r\n success: {\r\n default: 'green.600',\r\n _dark: 'green.200',\r\n },\r\n error: {\r\n default: 'red.600',\r\n _dark: 'red.200',\r\n },\r\n 'bg-accent': 'brand.600',\r\n 'bg-accent-subtle': 'brand.500',\r\n 'bg-accent-muted': 'brand.400',\r\n 'on-accent': 'white',\r\n 'on-accent-muted': 'brand.50',\r\n 'on-accent-subtle': 'brand.100',\r\n },\r\n};\r\n","import {\r\n ChakraProvider as BaseChakraProvider,\r\n ChakraProviderProps,\r\n} from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { theme } from 'src/styles/theme';\r\n\r\nexport const ChakraProvider: FC = (props) => {\r\n return ;\r\n};\r\n","import createCache from '@emotion/cache';\r\nimport { CacheProvider } from '@emotion/react';\r\nimport React, { PropsWithChildren, ReactElement } from 'react';\r\n\r\ntype EmotionCacheProviderProps = PropsWithChildren & {\r\n nonce: string;\r\n};\r\n\r\nexport const EmotionCacheProvider = ({\r\n nonce,\r\n children,\r\n}: EmotionCacheProviderProps): ReactElement => {\r\n const cache = createCache({ key: 'ecp', nonce });\r\n return {children};\r\n};\r\n","import React, { FC } from 'react';\r\nimport { QueryClient, QueryClientProvider } from 'react-query';\r\nimport { ThemeManagerProvider } from 'src/hooks/useThemeManager';\r\nimport { AuthProvider } from '../../hooks/useAuth';\r\nimport { ChakraProvider } from '../ChakraProvider';\r\nimport { EmotionCacheProvider } from '../EmotionProvider';\r\nimport { Env } from '../../constants/env';\r\n\r\nconst queryClient = new QueryClient({\r\n defaultOptions: {\r\n queries: {\r\n retry: 1,\r\n refetchOnWindowFocus: false,\r\n staleTime: 1000 * 60 * 61, // 61 min native TTL\r\n },\r\n },\r\n});\r\n\r\nexport const AppProviders: FC = ({ children }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { FC, useEffect } from 'react';\r\n\r\ntype PreventIframeProps = Record;\r\n\r\nconst PreventIframe: FC = () => {\r\n useEffect(() => {\r\n if (window.top && window.top !== window) {\r\n window.top.location.href = '/';\r\n }\r\n }, []);\r\n return null;\r\n};\r\n\r\nPreventIframe.displayName = 'PreventIframe';\r\n\r\nexport default PreventIframe;\r\n","import * as React from 'react';\r\n\r\nconst SvgBrandContact = (props: React.SVGProps) => {\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\n );\r\n};\r\n\r\nconst MemoSvgBrandContact = React.memo(SvgBrandContact);\r\nexport default MemoSvgBrandContact;\r\n","import * as React from 'react';\r\n\r\nconst SvgFacilities = (props: React.SVGProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgFacilities = React.memo(SvgFacilities);\r\nexport default MemoSvgFacilities;\r\n","import * as React from 'react';\r\n\r\nconst SvgFacilityDashboard = (props: React.SVGProps) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgFacilityDashboard = React.memo(SvgFacilityDashboard);\r\nexport default MemoSvgFacilityDashboard;\r\n","import * as React from 'react';\r\n\r\nconst SvgFacilityFolders = (props: React.SVGProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgFacilityFolders = React.memo(SvgFacilityFolders);\r\nexport default MemoSvgFacilityFolders;\r\n","import * as React from 'react';\r\n\r\nconst SvgHelpQuestionMark = (props: React.SVGProps) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgHelpQuestionMark = React.memo(SvgHelpQuestionMark);\r\nexport default MemoSvgHelpQuestionMark;\r\n","import * as React from 'react';\r\n\r\nconst SvgRiskAnalysis = (props: React.SVGProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgRiskAnalysis = React.memo(SvgRiskAnalysis);\r\nexport default MemoSvgRiskAnalysis;\r\n","import * as React from 'react';\r\n\r\nconst SvgBrandFaqs = (props: React.SVGProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgBrandFaqs = React.memo(SvgBrandFaqs);\r\nexport default MemoSvgBrandFaqs;\r\n","import * as React from 'react';\r\n\r\nconst SvgBrandResources = (props: React.SVGProps) => {\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\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgBrandResources = React.memo(SvgBrandResources);\r\nexport default MemoSvgBrandResources;\r\n","import * as React from 'react';\r\n\r\nconst SvgLoader = (props: React.SVGProps) => {\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\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst MemoSvgLoader = React.memo(SvgLoader);\r\nexport default MemoSvgLoader;\r\n","import React, {\r\n AnchorHTMLAttributes,\r\n ButtonHTMLAttributes,\r\n createElement,\r\n FC,\r\n} from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './Button.module.css';\r\nimport { LoaderIcon } from '../Icons';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport type ButtonProps = {\r\n as?: 'button' | 'a';\r\n light?: boolean;\r\n disabled?: boolean;\r\n isLoading?: boolean;\r\n variant?: 'primary' | 'secondary' | 'danger';\r\n};\r\n\r\nexport const Button: FC<\r\n ButtonProps &\r\n (\r\n | ButtonHTMLAttributes\r\n | AnchorHTMLAttributes\r\n )\r\n> = ({\r\n as = 'button',\r\n light = false,\r\n variant = 'primary',\r\n children,\r\n className,\r\n isLoading = false,\r\n disabled = false,\r\n ...buttonProps\r\n}) => {\r\n const isBaseButton = variant === 'primary' && !light;\r\n\r\n const props = {\r\n ...buttonProps,\r\n className: cx('button', variant, className, {\r\n light,\r\n isLoading,\r\n }),\r\n disabled: disabled || isLoading,\r\n };\r\n\r\n return createElement(\r\n as,\r\n { ...props },\r\n <>\r\n {children}\r\n {isBaseButton && isLoading && (\r\n
\r\n \r\n
\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default Button;\r\n","import { Env } from 'src/constants/env';\r\nimport request from '../request';\r\nimport { WrappedResponse } from '../types';\r\n\r\nexport type CheckVersionResponseType = WrappedResponse<{\r\n maintenance: boolean;\r\n upgrade: boolean;\r\n upcomingMaintenance: boolean;\r\n message: string;\r\n version: string;\r\n}>;\r\n\r\nexport function checkVersion() {\r\n return request.get(\r\n `${Env.apiUrl}/status/${Env.appVersion.toFixed(1)}`\r\n );\r\n}\r\n","import { useQuery } from 'react-query';\r\nimport { checkVersion } from 'src/clients/api/version';\r\nimport { Env } from 'src/constants/env';\r\n\r\nexport const DEFAULT_MAINTENANCE_MESSAGES = {\r\n active: 'Smart Water Navigator is currently under maintenance.',\r\n future: 'Smart Water Navigator will be under maintenance soon.',\r\n};\r\n\r\nexport function useMaintenance() {\r\n const { data } = useQuery(['app', 'version'], checkVersion!, {\r\n enabled: !Env.underMaintenance && !Env.futureMaintenance && !!checkVersion,\r\n });\r\n\r\n const hasActiveMaintenance =\r\n Env.underMaintenance ||\r\n (data?.status === 'success' && data.value.data.maintenance === true);\r\n\r\n const hasFutureMaintenance =\r\n Env.futureMaintenance ||\r\n (data?.status === 'success' &&\r\n data.value.data.upcomingMaintenance === true);\r\n\r\n let message = '';\r\n if (Env.underMaintenance) {\r\n message =\r\n Env.underMaintenanceMessage || DEFAULT_MAINTENANCE_MESSAGES.active;\r\n } else if (Env.futureMaintenance) {\r\n message =\r\n Env.futureMaintenanceMessage || DEFAULT_MAINTENANCE_MESSAGES.future;\r\n } else if (\r\n data?.status === 'success' &&\r\n data.value.data.maintenance === true\r\n ) {\r\n message =\r\n data.value.data.message !== ''\r\n ? data.value.data.message\r\n : DEFAULT_MAINTENANCE_MESSAGES.active;\r\n } else if (\r\n data?.status === 'success' &&\r\n data.value.data.upcomingMaintenance === true\r\n ) {\r\n message =\r\n data.value.data.message !== ''\r\n ? data.value.data.message\r\n : DEFAULT_MAINTENANCE_MESSAGES.future;\r\n }\r\n\r\n // const hasUpgrade =\r\n // data?.status === 'success' &&\r\n // data.value.data.upgrade === true;\r\n\r\n return {\r\n hasActiveMaintenance,\r\n hasFutureMaintenance,\r\n maintenanceMessage: message,\r\n };\r\n}\r\n","import React from 'react';\r\nimport {\r\n forwardRef,\r\n Icon as ChakraIcon,\r\n IconProps as ChakraIconProps,\r\n} from '@chakra-ui/react';\r\nimport MdiIcon from '@mdi/react';\r\nimport type { IconProps } from '@mdi/react/dist/IconProps';\r\n\r\nexport type IconPropsType = IconProps &\r\n ChakraIconProps & {\r\n size?: string | number;\r\n };\r\n\r\nexport const Icon = forwardRef(\r\n ({ size = '16px', ...props }, ref) => {\r\n return (\r\n \r\n );\r\n }\r\n);\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport {\r\n mdiAccountCircleOutline,\r\n mdiLogout,\r\n mdiAccountCogOutline,\r\n mdiAccountBoxOutline,\r\n} from '@mdi/js';\r\nimport styles from './AccountAvatar.module.css';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { Link } from 'react-router-dom';\r\nimport { useQuery } from 'react-query';\r\nimport { Box, Flex, Text } from '@chakra-ui/react';\r\nimport { Icon } from '../Icon';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype AccountAvatarProps = {};\r\n\r\nexport const AccountAvatar: FC = () => {\r\n const { isAuthenticated, logout, fetchUser } = useAuth();\r\n\r\n const { data } = useQuery(['user', 'current'], fetchUser!, {\r\n enabled: !!isAuthenticated,\r\n });\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n {data?.status === 'success' ? (\r\n \r\n {`${data.value.data.firstName} ${data.value.data.lastName}`}\r\n \r\n {data.value.data.companyName}\r\n \r\n \r\n ) : null}\r\n\r\n \r\n \r\n \r\n \r\n
    \r\n
  • \r\n \r\n \r\n Profile\r\n \r\n
  • \r\n
  • \r\n \r\n \r\n Account\r\n \r\n
  • \r\n
  • \r\n
  • \r\n logout && logout()}\r\n >\r\n \r\n Logout\r\n \r\n
  • \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAccountAvatar.displayName = 'AccountAvatar';\r\n","import { Box, Flex, SlideFade, Text } from '@chakra-ui/react';\r\nimport { mdiAlert } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { Icon } from '../Icon';\r\n\r\nexport interface SiteSubHeaderProps\r\n extends React.HTMLAttributes {\r\n hasUpcomingMaintenance?: boolean;\r\n isCurrentlyUnderMaintenance?: boolean;\r\n maintenanceMessage?: string;\r\n}\r\n\r\nexport const SiteSubHeader: FC = ({\r\n hasUpcomingMaintenance,\r\n isCurrentlyUnderMaintenance,\r\n maintenanceMessage,\r\n}) => {\r\n const { isAuthenticated } = useAuth();\r\n const hasMaintenance = isCurrentlyUnderMaintenance || hasUpcomingMaintenance;\r\n\r\n if (!hasMaintenance || isAuthenticated) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n a': { textDecor: 'underline' } }}\r\n />\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nSiteSubHeader.displayName = 'SiteSubHeader';\r\n","import { WrappedResponse } from '../types';\r\nimport request, {\r\n requestError,\r\n requestSuccess,\r\n getAuthHeaders,\r\n} from '../request';\r\nimport { urlWithAccountId } from '../helpers';\r\nimport { ActiveUpload, ActiveUploadWithRows } from 'src/types/upload';\r\n\r\nexport type SaveWrmBatchUploadRequestType = {};\r\nexport type SaveWrmBatchUploadResponseType = WrappedResponse<{}>;\r\nexport function postWrmBatchUpload(file: File) {\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n formData.append('data', file.name);\r\n\r\n const headers = new Headers({\r\n ...getAuthHeaders(),\r\n });\r\n headers.delete('Content-Type');\r\n\r\n return request\r\n .raw(urlWithAccountId(`batch-upload/facilities`), {\r\n method: 'POST',\r\n headers,\r\n body: formData,\r\n })\r\n .then(requestSuccess)\r\n .catch(requestError);\r\n}\r\n\r\nexport type GetActiveBatchUploadsResponseType = WrappedResponse<\r\n Array\r\n>;\r\nexport function getActiveBatchUploads() {\r\n return request.get(\r\n urlWithAccountId(`uploads`)\r\n );\r\n}\r\n\r\nexport type GetActiveBatchUploadResponseType = WrappedResponse<\r\n ActiveUploadWithRows\r\n>;\r\nexport function getActiveBatchUpload(uploadId: string) {\r\n return request.get(\r\n urlWithAccountId(`uploads/${uploadId}`)\r\n );\r\n}\r\n\r\nexport type DeleteActiveBatchUploadResponseType = WrappedResponse<{}>;\r\nexport function deleteActiveBatchUpload(uploadId: string) {\r\n return request.del(\r\n urlWithAccountId(`uploads/${uploadId}`)\r\n );\r\n}\r\n\r\nexport type DeleteActiveBatchUploadRowResponseType = WrappedResponse<{}>;\r\nexport function deleteActiveBatchUploadRow(uploadId: string, rowId: string) {\r\n return request.del(\r\n urlWithAccountId(`uploads/${uploadId}/rows/${rowId}`)\r\n );\r\n}\r\n","import { Box, Flex, IconButton, Tooltip } from '@chakra-ui/react';\r\nimport { mdiAlertCircle, mdiProgressUpload, mdiRefresh } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport React, { FC, useCallback, useEffect, useRef, useState } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport { getActiveBatchUploads } from 'src/clients/api/upload';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\n\r\ntype UploadStatusProps = {};\r\n\r\ntype DisplayStatus = {\r\n status: 'idle' | 'active' | 'error';\r\n};\r\n\r\nexport const UploadStatus: FC = () => {\r\n const { isAuthenticated, accountId } = useAuth();\r\n const timeout = useRef(null);\r\n\r\n const [display, setDisplay] = useState({\r\n status: 'idle',\r\n });\r\n\r\n const { data, isLoading, isFetching, refetch } = useQuery(\r\n ['activeUploads'],\r\n () => getActiveBatchUploads(),\r\n {\r\n enabled: Boolean(isAuthenticated && accountId),\r\n }\r\n );\r\n\r\n const check = useCallback(() => window.setTimeout(refetch, 20000), [refetch]);\r\n\r\n const checking = isLoading || isFetching;\r\n const isSuccess = data?.status === 'success';\r\n\r\n useEffect(() => {\r\n if (!checking) {\r\n if (isSuccess) {\r\n const uploads = data.value.data;\r\n\r\n const statuses = new Set(uploads.map((upload) => upload.status));\r\n const hasErrors = uploads.find((u) => u.errorCount > 0);\r\n\r\n if (statuses.has('unprocessed')) {\r\n setDisplay({\r\n status: 'active',\r\n });\r\n\r\n // Turn on polling because there are still unprocessed uploads\r\n timeout.current = check();\r\n } else if (hasErrors) {\r\n setDisplay({\r\n status: 'error',\r\n });\r\n\r\n // Turn on polling because there are still errored uploads\r\n timeout.current = check();\r\n } else {\r\n setDisplay({\r\n status: 'idle',\r\n });\r\n }\r\n }\r\n }\r\n\r\n return () => {\r\n if (timeout.current) {\r\n window.clearTimeout(timeout.current);\r\n }\r\n };\r\n }, [data, isSuccess, check, checking]);\r\n\r\n if (!isAuthenticated || !isSuccess || display.status === 'idle') {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n aria-label=\"Upload Status\"\r\n variant=\"link\"\r\n onClick={() => refetch()}\r\n />\r\n\r\n \r\n {display.status === 'error' ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUploadStatus.displayName = 'UploadStatus';\r\n","import {\r\n Box,\r\n Drawer,\r\n DrawerBody,\r\n DrawerCloseButton,\r\n DrawerContent,\r\n DrawerFooter,\r\n DrawerOverlay,\r\n Flex,\r\n HStack,\r\n IconButton,\r\n Image,\r\n Link as ChakraLink,\r\n Show,\r\n Stack,\r\n Tooltip,\r\n} from '@chakra-ui/react';\r\nimport { mdiAlertOutline, mdiMenu } from '@mdi/js';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useState } from 'react';\r\nimport { Link, NavLink, NavLinkProps, useLocation } from 'react-router-dom';\r\nimport { Button } from 'src/components/Button';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { DEFAULT_MAINTENANCE_MESSAGES } from 'src/hooks/useMaintenance';\r\nimport { AccountAvatar } from '../AccountAvatar';\r\nimport { Icon } from '../Icon';\r\nimport { SiteSubHeader } from '../SiteSubHeader';\r\nimport { UploadStatus } from '../UploadStatus';\r\nimport styles from './SiteHeader.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface SiteHeaderProps extends React.HTMLAttributes {\r\n hasUpcomingMaintenance?: boolean;\r\n maintenanceMessage?: string;\r\n isCurrentlyUnderMaintenance?: boolean;\r\n}\r\n\r\nconst LINKS: Record | string> = {\r\n About: {\r\n 'Smart Water Navigator': '/about',\r\n 'Development Partners': '/development-partners',\r\n FAQ: '/faq',\r\n Resources: '/resources',\r\n },\r\n Explore: {\r\n 'How it Works': '/how-it-works',\r\n Methodology: '/methodology',\r\n 'Take Action': '/take-action',\r\n },\r\n 'My Dashboard': '/app/dashboard',\r\n};\r\n\r\nconst ACCOUNT_LINKS: Record | string> = {\r\n Profile: {\r\n User: '/user',\r\n Account: '/account',\r\n },\r\n};\r\n\r\nconst Navigation: FC<{\r\n component: FC;\r\n className?: string;\r\n}> = ({ component: CustomLink, className }) => {\r\n return (\r\n
    \r\n {Object.entries(LINKS).map(([label, value]) => {\r\n switch (typeof value) {\r\n case 'string': {\r\n return (\r\n
  • \r\n {label}\r\n
  • \r\n );\r\n }\r\n\r\n case 'object': {\r\n return (\r\n
  • \r\n {label}\r\n
      \r\n {Object.entries(value).map(([subLabel, subValue]) => {\r\n return (\r\n
    • \r\n {subLabel}\r\n
    • \r\n );\r\n })}\r\n
    \r\n
  • \r\n );\r\n }\r\n\r\n default: {\r\n return '';\r\n }\r\n }\r\n })}\r\n
\r\n );\r\n};\r\n\r\nexport const SiteHeader: FC = ({\r\n hasUpcomingMaintenance,\r\n maintenanceMessage,\r\n isCurrentlyUnderMaintenance,\r\n}) => {\r\n const { isAuthenticated, logout } = useAuth();\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const location = useLocation();\r\n const shouldShowSubheader =\r\n isCurrentlyUnderMaintenance ||\r\n hasUpcomingMaintenance ||\r\n location.pathname.includes('/app');\r\n\r\n const HeaderLink: FC = (props) => {\r\n const isExternal = props.to.includes('http');\r\n\r\n if (isExternal) {\r\n return {props.children};\r\n }\r\n\r\n return (\r\n {\r\n setIsOpen(false);\r\n }}\r\n />\r\n );\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n setIsOpen(!isOpen)}\r\n aria-label={'Navigation'}\r\n icon={}\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\n \r\n {isCurrentlyUnderMaintenance ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n\r\n {isAuthenticated ? (\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\n )}\r\n
\r\n
\r\n \r\n\r\n {shouldShowSubheader ? (\r\n \r\n \r\n \r\n ) : null}\r\n\r\n \r\n {isOpen && (\r\n setIsOpen(false)}\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\n {Object.entries(ACCOUNT_LINKS).map(([label, value]) => {\r\n return (\r\n
  • \r\n {label}\r\n
      \r\n {Object.entries(value).map(([subLabel, subValue]) => {\r\n return (\r\n
    • \r\n \r\n {subLabel}\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\n {isAuthenticated ? (\r\n <>\r\n logout && logout()}\r\n style={{ width: '100%' }}\r\n >\r\n Logout\r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n Login\r\n \r\n \r\n \r\n \r\n Signup now\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\n\r\nSiteHeader.displayName = 'SiteHeader';\r\n","import React, { FC } from 'react';\r\nimport { Link as LocalLink } from 'react-router-dom';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './Pressable.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface PressableProps {\r\n to: string;\r\n className?: string;\r\n target?: string;\r\n rel?: string;\r\n}\r\n\r\nexport const Pressable: FC = ({\r\n to,\r\n children,\r\n className,\r\n ...props\r\n}) => {\r\n if (to.includes('http')) {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nPressable.displayName = 'Pressable';\r\n","import React, { FC } from 'react';\r\n\r\nexport interface UpdateCookiePrefButtonProps\r\n extends React.HTMLAttributes {\r\n solid?: boolean;\r\n}\r\n\r\nexport const UpdateCookiePrefButton: FC = () => {\r\n const reloadOTBanner = () => {\r\n if ((window as any).OneTrust != null) {\r\n // Check if OneTrust is already initialized\r\n if ((window as any).OneTrust.IsInitialized) {\r\n (window as any).OneTrust.LoadBanner();\r\n } else {\r\n console.log('Initializing OneTrust');\r\n (window as any).OneTrust.Init();\r\n (window as any).OneTrust.OnConsentChanged(() => {\r\n (window as any).OneTrust.LoadBanner();\r\n });\r\n }\r\n (window as any).OneTrust.ToggleInfoDisplay();\r\n }\r\n };\r\n\r\n return ;\r\n};\r\n\r\nUpdateCookiePrefButton.displayName = 'UpdateCookiePrefButton';\r\n","import classnames from 'classnames/bind';\r\nimport { Flex, Text, Box } from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { Pressable } from '../Pressable';\r\n\r\nimport styles from './AppFooter.module.css';\r\nimport { UpdateCookiePrefButton } from '../UpdateCookiePrefButton';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype AppFooterProps = {};\r\n\r\nexport const AppFooter: FC = () => {\r\n return (\r\n
\r\n \r\n \r\n Developed by Ecolab in collaboration with S&P Global Sustainable1\r\n \r\n \r\n
\r\n \r\n \r\n Terms of Service\r\n \r\n \r\n \r\n \r\n Privacy Notice\r\n \r\n \r\n\r\n \r\n \r\n Cookies\r\n \r\n \r\n\r\n \r\n \r\n Contact\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n © {new Date().getFullYear()} Smart Water Navigator, All Rights\r\n Reserved\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAppFooter.displayName = 'AppFooter';\r\n","import React, { createElement, FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './Copy.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface CopyProps extends React.HTMLAttributes {\r\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'p';\r\n color?: 'white' | 'blueLight';\r\n align?: 'left' | 'right' | 'center';\r\n}\r\n\r\nexport const Copy: FC = ({\r\n children,\r\n className,\r\n as = 'p',\r\n color = 'black',\r\n align,\r\n dangerouslySetInnerHTML,\r\n}) => {\r\n const combinedClassName = cx('copy', as, color, align, className);\r\n\r\n return createElement(\r\n as,\r\n {\r\n className: combinedClassName,\r\n dangerouslySetInnerHTML,\r\n },\r\n children\r\n );\r\n};\r\n\r\nCopy.displayName = 'Copy';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './BlockError.module.css';\r\nimport { Button } from '../Button';\r\nimport { Copy } from '../Copy';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface BlockErrorProps extends React.HTMLAttributes {\r\n title?: string;\r\n message?: string;\r\n retry?: () => void;\r\n isLoading?: boolean;\r\n}\r\n\r\nconst DEFAULT_TITLE = 'There was an error.';\r\nconst DEFAULT_MESSAGE = `Your request could not be processed or resulted in an error. Please try again.`;\r\n\r\nexport const BlockError: FC = ({\r\n title = DEFAULT_TITLE,\r\n message = DEFAULT_MESSAGE,\r\n isLoading = false,\r\n retry,\r\n}) => {\r\n return (\r\n
\r\n {title}\r\n
\r\n {message}\r\n
\r\n {!!retry ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nBlockError.displayName = 'BlockError';\r\n","import React, { FC } from 'react';\r\nimport { BoxProps, Flex, Spinner } from '@chakra-ui/react';\r\n\r\nexport type LoadingSpinnerProps = BoxProps & {\r\n block?: boolean;\r\n};\r\n\r\nexport const LoadingSpinner: FC = () => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nLoadingSpinner.displayName = 'LoadingSpinner';\r\n","import React, { FC } from 'react';\r\nimport {\r\n Alert,\r\n AlertTitle,\r\n AlertDescription,\r\n Stack,\r\n Box,\r\n} from '@chakra-ui/react';\r\nimport { mdiAlertOutline } from '@mdi/js';\r\nimport { Icon } from '../Icon';\r\nimport { DEFAULT_MAINTENANCE_MESSAGES } from 'src/hooks/useMaintenance';\r\n\r\ntype MaintenanceProps = {\r\n message?: string;\r\n};\r\n\r\nexport const Maintenance: FC = ({ message }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n Undergoing Maintenance\r\n \r\n \r\n a': { textDecor: 'underline' } }}\r\n dangerouslySetInnerHTML={{\r\n __html: message ?? DEFAULT_MAINTENANCE_MESSAGES.active,\r\n }}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nMaintenance.displayName = 'Maintenance';\r\n","import React, { FC } from 'react';\r\nimport {\r\n Redirect,\r\n Route as RouterRoute,\r\n RouteProps as RouterRouteProps,\r\n} from 'react-router-dom';\r\nimport { useAuth } from '../../hooks/useAuth';\r\nexport interface RouteProps extends RouterRouteProps {\r\n path: string;\r\n variant?: 'protected' | 'public' | undefined;\r\n}\r\n\r\nexport const Route: FC = ({ variant, location, ...props }) => {\r\n const { isAuthenticated } = useAuth();\r\n\r\n if (variant === 'protected' && !isAuthenticated) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (variant === 'public' && isAuthenticated) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return ;\r\n};\r\n\r\nRoute.displayName = 'Route';\r\n","import { WrappedResponse } from '../types';\r\nimport * as request from '../request';\r\nimport * as yup from 'yup';\r\nimport { User as UserType } from '../../types/user';\r\nimport { Env } from '../../constants/env';\r\nimport { Accounts as AccountsType } from '../../types/account';\r\n\r\nexport type UserResponseType = WrappedResponse;\r\n\r\nexport function getUser() {\r\n return request.get(`${Env.apiUrl}/v3.1/users/user`);\r\n}\r\n\r\nexport const editUserFormSchema = yup.object({\r\n firstName: yup.string().trim().required('Required'),\r\n lastName: yup.string().trim().required('Required'),\r\n companyName: yup.string().trim().required('Required'),\r\n jobTitle: yup.string().trim().required('Required'),\r\n email: yup.string().trim().required('Required'),\r\n});\r\nexport type SaveUserRequestType = yup.InferType;\r\nexport type SaveUserResponseType = WrappedResponse;\r\n\r\nexport function saveUser(userId: string, payload: SaveUserRequestType) {\r\n return request.put(\r\n `${Env.apiUrl}/v5/users/${userId}`,\r\n payload\r\n );\r\n}\r\n\r\nexport type UserAccountsResponseType = WrappedResponse;\r\n\r\nexport function getUserAccounts(userId: string) {\r\n return request.get(\r\n `${Env.apiUrl}/v5/users/${userId}/accounts`\r\n );\r\n}\r\n\r\nexport type ResendUserVerificationRequestType = {};\r\nexport type ResendUserVerificationResponseType = WrappedResponse;\r\nexport function resendVerificationEmail(userId: string) {\r\n return request.post<\r\n ResendUserVerificationResponseType,\r\n ResendUserVerificationRequestType\r\n >(`${Env.apiUrl}/v5/users/${userId}/resend-verification`);\r\n}\r\n","import classnames from 'classnames/bind';\r\nimport React, { forwardRef } from 'react';\r\nimport { Flex, Spinner, Text } from '@chakra-ui/react';\r\nimport { mdiChevronDown } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport { useSelect, UseSelectStateChange } from 'downshift';\r\nimport { FieldError } from 'react-hook-form';\r\nimport styles from './SelectInput.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport type ListItemType = {\r\n label: string;\r\n value: string;\r\n};\r\n\r\nexport type SelectInputProps = {\r\n items: Array;\r\n value: ListItemType['value'];\r\n onChange: (value: string) => void;\r\n placeholder?: string;\r\n className?: string;\r\n error?: FieldError;\r\n disabled?: boolean;\r\n loading?: boolean;\r\n};\r\n\r\nexport const SelectInput = forwardRef(\r\n (\r\n {\r\n items,\r\n placeholder,\r\n value,\r\n onChange,\r\n className,\r\n error,\r\n disabled = false,\r\n loading = false,\r\n },\r\n ref\r\n ) => {\r\n const selectedItemObject = items.find(({ value: v }) => v === `${value}`);\r\n\r\n const handleSelectedItemChange = (\r\n changes: UseSelectStateChange\r\n ) => {\r\n onChange(changes.selectedItem?.value ?? '');\r\n };\r\n\r\n const {\r\n isOpen,\r\n getToggleButtonProps,\r\n getMenuProps,\r\n getItemProps,\r\n } = useSelect({\r\n items,\r\n onSelectedItemChange: handleSelectedItemChange,\r\n initialSelectedItem: selectedItemObject,\r\n itemToString: (item) => item?.value ?? '',\r\n });\r\n\r\n return (\r\n
\r\n \r\n \r\n {selectedItemObject?.label ?? placeholder}\r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {error && (\r\n \r\n \r\n {error.message}\r\n \r\n \r\n )}\r\n
\r\n {isOpen && (\r\n
    \r\n {items.map((item, index) => (\r\n \r\n {item.label}\r\n \r\n ))}\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n }\r\n);\r\n\r\nSelectInput.displayName = 'SelectInput';\r\n","import React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { getUserAccounts } from 'src/clients/api/user';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { SelectInput } from '../SelectInput';\r\nimport { Box, BoxProps, Text } from '@chakra-ui/react';\r\n\r\ntype AccountSelectorProps = {\r\n hideWhileSingle?: boolean;\r\n} & BoxProps;\r\n\r\nexport const AccountSelector: FC = ({\r\n hideWhileSingle,\r\n ...props\r\n}) => {\r\n const { switchAccounts, accountId, userId } = useAuth();\r\n\r\n const { data: accounts } = useQuery(\r\n ['user', userId!, 'accounts'],\r\n () => getUserAccounts(userId!),\r\n {\r\n enabled: !!userId,\r\n }\r\n );\r\n\r\n const handleSwitch = (value: string) => {\r\n switchAccounts!(value);\r\n };\r\n\r\n if (accounts?.status === 'success') {\r\n if (hideWhileSingle && accounts.value.data.length === 1) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n Switch accounts:\r\n ({\r\n label: a.companyName,\r\n value: a.accountId,\r\n }))}\r\n value={accountId ?? ''}\r\n onChange={handleSwitch}\r\n />\r\n \r\n );\r\n }\r\n\r\n return null;\r\n};\r\n\r\nAccountSelector.displayName = 'AccountSelector';\r\n","import request from '../request';\r\nimport { WrappedResponse } from '../types';\r\nimport { urlWithAccountId } from '../helpers';\r\nimport { Env } from 'src/constants/env';\r\n\r\nexport type InviteUserRequestType = {\r\n accountId: string;\r\n email: string;\r\n externalInvite: boolean;\r\n consolidateAccount: boolean;\r\n internalInvite: boolean;\r\n};\r\nexport type InviteUserResponseType = WrappedResponse;\r\nexport function inviteUser(data: InviteUserRequestType) {\r\n return request.post(\r\n urlWithAccountId(`invitations`),\r\n data\r\n );\r\n}\r\n\r\nexport type GetInviteResponseType = WrappedResponse<{\r\n userName: string;\r\n accountName: string;\r\n}>;\r\nexport function getInvite(accountId: string, invitationId: string) {\r\n return request.get(\r\n `${Env.apiUrl}/v5/users/invitations/accounts/${accountId}/invitations/${invitationId}`\r\n );\r\n}\r\n\r\nexport type AcceptInviteRequestType = {\r\n accepted: boolean;\r\n};\r\nexport type AcceptInviteResponseType = WrappedResponse;\r\nexport function acceptInvite(\r\n accountId: string,\r\n invitationId: string,\r\n data: AcceptInviteRequestType\r\n) {\r\n return request.post(\r\n `${Env.apiUrl}/v5/users/invitations/accounts/${accountId}/invitations/${invitationId}`,\r\n data\r\n );\r\n}\r\n\r\nexport type DeleteUserRequestType = WrappedResponse;\r\nexport function deleteUserFromAccount(userId: string) {\r\n return request.del(\r\n urlWithAccountId(`users/${userId}`)\r\n );\r\n}\r\n\r\nexport type GenerateAccountCsvReportResponseType = WrappedResponse;\r\nexport function generateAccountCsvReport() {\r\n return request.post(\r\n urlWithAccountId(`reports/csv`)\r\n );\r\n}\r\n","import { AggregateResults } from 'src/types/aggregates';\r\nimport { Folders } from 'src/types/folder';\r\nimport { ProcessedFacilities } from 'src/types/processedFacility';\r\nimport { urlWithAccountId } from '../helpers';\r\nimport request from '../request';\r\nimport { WrappedResponse } from '../types';\r\n\r\nexport type GetFoldersResponseType = WrappedResponse;\r\nexport function getFolders() {\r\n return request.get(urlWithAccountId(`folders`));\r\n}\r\n\r\nexport type CreateFolderRequestType = {\r\n folderName: string;\r\n};\r\nexport type CreateFolderResponseType = WrappedResponse<{}>;\r\nexport function createFolder(folderName: string) {\r\n return request.post(\r\n urlWithAccountId(`folders`),\r\n { folderName }\r\n );\r\n}\r\n\r\nexport type UpdateFolderRequestType = {\r\n folderName: string;\r\n};\r\nexport type UpdateFolderResponseType = WrappedResponse<{}>;\r\nexport function updateFolder(folderId: number, folderName: string) {\r\n return request.put(\r\n urlWithAccountId(`folders/${folderId}`),\r\n { folderName }\r\n );\r\n}\r\n\r\nexport type DeleteFolderResponseType = WrappedResponse<{}>;\r\nexport function deleteFolder(folderId: number) {\r\n return request.del(\r\n urlWithAccountId(`folders/${folderId}`)\r\n );\r\n}\r\n\r\nexport type GetFolderFacilitiesResponseType = WrappedResponse<\r\n ProcessedFacilities\r\n>;\r\nexport function getFolderFacilities(folderId: string) {\r\n return request.get(\r\n urlWithAccountId(`folders/${folderId}/facilities`)\r\n );\r\n}\r\n\r\nexport type GetAggregateResponseType = WrappedResponse;\r\nexport function getFolderAggregates(folderId: string) {\r\n return request.get(\r\n urlWithAccountId(`folders/${folderId}/aggregate-results`)\r\n );\r\n}\r\n\r\nexport type GeneratePdfReportForFolderResponseType = WrappedResponse;\r\nexport type GeneratePdfReportForFolderRequestType = {\r\n riskAnalysisChart: string;\r\n benchmarkingChart: string;\r\n};\r\nexport function generateFolderPDFReport(\r\n folderId: string,\r\n data: GeneratePdfReportForFolderRequestType\r\n) {\r\n return request.post<\r\n GeneratePdfReportForFolderResponseType,\r\n GeneratePdfReportForFolderRequestType\r\n >(urlWithAccountId(`folders/${folderId}/reports/pdf`), data);\r\n}\r\n\r\nexport type GenerateFolderCsvReportResponseType = WrappedResponse;\r\nexport function generateFolderCsvReport(folderId: string) {\r\n return request.post(\r\n urlWithAccountId(`folders/${folderId}/reports/csv`)\r\n );\r\n}\r\n","import React, { FC } from 'react';\r\nimport {\r\n AlertDialog,\r\n AlertDialogBody,\r\n AlertDialogCloseButton,\r\n AlertDialogContent,\r\n AlertDialogHeader,\r\n AlertDialogOverlay,\r\n Box,\r\n Text,\r\n} from '@chakra-ui/react';\r\n\r\nexport type DialogProps = {\r\n variant?: 'danger' | 'default';\r\n isOpen: boolean;\r\n title: string;\r\n description: string;\r\n onClose?: () => void;\r\n className?: string;\r\n};\r\nexport const Dialog: FC = ({\r\n isOpen,\r\n title,\r\n description,\r\n children,\r\n onClose,\r\n}) => {\r\n return (\r\n onClose?.()}\r\n isOpen={isOpen}\r\n leastDestructiveRef={undefined}\r\n isCentered\r\n >\r\n \r\n\r\n \r\n {title}\r\n \r\n \r\n \r\n {description}\r\n \r\n {children}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nDialog.displayName = 'Dialog';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './RadioList.module.css';\r\nimport { FieldError } from 'react-hook-form';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype RadioListProps = {\r\n items: Array<{ label: string; value: string }>;\r\n value: string;\r\n onChange: (value: string) => void;\r\n error?: FieldError;\r\n};\r\n\r\nexport const RadioList: FC = ({\r\n items,\r\n value,\r\n onChange,\r\n error,\r\n}) => {\r\n return (\r\n
\r\n {items.map(({ value: v, label }) => (\r\n \r\n ))}\r\n {error && {error.message}}\r\n
\r\n );\r\n};\r\n\r\nRadioList.displayName = 'RadioList';\r\n","import { useState } from 'react';\r\n\r\nexport type AsyncStateType =\r\n | {\r\n status: 'idle';\r\n }\r\n | {\r\n status: 'loading';\r\n }\r\n | {\r\n status: 'success' | 'error';\r\n message: string;\r\n };\r\n\r\nexport function useAsyncState(state?: AsyncStateType) {\r\n return useState(\r\n state ?? {\r\n status: 'idle',\r\n }\r\n );\r\n}\r\n","export const DEFAULT_CHART = {\r\n chart: {\r\n height: 300,\r\n },\r\n title: {\r\n text: null,\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n credits: {\r\n enabled: false,\r\n },\r\n exporting: { enabled: false },\r\n};\r\n\r\nexport const RISK_COLOR_MAP = {\r\n high: '#ec5c39',\r\n medium: '#f7bb16',\r\n low: '#93be4c',\r\n none: '#717171',\r\n};\r\n\r\nexport const STRESS_COLOR_MAP = {\r\n 'Extremely high': RISK_COLOR_MAP['high'],\r\n High: RISK_COLOR_MAP['high'],\r\n 'Medium-high': RISK_COLOR_MAP['medium'],\r\n 'Low-medium': RISK_COLOR_MAP['medium'],\r\n Low: RISK_COLOR_MAP['low'],\r\n none: RISK_COLOR_MAP['none'],\r\n} as const;\r\n\r\nexport const COLOR_MAP = {\r\n R: { text: 'HIGH', color: 'danger' },\r\n Y: { text: 'MEDIUM', color: 'warning' },\r\n G: { text: 'LOW', color: 'success' },\r\n N: { text: 'NONE', color: 'none' },\r\n};\r\n\r\nexport const WITHDRAWAL_RISK_SUGGESTION_MAP = {\r\n high:\r\n 'greater than 50% decrease needed from current annual water user, invest in smart water strategies immediately',\r\n medium:\r\n 'between 25% and 50% decrease needed from current annual water use, invest in smart water strategies',\r\n low:\r\n 'between 0% and 25% decrease needed from current annual water use, monitor water issues and invest in smart water strategies',\r\n none:\r\n 'less than 0% decrease required needed current annual water use, monitor water issues accordingly',\r\n};\r\n\r\nexport function getRegressionLineV3(\r\n xData: Array,\r\n yData: Array,\r\n revenueSlope?: number\r\n) {\r\n const regressionLine = [];\r\n let slope = revenueSlope ? revenueSlope : getSlopeV3(xData, yData);\r\n\r\n for (let i = 0; i < xData.length; i++) {\r\n regressionLine[i] = xData[i] / slope;\r\n }\r\n\r\n regressionLine.sort(function (a, b) {\r\n return a - b;\r\n });\r\n\r\n return {\r\n xData,\r\n yData,\r\n values: regressionLine,\r\n };\r\n}\r\n\r\nexport function getColorByFacilityRank(rank: string) {\r\n switch (rank) {\r\n case 'HIGH-HIGH': {\r\n return '#e64848';\r\n }\r\n case 'HIGH-LOW': {\r\n return '#dc8f18';\r\n }\r\n case 'LOW-HIGH': {\r\n return '#6ba737';\r\n }\r\n default: {\r\n return '#717171';\r\n }\r\n }\r\n}\r\n\r\nexport function getSlopeV3(xData: Array, yData: Array) {\r\n return arrayAverage(waterIntensityAverage(xData, yData));\r\n}\r\n\r\nfunction waterIntensityAverage(xData: Array, yData: Array) {\r\n var i,\r\n waterIntensity = [];\r\n\r\n for (i = 0; i < xData.length; i++) {\r\n waterIntensity[i] = xData[i] / yData[i];\r\n }\r\n\r\n return waterIntensity;\r\n}\r\n\r\nfunction arrayAverage(array: Array) {\r\n return array.reduce((acc, c) => acc + c, 0) / array.length;\r\n}\r\n\r\nexport function getScatterPlotOptions() {\r\n return {\r\n dataLabels: {\r\n enabled: true,\r\n shadow: false,\r\n formatter: function (): string {\r\n // @ts-expect-error\r\n return `${this.point.idx}`;\r\n },\r\n allowOverlap: true,\r\n align: 'center',\r\n verticalAlign: 'middle',\r\n inside: true,\r\n useHTML: true,\r\n format: `
{point.idx}
`,\r\n },\r\n marker: {\r\n enabled: false,\r\n radius: 1,\r\n symbol: 'dot',\r\n lineColor: null, // inherit from series\r\n },\r\n zIndex: 6,\r\n };\r\n}\r\n","import { AggregateResults } from 'src/types/aggregates';\r\nimport {\r\n DEFAULT_CHART,\r\n getColorByFacilityRank,\r\n getRegressionLineV3,\r\n getScatterPlotOptions,\r\n} from './utils';\r\n\r\nexport type BenchmarkingDisplayType = 'Incoming' | 'Outgoing' | 'Consumptive';\r\nexport const BENCHMARKING_TYPE_OPTIONS = [\r\n 'Incoming',\r\n 'Outgoing',\r\n 'Consumptive',\r\n];\r\nexport type BenchmarkingDisplayIntensity = 'Production' | 'Revenue';\r\nexport const BENCHMARKING_INTENSITY_OPTIONS = ['Production', 'Revenue'];\r\n\r\nexport function benchmarkingChartDataGenerator(\r\n aggregates: AggregateResults = [],\r\n hiddenAggregates?: Set,\r\n displayState: {\r\n type: BenchmarkingDisplayType;\r\n intensity: BenchmarkingDisplayIntensity;\r\n showOrgAvg: boolean;\r\n showSectorAvg: boolean;\r\n } = {\r\n type: 'Incoming',\r\n intensity: 'Production',\r\n showOrgAvg: true,\r\n showSectorAvg: true,\r\n }\r\n) {\r\n const filteredAggregates = (aggregates ?? []).filter(\r\n (f) => !hiddenAggregates?.has(f.facilityId)\r\n );\r\n\r\n const getDots = function (facilities: AggregateResults) {\r\n const dots = facilities.map((a) => ({\r\n name: a.facility.facilityName,\r\n color: getColorByFacilityRank(a.twoByTwoQuadrant ?? ''),\r\n // @ts-ignore\r\n x: a[`benchmark${displayState.type}XAxis`] ?? undefined,\r\n // @ts-ignore\r\n y: a[`benchmark${displayState.intensity}YAxis`] ?? undefined,\r\n idx: a.facilityRank,\r\n }));\r\n\r\n const data = dots.reduce<{ x: Array; y: Array }>(\r\n (acc, dot) => {\r\n acc.x.push(Number(dot.x));\r\n acc.y.push(Number(dot.y));\r\n\r\n return acc;\r\n },\r\n {\r\n x: [],\r\n y: [],\r\n }\r\n );\r\n\r\n return { dots, data };\r\n };\r\n\r\n const organizationalAverageData = getDots(aggregates);\r\n const organizationalAverage = getRegressionLineV3(\r\n organizationalAverageData.data.x,\r\n organizationalAverageData.data.y\r\n );\r\n\r\n organizationalAverage.xData.sort(sortFunc);\r\n organizationalAverage.yData.sort(sortFunc);\r\n\r\n const sectorId =\r\n filteredAggregates &&\r\n filteredAggregates[0] &&\r\n filteredAggregates[0].facility.sector3Id;\r\n const isSector =\r\n filteredAggregates &&\r\n filteredAggregates.every((a) => a.facility.sector3Id === sectorId);\r\n\r\n const filteredAggregatesData = getDots(filteredAggregates);\r\n const sectorAverage = getRegressionLineV3(\r\n organizationalAverageData.data.x,\r\n organizationalAverageData.data.y,\r\n isSector &&\r\n filteredAggregates &&\r\n filteredAggregates[0] &&\r\n filteredAggregates[0].sectorWaterUsePerRevenue\r\n ? filteredAggregates[0].sectorWaterUsePerRevenue\r\n : undefined\r\n );\r\n\r\n sectorAverage.xData.sort(sortFunc);\r\n sectorAverage.yData.sort(sortFunc);\r\n\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n type: 'scatter',\r\n animation: false,\r\n spacing: [20, 10, 10, 10],\r\n },\r\n xAxis: {\r\n title: {\r\n text: `${displayState.intensity} (${\r\n displayState.intensity === 'Production' ? 'unit' : '$M'\r\n })`,\r\n },\r\n },\r\n plotOptions: {\r\n scatter: getScatterPlotOptions(),\r\n line: {\r\n enableMouseTracking: true,\r\n marker: {\r\n enabled: true,\r\n },\r\n label: {\r\n enabled: true,\r\n },\r\n },\r\n series: {\r\n animation: false,\r\n },\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Water Volume (m3)',\r\n },\r\n },\r\n legend: {\r\n enabled: false,\r\n squareSymbol: false,\r\n symbolHeight: 12,\r\n symbolWidth: 24,\r\n symbolPadding: 10,\r\n symbolRadius: 0,\r\n },\r\n tooltip: {\r\n headerFormat:\r\n '{point.key}',\r\n // prettier-ignore\r\n pointFormat: `\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n ${displayState.intensity} (${\r\n displayState.intensity === 'Production' ? 'unit' : '$M'\r\n }):\r\n \r\n {point.x:.5f}\r\n
Water Volume:{point.y:.5f}
`,\r\n shared: false,\r\n useHTML: true,\r\n },\r\n series: [\r\n {\r\n type: 'scatter',\r\n name: displayState.type,\r\n data: filteredAggregatesData.dots.map((d) =>\r\n Object.assign({}, d, {\r\n x: d.y,\r\n y: d.x,\r\n })\r\n ),\r\n },\r\n {\r\n type: 'line',\r\n color: '#096490',\r\n id: 'organizationalAverage',\r\n name: 'Organizational Average',\r\n visible: displayState.showOrgAvg,\r\n data: [\r\n {\r\n x: organizationalAverage.values[0],\r\n y: organizationalAverage.xData[0],\r\n },\r\n {\r\n x:\r\n organizationalAverage.values[\r\n organizationalAverage.values.length - 1\r\n ],\r\n y:\r\n organizationalAverage.xData[\r\n organizationalAverage.xData.length - 1\r\n ],\r\n },\r\n ],\r\n },\r\n {\r\n type: 'line',\r\n color: '#dc8f18',\r\n id: 'sectorAverage',\r\n name: 'Sector Average',\r\n visible:\r\n displayState.showSectorAvg &&\r\n isSector &&\r\n displayState.intensity === 'Revenue',\r\n data: [\r\n {\r\n x: sectorAverage.values[0],\r\n y: sectorAverage.xData[0],\r\n },\r\n {\r\n x: sectorAverage.values[sectorAverage.values.length - 1],\r\n y: sectorAverage.xData[sectorAverage.xData.length - 1],\r\n },\r\n ],\r\n },\r\n ],\r\n };\r\n}\r\n\r\nfunction sortFunc(a: number, b: number) {\r\n return a - b;\r\n}\r\n","import { ProcessedFacility } from 'src/types/processedFacility';\r\nimport { DEFAULT_CHART } from './utils';\r\n\r\nexport function incomingRiskChartDataGenerator({\r\n attributes,\r\n}: ProcessedFacility['charts']['incomingWaterRiskChart']): Highcharts.Options {\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'column',\r\n },\r\n title: {\r\n text: null,\r\n },\r\n xAxis: {\r\n categories: ['1 Year', '3 Year', '5 Year', '10 Year'],\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Value (USD per year)',\r\n },\r\n gridLineDashStyle: 'longdash',\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n tooltip: {\r\n headerFormat: '{point.x}
',\r\n pointFormatter: function (this: {\r\n series: { name: string };\r\n y: number;\r\n stackTotal: number;\r\n }) {\r\n return `${this.series.name}: ${this.y}
Combined: ${this.stackTotal}`;\r\n },\r\n },\r\n plotOptions: {\r\n column: {\r\n stacking: 'normal',\r\n },\r\n },\r\n series: [\r\n {\r\n name: 'Quality Risk',\r\n data: [\r\n attributes['year1-quality'],\r\n attributes['year3-quality'],\r\n attributes['year5-quality'],\r\n attributes['year10-quality'],\r\n ],\r\n color: '#b7dbe6',\r\n },\r\n {\r\n name: 'Quantity Risk',\r\n data: [\r\n attributes['year1-scarcity'],\r\n attributes['year3-scarcity'],\r\n attributes['year5-scarcity'],\r\n attributes['year10-scarcity'],\r\n ],\r\n color: '#93c9da',\r\n },\r\n {\r\n name: 'Water Bill',\r\n data: [\r\n attributes['year1-waterbill'],\r\n attributes['year3-waterbill'],\r\n attributes['year5-waterbill'],\r\n attributes['year10-waterbill'],\r\n ],\r\n color: '#6fb7ce',\r\n },\r\n ],\r\n credits: {\r\n enabled: false,\r\n },\r\n };\r\n}\r\n","import { ProcessedFacility } from 'src/types/processedFacility';\r\nimport { DEFAULT_CHART } from './utils';\r\n\r\nexport function outgoingRiskChartDataGenerator({\r\n attributes,\r\n}: ProcessedFacility['charts']['outgoingWaterRiskChart']): Highcharts.Options {\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'column',\r\n },\r\n xAxis: {\r\n categories: ['1 Year', '3 Year', '5 Year', '10 Year'],\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Value (USD per year)',\r\n },\r\n },\r\n tooltip: {\r\n headerFormat: '{point.x}
',\r\n pointFormatter: function (this: {\r\n series: { name: string };\r\n y: number;\r\n stackTotal: number;\r\n }) {\r\n return `${this.series.name}: ${this.y}
Combined: ${this.stackTotal}`;\r\n },\r\n },\r\n plotOptions: {\r\n column: {\r\n stacking: 'normal',\r\n },\r\n },\r\n series: [\r\n {\r\n name: 'Quality Risk',\r\n data: [\r\n attributes['year1-quality-risk'],\r\n attributes['year3-quality-risk'],\r\n attributes['year5-quality-risk'],\r\n attributes['year10-quality-risk'],\r\n ],\r\n color: '#d7eab8',\r\n },\r\n {\r\n name: 'Water Bill',\r\n data: [\r\n attributes['year1-waterbill'],\r\n attributes['year3-waterbill'],\r\n attributes['year5-waterbill'],\r\n attributes['year10-waterbill'],\r\n ],\r\n color: '#a7d162',\r\n },\r\n ],\r\n };\r\n}\r\n","import { ProcessedFacility } from 'src/types/processedFacility';\r\nimport { DEFAULT_CHART } from './utils';\r\n\r\nexport function revenueRiskChartDataGenerator({\r\n attributes,\r\n}: ProcessedFacility['charts']['revenueRiskChart']): Highcharts.Options {\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'column',\r\n },\r\n xAxis: {\r\n categories: ['1 Year', '3 Year', '5 Year', '10 Year'],\r\n },\r\n yAxis: {\r\n softMax: 1.25,\r\n title: {\r\n text: 'USD per USD',\r\n },\r\n },\r\n tooltip: {\r\n headerFormat: '{point.x}
',\r\n pointFormat: '{series.name}: {point.y}',\r\n },\r\n plotOptions: {\r\n column: {\r\n stacking: 'normal',\r\n },\r\n },\r\n series: [\r\n {\r\n name: 'Revenue at Risk',\r\n data: [\r\n attributes['year1-revenue-risk'],\r\n attributes['year3-revenue-risk'],\r\n attributes['year5-revenue-risk'],\r\n attributes['year10-revenue-risk'],\r\n ],\r\n color: '#f09a48',\r\n },\r\n ],\r\n };\r\n}\r\n","import { AggregateResults } from 'src/types/aggregates';\r\nimport { ChartDataNode } from 'src/types/chart';\r\nimport { DEFAULT_CHART, getScatterPlotOptions } from './utils';\r\n\r\nexport function riskAnalysisChartDataGenerator(\r\n aggregates?: AggregateResults,\r\n hiddenFacilities?: Set\r\n) {\r\n const series = (aggregates ?? []).reduce<{\r\n first: Array;\r\n second: Array;\r\n third: Array;\r\n fourth: Array;\r\n }>(\r\n (acc, f) => {\r\n if (\r\n !hiddenFacilities?.has(f.facilityId) &&\r\n typeof f.twoByTwoXAxis === 'number' &&\r\n !isNaN(f.twoByTwoXAxis) &&\r\n typeof f.twoByTwoYAxis === 'number' &&\r\n !isNaN(f.twoByTwoYAxis)\r\n ) {\r\n const node = {\r\n name: f.facility.facilityName,\r\n x: f.twoByTwoXAxis,\r\n y: f.twoByTwoYAxis,\r\n idx: f.facilityRank,\r\n };\r\n\r\n switch (f.twoByTwoQuadrant?.toLowerCase()) {\r\n case 'high-high':\r\n acc.first.push(node);\r\n break;\r\n case 'low-high':\r\n acc.second.push(node);\r\n break;\r\n case 'high-low':\r\n acc.third.push(node);\r\n break;\r\n case 'low-low':\r\n acc.fourth.push(node);\r\n break;\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n { first: [], second: [], third: [], fourth: [] }\r\n );\r\n\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n type: 'scatter',\r\n spacing: [0, 0, 0, 0],\r\n animation: false,\r\n },\r\n xAxis: {\r\n gridLineWidth: 1,\r\n startOnTick: true,\r\n endOnTick: true,\r\n tickLength: 0,\r\n plotLines: [\r\n {\r\n color: '#e6e6e6',\r\n dashStyle: 'Solid',\r\n width: 4,\r\n value: 0,\r\n zIndex: 2,\r\n },\r\n ],\r\n labels: {\r\n enabled: false,\r\n },\r\n tickPositioner: tickPositioner,\r\n },\r\n yAxis: {\r\n gridLineWidth: 1,\r\n startOnTick: true,\r\n endOnTick: true,\r\n plotLines: [\r\n {\r\n color: '#e6e6e6',\r\n dashStyle: 'Solid',\r\n width: 4,\r\n value: 0,\r\n zIndex: 2,\r\n },\r\n ],\r\n title: {\r\n text: '',\r\n },\r\n labels: {\r\n enabled: false,\r\n },\r\n tickPositioner: tickPositioner,\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n tooltip: {\r\n headerFormat: '{point.key}
',\r\n pointFormat: '',\r\n },\r\n plotOptions: {\r\n scatter: getScatterPlotOptions(),\r\n series: {\r\n animation: false,\r\n },\r\n },\r\n series: [\r\n {\r\n color: '#e64848',\r\n data: series.first,\r\n marker: {\r\n symbol: 'circle',\r\n },\r\n zIndex: 4,\r\n },\r\n {\r\n color: '#6ba737',\r\n data: series.second,\r\n marker: {\r\n symbol: 'circle',\r\n },\r\n zIndex: 4,\r\n },\r\n {\r\n color: '#dc8f18',\r\n data: series.third,\r\n marker: {\r\n symbol: 'circle',\r\n },\r\n zIndex: 4,\r\n },\r\n {\r\n color: '#717171',\r\n data: series.fourth,\r\n marker: {\r\n symbol: 'circle',\r\n },\r\n zIndex: 4,\r\n },\r\n ],\r\n };\r\n}\r\n\r\nconst CHART_BUFFER = 0.2;\r\nconst NUM_TICKS = 5;\r\n\r\nfunction tickPositioner(this: { dataMax: number; dataMin: number }) {\r\n var maxDeviation = Math.max(Math.abs(this.dataMax), Math.abs(this.dataMin));\r\n if (!maxDeviation) {\r\n maxDeviation = 10;\r\n }\r\n var chartWidth = maxDeviation + maxDeviation * CHART_BUFFER;\r\n var separation = chartWidth / NUM_TICKS;\r\n var ticks = [];\r\n\r\n for (var i = 0; i <= 2 * NUM_TICKS; i++) {\r\n ticks.push(chartWidth * -1 + i * separation);\r\n }\r\n return ticks;\r\n}\r\n","import { ProcessedFacility } from 'src/types/processedFacility';\r\nimport { DEFAULT_CHART } from './utils';\r\n\r\nexport function riskFactorChartDataGenerator({\r\n attributes,\r\n}: ProcessedFacility['charts']['waterRiskPremiumScarcityQualityChart']): Highcharts.Options {\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n type: 'pie',\r\n ...DEFAULT_CHART.chart,\r\n },\r\n tooltip: {\r\n headerFormat: '',\r\n pointFormat: '{point.name}: {point.y}%
',\r\n },\r\n plotOptions: {\r\n pie: {\r\n shadow: false,\r\n center: ['50%', '50%'],\r\n showInLegend: true,\r\n dataLabels: {\r\n connectorPadding: -20,\r\n distance: 25,\r\n },\r\n },\r\n },\r\n series: [\r\n {\r\n data: [\r\n {\r\n name: 'Quantity',\r\n color: '#bde2d2',\r\n y: attributes.segment1,\r\n },\r\n {\r\n name: 'Quality',\r\n color: '#5e9c9a',\r\n y: attributes.segment2,\r\n },\r\n ],\r\n size: '80%',\r\n innerSize: '70%',\r\n //@ts-ignore\r\n dataLabels: {\r\n formatter: function (this: { percentage: number }): string {\r\n return `${Math.round(this.percentage)}%`;\r\n },\r\n style: {\r\n fontSize: '20px',\r\n color: '#2d2d2d',\r\n fontWeight: 'bold',\r\n },\r\n },\r\n },\r\n ],\r\n };\r\n}\r\n","import { ProcessedFacility } from 'src/types/processedFacility';\r\nimport { DEFAULT_CHART } from './utils';\r\n\r\nexport function riskSourceChartDataGenerator({\r\n attributes,\r\n}: ProcessedFacility['charts']['waterRiskPremiumIncomingOutgoingChart']): Highcharts.Options {\r\n return {\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'pie',\r\n },\r\n tooltip: {\r\n headerFormat: '',\r\n pointFormat: '{point.name}: {point.y}%
',\r\n },\r\n plotOptions: {\r\n pie: {\r\n shadow: false,\r\n center: ['50%', '50%'],\r\n showInLegend: true,\r\n dataLabels: {\r\n connectorPadding: -20,\r\n distance: 20,\r\n },\r\n },\r\n },\r\n series: [\r\n {\r\n data: [\r\n {\r\n name: 'Incoming',\r\n color: '#bde2d2',\r\n y: attributes.segment1,\r\n },\r\n {\r\n name: 'Outgoing',\r\n color: '#5e9c9a',\r\n y: attributes.segment2,\r\n },\r\n ],\r\n size: '80%',\r\n innerSize: '70%',\r\n //@ts-ignore\r\n dataLabels: {\r\n formatter: function (this: { percentage: number }): string {\r\n return `${Math.round(this.percentage)}%`;\r\n },\r\n style: {\r\n fontSize: '20px',\r\n color: '#2d2d2d',\r\n fontWeight: 'bold',\r\n },\r\n },\r\n },\r\n ],\r\n };\r\n}\r\n","import currency from 'currency.js';\r\n\r\nexport function asCommaSeparatedString(value: number, decimals: number = 0) {\r\n return new Intl.NumberFormat('en-US', {\r\n maximumFractionDigits: decimals,\r\n minimumFractionDigits: decimals,\r\n }).format(value);\r\n}\r\n\r\nexport function formatAsCurrency(\r\n value: currency.Any | number,\r\n opts?: currency.Options | undefined\r\n) {\r\n return currency(value, opts).format();\r\n}\r\n","import { ColumnChartSeriesOptions } from 'highcharts';\r\nimport { ProcessedFacility } from 'src/types/processedFacility';\r\nimport { asCommaSeparatedString } from '../number';\r\nimport {\r\n DEFAULT_CHART,\r\n RISK_COLOR_MAP,\r\n WITHDRAWAL_RISK_SUGGESTION_MAP,\r\n} from './utils';\r\n\r\nexport function waterWithdrawalChartDataGenerator(\r\n data: ProcessedFacility['charts']['sustainableWaterAllocationChart']\r\n): Highcharts.Options {\r\n const riskLevel = {\r\n level: data.attributes['swu-riskRank'],\r\n color: RISK_COLOR_MAP[data.attributes['swu-riskRank']],\r\n suggestion: WITHDRAWAL_RISK_SUGGESTION_MAP[data.attributes['swu-riskRank']],\r\n style: { 'background-color': data.attributes['swu-riskRank'] },\r\n };\r\n\r\n return {\r\n ...DEFAULT_CHART,\r\n xAxis: {\r\n categories: ['Current', 'Year 1', 'Year 3', 'Year 5', 'Year 10'],\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Cubic meters (m3)',\r\n },\r\n stackLabels: {\r\n enabled: false,\r\n formatter: function (this: { total: number }): string {\r\n return asCommaSeparatedString(this.total);\r\n },\r\n },\r\n },\r\n tooltip: {\r\n formatter: function (this: { key: string; y: number }): string {\r\n return `${this.key}: ${asCommaSeparatedString(this.y)}`;\r\n },\r\n },\r\n plotOptions: {\r\n column: {\r\n stacking: 'normal',\r\n },\r\n line: {\r\n dashStyle: 'Dot',\r\n color: RISK_COLOR_MAP.none,\r\n marker: {\r\n enabled: false,\r\n },\r\n },\r\n },\r\n series: [\r\n {\r\n name: 'Annual water use',\r\n type: 'column',\r\n stack: 1,\r\n data: [\r\n {\r\n name: 'Current annual water use',\r\n color: riskLevel.color,\r\n y: data.attributes['current-swuAmount'],\r\n },\r\n {\r\n name: 'Year 1 annual water use',\r\n color: RISK_COLOR_MAP.none,\r\n y: data.attributes['year1-swuAmountMed'],\r\n },\r\n {\r\n name: 'Year 3 annual water use',\r\n color: RISK_COLOR_MAP.none,\r\n y: data.attributes['year3-swuAmountMed'],\r\n },\r\n {\r\n name: 'Year 5 annual water use',\r\n color: RISK_COLOR_MAP.none,\r\n y: data.attributes['year5-swuAmountMed'],\r\n },\r\n {\r\n name: 'Year 10 annual water use',\r\n color: RISK_COLOR_MAP.none,\r\n y: data.attributes['year10-swuAmountMed'],\r\n },\r\n ],\r\n } as ColumnChartSeriesOptions,\r\n {\r\n name: 'Replenishment',\r\n type: 'column',\r\n stack: 2,\r\n data: [\r\n {\r\n name: 'Current replenishment amount',\r\n color: '#93c9da',\r\n y: data.attributes['total-replenishmentAmount'],\r\n },\r\n ],\r\n } as ColumnChartSeriesOptions,\r\n {\r\n name: 'Replenishment Offset',\r\n type: 'column',\r\n stack: 2,\r\n tooltip: false,\r\n enableMouseTracking: false,\r\n data: [\r\n {\r\n color: '#ffffff',\r\n // @ts-ignore\r\n className: 'transparentBar',\r\n y: data.attributes['current-waterUsageLessReplenishment'],\r\n },\r\n ],\r\n } as ColumnChartSeriesOptions,\r\n {\r\n name: 'Withdrawal Level',\r\n type: 'line',\r\n // @ts-ignore\r\n data: data.attributes['withdrawalLine'] ?? undefined,\r\n },\r\n ],\r\n };\r\n}\r\n","export function escapeQuotes(string: string) {\r\n return string.replace(/\"/g, '\\\\\"');\r\n}\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, useMemo, useRef, useState } from 'react';\r\n\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport natsort from 'natsort';\r\nimport { useQuery } from 'react-query';\r\nimport { generateAccountCsvReport } from 'src/clients/api/account';\r\nimport {\r\n generateFolderCsvReport,\r\n generateFolderPDFReport,\r\n getFolderAggregates,\r\n getFolders,\r\n} from 'src/clients/api/v5.folders';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { Dialog } from 'src/components/Dialog';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { RadioList } from 'src/components/RadioList';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport {\r\n benchmarkingChartDataGenerator,\r\n riskAnalysisChartDataGenerator,\r\n} from 'src/utils/chart';\r\nimport { escapeQuotes } from 'src/utils/string';\r\nimport styles from './GenerateReportDialog.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\nconst sorter = natsort();\r\n\r\ntype GenerateReportDialogProps = {\r\n isOpen: boolean;\r\n onClose: () => void;\r\n};\r\n\r\nexport const GenerateReportDialog: FC = ({\r\n isOpen,\r\n onClose,\r\n}) => {\r\n const [state, setState] = useAsyncState();\r\n const [reportType, setReportType] = useState<'csv' | 'pdf'>('csv');\r\n const [selectedFolder, setSelectedFolder] = useState('');\r\n const riskAnalysisChart = useRef(null);\r\n const benchmarkingChart = useRef(null);\r\n\r\n const { isLoading, isFetching, data, error, refetch } = useQuery(\r\n ['folders'],\r\n () => getFolders()\r\n );\r\n\r\n const {\r\n isLoading: isLoadingFacilities,\r\n data: facilityData,\r\n error: facilityError,\r\n } = useQuery(\r\n ['aggregates', 'folders', selectedFolder],\r\n () => getFolderAggregates(selectedFolder),\r\n {\r\n enabled: selectedFolder !== '' && reportType === 'pdf',\r\n }\r\n );\r\n\r\n const handleGenerate = async () => {\r\n try {\r\n setState({ status: 'loading' });\r\n\r\n const result = await (reportType === 'csv'\r\n ? !selectedFolder\r\n ? generateAccountCsvReport()\r\n : generateFolderCsvReport(selectedFolder)\r\n : generateFolderPDFReport(selectedFolder, {\r\n riskAnalysisChart: escapeQuotes(\r\n // @ts-ignore\r\n riskAnalysisChart.current!.chart.getSVG()\r\n ),\r\n benchmarkingChart: escapeQuotes(\r\n // @ts-ignore\r\n benchmarkingChart.current!.chart.getSVG()\r\n ),\r\n }));\r\n\r\n if (result.status !== 'success') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: 'Report generated successfully.',\r\n });\r\n\r\n window.open(result.value.data, '_self');\r\n\r\n onClose();\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'Something went wrong.',\r\n });\r\n }\r\n };\r\n\r\n const folders = useMemo(\r\n () =>\r\n (data?.status === 'success' ? data.value.data ?? [] : [])\r\n .filter((f) => f.facilitiesInFolder.length > 0)\r\n .sort((a, b) => sorter(a.folderName, b.folderName)),\r\n [data]\r\n );\r\n\r\n const facilities = useMemo(() => {\r\n return facilityData?.status === 'success'\r\n ? facilityData.value.data\r\n .sort((a, b) =>\r\n sorter(a.facility.facilityName, b.facility.facilityName)\r\n )\r\n .map((f, idx) => ({\r\n ...f,\r\n idx: idx + 1,\r\n }))\r\n : [];\r\n }, [facilityData]);\r\n\r\n const riskAnalysisChartOptions = useMemo(() => {\r\n if (facilities) {\r\n return riskAnalysisChartDataGenerator(facilities);\r\n }\r\n\r\n return undefined;\r\n }, [facilities]);\r\n\r\n const benchmarkingChartOptions = useMemo(() => {\r\n if (facilities) {\r\n return benchmarkingChartDataGenerator(facilities, undefined, {\r\n type: 'Incoming',\r\n intensity: 'Production',\r\n showOrgAvg: true,\r\n showSectorAvg: true,\r\n });\r\n }\r\n\r\n return undefined;\r\n }, [facilities]);\r\n\r\n return (\r\n \r\n
\r\n {isLoading || isLoadingFacilities ? : null}\r\n\r\n {!isLoading &&\r\n (facilityError ||\r\n error ||\r\n (data?.status !== 'success' && data?.code !== 404)) ? (\r\n \r\n ) : null}\r\n\r\n {data?.status === 'success' || data?.code === 404 ? (\r\n <>\r\n (v === 'csv' || v === 'pdf') && setReportType(v)}\r\n />\r\n {reportType === 'csv' ? (\r\n <>\r\n ({\r\n value: `${f.folderId}`,\r\n label: f.folderName,\r\n })),\r\n ]}\r\n value={`${selectedFolder}` ?? ''}\r\n onChange={(value: string) => setSelectedFolder(value)}\r\n className={cx('input')}\r\n />\r\n
\r\n \r\n Generate\r\n \r\n
\r\n \r\n ) : (\r\n <>\r\n \r\n Select a folder to generate a PDF report for your facilities.\r\n \r\n ({\r\n value: `${f.folderId}`,\r\n label: f.folderName,\r\n })),\r\n ]}\r\n value={`${selectedFolder}`}\r\n onChange={(value: string) => setSelectedFolder(value)}\r\n className={cx('input')}\r\n />\r\n
\r\n \r\n Generate\r\n \r\n
\r\n \r\n )}\r\n \r\n ) : null}\r\n\r\n {!isLoading && !isLoadingFacilities ? (\r\n
\r\n \r\n \r\n
\r\n ) : null}\r\n
\r\n \r\n );\r\n};\r\n\r\nGenerateReportDialog.displayName = 'GenerateReportDialog';\r\n","import {\r\n Box,\r\n ChakraProps,\r\n Flex,\r\n Hide,\r\n Link,\r\n LinkProps,\r\n Text,\r\n} from '@chakra-ui/react';\r\nimport React, { FC, PropsWithChildren, useMemo } from 'react';\r\nimport { NavLink as RRNavLink, NavLinkProps } from 'react-router-dom';\r\nimport { Icon } from '../Icon';\r\n\r\ntype NavLinkSpecific = {\r\n icon: string;\r\n text: string;\r\n variant?: 'primary' | 'secondary' | 'tertiary';\r\n};\r\n\r\ntype NavLinkPropsType = LinkProps & NavLinkProps & NavLinkSpecific;\r\n\r\nexport const NavLink: FC> = ({\r\n to,\r\n icon,\r\n text,\r\n variant = 'primary',\r\n ...props\r\n}) => {\r\n const isExternal = to && to.includes('http');\r\n\r\n const variantCssVars = useMemo(() => {\r\n switch (variant) {\r\n case 'secondary':\r\n return {\r\n '--fontWeight': 'var(--chakra-fontWeights-semibold)',\r\n '--borderColor': 'transparent',\r\n '--iconBgColor': 'var(--chakra-colors-whiteAlpha-500)',\r\n '--iconColor': 'var(--chakra-colors-brand-primary)',\r\n '--textColor': 'var(--chakra-colors-white)',\r\n };\r\n case 'tertiary':\r\n return {\r\n '--fontWeight': 'var(--chakra-fontWeights-normal)',\r\n '--iconBgColor': 'transparent',\r\n '--borderColor': 'transparent',\r\n '--iconColor': 'var(--chakra-colors-brand-primary)',\r\n '--textColor': 'var(--chakra-colors-brand-primary)',\r\n };\r\n default:\r\n return {\r\n '--fontWeight': 'var(--chakra-fontWeights-normal)',\r\n '--iconBgColor': 'transparent',\r\n '--iconColor': 'var(--chakra-colors-brand-primary)',\r\n '--textColor': 'var(--chakra-colors-white)',\r\n '--borderColor': 'var(--chakra-colors-whiteAlpha-400)',\r\n };\r\n }\r\n }, [variant]);\r\n\r\n return (\r\n \r\n \r\n {icon ? (\r\n \r\n \r\n \r\n ) : null}\r\n\r\n \r\n \r\n {text}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { Box, List, ListItem, Stack } from '@chakra-ui/react';\r\nimport {\r\n mdiChartLine,\r\n mdiDomain,\r\n mdiFileOutline,\r\n mdiFileUploadOutline,\r\n mdiFinance,\r\n mdiFolderMultipleOutline,\r\n mdiHelp,\r\n mdiPlusCircleOutline,\r\n} from '@mdi/js';\r\nimport React, { FC, useState } from 'react';\r\nimport { AccountSelector } from 'src/components/AccountSelector';\r\nimport { GenerateReportDialog } from '../GenerateReportDialog';\r\nimport { NavLink } from './NavLink';\r\n\r\ntype SidebarNavProps = {};\r\n\r\nexport const SidebarNav: FC = () => {\r\n const [isGenerateReportOpen, setIsGenerateReportOpen] = useState(false);\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\n \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\n \r\n {\r\n e.preventDefault();\r\n setIsGenerateReportOpen(!isGenerateReportOpen);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n {isGenerateReportOpen ? (\r\n setIsGenerateReportOpen(false)}\r\n />\r\n ) : null}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nSidebarNav.displayName = 'SidebarNav';\r\n","import React, { createContext, useContext, useState } from 'react';\r\nimport { AsyncStateType } from './useAsyncState';\r\n\r\nexport type AsyncFormContextMethods = {\r\n setState: (key: 'saveState' | 'deleteState', value: AsyncStateType) => void;\r\n resetState: () => void;\r\n};\r\n\r\nexport type AsyncFormContextPropsType = {\r\n deleteState: AsyncStateType;\r\n saveState: AsyncStateType;\r\n};\r\n\r\nconst DEFAULT_STATE = {\r\n deleteState: { status: 'idle' } as const,\r\n saveState: { status: 'idle' } as const,\r\n};\r\n\r\ntype FilterAndSortContextProps = AsyncFormContextMethods &\r\n AsyncFormContextPropsType;\r\n\r\nconst AsyncFormContext = createContext>({});\r\n\r\nfunction AsyncFormStateProvider(props: any) {\r\n const [internalFilterState, setInternalFilterState] = useState<\r\n AsyncFormContextPropsType\r\n >(DEFAULT_STATE);\r\n\r\n const setState = (key: keyof AsyncFormContextPropsType, value: string) =>\r\n setInternalFilterState({\r\n ...internalFilterState,\r\n [key]: value,\r\n });\r\n\r\n const resetState = () => setInternalFilterState(DEFAULT_STATE);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nconst useAsyncFormState = () => useContext(AsyncFormContext);\r\n\r\nexport { AsyncFormStateProvider, useAsyncFormState };\r\n","import React, { createContext, useContext, useState } from 'react';\r\n\r\nexport type FilterAndSortContextMethods = {\r\n setFilterState: (\r\n key: keyof FilterAndSortContextPropsType,\r\n value: string | null\r\n ) => void;\r\n};\r\n\r\nexport type FilterAndSortContextPropsType = Partial<{\r\n folderId: string | null;\r\n countryId: string;\r\n label: string;\r\n sectorId: string;\r\n sortId: string;\r\n}>;\r\n\r\ntype FilterAndSortContextProps = FilterAndSortContextMethods &\r\n FilterAndSortContextPropsType;\r\n\r\nconst FilterAndSortContext = createContext>(\r\n {}\r\n);\r\n\r\nfunction FilterAndSortProvider(props: any) {\r\n const [internalFilterState, setInternalFilterState] = useState<\r\n FilterAndSortContextPropsType\r\n >();\r\n\r\n const setFilterState = (\r\n key: keyof FilterAndSortContextPropsType,\r\n value: string | null\r\n ) => {\r\n if (key === 'folderId') {\r\n return setInternalFilterState({\r\n [key]: value,\r\n });\r\n }\r\n\r\n return setInternalFilterState({\r\n ...internalFilterState,\r\n [key]: value,\r\n });\r\n };\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nconst useFilterAndSort = () => useContext(FilterAndSortContext);\r\n\r\nexport { FilterAndSortProvider, useFilterAndSort };\r\n","import { AggregateResult, AggregateResults } from 'src/types/aggregates';\r\nimport { urlWithAccountId } from '../helpers';\r\nimport request from '../request';\r\nimport { WrappedResponse } from '../types';\r\n\r\nexport type GetAggregatesResponseType = WrappedResponse;\r\nexport function getAggregates() {\r\n return request.get(\r\n urlWithAccountId(`aggregate-results`)\r\n );\r\n}\r\n\r\nexport type GetAggregateResponseType = WrappedResponse;\r\nexport function getAggregate(id: string) {\r\n return request.get(\r\n urlWithAccountId(`aggregate-results/${id}`)\r\n );\r\n}\r\n","import equal from 'fast-deep-equal/es6/react';\r\nimport {\r\n DependencyList,\r\n EffectCallback,\r\n useEffect,\r\n useMemo,\r\n useRef,\r\n} from 'react';\r\n\r\nfunction useDeepCompareMemoize(value: any) {\r\n const ref = useRef();\r\n if (!equal(value, ref.current)) {\r\n ref.current = value;\r\n }\r\n\r\n return ref.current;\r\n}\r\n\r\nexport function useDeepCompareEffect(\r\n callback: EffectCallback,\r\n dependencies: DependencyList\r\n) {\r\n useEffect(callback, dependencies.map(useDeepCompareMemoize));\r\n}\r\n\r\nexport function useDeepCompareMemo(\r\n callback: () => T,\r\n dependencies: DependencyList\r\n) {\r\n return useMemo(callback, dependencies.map(useDeepCompareMemoize));\r\n}\r\n","import natsort from 'natsort';\r\nimport React, { ReactNode, useState } from 'react';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\nimport { useDeepCompareMemo } from './useDeepCompare';\r\n\r\ntype FacilityRiskFilterContextMethods = {\r\n filter: () => void;\r\n toggleFacilityVisibility: (id: number) => void;\r\n};\r\n\r\ntype FacilityRiskFilterContextPropsType = {\r\n hiddenAggregates: Set;\r\n allAggregates: AggregateResults;\r\n filteredAggregates: AggregateResults;\r\n toggleVisibility: (state?: VISIBILITY_STATE) => void;\r\n};\r\n\r\ntype FacilityRiskFilterContextProps = FacilityRiskFilterContextMethods &\r\n FacilityRiskFilterContextPropsType;\r\n\r\nconst FacilityRiskFilterContext = React.createContext<\r\n Partial\r\n>({});\r\n\r\nconst sorter = natsort();\r\n\r\nenum VISIBILITY_STATE {\r\n VISIBLE = 'visible',\r\n HIDDEN = 'hidden',\r\n}\r\n\r\nfunction FacilityRiskFilterProvider({\r\n children,\r\n aggregates,\r\n}: {\r\n children: ReactNode;\r\n aggregates: AggregateResults;\r\n}) {\r\n const [hiddenAggregates, setHiddenAggregates] = useState>(\r\n new Set()\r\n );\r\n\r\n const toggleVisibility = (state?: VISIBILITY_STATE) => {\r\n if (state) {\r\n return state === VISIBILITY_STATE.VISIBLE\r\n ? setHiddenAggregates(new Set())\r\n : setHiddenAggregates(new Set(aggregates.map((a) => a.facilityId)));\r\n }\r\n\r\n if (hiddenAggregates.size === 0) {\r\n return setHiddenAggregates(new Set(aggregates.map((a) => a.facilityId)));\r\n }\r\n\r\n return setHiddenAggregates(new Set());\r\n };\r\n\r\n const toggleFacilityVisibility = (id: number) => {\r\n const set = new Set(hiddenAggregates);\r\n\r\n if (set.has(id)) {\r\n set.delete(id);\r\n } else {\r\n set.add(id);\r\n }\r\n\r\n setHiddenAggregates(new Set(set));\r\n };\r\n\r\n const sortedAggregates: AggregateResults = useDeepCompareMemo(\r\n () =>\r\n aggregates\r\n .sort((a, b) =>\r\n sorter(a.facility.facilityName, b.facility.facilityName)\r\n )\r\n .map((a, idx) => ({ ...a, idx: idx + 1 })),\r\n [aggregates]\r\n );\r\n\r\n const filteredAggregates: AggregateResults = useDeepCompareMemo(() => {\r\n return sortedAggregates.filter((f) => !hiddenAggregates.has(f.facilityId));\r\n }, [aggregates, hiddenAggregates]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nconst useFacilityRiskFilter = () => React.useContext(FacilityRiskFilterContext);\r\n\r\nexport { FacilityRiskFilterProvider, useFacilityRiskFilter };\r\n","import React, { FC, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from './BenchmarkingChart.module.css';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { useFacilityRiskFilter } from 'src/hooks/useFacilityRiskFilter';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport {\r\n benchmarkingChartDataGenerator,\r\n BenchmarkingDisplayIntensity,\r\n BenchmarkingDisplayType,\r\n BENCHMARKING_INTENSITY_OPTIONS,\r\n BENCHMARKING_TYPE_OPTIONS,\r\n} from 'src/utils/chart';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport Highcharts from 'highcharts';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype BenchmarkingChartProps = {};\r\n\r\nexport const BenchmarkingChart: FC = () => {\r\n const { filteredAggregates, hiddenAggregates } = useFacilityRiskFilter();\r\n const [displayState, setDisplayState] = useState<{\r\n type: BenchmarkingDisplayType;\r\n intensity: BenchmarkingDisplayIntensity;\r\n showOrgAvg: boolean;\r\n showSectorAvg: boolean;\r\n }>({\r\n type: 'Incoming',\r\n intensity: 'Production',\r\n showOrgAvg: true,\r\n showSectorAvg: true,\r\n });\r\n\r\n const chart = useDeepCompareMemo(\r\n () =>\r\n benchmarkingChartDataGenerator(\r\n filteredAggregates,\r\n hiddenAggregates,\r\n displayState\r\n ),\r\n [filteredAggregates, hiddenAggregates, displayState]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n
\r\n ({\r\n label: s,\r\n value: s,\r\n }))}\r\n value={displayState.type}\r\n onChange={(value) =>\r\n setDisplayState({\r\n ...displayState,\r\n type: value as BenchmarkingDisplayType,\r\n })\r\n }\r\n />\r\n
\r\n
\r\n ({\r\n label: s,\r\n value: s,\r\n }))}\r\n value={displayState.intensity}\r\n onChange={(v) =>\r\n setDisplayState({\r\n ...displayState,\r\n intensity: v as BenchmarkingDisplayIntensity,\r\n })\r\n }\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n setDisplayState({\r\n ...displayState,\r\n showOrgAvg: !displayState.showOrgAvg,\r\n })\r\n }\r\n >\r\n \r\n   Organization Average\r\n
\r\n {displayState.intensity === 'Revenue' ? (\r\n \r\n setDisplayState({\r\n ...displayState,\r\n showSectorAvg: !displayState.showSectorAvg,\r\n })\r\n }\r\n >\r\n \r\n   Sector Average\r\n
\r\n ) : null}\r\n
\r\n \r\n \r\n );\r\n};\r\n","import React, { PropsWithChildren } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './CheckboxInput.module.css';\r\nimport { FieldError } from 'react-hook-form';\r\nimport { forwardRef } from 'react';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport type CheckboxInputProps = PropsWithChildren<{\r\n name: string;\r\n onChange: (val: boolean) => void;\r\n value: boolean;\r\n error?: FieldError;\r\n className?: string;\r\n}>;\r\n\r\nexport const CheckboxInput = forwardRef(\r\n ({ name, className, children, value, onChange, error, ...props }, ref) => {\r\n const isChecked = !!value;\r\n\r\n return (\r\n <>\r\n onChange(!value)}\r\n ref={ref}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n {error && {error.message}}\r\n \r\n );\r\n }\r\n);\r\n\r\nCheckboxInput.displayName = 'CheckboxInput';\r\n","import { ListItem, UnorderedList } from '@chakra-ui/react';\r\nimport React from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\n\r\nfunction Danger() {\r\n return (\r\n <>\r\n \r\n Model investment outcomes for water quality improvement or conservation\r\n to make the business case to take action.\r\n \r\n \r\n INVEST:\r\n \r\n \r\n \r\n \r\n Take the Water Action Assessment to receive a tailored guide to\r\n implement improvements in water management, use, target-setting and\r\n stewardship practices.\r\n \r\n \r\n \r\n \r\n Use the Risk Analysis Investment calculator to model project\r\n investment outcomes.\r\n \r\n \r\n \r\n \r\n Establish a process to monitor local water availability (for example\r\n droughts or pollution incidents) so that acute events can be managed\r\n in a way that reduces business disruption or cost.\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nfunction Warning() {\r\n return (\r\n <>\r\n \r\n ENGAGE:\r\n \r\n \r\n \r\n \r\n Take the Water Action Assessment to receive a tailored guide to\r\n implement improvements in water management, use, target-setting and\r\n stewardship practices.\r\n \r\n \r\n \r\n \r\n Use the Risk Analysis Investment Calculator to model investment\r\n project outcomes.\r\n \r\n \r\n \r\n \r\n Meet with local water service providers to understand the current\r\n state of the watershed and plans to manage stakeholder needs.\r\n Understand how local authorities plan to allocate water today and in\r\n the future, how future water rates may be linked to availability and\r\n quality, and current and future treatment capacity.\r\n \r\n \r\n \r\n \r\n Collaborate with other local users on a water stewardship plan and\r\n explore where there may be opportunities to share data that would\r\n minimize risk.\r\n \r\n \r\n \r\n \r\n Leverage the Alliance for Water Stewardship's six step framework to\r\n implement a water stewardship plan:{' '}\r\n \r\n Alliance for Water Stewardship\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nfunction Success() {\r\n return (\r\n <>\r\n \r\n ENGAGE:\r\n \r\n \r\n \r\n \r\n Take the Water Action Assessment to receive a tailored guide to\r\n implement improvements in water management, use, target-setting and\r\n stewardship practices.\r\n \r\n \r\n \r\n \r\n Monitor water availability and growth in the basin and put in place\r\n a process to react to changes that would place the facility at a\r\n higher risk.\r\n \r\n \r\n Monitoring growth and local water availability can include a\r\n combination of private and public efforts. Examples could include\r\n trends in water demand by category (agricultural, domestic and\r\n industrial), real time satellite data on water availability, water\r\n use intensity within the region, changes in economic development or\r\n basin-wide water conservation initiatives.\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nfunction Primary() {\r\n return (\r\n <>\r\n \r\n CONTINUE ONGOING CONSERVATION:\r\n \r\n \r\n \r\n \r\n Continue ongoing water efficiency efforts and monitor performance\r\n over time to reduce reliance on fresh water.\r\n \r\n \r\n \r\n \r\n Take the Water Action Assessment to receive a tailored guide to\r\n implement improvements in water management, use, target-setting and\r\n stewardship practices\r\n \r\n \r\n \r\n \r\n Periodically assess water basin conditions and local growth to\r\n understand changes that might increase risk\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default {\r\n Danger,\r\n Warning,\r\n Success,\r\n Primary,\r\n};\r\n","import { Button as ChakraButton, Flex, Text } from '@chakra-ui/react';\r\nimport { mdiChevronRight } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useState } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Button } from 'src/components/Button';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { useFacilityRiskFilter } from 'src/hooks/useFacilityRiskFilter';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\nimport styles from './FacilityRiskFilter.module.css';\r\nimport SectionInfo from './SectionInfo';\r\n\r\nconst cx = classnames.bind(styles);\r\nconst SECTIONS = [\r\n {\r\n key: 'danger',\r\n label: 'HIGH WATER SCARCITY/HIGH GROWTH',\r\n filterKey: 'HIGH-HIGH',\r\n Info: SectionInfo.Danger,\r\n },\r\n {\r\n key: 'warning',\r\n label: 'HIGH WATER SCARCITY/LOW GROWTH',\r\n filterKey: 'HIGH-LOW',\r\n Info: SectionInfo.Warning,\r\n },\r\n {\r\n key: 'success',\r\n label: 'LOW WATER SCARCITY/HIGH GROWTH',\r\n filterKey: 'LOW-HIGH',\r\n Info: SectionInfo.Success,\r\n },\r\n {\r\n key: 'primary',\r\n label: 'LOW WATER SCARCITY/LOW GROWTH',\r\n filterKey: 'LOW-LOW',\r\n Info: SectionInfo.Primary,\r\n },\r\n] as const;\r\n\r\ntype FacilityRiskFilterSectionProps = {\r\n isOpen: boolean;\r\n section: { key: string; label: string; Info: FC };\r\n onToggle: (id: string) => void;\r\n aggregates: AggregateResults;\r\n};\r\n\r\nconst FacilityRiskFilterSection: FC = ({\r\n isOpen,\r\n section,\r\n onToggle,\r\n aggregates,\r\n}) => {\r\n const [openInfo, setOpenInfo] = useState(null);\r\n const {\r\n allAggregates,\r\n hiddenAggregates,\r\n toggleFacilityVisibility,\r\n } = useFacilityRiskFilter();\r\n\r\n const { Info } = section;\r\n\r\n return (\r\n
\r\n onToggle(section.key)}\r\n >\r\n {section.label}\r\n \r\n \r\n {isOpen ? (\r\n
\r\n
\r\n \r\n {aggregates.length} of {allAggregates?.length}\r\n \r\n
\r\n {aggregates.length ? (\r\n aggregates.map((aggregate) => (\r\n
\r\n
\r\n {\r\n toggleFacilityVisibility &&\r\n toggleFacilityVisibility(aggregate.facilityId);\r\n }}\r\n value={!hiddenAggregates?.has(aggregate.facilityId)}\r\n className={cx('sectionLineItemInput')}\r\n />\r\n {\r\n openInfo === aggregate.facilityId\r\n ? setOpenInfo(null)\r\n : setOpenInfo(aggregate.facilityId);\r\n }}\r\n >\r\n \r\n [{aggregate.facilityRank}]{' '}\r\n {aggregate.facility.facilityName}\r\n \r\n
\r\n
\r\n\r\n {openInfo === aggregate.facilityId ? (\r\n
\r\n \r\n {aggregate.waaFacility ? (\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\n ) : null}\r\n \r\n ))\r\n ) : (\r\n
No facilities found.
\r\n )}\r\n
\r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\ntype ReducedAggregateResults = {\r\n danger: AggregateResults;\r\n warning: AggregateResults;\r\n success: AggregateResults;\r\n primary: AggregateResults;\r\n};\r\ntype FacilityRiskFilterProps = {};\r\n\r\nexport const FacilityRiskFilter: FC = () => {\r\n const {\r\n allAggregates,\r\n hiddenAggregates,\r\n toggleVisibility,\r\n } = useFacilityRiskFilter();\r\n const [activeSection, setActiveSection] = useState('danger');\r\n\r\n const handleToggle = (value: string) => {\r\n setActiveSection(value === activeSection ? null : value);\r\n };\r\n\r\n const reducedAggregates = useDeepCompareMemo(() => {\r\n return (allAggregates ?? []).reduce(\r\n (acc, aggregate) => {\r\n switch (aggregate.twoByTwoQuadrant) {\r\n case 'HIGH-HIGH': {\r\n acc.danger.push(aggregate);\r\n return acc;\r\n }\r\n\r\n case 'HIGH-LOW': {\r\n acc.warning.push(aggregate);\r\n return acc;\r\n }\r\n\r\n case 'LOW-HIGH': {\r\n acc.success.push(aggregate);\r\n return acc;\r\n }\r\n\r\n case 'LOW-LOW': {\r\n acc.primary.push(aggregate);\r\n return acc;\r\n }\r\n\r\n default: {\r\n return acc;\r\n }\r\n }\r\n },\r\n {\r\n danger: [],\r\n warning: [],\r\n success: [],\r\n primary: [],\r\n }\r\n );\r\n }, [allAggregates]);\r\n\r\n return (\r\n
\r\n \r\n Facility Rank & Action Plan by Risk\r\n \r\n \r\n toggleVisibility && toggleVisibility()}\r\n >\r\n {hiddenAggregates && hiddenAggregates.size > 0\r\n ? 'Select All'\r\n : 'Deselect All'}\r\n \r\n \r\n {SECTIONS.map((section) => (\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nFacilityRiskFilter.displayName = 'FacilityRiskFilter';\r\n","import { AggregateResults } from 'src/types/aggregates';\r\nimport { FilterAndSortContextPropsType } from '.';\r\n\r\nconst amp = String.fromCharCode(0x0026);\r\nexport const SORTING_OPTIONS = [\r\n {\r\n value: '1',\r\n label: 'Facility Rank High to Low',\r\n prop: 'facilityRank' as const,\r\n direction: 'desc',\r\n },\r\n {\r\n value: '2',\r\n label: 'Facility Rank Low to High',\r\n prop: 'facilityRank' as const,\r\n direction: 'asc',\r\n },\r\n {\r\n value: '3',\r\n label: 'Water Risk Premium High to Low',\r\n prop: 'waterRiskPremium' as const,\r\n direction: 'desc',\r\n },\r\n {\r\n value: '4',\r\n label: 'Water Risk Premium Low to High',\r\n prop: 'waterRiskPremium' as const,\r\n direction: 'asc',\r\n },\r\n {\r\n value: '5',\r\n label: 'Revenue At Risk High to Low',\r\n prop: 'revenueAtRiskPercentage' as const,\r\n direction: 'desc',\r\n },\r\n {\r\n value: '6',\r\n label: 'Revenue At Risk Low to High',\r\n prop: 'revenueAtRiskPercentage' as const,\r\n direction: 'asc',\r\n },\r\n {\r\n value: '7',\r\n label: `Total - Incoming ${amp} Outgoing High to Low`,\r\n prop: 'revenueAtRiskPercentage' as const,\r\n direction: 'desc',\r\n },\r\n {\r\n value: '8',\r\n label: `Total - Incoming ${amp} Outgoing Low to High`,\r\n prop: 'revenueAtRiskPercentage' as const,\r\n direction: 'asc',\r\n },\r\n // {\r\n // value: '9',\r\n // label: 'Facility Name (A-Z)',\r\n // prop: 'name' as const,\r\n // direction: 'asc',\r\n // },\r\n // {\r\n // value: '10',\r\n // label: 'Facility Name (Z-A)',\r\n // prop: 'name' as const,\r\n // direction: 'desc',\r\n // },\r\n];\r\n\r\nexport const filter = (\r\n aggregates: AggregateResults,\r\n filterState: FilterAndSortContextPropsType\r\n) => {\r\n const filtered = aggregates.filter((aggregate) => {\r\n const noOrMatchesFolderId =\r\n !filterState.folderId || filterState.folderId === `${aggregate.folderId}`;\r\n const noOrMatchesCountryId =\r\n !filterState.countryId ||\r\n `${filterState.countryId}` === `${aggregate.facility.countryId}`;\r\n const noOrMatchesLabel =\r\n !filterState.label ||\r\n filterState.label === `${aggregate.facility.facilityLabel}`;\r\n const noOrMatchesSectorId =\r\n !filterState.sectorId ||\r\n filterState.sectorId === `${aggregate.facility.sector3Id}`;\r\n\r\n return [\r\n noOrMatchesFolderId,\r\n noOrMatchesCountryId,\r\n noOrMatchesLabel,\r\n noOrMatchesSectorId,\r\n ].every(Boolean);\r\n });\r\n\r\n const state = SORTING_OPTIONS.find(\r\n (f) => f.value === (filterState.sortId ?? '2')\r\n );\r\n\r\n if (state) {\r\n filtered.sort((a, b) => {\r\n const aProp = a[state.prop];\r\n const bProp = b[state.prop];\r\n if (aProp && bProp) {\r\n if (aProp < bProp) {\r\n return -1;\r\n }\r\n if (aProp > bProp) {\r\n return 1;\r\n }\r\n }\r\n\r\n return 0;\r\n });\r\n }\r\n\r\n if (state?.direction === 'desc') {\r\n filtered.reverse();\r\n }\r\n\r\n return filtered;\r\n};\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './FilterAndSort.module.css';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { Folders } from 'src/types/folder';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { SORTING_OPTIONS } from 'src/hooks/useFilterAndSort/utils';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst SORT = (a: FilterOption, b: FilterOption) => (a.label > b.label ? 1 : -1);\r\n\r\ntype FilterOption = { label: string; value: string };\r\ntype FilterData = {\r\n countries: Array;\r\n sectors: Array;\r\n};\r\n\r\ntype FilterAndSortProps = {\r\n aggregates: AggregateResults;\r\n folders: Folders;\r\n hideSort?: boolean;\r\n};\r\n\r\nexport const FilterAndSort: FC = ({\r\n aggregates,\r\n folders,\r\n hideSort = false,\r\n}) => {\r\n const { setFilterState, ...filterState } = useFilterAndSort();\r\n\r\n const filterData = useDeepCompareMemo(() => {\r\n const countriesDedupe = new Set();\r\n const sectorsDedupe = new Set();\r\n const result = aggregates.reduce(\r\n (acc, aggregate) => {\r\n if (\r\n aggregate.facility.countryId &&\r\n aggregate.facility.countryName &&\r\n !countriesDedupe.has(\r\n `${aggregate.facility.countryId}-${aggregate.facility.countryName}`\r\n )\r\n ) {\r\n countriesDedupe.add(\r\n `${aggregate.facility.countryId}-${aggregate.facility.countryName}`\r\n );\r\n acc.countries.push({\r\n value: `${aggregate.facility.countryId}`,\r\n label: aggregate.facility.countryName,\r\n });\r\n }\r\n\r\n if (\r\n aggregate.facility.sector3Id &&\r\n aggregate.facility.sectorName &&\r\n !sectorsDedupe.has(\r\n `${aggregate.facility.sector3Id}-${aggregate.facility.sectorName}`\r\n )\r\n ) {\r\n sectorsDedupe.add(\r\n `${aggregate.facility.sector3Id}-${aggregate.facility.sectorName}`\r\n );\r\n acc.sectors.push({\r\n value: `${aggregate.facility.sector3Id}`,\r\n label: aggregate.facility.sectorName,\r\n });\r\n }\r\n\r\n return acc;\r\n },\r\n {\r\n countries: [],\r\n sectors: [],\r\n }\r\n );\r\n\r\n result.countries.sort(SORT);\r\n result.sectors.sort(SORT);\r\n\r\n return result;\r\n }, [aggregates]);\r\n\r\n return (\r\n
\r\n
\r\n
Filter by:
\r\n
\r\n
\r\n ({\r\n label: f.folderName,\r\n value: `${f.folderId}`,\r\n })),\r\n ]}\r\n value={filterState.folderId ?? ''}\r\n placeholder=\" \"\r\n onChange={(value) => {\r\n setFilterState && setFilterState('folderId', value);\r\n }}\r\n />\r\n
\r\n
\r\n {\r\n setFilterState && setFilterState('countryId', value);\r\n }}\r\n />\r\n
\r\n
\r\n {\r\n setFilterState && setFilterState('sectorId', value);\r\n }}\r\n />\r\n
\r\n
\r\n
\r\n {!hideSort ? (\r\n
\r\n
Sort by:
\r\n
\r\n {\r\n setFilterState && setFilterState('sortId', value);\r\n }}\r\n />\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nFilterAndSort.displayName = 'FilterAndSort';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport { getAggregates } from 'src/clients/api/v5.aggregates';\r\nimport { getFolderAggregates, getFolders } from 'src/clients/api/v5.folders';\r\nimport { BenchmarkingChart } from 'src/components/BenchmarkingChart';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport tabStyles from 'src/components/FacilityForm/Helpers/FacilityTabNavigator/FacilityTabNavigator.module.css';\r\nimport { FacilityRiskFilter } from 'src/components/FacilityRiskFilter';\r\nimport { FilterAndSort } from 'src/components/FilterAndSort';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { FacilityRiskFilterProvider } from 'src/hooks/useFacilityRiskFilter';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { filter } from 'src/hooks/useFilterAndSort/utils';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\nimport { Folders } from 'src/types/folder';\r\nimport styles from './Benchmarking.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype BenchmarkingProps = {};\r\n\r\nconst BenchmarkingWrapper: FC<{\r\n aggregates: AggregateResults;\r\n folders: Folders;\r\n}> = ({ aggregates, folders, children }) => (\r\n <>\r\n
\r\n \r\n
\r\n
\r\n
\r\n Track Performance\r\n \r\n This Benchmarking chart allows a company to compare the performance of\r\n different sites within a facility portfolio. This analysis provides a\r\n way for business leaders to prioritize and determine appropriate water\r\n use efficiency strategies for each location in order to bring sites\r\n closer to the industry, or organizational, average or median\r\n water-intensity.\r\n \r\n
\r\n
\r\n \r\n
\r\n {children}\r\n
\r\n \r\n);\r\n\r\nexport const Benchmarking: FC = () => {\r\n const filterState = useFilterAndSort();\r\n\r\n const { data: folderData, isLoading: isLoadingFolders } = useQuery(\r\n ['folders'],\r\n () => getFolders()\r\n );\r\n\r\n const { isLoading, isFetching, data, error, refetch } = useQuery(\r\n [\r\n 'aggregates',\r\n ...(filterState.folderId ? ['folder', filterState.folderId] : []),\r\n ],\r\n () =>\r\n filterState.folderId\r\n ? getFolderAggregates(filterState.folderId)\r\n : getAggregates(),\r\n {\r\n cacheTime: 0,\r\n enabled: !isLoadingFolders,\r\n }\r\n );\r\n\r\n const aggregates =\r\n data?.status === 'success' && data?.value.data ? data?.value.data : [];\r\n\r\n const folders =\r\n folderData?.status === 'success' && folderData?.value.data\r\n ? folderData?.value.data\r\n : [];\r\n\r\n const filteredAggregates = useDeepCompareMemo(\r\n () => filter(aggregates, filterState),\r\n [aggregates, filterState]\r\n );\r\n\r\n if (isLoading || isLoadingFolders) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (error || data?.status === 'error') {\r\n return (\r\n \r\n \r\n \r\n );\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\n
\r\n );\r\n};\r\n\r\nBenchmarking.displayName = 'Benchmarking';\r\n","import { WrappedResponse } from '../types';\r\nimport request from '../request';\r\nimport { Env } from '../../constants/env';\r\nimport { ReferenceData } from '../../types/referenceData';\r\n\r\nexport type ReferenceDataResponseType = WrappedResponse;\r\nexport function getReferenceData() {\r\n return request.get(\r\n `${Env.apiUrl}/v5/reference-data/options`\r\n );\r\n}\r\n\r\nexport type GetWrmBatchUploadTemplateResponseType = WrappedResponse;\r\nexport function getWrmBatchUploadTemplate() {\r\n return request.get(\r\n `${Env.apiUrl}/v5/reference-data/batch-upload-template`\r\n );\r\n}\r\n","import set from 'lodash-es/set';\r\nimport { CalculatorPdfRequestDataType } from 'src/components/InvestmentCalculator/utils';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { Guide, GuideNode } from 'src/types/guide';\r\nimport { Facility, TruncatedFacilities } from 'src/types/v5.facility';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { getAccountIdInStorage, urlWithAccountId } from '../helpers';\r\nimport request from '../request';\r\nimport { WrappedResponse } from '../types';\r\n\r\nexport type GetFacilitiesListResponseType = WrappedResponse<\r\n TruncatedFacilities\r\n>;\r\nexport function getFacilitiesList() {\r\n return request.get(\r\n urlWithAccountId(`facilities`)\r\n );\r\n}\r\n\r\nexport type GetFacilitiesListExportResponseType = WrappedResponse;\r\nexport function getFacilitiesListExport() {\r\n return request.get(\r\n urlWithAccountId(`facilities/export`)\r\n );\r\n}\r\n\r\nexport type CreateWrmFacilityRequestPayloadType = {\r\n accountId: string;\r\n active: boolean;\r\n cityId: number;\r\n countryId: number;\r\n facilityName: string;\r\n modelingOnly: boolean;\r\n regionId: number;\r\n sector3Id: number;\r\n facilityLabel?: string;\r\n};\r\nexport type CreateWrmFacilityResponsePayloadType = WrappedResponse;\r\nexport function createWrmFacility(data: CreateWrmFacilityRequestPayloadType) {\r\n return request.post<\r\n CreateWrmFacilityResponsePayloadType,\r\n CreateWrmFacilityRequestPayloadType\r\n >(urlWithAccountId(`facilities`), data);\r\n}\r\n\r\nexport type UpdateWrmFacilityRequestPayloadType = {\r\n accountId: string;\r\n active: boolean;\r\n cityId: number;\r\n countryId: number;\r\n facilityId: number;\r\n facilityName: string;\r\n modelingOnly: boolean;\r\n regionId: number;\r\n sector3Id: number;\r\n userId: number;\r\n facilityLabel?: string;\r\n};\r\nexport function updateWrmFacility(\r\n facilityId: string | number,\r\n data: UpdateWrmFacilityRequestPayloadType\r\n) {\r\n return request.put(\r\n urlWithAccountId(`facilities/${facilityId}`),\r\n data\r\n );\r\n}\r\n\r\nexport type GetFacilityResponseType = WrappedResponse;\r\nexport function getFacility(facilityId: string) {\r\n return request.get(\r\n urlWithAccountId(`facilities/${facilityId}`)\r\n );\r\n}\r\n\r\nexport function deleteFacility(facilityId: string | number) {\r\n return request.del(urlWithAccountId(`facilities/${facilityId}`));\r\n}\r\n\r\nexport type GetFacilityReportingYearsResponseType = WrappedResponse<\r\n Array\r\n>;\r\nexport function getFacilityReportingYears(facilityId: string) {\r\n return request.get(\r\n urlWithAccountId(`facilities/${facilityId}/reporting-years`)\r\n );\r\n}\r\n\r\nexport type GetFacilityReportingYearResponseType = WrappedResponse<\r\n ReportingYear\r\n>;\r\nexport function getFacilityReportingYear(\r\n facilityId: string,\r\n reportingYearId: string\r\n) {\r\n return request.get(\r\n urlWithAccountId(\r\n `facilities/${facilityId}/reporting-years/${reportingYearId}`\r\n )\r\n );\r\n}\r\n\r\nexport type CreateFacilityReportingYearRequestPayloadType = ReportingYear['input'];\r\nexport function createFacilityReportingYear(\r\n facilityId: string,\r\n data: CreateFacilityReportingYearRequestPayloadType,\r\n options: Partial<{\r\n query: Record;\r\n }> = {}\r\n) {\r\n return request.post(\r\n urlWithAccountId(\r\n `facilities/${facilityId}/reporting-years${\r\n options?.query\r\n ? `?${new URLSearchParams(options.query).toString()}`\r\n : ''\r\n }`\r\n ),\r\n {\r\n ...data,\r\n accountId: `${getAccountIdInStorage()}`,\r\n }\r\n );\r\n}\r\n\r\nexport type UpdateFacilityReportingYearRequestPayloadType = ReportingYear['input'];\r\nexport function updateFacilityReportingYear(\r\n facilityId: string,\r\n reportingYearId: string,\r\n data: UpdateFacilityReportingYearRequestPayloadType\r\n) {\r\n return request.put(\r\n urlWithAccountId(\r\n `facilities/${facilityId}/reporting-years/${reportingYearId}`\r\n ),\r\n {\r\n ...data,\r\n accountId: `${getAccountIdInStorage()}`,\r\n }\r\n );\r\n}\r\n\r\nexport function deleteFacilityReportingYear(\r\n facilityId: string | number,\r\n reportingYearId: string | number\r\n) {\r\n return request.del(\r\n urlWithAccountId(\r\n `facilities/${facilityId}/reporting-years/${reportingYearId}`\r\n )\r\n );\r\n}\r\n\r\nexport type AddFacilityFolderAssociationResponseType = WrappedResponse<{}>;\r\nexport function addFacilityFolderAssociation(\r\n facilityId: number,\r\n folderId: number\r\n) {\r\n return request.post(\r\n urlWithAccountId(`folders/${folderId}/facilities`),\r\n { facilityId }\r\n );\r\n}\r\n\r\nexport type RemoveFacilityFolderAssociationResponseType = WrappedResponse<{}>;\r\nexport function removeFacilityFolderAssociation(\r\n facilityId: number,\r\n folderId: number\r\n) {\r\n return request.del(\r\n urlWithAccountId(`folders/${folderId}/facilities/${facilityId}`)\r\n );\r\n}\r\n\r\nexport type GenerateFacilityPDFReportResponseType = WrappedResponse;\r\nexport type GenerateFacilityPDFReportRequestType = {\r\n facilityRank: number;\r\n incomingSvgChart: string;\r\n outgoingSvgChart: string;\r\n revenueSvgChart: string;\r\n riskFactorSvgChart: string;\r\n riskSourceSvgChart: string;\r\n waterWithdrawalSvgChart: string;\r\n aggregateResult: AggregateResult;\r\n};\r\nexport function generateFacilityPDFReport(\r\n facilityId: number,\r\n aggregateResult: AggregateResult,\r\n data: Omit<\r\n GenerateFacilityPDFReportRequestType,\r\n 'reportingYear' | 'aggregateResult'\r\n >\r\n) {\r\n return request.post<\r\n GenerateFacilityPDFReportResponseType,\r\n GenerateFacilityPDFReportRequestType\r\n >(urlWithAccountId(`facilities/${facilityId}/reports/pdf`), {\r\n ...data,\r\n aggregateResult,\r\n });\r\n}\r\n\r\nexport type GenerateFacilityInvestmentPDFReportResponseType = WrappedResponse<\r\n string\r\n>;\r\nexport type GenerateFacilityInvestmentPDFReportRequestType = CalculatorPdfRequestDataType;\r\nexport function generateFacilityInvestmentPDFReport(\r\n facilityId: number,\r\n data: GenerateFacilityInvestmentPDFReportRequestType\r\n) {\r\n return request.post<\r\n GenerateFacilityInvestmentPDFReportResponseType,\r\n GenerateFacilityInvestmentPDFReportRequestType\r\n >(\r\n urlWithAccountId(`facilities/${facilityId}/investment-calculator/pdf`),\r\n data\r\n );\r\n}\r\n\r\nexport type GetFacilityGuideResponseType = WrappedResponse>;\r\nexport function getFacilityGuide(facilityId: number, reportingYearId: string) {\r\n return request.get(\r\n urlWithAccountId(\r\n `facilities/${facilityId}/reporting-years/${reportingYearId}/guides`\r\n )\r\n );\r\n}\r\n\r\nexport type ParsedGuide = {\r\n BusinessCase: {\r\n Content: GuideNode;\r\n Enterprise: ParsedGuideBusinessCaseSubSection;\r\n Individual: ParsedGuideBusinessCaseSubSection;\r\n };\r\n CaseStudies: {\r\n Header: ParsedGuideNodeList;\r\n Content: ParsedGuideNodeList;\r\n };\r\n Scenario: {\r\n Header: GuideNode;\r\n Content: GuideNode;\r\n };\r\n ToolsAndResources: {\r\n Step: ParsedGuideNodeList<{\r\n Description: GuideNode;\r\n Examples: ParsedGuideBulletList;\r\n Tools: ParsedGuideBulletList | GuideNode;\r\n }>;\r\n };\r\n checklist: {\r\n SiteManagement?: ParsedGuideCheckList;\r\n WaterManagementPractices?: ParsedGuideCheckList;\r\n TargetSetting?: ParsedGuideCheckList;\r\n WaterStewardship?: ParsedGuideCheckList;\r\n };\r\n};\r\n\r\nexport type ParsedGuideBusinessCaseSubSection = {\r\n SubHeaderBelowContent: GuideNode;\r\n Tangible: ParsedGuideBulletList;\r\n Intangible: ParsedGuideBulletList;\r\n};\r\n\r\nexport type ParsedGuideBulletList = {\r\n Bullet: ParsedGuideNodeList;\r\n};\r\n\r\nexport type ParsedGuideCheckList = {\r\n CheckBox: ParsedGuideNodeList;\r\n};\r\n\r\nexport type ParsedGuideNodeList = Array;\r\n\r\nexport function parseGuide(guide: Guide): ParsedGuide {\r\n const tree = guide.guideNodes.reduce((acc, node) => {\r\n return set(acc, node.nodeName, node);\r\n }, {} as ParsedGuide);\r\n\r\n return tree;\r\n}\r\n","import React, { FC, forwardRef } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport { Flex, Text } from '@chakra-ui/react';\r\n\r\nimport styles from './TextInput.module.css';\r\nimport { FieldError } from 'react-hook-form';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface TextInputProps extends React.ComponentPropsWithRef<'input'> {\r\n error?: FieldError;\r\n}\r\n\r\nexport const TextInput: FC = forwardRef(\r\n ({ className, error, disabled, readOnly, ...props }, ref) => {\r\n return (\r\n
\r\n \r\n {error && (\r\n \r\n \r\n {error.message}\r\n \r\n \r\n )}\r\n
\r\n );\r\n }\r\n);\r\n\r\nTextInput.displayName = 'TextInput';\r\n","import React, { FC, useMemo } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport styles from './CalculatorOptionalForm.module.css';\r\nimport { Controller, useForm } from 'react-hook-form';\r\nimport * as yup from 'yup';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { Button } from 'src/components/Button';\r\nimport currency from 'currency.js';\r\nimport { mdiClose } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport { useEffect } from 'react';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst calculatorOptionalFormSchemaProps = {\r\n name: yup.string().trim().required('Required'),\r\n value: yup.string().trim().required('Required'),\r\n year: yup.string().trim().required('Required'),\r\n};\r\nconst calculatorOptionalFormSchema = yup.object(\r\n calculatorOptionalFormSchemaProps\r\n);\r\ntype CalculatorOptionalFormSchema = yup.InferType<\r\n typeof calculatorOptionalFormSchema\r\n>;\r\n\r\nexport type StoredOptionalFormSchema = CalculatorOptionalFormSchema & {\r\n id: string;\r\n};\r\n\r\ntype CalculatorOptionalFormProps = {\r\n minYear: number;\r\n list: Array;\r\n onChange: (list: Array) => void;\r\n};\r\n\r\nconst MAX_YEARS = 20;\r\n\r\nexport const CalculatorOptionalForm: FC = ({\r\n minYear,\r\n list,\r\n onChange,\r\n}) => {\r\n const startingYear = Number(\r\n minYear && !isNaN(+minYear) ? minYear : new Date().getFullYear()\r\n );\r\n\r\n const years = useMemo(() => {\r\n return Array(MAX_YEARS)\r\n .fill(null)\r\n .map((_, i) => `${i + startingYear}`);\r\n }, [startingYear]);\r\n\r\n const {\r\n register,\r\n control,\r\n handleSubmit,\r\n reset,\r\n formState: { errors, isDirty },\r\n } = useForm({\r\n defaultValues: {\r\n name: '',\r\n value: '',\r\n year: `${startingYear}`,\r\n },\r\n resolver: yupResolver(calculatorOptionalFormSchema),\r\n });\r\n\r\n useEffect(() => {\r\n reset({\r\n name: '',\r\n value: '',\r\n year: `${startingYear}`,\r\n });\r\n }, [reset, startingYear]);\r\n\r\n const onSubmit = handleSubmit((values) => {\r\n onChange([\r\n ...list,\r\n { ...values, id: Math.random().toString(36).substr(2, 5) },\r\n ]);\r\n });\r\n\r\n const handleRemove = (value: string) => {\r\n onChange(list.filter((l) => l.id !== value));\r\n };\r\n\r\n return (\r\n
\r\n {list.length > 0 ? (\r\n
\r\n {list.map((e) => (\r\n
\r\n \r\n {e.name} - {e.year} - {currency(e.value).format()}\r\n \r\n
handleRemove(e.id)}>\r\n \r\n
\r\n
\r\n ))}\r\n
\r\n ) : null}\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n (\r\n ({\r\n label: y,\r\n value: y,\r\n }))}\r\n placeholder=\" \"\r\n error={errors.year}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nCalculatorOptionalForm.displayName = 'CalculatorOptionalForm';\r\n","export type ExpenseOrSavings = {\r\n amount: number;\r\n year: number;\r\n};\r\n\r\nexport class OptionalExpensesSavingsYear {\r\n expenseAmount: number;\r\n savingsAmount: number;\r\n expenses: Array;\r\n savings: Array;\r\n\r\n constructor() {\r\n this.expenseAmount = 0;\r\n this.savingsAmount = 0;\r\n this.expenses = [];\r\n this.savings = [];\r\n }\r\n\r\n getOtherExpensesSavings() {\r\n return this.savingsAmount - this.expenseAmount;\r\n }\r\n}\r\n","import { AggregateResult } from 'src/types/aggregates';\r\nimport { ReferenceDataWaterUnit } from 'src/types/referenceData';\r\nimport {\r\n ExpenseOrSavings,\r\n OptionalExpensesSavingsYear,\r\n} from './OptionalExpensesSavingsYear';\r\n\r\nexport class CashFlowModel {\r\n initialAmount: number;\r\n initialYear: number;\r\n waterSaved: number;\r\n aggregate: AggregateResult;\r\n incomingIncrease: number;\r\n outgoingIncrease: number;\r\n optionalExpensesSavingsYears: Record;\r\n cashFlowArray: Array;\r\n cashFlowArrayRiskAdjusted: Array;\r\n discountedCashFlowArray: Array;\r\n discountedCashFlowArrayRiskAdjusted: Array;\r\n npvArray: Array;\r\n npvArrayRiskAdjusted: Array;\r\n volumeUnitFactor: number;\r\n\r\n constructor(\r\n expenses: Array,\r\n savings: Array,\r\n initialAmount: number,\r\n initialYear: number,\r\n waterSaved: number,\r\n discountRate: number,\r\n aggregate: AggregateResult,\r\n incomingIncrease: number,\r\n outgoingIncrease: number,\r\n waterUnitsMap: Record\r\n ) {\r\n this.initialAmount = initialAmount || 0;\r\n this.initialYear = initialYear;\r\n this.waterSaved = waterSaved || 0;\r\n this.aggregate = aggregate;\r\n this.incomingIncrease = incomingIncrease;\r\n this.outgoingIncrease = outgoingIncrease;\r\n this.volumeUnitFactor =\r\n waterUnitsMap[aggregate.incomingWaterQuantityUnitId].factor;\r\n\r\n this.optionalExpensesSavingsYears = getOptionalExpensesSavingsMap(\r\n expenses,\r\n savings\r\n );\r\n\r\n this.cashFlowArray = this.getCashFlowArray(20);\r\n this.cashFlowArrayRiskAdjusted = this.getCashFlowArrayRiskAdjusted(20);\r\n this.discountedCashFlowArray = getDiscountedCashFlowArray(\r\n this.cashFlowArray,\r\n discountRate / 100\r\n );\r\n this.discountedCashFlowArrayRiskAdjusted = getDiscountedCashFlowArray(\r\n this.cashFlowArrayRiskAdjusted,\r\n discountRate / 100\r\n );\r\n this.npvArray = getNPVArray(this.discountedCashFlowArray);\r\n this.npvArrayRiskAdjusted = getNPVArray(\r\n this.discountedCashFlowArrayRiskAdjusted\r\n );\r\n }\r\n\r\n getCashFlowArray(numOfTerms: number) {\r\n let cashFlowArray = [this.initialAmount];\r\n\r\n for (let i = 0; i < numOfTerms; i++) {\r\n let year = this.initialYear + i;\r\n let cashFlowAmount = 0;\r\n\r\n //input\r\n cashFlowAmount +=\r\n this.waterSaved *\r\n this.aggregate.incomingWaterUnitPrice *\r\n this.volumeUnitFactor *\r\n Math.pow(1 + (this.incomingIncrease || 0) / 100, i);\r\n //output\r\n // cashFlowAmount += this.waterSaved * this.aggregate.outgoingWaterUnitPrice * Math.pow((1 + (this.outgoingIncrease || 0)/100), i);\r\n cashFlowAmount +=\r\n this.waterSaved *\r\n this.aggregate.outgoingWaterUnitPrice *\r\n this.volumeUnitFactor *\r\n Math.pow(1 + (this.outgoingIncrease || 0) / 100, i);\r\n if (this.optionalExpensesSavingsYears[year]) {\r\n cashFlowAmount += this.optionalExpensesSavingsYears[\r\n year\r\n ].getOtherExpensesSavings();\r\n }\r\n cashFlowArray.push(cashFlowAmount);\r\n }\r\n return cashFlowArray;\r\n }\r\n\r\n getCashFlowArrayRiskAdjusted(numOfTerms: number) {\r\n var cashFlowArray = [this.initialAmount];\r\n\r\n for (var i = 0; i < numOfTerms; i++) {\r\n var year = this.initialYear + i;\r\n var cashFlowAmount = 0;\r\n\r\n var outgoingPrice = this.aggregate.charts.outgoingWaterRiskChart\r\n .attributes['year1-combined-unit-price'];\r\n var incomingPrice =\r\n this.aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-quantity-unit-price'\r\n ] +\r\n this.aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-waterbill-unit-price'\r\n ];\r\n\r\n //incoming\r\n cashFlowAmount +=\r\n this.waterSaved *\r\n incomingPrice *\r\n this.volumeUnitFactor *\r\n Math.pow(1 + (this.incomingIncrease || 0) / 100, i);\r\n\r\n //outgoing\r\n cashFlowAmount +=\r\n this.waterSaved *\r\n outgoingPrice *\r\n this.volumeUnitFactor *\r\n Math.pow(1 + (this.outgoingIncrease || 0) / 100, i);\r\n\r\n if (this.optionalExpensesSavingsYears[year]) {\r\n cashFlowAmount += this.optionalExpensesSavingsYears[\r\n year\r\n ].getOtherExpensesSavings();\r\n }\r\n\r\n cashFlowArray.push(cashFlowAmount);\r\n }\r\n\r\n return cashFlowArray;\r\n }\r\n}\r\n\r\nfunction getOptionalExpensesSavingsMap(\r\n expenses: Array,\r\n savings: Array\r\n) {\r\n let optionalExpensesSavingsYears: Record<\r\n string,\r\n OptionalExpensesSavingsYear\r\n > = {};\r\n\r\n for (let i = expenses.length - 1; i >= 0; i--) {\r\n let e = expenses[i];\r\n if (!e.year || !e.amount) {\r\n continue;\r\n }\r\n if (!optionalExpensesSavingsYears[e.year]) {\r\n optionalExpensesSavingsYears[e.year] = new OptionalExpensesSavingsYear();\r\n }\r\n optionalExpensesSavingsYears[e.year].expenses.push(e);\r\n optionalExpensesSavingsYears[e.year].expenseAmount += e.amount;\r\n }\r\n\r\n for (let i = savings.length - 1; i >= 0; i--) {\r\n let s = savings[i];\r\n if (!s.year || !s.amount) {\r\n continue;\r\n }\r\n if (!optionalExpensesSavingsYears[s.year]) {\r\n optionalExpensesSavingsYears[s.year] = new OptionalExpensesSavingsYear();\r\n }\r\n optionalExpensesSavingsYears[s.year].savings.push(s);\r\n optionalExpensesSavingsYears[s.year].savingsAmount += s.amount;\r\n }\r\n return optionalExpensesSavingsYears;\r\n}\r\n\r\nfunction getDiscountedCashFlowArray(\r\n cashFlow: Array,\r\n discountPercent: number\r\n) {\r\n let discountedCashFlow = [];\r\n\r\n for (let i = 0; i < cashFlow.length; i++) {\r\n discountedCashFlow.push(\r\n cashFlow[i] / Math.pow(1 + (discountPercent || 0), i)\r\n );\r\n }\r\n\r\n return discountedCashFlow;\r\n}\r\n\r\nfunction getNPVArray(discountedCashFlowArray: Array) {\r\n let npvArray = [discountedCashFlowArray[0]];\r\n\r\n for (let i = 1; i < discountedCashFlowArray.length; i++) {\r\n npvArray.push(npvArray[i - 1] + discountedCashFlowArray[i]);\r\n }\r\n\r\n return npvArray;\r\n}\r\n","import { AggregateResult } from 'src/types/aggregates';\r\nimport { ReferenceDataWaterUnit } from 'src/types/referenceData';\r\nimport { CashFlowModel } from './CashFlowModel';\r\n\r\nexport class CalculatorResults {\r\n initialInvestment: number;\r\n discountRate: number;\r\n waterSaved: number;\r\n waterReductionImpact: number;\r\n expenses: Array;\r\n savings: Array;\r\n expensesTotal: number;\r\n savingsTotal: number;\r\n initialYear: number;\r\n incomingIncrease: number;\r\n outgoingIncrease: number;\r\n investmentName: string;\r\n\r\n outgoingPriceRiskAdjusted: number;\r\n incomingPriceRiskAdjusted: number;\r\n combinedPriceRiskAdjusted: number;\r\n\r\n twoYearIRRConventional: number | 'ERR';\r\n fiveYearIRRConventional: number | 'ERR';\r\n tenYearIRRConventional: number | 'ERR';\r\n twentyYearIRRConventional: number | 'ERR';\r\n twoYearIRRRiskAdjusted: number | 'ERR';\r\n fiveYearIRRRiskAdjusted: number | 'ERR';\r\n tenYearIRRRiskAdjusted: number | 'ERR';\r\n twentyYearIRRRiskAdjusted: number | 'ERR';\r\n npvArrayConventional: Array;\r\n npvArrayRiskAdjusted: Array;\r\n paybackPeriodConventional: number | null;\r\n paybackPeriodRiskAdjusted: number | null;\r\n\r\n constructor(\r\n expenses: Array,\r\n savings: Array,\r\n initialInvestment: number,\r\n initialYear: number,\r\n waterSaved: number,\r\n discountRate: number,\r\n aggregate: AggregateResult,\r\n incomingIncrease: number,\r\n outgoingIncrease: number,\r\n investmentName: string,\r\n waterUnitsMap: Record\r\n ) {\r\n const cashFlow = new CashFlowModel(\r\n expenses,\r\n savings,\r\n initialInvestment * -1,\r\n initialYear,\r\n waterSaved,\r\n discountRate,\r\n aggregate,\r\n incomingIncrease,\r\n outgoingIncrease,\r\n waterUnitsMap\r\n );\r\n //Conventional\r\n try {\r\n this.twentyYearIRRConventional = getIRRForCashFlow(\r\n cashFlow.cashFlowArray.slice(0, 21)\r\n );\r\n } catch (e) {\r\n this.twentyYearIRRConventional = 'ERR';\r\n }\r\n try {\r\n this.tenYearIRRConventional = getIRRForCashFlow(\r\n cashFlow.cashFlowArray.slice(0, 11)\r\n );\r\n } catch (e) {\r\n this.tenYearIRRConventional = 'ERR';\r\n }\r\n try {\r\n this.fiveYearIRRConventional = getIRRForCashFlow(\r\n cashFlow.cashFlowArray.slice(0, 6)\r\n );\r\n } catch (e) {\r\n this.fiveYearIRRConventional = 'ERR';\r\n }\r\n try {\r\n this.twoYearIRRConventional = getIRRForCashFlow(\r\n cashFlow.cashFlowArray.slice(0, 3)\r\n );\r\n } catch (e) {\r\n this.twoYearIRRConventional = 'ERR';\r\n }\r\n\r\n //Risk Adjusted\r\n try {\r\n this.twentyYearIRRRiskAdjusted = getIRRForCashFlow(\r\n cashFlow.cashFlowArrayRiskAdjusted.slice(0, 21)\r\n );\r\n } catch (e) {\r\n this.twentyYearIRRRiskAdjusted = 'ERR';\r\n }\r\n try {\r\n this.tenYearIRRRiskAdjusted = getIRRForCashFlow(\r\n cashFlow.cashFlowArrayRiskAdjusted.slice(0, 11)\r\n );\r\n } catch (e) {\r\n this.tenYearIRRRiskAdjusted = 'ERR';\r\n }\r\n try {\r\n this.fiveYearIRRRiskAdjusted = getIRRForCashFlow(\r\n cashFlow.cashFlowArrayRiskAdjusted.slice(0, 6)\r\n );\r\n } catch (e) {\r\n this.fiveYearIRRRiskAdjusted = 'ERR';\r\n }\r\n try {\r\n this.twoYearIRRRiskAdjusted = getIRRForCashFlow(\r\n cashFlow.cashFlowArrayRiskAdjusted.slice(0, 3)\r\n );\r\n } catch (e) {\r\n this.twoYearIRRRiskAdjusted = 'ERR';\r\n }\r\n\r\n this.npvArrayConventional = cashFlow.npvArray;\r\n this.npvArrayRiskAdjusted = cashFlow.npvArrayRiskAdjusted;\r\n this.paybackPeriodConventional = getPaybackPeriod(cashFlow.npvArray);\r\n this.paybackPeriodRiskAdjusted = getPaybackPeriod(\r\n cashFlow.npvArrayRiskAdjusted\r\n );\r\n\r\n this.initialInvestment = initialInvestment;\r\n this.discountRate = discountRate || 0;\r\n this.waterSaved = waterSaved;\r\n this.waterReductionImpact =\r\n (waterSaved / aggregate.annualizedIncomingWaterQuantity) * 100;\r\n\r\n this.expenses = [...expenses];\r\n this.savings = [...savings];\r\n\r\n this.expensesTotal = getTotalAmount(expenses);\r\n this.savingsTotal = getTotalAmount(savings);\r\n\r\n this.outgoingPriceRiskAdjusted =\r\n aggregate.charts.outgoingWaterRiskChart.attributes[\r\n 'year1-combined-unit-price'\r\n ];\r\n this.incomingPriceRiskAdjusted =\r\n aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-quantity-unit-price'\r\n ] +\r\n aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-waterbill-unit-price'\r\n ];\r\n this.combinedPriceRiskAdjusted =\r\n this.outgoingPriceRiskAdjusted + this.incomingPriceRiskAdjusted;\r\n\r\n this.initialYear = initialYear;\r\n this.incomingIncrease = incomingIncrease;\r\n this.outgoingIncrease = outgoingIncrease;\r\n this.investmentName = investmentName;\r\n }\r\n}\r\n\r\nfunction getIRRForCashFlow(cashFlow: Array) {\r\n let numberOfTries = 1;\r\n let positive, negative;\r\n\r\n cashFlow.forEach((value: number) => {\r\n if (value > 0) positive = true;\r\n if (value < 0) negative = true;\r\n });\r\n\r\n if (!positive || !negative) {\r\n throw new Error(\r\n 'IRR requires at least one positive value and one negative value'\r\n );\r\n }\r\n\r\n return Math.round(seekZero(npv) * 100) / 100;\r\n\r\n function npv(rate: number) {\r\n numberOfTries++;\r\n if (numberOfTries > 10000) {\r\n throw new Error(\"IRR can't find a result\");\r\n }\r\n let rrate = 1 + rate / 100;\r\n let npv = cashFlow[0];\r\n for (let i = 1; i < cashFlow.length; i++) {\r\n npv += cashFlow[i] / Math.pow(rrate, i);\r\n }\r\n return npv;\r\n }\r\n\r\n function seekZero(fn: (x: number) => number) {\r\n let x = 1;\r\n while (fn(x) > 0) {\r\n x += 1;\r\n }\r\n while (fn(x) < 0) {\r\n x -= 0.01;\r\n }\r\n return x + 0.01;\r\n }\r\n}\r\n\r\nfunction getPaybackPeriod(npvArray: Array) {\r\n for (var i = 0; i < npvArray.length; i++) {\r\n if (npvArray[i] === 0) {\r\n return i - 1;\r\n } else if (npvArray[i] > 0) {\r\n return (\r\n i -\r\n 1 +\r\n Math.abs(npvArray[i - 1]) / (Math.abs(npvArray[i - 1]) + npvArray[i])\r\n );\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction getTotalAmount(amountList: Array<{ amount: number }>) {\r\n var totalAmount = 0;\r\n for (var i = 0; i < amountList.length; i++) {\r\n totalAmount += amountList[i].amount;\r\n }\r\n return totalAmount;\r\n}\r\n","import { AggregateResult } from 'src/types/aggregates';\r\nimport { ReferenceDataWaterUnit } from 'src/types/referenceData';\r\nimport { CalculatorResults } from './CalculatorResults';\r\n\r\nexport class InvestmentCalculatorService {\r\n referenceData: Record;\r\n\r\n constructor(referenceData: Record) {\r\n this.referenceData = referenceData;\r\n }\r\n\r\n calculateResults(\r\n expenses: Array,\r\n savings: Array,\r\n initialInvestment: number,\r\n initialYear: number,\r\n waterSaved: number,\r\n discountRate: number,\r\n aggregate: AggregateResult,\r\n incomingIncrease: number,\r\n outgoingIncrease: number,\r\n investmentName: string\r\n ) {\r\n return new CalculatorResults(\r\n expenses,\r\n savings,\r\n initialInvestment,\r\n initialYear,\r\n waterSaved,\r\n discountRate,\r\n aggregate,\r\n incomingIncrease,\r\n outgoingIncrease,\r\n investmentName,\r\n this.referenceData\r\n );\r\n }\r\n}\r\n","import { AggregateResult } from 'src/types/aggregates';\r\nimport { asCommaSeparatedString } from 'src/utils/number';\r\nimport { CalculatorResults } from './CalculatorResults';\r\n\r\nexport type CalculatorPdfRequestDataType = {\r\n facilityName: string;\r\n facilityCity: string;\r\n facilityState: string;\r\n facilityCountry: string;\r\n projectName: string;\r\n date: string;\r\n capitalInvestmentAmount: string;\r\n capitalInvestmentYear: number;\r\n waterSavedPerYearAmount: string;\r\n waterSavedPerYearUnit: string;\r\n discountRate: string;\r\n projectedWaterCostIncreaseIncoming: string;\r\n projectedWaterCostIncreaseOutgoing: string;\r\n operatingExpenses: Array;\r\n operatingSavings: Array;\r\n incomingWaterCostPerUnit: string;\r\n outgoingWaterCostPerUnit: string;\r\n combinedWaterCostPerUnit: string;\r\n totalOperationalExpenses: string;\r\n totalOperationalSavings: string;\r\n incomingQuantityRiskAdjustedPricePerUnit: string;\r\n outgoingRiskAdjustedWaterPricePerUnit: string;\r\n inAndOutTotalRiskAdjustedPrice: string;\r\n estimatedAnnualWaterReduction: string;\r\n annualWaterReductionImpact: string;\r\n irrYear: string;\r\n netPresentYear: string;\r\n conventionalPaybackPeriod: string;\r\n riskAdjustedPaybackPeriod: string;\r\n year2NPVConventional: string;\r\n year5NPVConventional: string;\r\n year10NPVConventional: string;\r\n year20NPVConventional: string;\r\n year2NPVRiskAdjusted: string;\r\n year5NPVRiskAdjusted: string;\r\n year10NPVRiskAdjusted: string;\r\n year20NPVRiskAdjusted: string;\r\n year2IRRConventional: string;\r\n year5IRRConventional: string;\r\n year10IRRConventional: string;\r\n year20IRRConventional: string;\r\n year2IRRRiskAdjusted: string;\r\n year5IRRRiskAdjusted: string;\r\n year10IRRRiskAdjusted: string;\r\n year20IRRRiskAdjusted: string;\r\n svgChart: string;\r\n};\r\n\r\nexport function mapCalculatorPdfRequestData(\r\n aggregate: AggregateResult,\r\n calculatorResults: CalculatorResults,\r\n irrYear: string,\r\n npvYear: string,\r\n waterUnit: string,\r\n paybackPeriodChartString: string\r\n): CalculatorPdfRequestDataType {\r\n return {\r\n facilityName: aggregate.facility.facilityName,\r\n facilityCity: aggregate.facility.cityName,\r\n facilityState: aggregate.facility.regionName,\r\n facilityCountry: aggregate.facility.countryName,\r\n projectName: calculatorResults.investmentName,\r\n date: new Date().toLocaleDateString(),\r\n capitalInvestmentAmount: formatValueForExport(\r\n calculatorResults.initialInvestment\r\n ),\r\n capitalInvestmentYear: calculatorResults.initialYear,\r\n waterSavedPerYearAmount: formatValueForExport(calculatorResults.waterSaved),\r\n waterSavedPerYearUnit: waterUnit,\r\n discountRate: formatValueForExport(calculatorResults.discountRate),\r\n projectedWaterCostIncreaseIncoming: formatValueForExport(\r\n calculatorResults.incomingIncrease\r\n ),\r\n projectedWaterCostIncreaseOutgoing: formatValueForExport(\r\n calculatorResults.outgoingIncrease\r\n ),\r\n operatingExpenses: calculatorResults.expenses.reduce((acc, exp) => {\r\n if (exp.amount != null) {\r\n exp.amount = formatValueForExport(exp.amount, 2);\r\n return [...acc, exp];\r\n }\r\n return acc;\r\n }, []),\r\n operatingSavings: calculatorResults.savings.reduce((acc, sav) => {\r\n if (sav.amount != null) {\r\n sav.amount = formatValueForExport(sav.amount, 2);\r\n return [...acc, sav];\r\n }\r\n return acc;\r\n }, []),\r\n incomingWaterCostPerUnit: formatValueForExport(\r\n aggregate.incomingWaterUnitPrice,\r\n 2\r\n ),\r\n outgoingWaterCostPerUnit: formatValueForExport(\r\n aggregate.outgoingWaterUnitPrice,\r\n 2\r\n ),\r\n combinedWaterCostPerUnit: formatValueForExport(\r\n aggregate.outgoingWaterUnitPrice + aggregate.incomingWaterUnitPrice,\r\n 2\r\n ),\r\n totalOperationalExpenses: formatValueForExport(\r\n calculatorResults.expensesTotal,\r\n 2\r\n ),\r\n totalOperationalSavings: formatValueForExport(\r\n calculatorResults.savingsTotal,\r\n 2\r\n ),\r\n incomingQuantityRiskAdjustedPricePerUnit: formatValueForExport(\r\n calculatorResults.incomingPriceRiskAdjusted,\r\n 2\r\n ),\r\n outgoingRiskAdjustedWaterPricePerUnit: formatValueForExport(\r\n calculatorResults.outgoingPriceRiskAdjusted,\r\n 2\r\n ),\r\n inAndOutTotalRiskAdjustedPrice: formatValueForExport(\r\n calculatorResults.combinedPriceRiskAdjusted,\r\n 2\r\n ),\r\n estimatedAnnualWaterReduction: formatValueForExport(\r\n calculatorResults.waterSaved\r\n ),\r\n annualWaterReductionImpact: formatValueForExport(\r\n calculatorResults.waterReductionImpact,\r\n 2\r\n ),\r\n irrYear: irrYear,\r\n netPresentYear: npvYear,\r\n conventionalPaybackPeriod: formatValueForExport(\r\n calculatorResults.paybackPeriodConventional,\r\n 2\r\n ),\r\n riskAdjustedPaybackPeriod: formatValueForExport(\r\n calculatorResults.paybackPeriodRiskAdjusted,\r\n 2\r\n ),\r\n year2NPVConventional: formatValueForExport(\r\n calculatorResults.npvArrayConventional[2],\r\n 2\r\n ),\r\n year5NPVConventional: formatValueForExport(\r\n calculatorResults.npvArrayConventional[5],\r\n 2\r\n ),\r\n year10NPVConventional: formatValueForExport(\r\n calculatorResults.npvArrayConventional[10],\r\n 2\r\n ),\r\n year20NPVConventional: formatValueForExport(\r\n calculatorResults.npvArrayConventional[20],\r\n 2\r\n ),\r\n year2NPVRiskAdjusted: formatValueForExport(\r\n calculatorResults.npvArrayRiskAdjusted[2],\r\n 2\r\n ),\r\n year5NPVRiskAdjusted: formatValueForExport(\r\n calculatorResults.npvArrayRiskAdjusted[5],\r\n 2\r\n ),\r\n year10NPVRiskAdjusted: formatValueForExport(\r\n calculatorResults.npvArrayRiskAdjusted[10],\r\n 2\r\n ),\r\n year20NPVRiskAdjusted: formatValueForExport(\r\n calculatorResults.npvArrayRiskAdjusted[20],\r\n 2\r\n ),\r\n year2IRRConventional: formatValueForExport(\r\n calculatorResults.twoYearIRRConventional,\r\n 2\r\n ),\r\n year5IRRConventional: formatValueForExport(\r\n calculatorResults.fiveYearIRRConventional,\r\n 2\r\n ),\r\n year10IRRConventional: formatValueForExport(\r\n calculatorResults.tenYearIRRConventional,\r\n 2\r\n ),\r\n year20IRRConventional: formatValueForExport(\r\n calculatorResults.twentyYearIRRConventional,\r\n 2\r\n ),\r\n year2IRRRiskAdjusted: formatValueForExport(\r\n calculatorResults.twoYearIRRRiskAdjusted,\r\n 2\r\n ),\r\n year5IRRRiskAdjusted: formatValueForExport(\r\n calculatorResults.fiveYearIRRRiskAdjusted,\r\n 2\r\n ),\r\n year10IRRRiskAdjusted: formatValueForExport(\r\n calculatorResults.tenYearIRRRiskAdjusted,\r\n 2\r\n ),\r\n year20IRRRiskAdjusted: formatValueForExport(\r\n calculatorResults.twentyYearIRRRiskAdjusted,\r\n 2\r\n ),\r\n svgChart: paybackPeriodChartString,\r\n };\r\n}\r\n\r\nfunction formatValueForExport(\r\n value: string | number | null,\r\n precision = 0\r\n): string {\r\n try {\r\n if (!value || value === 'ERR') {\r\n throw new Error();\r\n }\r\n\r\n const valueAsNumber = parseFloat(`${value}`);\r\n\r\n return asCommaSeparatedString(valueAsNumber, precision);\r\n } catch (e) {\r\n return '';\r\n }\r\n}\r\n","import { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport currency from 'currency.js';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport { DateTime } from 'luxon';\r\nimport React, { FC, useRef, useState } from 'react';\r\nimport { Controller, useForm } from 'react-hook-form';\r\nimport { generateFacilityInvestmentPDFReport } from 'src/clients/api/v5.facility';\r\nimport { Button } from 'src/components/Button';\r\nimport {\r\n CalculatorOptionalForm,\r\n StoredOptionalFormSchema,\r\n} from 'src/components/CalculatorOptionalForm';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { ReferenceData, ReferenceDataWaterUnit } from 'src/types/referenceData';\r\nimport { paybackPeriodChartDataGenerator } from 'src/utils/chart/paybackPeriodChartDataGenerator';\r\nimport { asCommaSeparatedString, formatAsCurrency } from 'src/utils/number';\r\nimport { escapeQuotes } from 'src/utils/string';\r\nimport * as yup from 'yup';\r\nimport { CalculatorResults } from './CalculatorResults';\r\nimport { InvestmentCalculatorService } from './InvesetmentCalculatorService';\r\nimport styles from './InvestmentCalculator.module.css';\r\nimport { mapCalculatorPdfRequestData } from './utils';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype InvestmentCalculatorProps = {\r\n aggregate: AggregateResult;\r\n referenceData: ReferenceData;\r\n};\r\n\r\nconst investmentCalculatorSchemaProperties = {\r\n investmentName: yup.string().trim().required('Required'),\r\n initialYear: yup.string().trim().required('Required'),\r\n initialInvestment: yup.string().trim().required('Required'),\r\n waterSaved: yup.string().trim().required('Required'),\r\n discountRate: yup.string().trim().required('Required'),\r\n incomingIncrease: yup.string().trim().required('Required'),\r\n outgoingIncrease: yup.string().trim().required('Required'),\r\n};\r\nexport const investmentCalculatorSchema = yup.object(\r\n investmentCalculatorSchemaProperties\r\n);\r\n\r\nconst INVESTMENT_YEAR_START = 2010;\r\nconst FUTURE_INVESTMENT_YEARS = 10;\r\nfunction getInvestmentYears() {\r\n const currentYear = new Date().getFullYear();\r\n const years = [];\r\n for (\r\n let i = INVESTMENT_YEAR_START;\r\n i <= currentYear - 1 + FUTURE_INVESTMENT_YEARS;\r\n i++\r\n ) {\r\n years.push(i);\r\n }\r\n return years;\r\n}\r\n\r\nexport const InvestmentCalculator: FC = ({\r\n aggregate,\r\n referenceData,\r\n}) => {\r\n const [state, setState] = useAsyncState();\r\n const paybackPeriodChart = useRef(null);\r\n const [selectors, setSelectors] = useState<{\r\n npvYear: string;\r\n irrYear: string;\r\n }>({\r\n npvYear: '2',\r\n irrYear: '2',\r\n });\r\n\r\n const [calculatorResults, setCalculatorResults] = useState<\r\n CalculatorResults | undefined\r\n >();\r\n const waterUnits = referenceData.waterUnits.reduce<\r\n Record\r\n >(\r\n (acc, unit) => ({\r\n ...acc,\r\n [unit.unitId]: unit,\r\n }),\r\n {}\r\n );\r\n\r\n const calculatorService = new InvestmentCalculatorService(waterUnits);\r\n\r\n const [savingsAndExpenses, setSavingsAndExpenses] = useState<{\r\n savings: Array;\r\n expenses: Array;\r\n }>({\r\n savings: [],\r\n expenses: [],\r\n });\r\n\r\n const projectYears = getInvestmentYears();\r\n\r\n const { register, control, watch, handleSubmit, errors } = useForm({\r\n resolver: yupResolver(investmentCalculatorSchema),\r\n defaultValues: {\r\n investmentName: aggregate.facility.facilityName,\r\n initialYear: projectYears[0],\r\n initialInvestment: '',\r\n waterSaved: '',\r\n discountRate: '',\r\n incomingIncrease: '',\r\n outgoingIncrease: '',\r\n },\r\n });\r\n\r\n const projectName = watch('investmentName');\r\n const projectYear = watch('initialYear');\r\n\r\n const onSubmit = handleSubmit(\r\n (values) => {\r\n setCalculatorResults(undefined);\r\n\r\n const expenses = savingsAndExpenses.expenses.map(\r\n ({ value, ...expense }) => ({\r\n ...expense,\r\n amount: Number(value),\r\n })\r\n );\r\n\r\n const savings = savingsAndExpenses.savings.map(\r\n ({ value, ...saving }) => ({\r\n ...saving,\r\n amount: Number(value),\r\n })\r\n );\r\n\r\n setCalculatorResults(\r\n calculatorService.calculateResults(\r\n expenses,\r\n savings,\r\n Number(values.initialInvestment),\r\n Number(values.initialYear),\r\n Number(values.waterSaved),\r\n Number(values.discountRate),\r\n aggregate,\r\n Number(values.incomingIncrease),\r\n Number(values.outgoingIncrease),\r\n values.investmentName\r\n )\r\n );\r\n },\r\n (errors) => {\r\n console.log(errors);\r\n }\r\n );\r\n\r\n const onDownload = async () => {\r\n if (calculatorResults) {\r\n try {\r\n setState({ status: 'loading' });\r\n\r\n const result = await generateFacilityInvestmentPDFReport(\r\n aggregate.facility.facilityId,\r\n mapCalculatorPdfRequestData(\r\n aggregate,\r\n calculatorResults,\r\n selectors.irrYear,\r\n selectors.npvYear,\r\n waterUnits[aggregate.incomingWaterQuantityUnitId].name,\r\n escapeQuotes(\r\n // @ts-ignore\r\n paybackPeriodChart.current!.chart.getSVG()\r\n )\r\n )\r\n );\r\n\r\n if (result.status !== 'success') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: 'Report generated successfully.',\r\n });\r\n\r\n window.open(result.value.data, '_self');\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'Something went wrong.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n const chart = useDeepCompareMemo(\r\n () =>\r\n calculatorResults\r\n ? paybackPeriodChartDataGenerator(\r\n calculatorResults.npvArrayConventional,\r\n calculatorResults.npvArrayRiskAdjusted,\r\n calculatorResults.initialYear\r\n )\r\n : undefined,\r\n\r\n [calculatorResults]\r\n );\r\n\r\n return (\r\n
\r\n \r\n {aggregate.facility.facilityName}\r\n \r\n
\r\n
\r\n
\r\n \r\n Required Investment Inputs\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n (\r\n ({\r\n label: `${v}`,\r\n value: `${v}`,\r\n }))}\r\n placeholder=\" \"\r\n error={errors.initialYear}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n \r\n cubic meters\r\n
\r\n
\r\n \r\n
\r\n
Projected Water Cost Increase
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n Optional Additional Expenses\r\n \r\n \r\n setSavingsAndExpenses({ ...savingsAndExpenses, expenses })\r\n }\r\n />\r\n
\r\n
\r\n \r\n Optional Additional Savings\r\n \r\n \r\n setSavingsAndExpenses({ ...savingsAndExpenses, savings })\r\n }\r\n />\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n {aggregate.facility.facilityName}\r\n
\r\n \r\n {aggregate.facility.cityName}, {aggregate.facility.regionName},{' '}\r\n {aggregate.facility.countryName}\r\n \r\n
\r\n {projectName ? Project Name: {projectName} : null}\r\n
\r\n Date: {DateTime.now().toLocaleString()}\r\n
\r\n
\r\n \r\n Financial Investment Summary\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\n \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\n
Capital Investment\r\n {formatAsCurrency(\r\n calculatorResults?.initialInvestment ?? 0\r\n )}\r\n
Discount Rate %{calculatorResults?.discountRate ?? 0}%
Incoming Water Cost/Unit\r\n {formatAsCurrency(aggregate.incomingWaterUnitPrice)}\r\n
Outgoing Water Cost/Unit\r\n {formatAsCurrency(aggregate.outgoingWaterUnitPrice)}\r\n
Combined Water Cost/Unit\r\n {currency(aggregate.outgoingWaterUnitPrice)\r\n .add(aggregate.incomingWaterUnitPrice)\r\n .format()}\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\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Total Operational Expenses\r\n {formatAsCurrency(\r\n calculatorResults?.expensesTotal ?? 0\r\n )}\r\n
Total Operational Savings\r\n {formatAsCurrency(calculatorResults?.savingsTotal ?? 0)}\r\n
Incoming Quantity Risk Adjusted Price/Unit\r\n {currency(\r\n aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-quantity-unit-price'\r\n ]\r\n )\r\n .add(\r\n aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-waterbill-unit-price'\r\n ]\r\n )\r\n .format()}\r\n
Outgoing Risk Adjusted Water Price/Unit\r\n {formatAsCurrency(\r\n aggregate.charts.outgoingWaterRiskChart.attributes[\r\n 'year1-combined-unit-price'\r\n ]\r\n )}\r\n
\r\n Incoming Quantity & Outgoing Total Risk Adjusted\r\n Price\r\n \r\n {currency(\r\n aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-quantity-unit-price'\r\n ]\r\n )\r\n .add(\r\n aggregate.charts.incomingWaterRiskChart.attributes[\r\n 'year1-waterbill-unit-price'\r\n ]\r\n )\r\n .add(\r\n aggregate.charts.outgoingWaterRiskChart.attributes[\r\n 'year1-combined-unit-price'\r\n ]\r\n )\r\n .format()}\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\n \r\n \r\n
\r\n \r\n Estimated Annual Water Reduction (units)\r\n \r\n \r\n \r\n {calculatorResults?.waterSaved ?? 0}{' '}\r\n {\r\n waterUnits[aggregate.incomingWaterQuantityUnitId]\r\n .name\r\n }\r\n \r\n
\r\n \r\n Annual Water Reduction Impact % (savings/site Water\r\n Use)\r\n \r\n \r\n {asCommaSeparatedString(\r\n calculatorResults?.waterReductionImpact ?? 0,\r\n 2\r\n )}\r\n %\r\n
\r\n
\r\n
\r\n
\r\n \r\n Financial Investment Results\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\n \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\n \r\n \r\n \r\n \r\n \r\n
\r\n Conventional Decision Making Factors: Local Water Price\r\n \r\n Risk Adjusted Decision Making Factors: WRM Outputs\r\n
Net Present Value $\r\n \r\n setSelectors({\r\n ...selectors,\r\n npvYear: value,\r\n })\r\n }\r\n />\r\n \r\n {formatAsCurrency(\r\n calculatorResults?.npvArrayConventional[\r\n Number(selectors.npvYear)\r\n ] ?? 0\r\n )}\r\n \r\n {formatAsCurrency(\r\n calculatorResults?.npvArrayRiskAdjusted[\r\n Number(selectors.npvYear)\r\n ] ?? 0\r\n )}\r\n
IRR%\r\n \r\n setSelectors({\r\n ...selectors,\r\n irrYear: value,\r\n })\r\n }\r\n />\r\n \r\n {selectors.irrYear === '2' ? (\r\n \r\n {calculatorResults?.twoYearIRRConventional ?? 0}\r\n \r\n ) : null}\r\n {selectors.irrYear === '5' ? (\r\n \r\n {calculatorResults?.fiveYearIRRConventional ?? 0}\r\n \r\n ) : null}\r\n {selectors.irrYear === '10' ? (\r\n \r\n {calculatorResults?.tenYearIRRConventional ?? 0}\r\n \r\n ) : null}\r\n {selectors.irrYear === '20' ? (\r\n \r\n {calculatorResults?.twentyYearIRRConventional ?? 0}\r\n \r\n ) : null}\r\n %\r\n \r\n {selectors.irrYear === '2' ? (\r\n \r\n {calculatorResults?.twoYearIRRRiskAdjusted ?? 0}\r\n \r\n ) : null}\r\n {selectors.irrYear === '5' ? (\r\n \r\n {calculatorResults?.fiveYearIRRRiskAdjusted ?? 0}\r\n \r\n ) : null}\r\n {selectors.irrYear === '10' ? (\r\n \r\n {calculatorResults?.tenYearIRRRiskAdjusted ?? 0}\r\n \r\n ) : null}\r\n {selectors.irrYear === '20' ? (\r\n \r\n {calculatorResults?.twentyYearIRRRiskAdjusted ?? 0}\r\n \r\n ) : null}\r\n %\r\n
Payback Period\r\n {calculatorResults?.paybackPeriodConventional ? (\r\n \r\n {asCommaSeparatedString(\r\n calculatorResults.paybackPeriodConventional ?? 0,\r\n 2\r\n )}{' '}\r\n years\r\n \r\n ) : (\r\n > 20 years\r\n )}\r\n \r\n {calculatorResults?.paybackPeriodRiskAdjusted ? (\r\n \r\n {asCommaSeparatedString(\r\n calculatorResults.paybackPeriodRiskAdjusted ?? 0,\r\n 2\r\n )}{' '}\r\n years\r\n \r\n ) : (\r\n > 20 years\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n\r\n {chart ? (\r\n
\r\n \r\n\r\n
\r\n \r\n Download PDF\r\n \r\n
\r\n
\r\n ) : null}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nInvestmentCalculator.displayName = 'InvestmentCalculator';\r\n","import { asCommaSeparatedString } from '../number';\r\n\r\nexport function paybackPeriodChartDataGenerator(\r\n conventional: Array,\r\n riskAdjusted: Array,\r\n initialYear: number\r\n) {\r\n return {\r\n chart: {\r\n type: 'line',\r\n },\r\n title: {\r\n text: 'Payback Period: Conventional and Risk Adjusted Methods',\r\n },\r\n xAxis: {\r\n title: {\r\n text: 'Year',\r\n },\r\n tickInterval: 1,\r\n labels: {\r\n formatter: function (this: { value: string }): string {\r\n return this.value + initialYear;\r\n },\r\n },\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Cash Flow Balance (NPV)',\r\n },\r\n plotLines: [\r\n {\r\n color: '#e6e6e6',\r\n dashStyle: 'Solid',\r\n width: 3,\r\n value: 0,\r\n },\r\n ],\r\n },\r\n plotOptions: {\r\n line: {\r\n enableMouseTracking: true,\r\n },\r\n },\r\n series: [\r\n {\r\n name: 'Conventional',\r\n data: conventional,\r\n },\r\n {\r\n name: 'Risk Adjusted',\r\n data: riskAdjusted,\r\n },\r\n ],\r\n credits: {\r\n enabled: false,\r\n },\r\n tooltip: {\r\n headerFormat: '',\r\n pointFormatter: function (this: { y: number }): string {\r\n return asCommaSeparatedString(this.y, 2);\r\n },\r\n },\r\n exporting: { enabled: false },\r\n };\r\n}\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\n\r\nimport { useQuery } from 'react-query';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport { getAggregates } from 'src/clients/api/v5.aggregates';\r\nimport { getReferenceData } from 'src/clients/api/v5.referenceData';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { InvestmentCalculator } from 'src/components/InvestmentCalculator';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport styles from './Calculator.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype CalculatorProps = {};\r\n\r\nexport const Calculator: FC<\r\n CalculatorProps & RouteComponentProps<{ id: string }>\r\n> = ({ match }) => {\r\n const { id } = match.params;\r\n\r\n const {\r\n isLoading: isLoadingFacilities,\r\n data: aggregates,\r\n error: facilitiesError,\r\n } = useQuery(['aggregates'], () => getAggregates());\r\n\r\n const {\r\n data: referenceData,\r\n isLoading: isLoadingReferenceData,\r\n error: referenceDataError,\r\n } = useQuery(['referenceData'], () => getReferenceData());\r\n\r\n if (isLoadingFacilities || isLoadingReferenceData) {\r\n return ;\r\n }\r\n\r\n const aggregate =\r\n (aggregates?.status === 'success' &&\r\n aggregates.value.data.find((f) => `${f.facilityId}` === id)) ??\r\n undefined;\r\n\r\n if (\r\n facilitiesError ||\r\n !aggregates ||\r\n aggregates?.status === 'error' ||\r\n referenceDataError ||\r\n !referenceData ||\r\n referenceData?.status === 'error' ||\r\n !aggregate\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n Risk Analysis Investment Calculator\r\n
\r\n \r\n Based on the risk factors of business growth and water scarcity,\r\n different actions can be taken. This Risk Analysis Investment\r\n Calculator provides results based on financial investment inputs that\r\n help guide decisions according to the conventional (local water price)\r\n and risk adjusted factors. Comparing these two factors can help\r\n support the business case to prioritize water reduction efforts,\r\n optimize water efficiency or monitor conditions. These types of\r\n projects can deliver additional operational benefits besides water\r\n savings and this tool can help move the needle on a proactive water\r\n management strategy.\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nCalculator.displayName = 'Calculator';\r\n","import React, { FC, ReactElement, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './VerticalTabContainer.module.css';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype VerticalTabContainerProps = {\r\n tabs: Array;\r\n children: (activeTabIndex: number) => ReactElement;\r\n className?: string;\r\n};\r\n\r\nexport const VerticalTabContainer: FC = ({\r\n tabs,\r\n children,\r\n className,\r\n}) => {\r\n const [activeTab, setActiveTab] = useState(0);\r\n\r\n return (\r\n
\r\n {!!tabs.length ? (\r\n <>\r\n
\r\n ({\r\n label,\r\n value: `${index}`,\r\n }))}\r\n value={`${activeTab}`}\r\n placeholder=\" \"\r\n onChange={(value) => setActiveTab(+value)}\r\n />\r\n
\r\n
\r\n
\r\n {tabs.map((label, index) => (\r\n setActiveTab(index)}\r\n key={label}\r\n >\r\n {label}\r\n
\r\n ))}\r\n
\r\n \r\n ) : null}\r\n
{children(activeTab)}
\r\n \r\n );\r\n};\r\n\r\nVerticalTabContainer.displayName = 'VerticalTabContainer';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport {\r\n riskFactorChartDataGenerator,\r\n riskSourceChartDataGenerator,\r\n} from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype TotalRiskProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const TotalRisk: FC = ({ aggregate }) => {\r\n const riskSource = useDeepCompareMemo(\r\n () =>\r\n riskSourceChartDataGenerator(\r\n aggregate.charts.waterRiskPremiumIncomingOutgoingChart\r\n ),\r\n [aggregate.charts]\r\n );\r\n\r\n const riskFactor = useDeepCompareMemo(\r\n () =>\r\n riskFactorChartDataGenerator(\r\n aggregate.charts.waterRiskPremiumScarcityQualityChart\r\n ),\r\n [aggregate.charts]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n Total Risk Premium\r\n \r\n The Total Risk Premium is a monetary estimate of the full value of\r\n water to the facility. It is the sum of the incoming risk premium\r\n (based on quantity and quality) and the outgoing risk premium (based\r\n on quality risk).\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Risk source: Incoming vs. Outgoing water

\r\n
    \r\n
  • Incoming
  • \r\n
  • Outgoing
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Risk Factor: Quantity vs. Quality

\r\n
    \r\n
  • Quantity
  • \r\n
  • Quality
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nTotalRisk.displayName = 'TotalRisk';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { asCommaSeparatedString } from 'src/utils/number';\r\nimport {\r\n COLOR_MAP,\r\n incomingRiskChartDataGenerator,\r\n} from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\nconst legendYears = [1, 3, 5, 10] as const;\r\n\r\nconst legendColors = ['#b7dbe6', '#93c9da', '#6fb7ce', '#cccccc'];\r\n\r\nconst legend = {\r\n usdPerYear: [\r\n { label: 'Quality Risk', rowKey: 'quality' },\r\n { label: 'Quantity Risk', rowKey: 'scarcity' },\r\n { label: 'Water Bill', rowKey: 'waterbill' },\r\n { label: 'Combined', rowKey: 'total' },\r\n ] as const,\r\n riskAdjustedPricing: [\r\n { label: 'Quality Risk Premium', rowKey: 'quality' },\r\n { label: 'Quantity Risk Premium', rowKey: 'quantity' },\r\n { label: 'Water Bill Unit Price', rowKey: 'waterbill' },\r\n { label: 'Combined Risk Adjusted Price', rowKey: 'combined' },\r\n ] as const,\r\n};\r\n\r\ntype IncomingRiskProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const IncomingRisk: FC = ({ aggregate }) => {\r\n const attributes = aggregate.charts.incomingWaterRiskChart.attributes;\r\n const chart = useDeepCompareMemo(\r\n () =>\r\n incomingRiskChartDataGenerator(aggregate.charts.incomingWaterRiskChart),\r\n [aggregate.charts.incomingWaterRiskChart]\r\n );\r\n\r\n const score =\r\n COLOR_MAP[aggregate.individualQuantityRiskLevel] ?? COLOR_MAP['N'];\r\n\r\n return (\r\n
\r\n
\r\n Incoming Risk\r\n \r\n Incoming water risk premium places a monetary value on the local\r\n environmental, human-health and domestic supply impacts of water\r\n depletion and the future costs of incoming water treatment. Local\r\n water availability, local water quality and local population density\r\n are all variables that impact the size of the risk premium. Locations\r\n that have high levels of water stress (due to quantity or quality\r\n related impacts) and high population densities will usually have a\r\n higher risk premium.\r\n \r\n \r\n Incoming Risk Likelihood Score ={' '}\r\n {score.text}\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\n \r\n \r\n {legend['usdPerYear'].map(({ label, rowKey }, index, arr) => (\r\n \r\n \r\n {legendYears.map((number) => {\r\n const key = `year${number}-${rowKey}` as const;\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\n {legend['riskAdjustedPricing'].map(\r\n ({ label, rowKey }, index, arr) => (\r\n \r\n \r\n {legendYears.map((number) => {\r\n const key = `year${number}-${rowKey}-unit-price` as const;\r\n return (\r\n \r\n );\r\n })}\r\n \r\n )\r\n )}\r\n \r\n
USD per year1 year3 year5 year10 year
\r\n \r\n {label}\r\n \r\n \r\n \r\n {asCommaSeparatedString(attributes[key])}\r\n \r\n
\r\n Risk Adjusted Unit Pricing (USD per m3)\r\n 1 year3 year5 year10 year
\r\n \r\n {label}\r\n \r\n \r\n \r\n {asCommaSeparatedString(attributes[key], 2)}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nIncomingRisk.displayName = 'IncomingRisk';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { asCommaSeparatedString } from 'src/utils/number';\r\nimport {\r\n COLOR_MAP,\r\n outgoingRiskChartDataGenerator,\r\n} from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype OutgoingRiskProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nconst legend = {\r\n usdPerYear: [\r\n { label: 'Quality Risk', rowKey: 'quality-risk' },\r\n { label: 'Water Bill', rowKey: 'waterbill' },\r\n { label: 'Combined', rowKey: 'total' },\r\n ] as const,\r\n riskAdjustedPricing: [\r\n { label: 'Quality Risk Premium', rowKey: 'quality' },\r\n { label: 'Water Bill Unit Price', rowKey: 'waterbill' },\r\n { label: 'Combined Risk Adjusted Price', rowKey: 'combined' },\r\n ] as const,\r\n};\r\nconst legendYears = [1, 3, 5, 10] as const;\r\nconst legendColors = ['#d7eab8', '#a7d162', '#cccccc'];\r\n\r\nexport const OutgoingRisk: FC = ({ aggregate }) => {\r\n const attributes = aggregate.charts.outgoingWaterRiskChart.attributes;\r\n const chart = useDeepCompareMemo(\r\n () =>\r\n outgoingRiskChartDataGenerator(aggregate.charts.outgoingWaterRiskChart),\r\n [aggregate.charts.outgoingWaterRiskChart]\r\n );\r\n\r\n const score =\r\n COLOR_MAP[aggregate.individualQualityRiskLevel] ?? COLOR_MAP['N'];\r\n\r\n return (\r\n
\r\n
\r\n Outgoing Risk\r\n \r\n Outgoing water risk premium places a monetary value on the local\r\n environmental and human-health impacts of water pollution and the\r\n future costs of water treatment. Local water stress, local water\r\n quality and local population density and are all variables that impact\r\n the size of the risk premium. Locations that have high levels of water\r\n stress and high population densities will usually have a higher risk\r\n premium; however, the type of water pollutant and its treatment method\r\n will also influence the value.\r\n \r\n \r\n Outgoing Risk Likelihood Score ={' '}\r\n {score.text}\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\n \r\n \r\n {legend['usdPerYear'].map(({ label, rowKey }, index, arr) => (\r\n \r\n \r\n {legendYears.map((number) => {\r\n const key = `year${number}-${rowKey}` as const;\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\n {legend['riskAdjustedPricing'].map(\r\n ({ label, rowKey }, index, arr) => (\r\n \r\n \r\n {legendYears.map((number) => {\r\n const key = `year${number}-${rowKey}-unit-price` as const;\r\n return (\r\n \r\n );\r\n })}\r\n \r\n )\r\n )}\r\n \r\n
USD per year1 year3 year5 year10 year
\r\n \r\n {label}\r\n \r\n \r\n \r\n {asCommaSeparatedString(attributes[key])}\r\n \r\n
\r\n Risk Adjusted Unit Pricing (USD per m3)\r\n 1 year3 year5 year10 year
\r\n \r\n {label}\r\n \r\n \r\n \r\n {asCommaSeparatedString(attributes[key], 2)}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nOutgoingRisk.displayName = 'OutgoingRisk';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { asCommaSeparatedString } from 'src/utils/number';\r\nimport {\r\n COLOR_MAP,\r\n revenueRiskChartDataGenerator,\r\n} from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype RevenueRiskProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nconst legend = {\r\n usdPerYear: [{ label: 'Quality Risk', rowKey: 'revenue-risk' }] as const,\r\n};\r\nconst legendYears = [1, 3, 5, 10] as const;\r\nconst legendColors = ['#f09a48'];\r\n\r\nexport const RevenueRisk: FC = ({ aggregate }) => {\r\n const attributes = aggregate.charts.revenueRiskChart.attributes;\r\n const chart = useDeepCompareMemo(\r\n () => revenueRiskChartDataGenerator(aggregate.charts.revenueRiskChart),\r\n [aggregate]\r\n );\r\n\r\n const score =\r\n COLOR_MAP[aggregate.individualRevenueRiskLevel] ?? COLOR_MAP['N'];\r\n\r\n return (\r\n
\r\n
\r\n Revenue Risk\r\n \r\n Revenue at risk compares the estimated amount of water a business\r\n requires to generate revenue (m3 per USD of revenue) to the\r\n business' share of water available in the water basin if water were\r\n allocated among water users based on economic activity (contribution\r\n to basin-level GDP). If more water is required than the basin share of\r\n water allocated, then a proportion of the business' revenue is\r\n potentially at risk.\r\n \r\n \r\n Revenue Risk Likelihood Score ={' '}\r\n {score.text}\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\n \r\n \r\n {legend['usdPerYear'].map(({ label, rowKey }, index, arr) => (\r\n \r\n \r\n {legendYears.map((number) => {\r\n const key = `year${number}-${rowKey}` as const;\r\n return (\r\n \r\n );\r\n })}\r\n \r\n ))}\r\n \r\n
1 year3 year5 year10 year
\r\n \r\n {label}\r\n \r\n \r\n \r\n {asCommaSeparatedString(attributes[key], 2)}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nRevenueRisk.displayName = 'RevenueRisk';\r\n","import React, { FC } from 'react';\r\nimport { VerticalTabContainer } from '../../VerticalTabContainer';\r\nimport classnames from 'classnames/bind';\r\nimport styles from './IdentifyRiskTabGroup.module.css';\r\nimport { TotalRisk } from './Tabs/TotalRisk';\r\nimport { IncomingRisk } from './Tabs/IncomingRisk';\r\nimport { OutgoingRisk } from './Tabs/OutgoingRisk';\r\nimport { RevenueRisk } from './Tabs/RevenueRisk';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\n\r\nexport type IdentifyRiskTabGroupProps = {\r\n aggregate: AggregateResult;\r\n className?: string;\r\n};\r\n\r\nconst TABS = [\r\n 'Total Risk Premium',\r\n 'Incoming Water At Risk',\r\n 'Outgoing Water At Risk',\r\n 'Revenue Risk',\r\n];\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport const IdentifyRiskTabGroup: FC = ({\r\n aggregate,\r\n className,\r\n}) => {\r\n return (\r\n \r\n {(activeTabIndex) => (\r\n <>\r\n {activeTabIndex === 0 ? : null}\r\n {activeTabIndex === 1 ? : null}\r\n {activeTabIndex === 2 ? : null}\r\n {activeTabIndex === 3 ? : null}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nIdentifyRiskTabGroup.displayName = 'IdentifyRiskTabGroup';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport Highcharts from 'highcharts';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport styles from '../../Tabs.module.css';\r\nimport {\r\n RISK_COLOR_MAP,\r\n WITHDRAWAL_RISK_SUGGESTION_MAP,\r\n waterWithdrawalChartDataGenerator,\r\n} from 'src/utils/chart';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { STRESS_COLOR_MAP } from 'src/utils/chart/utils';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype WaterWithdrawalRiskProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const WaterWithdrawalRisk: FC = ({\r\n aggregate,\r\n}) => {\r\n const data = aggregate.charts.sustainableWaterAllocationChart;\r\n const riskLevel = {\r\n level: data.attributes['swu-riskRank'],\r\n color: RISK_COLOR_MAP[data.attributes['swu-riskRank']],\r\n suggestion: WITHDRAWAL_RISK_SUGGESTION_MAP[data.attributes['swu-riskRank']],\r\n style: { 'background-color': data.attributes['swu-riskRank'] },\r\n };\r\n const stressLevel = {\r\n level: (aggregate.wriWaterStressCategory ?? '').toUpperCase(),\r\n color:\r\n STRESS_COLOR_MAP[\r\n (aggregate.wriWaterStressCategory as keyof typeof STRESS_COLOR_MAP) ??\r\n 'none'\r\n ],\r\n };\r\n\r\n const chart = useDeepCompareMemo(\r\n () => waterWithdrawalChartDataGenerator(data),\r\n [aggregate]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n Water Withdrawal Risk\r\n \r\n The facility may use more water than what would be a sustainable\r\n amount of water from its surrounding water sources. If the facility’s\r\n current water use, subtracting any replenishment volumes, is higher\r\n than the current and future sustainable water use amounts, the\r\n facility needs to decrease its water use to avoid impacts to its\r\n operations from water scarcity. Water intensive industries located in\r\n areas of high levels of water stress and competition for water\r\n resources will usually have a higher amount of water use risk.\r\n Sustainable annual water withdrawal is calculated to achieve a <\r\n 40% risk threshold of baseline water stress to a basin.\r\n \r\n \r\n WRI Baseline Water Stress = {' '}\r\n \r\n {stressLevel.level}\r\n \r\n \r\n \r\n Water Withdrawal Risk = {' '}\r\n \r\n {riskLevel.level}\r\n \r\n — {riskLevel.suggestion}.\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\n \r\n \r\n Current annual water withdrawal\r\n \r\n \r\n \r\n Water replenishment\r\n \r\n \r\n \r\n Sustainable annual water withdrawal\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nWaterWithdrawalRisk.displayName = 'WaterWithdrawalRisk';\r\n","import React, { FC } from 'react';\r\nimport { VerticalTabContainer } from '../../VerticalTabContainer';\r\nimport classnames from 'classnames/bind';\r\nimport { WaterWithdrawalRisk } from './Tabs/WaterWithdrawalRisk';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport styles from '../Tabs.module.css';\r\n\r\nexport type SetTargetsTabGroupProps = {\r\n aggregate: AggregateResult;\r\n className?: string;\r\n};\r\n\r\nconst TABS = ['Water Withdrawal Risk'];\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport const SetTargetsTabGroup: FC = ({\r\n aggregate,\r\n className,\r\n}) => {\r\n return (\r\n \r\n {(activeTabIndex) => (\r\n <>\r\n {activeTabIndex === 0 ? (\r\n \r\n ) : null}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nSetTargetsTabGroup.displayName = 'SetTargetsTabGroup';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\n\r\nimport { mdiPlusCircleOutline } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport styles from './NoAssessment.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype NoAssessmentProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const NoAssessment: FC = ({ aggregate }) => {\r\n return (\r\n
\r\n \r\n Start your Action Plan\r\n \r\n \r\n You currently do not have assessments for this facility. Take the\r\n assessment and start your action plan today.\r\n \r\n
\r\n \r\n \r\n Take Assessment\r\n \r\n
\r\n\r\n \r\n Need Help? For tips on this or any other topic,{' '}\r\n \r\n click here\r\n \r\n .\r\n \r\n
\r\n );\r\n};\r\n\r\nNoAssessment.displayName = 'NoAssessment';\r\n","export enum JourneyStep {\r\n Identify = 'identify', //risk\r\n Target = 'target', //targets\r\n Implement = 'implement', //take action\r\n Track = 'track', // track progress\r\n}\r\n\r\nexport const JourneyTitles = {\r\n [JourneyStep.Identify]: 'Identify Risk',\r\n [JourneyStep.Target]: 'Set Targets',\r\n [JourneyStep.Implement]: 'Take Action',\r\n [JourneyStep.Track]: 'Track Progress',\r\n};\r\n\r\nexport const TIMELINE_COLORS = [\r\n '#e6eef2',\r\n '#ccdde4',\r\n '#99bbca',\r\n '#6698af',\r\n '#337695',\r\n '#00547a',\r\n];\r\n","import { Box, Show, Table, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport {\r\n ParsedGuide,\r\n ParsedGuideBulletList,\r\n} from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { TIMELINE_COLORS } from 'src/constants/journey';\r\nimport { GuideNode } from 'src/types/guide';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype BusinessCaseProps = {\r\n guide: ParsedGuide['BusinessCase'];\r\n};\r\n\r\nexport const BusinessCase: FC = ({ guide }) => {\r\n try {\r\n return (\r\n
\r\n Business Case\r\n\r\n \r\n\r\n \r\n \r\n Benefits\r\n \r\n \r\n\r\n tr': {\r\n borderBottom: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n '& tbody > tr:nth-child(even)': {\r\n bgColor: TIMELINE_COLORS[1],\r\n },\r\n '& tbody td': {\r\n verticalAlign: 'top',\r\n borderRight: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n '& a': {\r\n color: 'blue.500',\r\n textDecoration: 'underline',\r\n '&:hover': {\r\n color: 'blue.600',\r\n },\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n Enterprise Level\r\n \r\n \r\n \r\n Potential benefits at the enterprise level\r\n \r\n \r\n \r\n \r\n \r\n Facility Level\r\n \r\n \r\n \r\n Potential benefits at the individual facility level\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Tangible\r\n \r\n \r\n
    \r\n {resolveBullets(guide.Enterprise.Tangible).map((node) => (\r\n \r\n ))}\r\n
\r\n \r\n \r\n
    \r\n {resolveBullets(guide.Individual.Tangible).map((node) => (\r\n \r\n ))}\r\n
\r\n \r\n \r\n \r\n \r\n Intangible\r\n \r\n \r\n
    \r\n {resolveBullets(guide.Enterprise.Intangible).map((node) => (\r\n \r\n ))}\r\n
\r\n \r\n \r\n
    \r\n {resolveBullets(guide.Individual.Intangible).map((node) => (\r\n \r\n ))}\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n } catch (error) {\r\n return ;\r\n }\r\n};\r\n\r\nfunction resolveBullets(node: GuideNode | ParsedGuideBulletList): GuideNode[] {\r\n if (node.hasOwnProperty('Bullet')) {\r\n return (node as ParsedGuideBulletList).Bullet.filter(\r\n Boolean\r\n ) as GuideNode[];\r\n }\r\n\r\n return [node as GuideNode];\r\n}\r\n\r\nBusinessCase.displayName = 'BusinessCase';\r\n","import { Box } from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport zip from 'lodash-es/zip';\r\nimport React, { FC } from 'react';\r\nimport { ParsedGuide } from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype CaseStudiesProps = {\r\n guide: ParsedGuide['CaseStudies'];\r\n};\r\n\r\nconst caseStudyImages = [\r\n '/images/waa/case_study_1.jpg',\r\n '/images/waa/case_study_2.jpg',\r\n];\r\n\r\nexport const CaseStudies: FC = ({ guide }) => {\r\n const caseStudies = zip(\r\n guide.Header.filter(Boolean),\r\n guide.Content.filter(Boolean)\r\n );\r\n\r\n try {\r\n return (\r\n
\r\n Case Studies\r\n
\r\n {caseStudies\r\n .map(([header, content], i) => {\r\n if (header && content) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return null;\r\n })\r\n .filter(Boolean)}\r\n
\r\n
\r\n );\r\n } catch (error) {\r\n return ;\r\n }\r\n};\r\n\r\nCaseStudies.displayName = 'CaseStudies';\r\n","import {\r\n Accordion,\r\n AccordionButton,\r\n AccordionIcon,\r\n AccordionItem,\r\n AccordionPanel,\r\n Box,\r\n Heading,\r\n List,\r\n ListIcon,\r\n ListItem,\r\n Stack,\r\n Text,\r\n} from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, PropsWithChildren, useMemo } from 'react';\r\nimport { ParsedGuide } from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ChecklistProps = {\r\n guide: ParsedGuide['checklist'];\r\n};\r\n\r\nconst ChecklistItem: FC> = ({\r\n title,\r\n children,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const Checklist: FC = ({ guide }) => {\r\n const sections = useMemo(() => {\r\n return [\r\n {\r\n title: 'Site Management',\r\n items: guide.SiteManagement?.CheckBox.filter(Boolean),\r\n },\r\n {\r\n title: 'Water Management Practices',\r\n items: guide.WaterManagementPractices?.CheckBox.filter(Boolean),\r\n },\r\n {\r\n title: 'Target Setting',\r\n items: guide.TargetSetting?.CheckBox.filter(Boolean),\r\n },\r\n {\r\n title: 'Water Stewardship',\r\n items: guide.WaterStewardship?.CheckBox.filter(Boolean),\r\n },\r\n ];\r\n }, [guide]);\r\n\r\n try {\r\n return (\r\n
\r\n \r\n Checklist\r\n \r\n \r\n {sections.map((section) =>\r\n section.items?.length ? (\r\n \r\n \r\n {section.items.map((node, i) =>\r\n node ? (\r\n \r\n \r\n (\r\n \r\n )}\r\n color=\"green.500\"\r\n mr=\"2\"\r\n />\r\n \r\n \r\n \r\n ) : null\r\n )}\r\n \r\n \r\n ) : null\r\n )}\r\n \r\n
\r\n );\r\n } catch (error) {\r\n return ;\r\n }\r\n};\r\n\r\nChecklist.displayName = 'Checklist';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { getReferenceData } from 'src/clients/api/v5.referenceData';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { InvestmentCalculator } from '../../../InvestmentCalculator';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype InvestmentCalculatorTabProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const InvestmentCalculatorTab: FC = ({\r\n aggregate,\r\n}) => {\r\n const {\r\n isLoading: isLoadingReferenceData,\r\n data: referenceData,\r\n refetch,\r\n isFetching,\r\n error,\r\n } = useQuery(['referenceData'], () => getReferenceData());\r\n\r\n if (isLoadingReferenceData) {\r\n return ;\r\n }\r\n\r\n if (error || (referenceData && referenceData.status === 'error')) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (referenceData && referenceData.status === 'success') {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return <>;\r\n};\r\n\r\nInvestmentCalculatorTab.displayName = 'InvestmentCalculatorTab';\r\n","import { Box } from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { ParsedGuide } from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ScenarioProps = {\r\n guide: ParsedGuide['Scenario'];\r\n maturity: string;\r\n graphUrl: string;\r\n};\r\n\r\nexport const Scenario: FC = ({ guide, maturity, graphUrl }) => {\r\n const { Header, Content } = guide;\r\n\r\n try {\r\n return (\r\n
\r\n
\r\n Scenario\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\n } catch (error) {\r\n return ;\r\n }\r\n};\r\n\r\nScenario.displayName = 'Scenario';\r\n","import { Table, Thead, Tr, Tbody, Td, Text, Link } from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\n\r\nimport {\r\n ParsedGuide,\r\n ParsedGuideBulletList,\r\n} from 'src/clients/api/v5.facility';\r\nimport { TIMELINE_COLORS } from 'src/constants/journey';\r\nimport { GuideNode } from 'src/types/guide';\r\n\r\ntype StepsTableProps = {\r\n steps: ParsedGuide['ToolsAndResources']['Step'];\r\n};\r\n\r\nexport const StepsTable: FC = ({ steps }) => {\r\n return (\r\n tr': {\r\n borderBottom: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n '& tbody > tr:nth-child(even)': {\r\n bgColor: TIMELINE_COLORS[1],\r\n },\r\n '& tbody td': {\r\n verticalAlign: 'top',\r\n borderRight: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n Description\r\n Examples\r\n Tools\r\n \r\n \r\n \r\n {steps\r\n .map((step, index) => {\r\n const stepNumber = index + 1;\r\n if (step) {\r\n return (\r\n \r\n \r\n Step\r\n {stepNumber}\r\n \r\n {step.Description.nodeValue}\r\n \r\n
    \r\n {resolveBullets(step.Examples).map((node) => (\r\n \r\n ))}\r\n
\r\n \r\n \r\n
    \r\n {resolveBullets(step.Tools).map((node) => (\r\n
  • \r\n {node.nodeValueLink ? (\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\n return null;\r\n })\r\n .filter(Boolean)}\r\n \r\n \r\n );\r\n};\r\n\r\nfunction resolveBullets(node: GuideNode | ParsedGuideBulletList): GuideNode[] {\r\n if (node.hasOwnProperty('Bullet')) {\r\n return (node as ParsedGuideBulletList).Bullet.filter(\r\n Boolean\r\n ) as GuideNode[];\r\n }\r\n\r\n return [node as GuideNode];\r\n}\r\n\r\nStepsTable.displayName = 'StepsTable';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, useMemo } from 'react';\r\nimport { ParsedGuide } from 'src/clients/api/v5.facility';\r\nimport { StepsTable } from '../../../StepsTable';\r\nimport { Text } from '@chakra-ui/react';\r\nimport styles from '../../Tabs.module.css';\r\nimport { BlockError } from 'src/components/BlockError';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ToolsAndResourcesProps = {\r\n guide: ParsedGuide['ToolsAndResources'];\r\n};\r\n\r\nexport const ToolsAndResources: FC = ({ guide }) => {\r\n try {\r\n const steps = useMemo(() => guide.Step.filter(Boolean), [guide]);\r\n\r\n return (\r\n
\r\n \r\n Tools and Resources\r\n \r\n \r\n
\r\n );\r\n } catch (error) {\r\n return ;\r\n }\r\n};\r\n\r\nToolsAndResources.displayName = 'ToolsAndResources';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, useMemo } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { getFacilityGuide, parseGuide } from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { NoAssessment } from '../../NoAssessment';\r\nimport { VerticalTabContainer } from '../../VerticalTabContainer';\r\nimport { BusinessCase } from './Tabs/BusinessCase';\r\nimport { CaseStudies } from './Tabs/CaseStudies';\r\nimport { Checklist } from './Tabs/Checklist';\r\nimport { InvestmentCalculatorTab } from './Tabs/InvestmentCalculator';\r\nimport { Scenario } from './Tabs/Scenario';\r\nimport { ToolsAndResources } from './Tabs/ToolsAndResources';\r\nimport styles from './TakeActionTabGroup.module.css';\r\n\r\nexport type TakeActionTabGroupProps = {\r\n aggregate: AggregateResult;\r\n className?: string;\r\n};\r\n\r\nconst TABS = [\r\n 'Scenario',\r\n 'Checklist',\r\n 'Tools and Resources',\r\n 'Business Case',\r\n 'Investment Calculator',\r\n 'Case Studies',\r\n];\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport const TakeActionTabGroup: FC = ({\r\n aggregate,\r\n className,\r\n}) => {\r\n const maturity = aggregate.waaWaterMaturity;\r\n const normalizedMaturity = maturity?.toLowerCase() ?? '';\r\n\r\n const request = useQuery(\r\n [\r\n 'facilities',\r\n aggregate.facility.facilityId,\r\n 'reportingYears',\r\n aggregate.facilityReportingYearId,\r\n 'guide',\r\n ],\r\n () =>\r\n getFacilityGuide(\r\n aggregate.facility.facilityId,\r\n aggregate.facilityReportingYearId\r\n ),\r\n {\r\n enabled: !!aggregate.facility.facilityId,\r\n cacheTime: 0,\r\n }\r\n );\r\n\r\n const graphUrl = useMemo(() => {\r\n switch (normalizedMaturity) {\r\n case 'exploratory':\r\n return '/images/waa/wmc_exploratory.png';\r\n case 'linear':\r\n return '/images/waa/wmc_linear.png';\r\n case 'untapped':\r\n return '/images/waa/wmc_untapped.png';\r\n default:\r\n return '/images/waa/wmc_watersmart.png';\r\n }\r\n }, [normalizedMaturity]);\r\n\r\n if (request.isLoading) {\r\n return ;\r\n }\r\n\r\n if (\r\n request.isError ||\r\n (request.isSuccess &&\r\n request.data.status === 'error' &&\r\n request.data.code !== 404) ||\r\n !request.data?.value\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const guide =\r\n request.data?.status === 'success'\r\n ? parseGuide(request.data?.value.data[0])\r\n : undefined;\r\n\r\n try {\r\n return (\r\n \r\n {(idx) => {\r\n if (!aggregate.waaScore || !aggregate.waaWaterMaturity || !guide) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n <>\r\n {idx === 0 ? (\r\n \r\n ) : null}\r\n {idx === 1 ? : null}\r\n {idx === 2 ? (\r\n \r\n ) : null}\r\n {idx === 3 ? : null}\r\n {idx === 4 ? (\r\n \r\n ) : null}\r\n {idx === 5 ? : null}\r\n \r\n );\r\n }}\r\n \r\n );\r\n } catch (error) {\r\n return ;\r\n }\r\n};\r\n\r\nTakeActionTabGroup.displayName = 'TakeActionTabGroup';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { DEFAULT_CHART } from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype AbsoluteVolumeProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const AbsoluteVolume: FC = ({ aggregate }) => {\r\n const attributes = aggregate.charts.potWaterVolume.attributes;\r\n const chart = useDeepCompareMemo(\r\n () => ({\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'column',\r\n },\r\n colors: ['#096490', '#93c9da', '#dc8f18'],\r\n xAxis: {\r\n categories: attributes.categories,\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Cubic meters (m3)',\r\n },\r\n },\r\n legend: {\r\n squareSymbol: false,\r\n symbolHeight: 12,\r\n symbolWidth: 24,\r\n symbolPadding: 10,\r\n symbolRadius: 0,\r\n },\r\n tooltip: {\r\n headerFormat: '{point.key}',\r\n pointFormat:\r\n '' +\r\n '',\r\n footerFormat: '
{series.name}: {point.y}
',\r\n shared: true,\r\n useHTML: true,\r\n },\r\n series: attributes.series,\r\n }),\r\n [aggregate]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n Absolute Water Volume Over Time\r\n \r\n Absolute water volume over time compares the incoming, outgoing and\r\n calculated consumptive water use over multiple years.\r\n \r\n
\r\n\r\n {/* @ts-ignore */}\r\n \r\n
\r\n );\r\n};\r\n\r\nAbsoluteVolume.displayName = 'AbsoluteVolume';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { DEFAULT_CHART } from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ProductionBasisProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const ProductionBasis: FC = ({ aggregate }) => {\r\n const attributes = aggregate.charts.potWaterIntensityProduction.attributes;\r\n const chart = useDeepCompareMemo(\r\n () => ({\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'column',\r\n },\r\n colors: ['#096490', '#93c9da', '#dc8f18'],\r\n title: {\r\n text: null,\r\n },\r\n xAxis: {\r\n categories: attributes.categories,\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Cubic meters water / unit of production (m3/unit)',\r\n },\r\n },\r\n legend: {\r\n squareSymbol: false,\r\n symbolHeight: 12,\r\n symbolWidth: 24,\r\n symbolPadding: 10,\r\n symbolRadius: 0,\r\n },\r\n tooltip: {\r\n headerFormat: '{point.key}',\r\n pointFormat:\r\n '' +\r\n '',\r\n footerFormat: '
{series.name}: {point.y:.5f}
',\r\n shared: true,\r\n useHTML: true,\r\n },\r\n series: attributes.series,\r\n }),\r\n [aggregate]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n Water Intensity - Production Basis Over Time\r\n \r\n Water Intensity on a production basis over time compares the incoming,\r\n outgoing and calculated consumptive water use per production unit over\r\n multiple years.\r\n \r\n
\r\n\r\n {/* @ts-ignore */}\r\n \r\n
\r\n );\r\n};\r\n\r\nProductionBasis.displayName = 'ProductionBasis';\r\n","import classnames from 'classnames/bind';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport React, { FC } from 'react';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { DEFAULT_CHART } from '../../../../utils/chart';\r\nimport styles from '../../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype RevenueBasisProps = {\r\n aggregate: AggregateResult;\r\n};\r\n\r\nexport const RevenueBasis: FC = ({ aggregate }) => {\r\n const attributes = aggregate.charts.potWaterIntensityRevenue.attributes;\r\n const chart = useDeepCompareMemo(\r\n () => ({\r\n ...DEFAULT_CHART,\r\n chart: {\r\n ...DEFAULT_CHART.chart,\r\n type: 'column',\r\n },\r\n colors: ['#096490', '#93c9da', '#dc8f18'],\r\n title: {\r\n text: null,\r\n },\r\n xAxis: {\r\n categories: attributes.categories,\r\n },\r\n yAxis: {\r\n title: {\r\n text: 'Cubic meters water / revenue in millions USD (m3/$M)',\r\n },\r\n },\r\n legend: {\r\n squareSymbol: false,\r\n symbolHeight: 12,\r\n symbolWidth: 24,\r\n symbolPadding: 10,\r\n symbolRadius: 0,\r\n },\r\n tooltip: {\r\n headerFormat: '{point.key}',\r\n pointFormat:\r\n '' +\r\n '',\r\n footerFormat: '
{series.name}: {point.y:.5f}
',\r\n shared: true,\r\n useHTML: true,\r\n },\r\n series: attributes.series,\r\n credits: {\r\n enabled: false,\r\n },\r\n exporting: { enabled: false },\r\n }),\r\n [aggregate]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n Water Intensity - Revenue Basis Over Time\r\n \r\n Water Intensity on a revenue basis over time compares the incoming,\r\n outgoing and calculated consumptive water use per revenue over\r\n multiple years.\r\n \r\n
\r\n\r\n {/* @ts-ignore */}\r\n \r\n
\r\n );\r\n};\r\n\r\nRevenueBasis.displayName = 'RevenueBasis';\r\n","import React, { FC } from 'react';\r\nimport { VerticalTabContainer } from '../../VerticalTabContainer';\r\nimport classnames from 'classnames/bind';\r\nimport styles from './TrackProgressTabGroup.module.css';\r\nimport { AbsoluteVolume } from './Tabs/AbsoluteVolume';\r\nimport { ProductionBasis } from './Tabs/ProductionBasis';\r\nimport { RevenueBasis } from './Tabs/RevenueBasis';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\n\r\nexport type TrackProgressTabGroupProps = {\r\n aggregate: AggregateResult;\r\n className?: string;\r\n};\r\n\r\nconst TABS = [\r\n 'Absolute Volume',\r\n 'Intensity - Production Basis',\r\n 'Intensity - Revenue Basis',\r\n];\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport const TrackProgressTabGroup: FC = ({\r\n aggregate,\r\n className,\r\n}) => {\r\n return (\r\n \r\n {(idx) => (\r\n <>\r\n {idx === 0 ? : null}\r\n {idx === 1 ? : null}\r\n {idx === 2 ? : null}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nTrackProgressTabGroup.displayName = 'TrackProgressTabGroup';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './Alert.module.css';\r\nimport { Copy } from '../Copy';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface AlertProps extends React.HTMLAttributes {\r\n variant: 'danger' | 'success' | 'warning' | 'info';\r\n title?: string;\r\n message: string;\r\n}\r\n\r\nexport const Alert: FC = ({\r\n title,\r\n message,\r\n variant,\r\n className,\r\n}) => {\r\n return (\r\n
\r\n {title && {title}}\r\n {message}\r\n
\r\n );\r\n};\r\n\r\nAlert.displayName = 'Alert';\r\n","import React, { FC, useRef } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from './FacilityReportDialog.module.css';\r\nimport { Dialog } from 'src/components/Dialog';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { Alert } from 'src/components/Alert';\r\nimport {\r\n incomingRiskChartDataGenerator,\r\n outgoingRiskChartDataGenerator,\r\n riskSourceChartDataGenerator,\r\n riskFactorChartDataGenerator,\r\n revenueRiskChartDataGenerator,\r\n waterWithdrawalChartDataGenerator,\r\n} from 'src/utils/chart';\r\nimport Highcharts from 'highcharts';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport { useEffect } from 'react';\r\nimport { generateFacilityPDFReport } from 'src/clients/api/v5.facility';\r\nimport { escapeQuotes } from 'src/utils/string';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { Flex } from '@chakra-ui/react';\r\n\r\nrequire('highcharts-exporting')(Highcharts);\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype FacilityReportDialogProps = {\r\n aggregate: AggregateResult;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n};\r\n\r\nexport const FacilityReportDialog: FC = ({\r\n aggregate,\r\n isOpen,\r\n onClose,\r\n}) => {\r\n const [state, setState] = useAsyncState({ status: 'loading' });\r\n\r\n const riskSourceChartComponent = useRef(null);\r\n const riskFactorChartComponent = useRef(null);\r\n const incomingChartComponent = useRef(null);\r\n const outgoingChartComponent = useRef(null);\r\n const revenueChartComponent = useRef(null);\r\n const waterWithdrawalChartComponent = useRef(null);\r\n\r\n useEffect(() => {\r\n const timeout = setTimeout(async () => {\r\n try {\r\n const result = await generateFacilityPDFReport(\r\n aggregate.facilityId,\r\n aggregate,\r\n {\r\n facilityRank: aggregate.facilityRank,\r\n riskFactorSvgChart: escapeQuotes(\r\n // @ts-ignore\r\n riskSourceChartComponent.current!.chart.getSVG()\r\n ),\r\n riskSourceSvgChart: escapeQuotes(\r\n // @ts-ignore\r\n riskFactorChartComponent.current!.chart.getSVG()\r\n ),\r\n incomingSvgChart: escapeQuotes(\r\n // @ts-ignore\r\n incomingChartComponent.current!.chart.getSVG()\r\n ),\r\n outgoingSvgChart: escapeQuotes(\r\n // @ts-ignore\r\n outgoingChartComponent.current!.chart.getSVG()\r\n ),\r\n revenueSvgChart: escapeQuotes(\r\n // @ts-ignore\r\n revenueChartComponent.current!.chart.getSVG()\r\n ),\r\n waterWithdrawalSvgChart: escapeQuotes(\r\n // @ts-ignore\r\n waterWithdrawalChartComponent.current!.chart.getSVG()\r\n ),\r\n }\r\n );\r\n\r\n if (\r\n (result.status === 'success' && result.value.data === null) ||\r\n result.status !== 'success'\r\n ) {\r\n throw new Error(\r\n 'An error was encountered while generating your report.'\r\n );\r\n }\r\n\r\n window.open(result.value.data, '_self');\r\n\r\n onClose();\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message:\r\n e ?? 'An error was encountered while generating your report.',\r\n });\r\n }\r\n }, 3000);\r\n\r\n return () => clearTimeout(timeout);\r\n }, [\r\n aggregate,\r\n aggregate.facilityId,\r\n aggregate.reportingYear,\r\n aggregate.facilityRank,\r\n setState,\r\n onClose,\r\n ]);\r\n\r\n const result = () => {\r\n switch (state.status) {\r\n case 'loading': {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n case 'error': {\r\n return (\r\n \r\n );\r\n }\r\n\r\n default: {\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\n \r\n \r\n
\r\n {result()}\r\n \r\n );\r\n};\r\n\r\nFacilityReportDialog.displayName = 'FacilityReportDialog';\r\n","import React, { FC, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport { Dialog } from 'src/components/Dialog';\r\nimport { Button } from 'src/components/Button';\r\nimport styles from './FolderAssignDialog.module.css';\r\nimport { addFacilityFolderAssociation } from 'src/clients/api/v5.facility';\r\nimport { RadioList } from 'src/components/RadioList';\r\nimport { getFolders } from 'src/clients/api/v5.folders';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { AsyncState } from 'src/types/asyncState';\r\nimport { Alert } from 'src/components/Alert';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype FolderAssignDialogProps = {\r\n isOpen: boolean;\r\n onSave: () => void;\r\n onClose: () => void;\r\n facilityId: number;\r\n reportingYear: number;\r\n facilityFolderId: number;\r\n};\r\nexport const FolderAssignDialog: FC = ({\r\n isOpen,\r\n onClose,\r\n onSave,\r\n facilityId,\r\n facilityFolderId,\r\n}) => {\r\n const queryClient = useQueryClient();\r\n const [selectedFolder, setSelectedFolder] = useState(\r\n `${facilityFolderId}`\r\n );\r\n const [asyncState, setAsyncState] = useState({ state: 'idle' });\r\n\r\n const { isLoading, isFetching, data, error, refetch } = useQuery(\r\n ['folders'],\r\n () => getFolders()\r\n );\r\n\r\n const handleCreateFolder = async () => {\r\n if (selectedFolder) {\r\n try {\r\n setAsyncState({ state: 'loading' });\r\n\r\n const result = await addFacilityFolderAssociation(\r\n facilityId,\r\n Number(selectedFolder)\r\n );\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n setAsyncState({\r\n state: 'success',\r\n message: `Folder assigned successfully!`,\r\n });\r\n\r\n queryClient.refetchQueries(['folders']);\r\n queryClient.refetchQueries(['aggregates']);\r\n\r\n onSave();\r\n } catch (e) {\r\n setAsyncState({\r\n state: 'error',\r\n message: e.message ?? 'There was an error creating your folder.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n let content;\r\n let hideActions = false;\r\n if (isLoading) {\r\n content = ;\r\n } else if (data?.code === 404) {\r\n content = ;\r\n hideActions = true;\r\n } else if (error || !data || data.status === 'error') {\r\n content = (\r\n \r\n );\r\n } else {\r\n content = (\r\n ({\r\n label: folder.folderName,\r\n value: `${folder.folderId}`,\r\n }))}\r\n value={selectedFolder}\r\n onChange={setSelectedFolder}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n \r\n {content}\r\n\r\n
\r\n \r\n Cancel\r\n \r\n {!hideActions ? (\r\n \r\n Save\r\n \r\n ) : null}\r\n
\r\n \r\n );\r\n};\r\n\r\nFolderAssignDialog.displayName = 'FolderAssignDialog';\r\n","import {\r\n Box,\r\n Button,\r\n ButtonGroup,\r\n Link as ChakraLink,\r\n Flex,\r\n Heading,\r\n IconButton,\r\n Menu,\r\n MenuButton,\r\n MenuDivider,\r\n MenuGroup,\r\n MenuItem,\r\n MenuList,\r\n Popover,\r\n PopoverArrow,\r\n PopoverBody,\r\n PopoverContent,\r\n PopoverTrigger,\r\n Show,\r\n Stack,\r\n PopoverHeader,\r\n} from '@chakra-ui/react';\r\nimport {\r\n mdiCardSearchOutline,\r\n mdiFileDownloadOutline,\r\n mdiFolderOutline,\r\n mdiDotsVertical,\r\n mdiHelpCircleOutline,\r\n} from '@mdi/js';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, HTMLAttributes, useState } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { Link, useHistory } from 'react-router-dom';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { AggregateResult } from 'src/types/aggregates';\r\nimport { asCommaSeparatedString } from 'src/utils/number';\r\nimport tableStyles from '../FacilityList/FacilityList.module.css';\r\nimport { IdentifyRiskTabGroup } from '../FacilityListItemTabs/IdentifyRiskTabGroup';\r\nimport { SetTargetsTabGroup } from '../FacilityListItemTabs/SetTargetsTabGroup';\r\nimport { TakeActionTabGroup } from '../FacilityListItemTabs/TakeActionTabGroup';\r\nimport { TrackProgressTabGroup } from '../FacilityListItemTabs/TrackProgressTabGroup';\r\nimport { FacilityReportDialog } from '../FacilityReportDialog';\r\nimport { FolderAssignDialog } from '../FolderAssignDialog';\r\nimport styles from './FacilityListItem.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface FacilityListItemProps extends HTMLAttributes {\r\n aggregate: AggregateResult;\r\n}\r\n\r\nenum ViewTabs {\r\n IDENTIFY_RISK = 'identify',\r\n SET_TARGETS = 'set',\r\n TAKE_ACTION = 'take',\r\n TRACK_PROGRESS = 'track',\r\n}\r\n\r\nexport const FacilityListItem: FC = (props) => {\r\n const history = useHistory();\r\n const { aggregate, className } = props;\r\n const { reportingYear, facility, showAverageWaterStress } = aggregate;\r\n const { facilityName, regionName, cityName, countryName } = facility;\r\n const queryClient = useQueryClient();\r\n const [openModalView, setOpenModalView] = useState();\r\n\r\n const [currentOpenView, setCurrentOpenView] = useState();\r\n const [isGeneratingReport, setIsGeneratingReport] = useState(false);\r\n\r\n return (\r\n
\r\n {\r\n currentOpenView !== undefined\r\n ? setCurrentOpenView(undefined)\r\n : setCurrentOpenView(ViewTabs.IDENTIFY_RISK);\r\n }}\r\n >\r\n
\r\n
\r\n \r\n \r\n \r\n {facilityName}\r\n \r\n\r\n \r\n {`${cityName}, ${regionName}, ${countryName}`}\r\n {showAverageWaterStress ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Notice\r\n \r\n \r\n \r\n Due to gaps in local-level data, water risk metrics\r\n for this facility are derived from global averages.\r\n For more information, please refer to the{' '}\r\n \r\n Smart Water Navigator methodology\r\n \r\n .\r\n \r\n \r\n \r\n \r\n ) : null}\r\n \r\n \r\n {reportingYear}\r\n \r\n \r\n\r\n \r\n \r\n {({ onClose }) => (\r\n <>\r\n \r\n \r\n }\r\n zIndex=\"5\"\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n }\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n history.push(\r\n `/app/facilities/${facility.facilityId}`\r\n );\r\n }}\r\n >\r\n Facility Details\r\n \r\n }\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n setOpenModalView(\r\n `assignFolder:${facility.facilityId}`\r\n );\r\n }}\r\n >\r\n Assign to Folder\r\n \r\n }\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n setIsGeneratingReport(true);\r\n }}\r\n >\r\n Download Report\r\n \r\n \r\n\r\n \r\n\r\n \r\n {\r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.IDENTIFY_RISK\r\n ? ViewTabs.IDENTIFY_RISK\r\n : undefined\r\n );\r\n onClose();\r\n }}\r\n >\r\n Identify Risk\r\n \r\n {\r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.SET_TARGETS\r\n ? ViewTabs.SET_TARGETS\r\n : undefined\r\n );\r\n\r\n onClose();\r\n }}\r\n >\r\n Set Targets\r\n \r\n {\r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.TAKE_ACTION\r\n ? ViewTabs.TAKE_ACTION\r\n : undefined\r\n );\r\n\r\n onClose();\r\n }}\r\n >\r\n Take Action\r\n \r\n {\r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.TRACK_PROGRESS\r\n ? ViewTabs.TRACK_PROGRESS\r\n : undefined\r\n );\r\n\r\n onClose();\r\n }}\r\n >\r\n Track Progress\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\n Incoming Water\r\n \r\n {asCommaSeparatedString(\r\n aggregate?.incomingOutgoingWaterTotal ?? 0\r\n )}\r\n \r\n \r\n m3 per year\r\n \r\n
\r\n
\r\n
\r\n
\r\n Overall Water Stress\r\n \r\n {aggregate.overallWaterStressCategory\r\n ? `${asCommaSeparatedString(\r\n aggregate.overallWaterStressCategory,\r\n 0\r\n )}`\r\n : '0'}\r\n \r\n
\r\n
\r\n
\r\n
\r\n Water Risk Premium\r\n \r\n {aggregate.waterRiskPremium\r\n ? `${asCommaSeparatedString(aggregate.waterRiskPremium, 1)}x`\r\n : 'N/A'}\r\n \r\n
\r\n
\r\n
\r\n
\r\n Revenue at Risk\r\n \r\n {aggregate.revenueAtRiskPercentage}%\r\n \r\n
\r\n
\r\n
\r\n
\r\n Facility Rank\r\n \r\n {aggregate.facilityRank}\r\n \r\n
\r\n
\r\n
\r\n\r\n {isGeneratingReport ? (\r\n setIsGeneratingReport(false)}\r\n />\r\n ) : null}\r\n\r\n {openModalView === `assignFolder:${facility.facilityId}` ? (\r\n {\r\n setOpenModalView(undefined);\r\n queryClient.refetchQueries(['aggregates']);\r\n }}\r\n onClose={() => setOpenModalView(undefined)}\r\n facilityId={aggregate.facility.facilityId}\r\n reportingYear={aggregate.reportingYear}\r\n facilityFolderId={aggregate.folderId}\r\n />\r\n ) : null}\r\n\r\n \r\n \r\n \r\n \r\n }\r\n onClick={() =>\r\n history.push(`/app/facilities/${facility.facilityId}`)\r\n }\r\n iconSpacing=\"2px\"\r\n >\r\n Facility Details\r\n \r\n }\r\n onClick={() =>\r\n setOpenModalView(`assignFolder:${facility.facilityId}`)\r\n }\r\n iconSpacing=\"2px\"\r\n >\r\n Assign to Folder\r\n \r\n setIsGeneratingReport(true)}\r\n leftIcon={}\r\n iconSpacing=\"2px\"\r\n >\r\n Download Report\r\n \r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.IDENTIFY_RISK\r\n ? ViewTabs.IDENTIFY_RISK\r\n : undefined\r\n )\r\n }\r\n >\r\n Identify Risk\r\n
\r\n \r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.SET_TARGETS\r\n ? ViewTabs.SET_TARGETS\r\n : undefined\r\n )\r\n }\r\n >\r\n Set Targets\r\n
\r\n \r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.TAKE_ACTION\r\n ? ViewTabs.TAKE_ACTION\r\n : undefined\r\n )\r\n }\r\n >\r\n Take Action\r\n
\r\n \r\n setCurrentOpenView(\r\n currentOpenView !== ViewTabs.TRACK_PROGRESS\r\n ? ViewTabs.TRACK_PROGRESS\r\n : undefined\r\n )\r\n }\r\n >\r\n Track Progress\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n {currentOpenView === ViewTabs.IDENTIFY_RISK ? (\r\n \r\n ) : null}\r\n\r\n {currentOpenView === ViewTabs.SET_TARGETS ? (\r\n \r\n ) : null}\r\n\r\n {currentOpenView === ViewTabs.TAKE_ACTION ? (\r\n \r\n ) : null}\r\n\r\n {currentOpenView === ViewTabs.TRACK_PROGRESS ? (\r\n <>\r\n \r\n A facility's performance over time can be charted to show variation\r\n in incoming, outgoing and calculated consumptive water use over\r\n multiple years. This visualization provides a way for facility\r\n leaders to contextualize the interdependencies of production volume,\r\n revenue and water use to inform water efficiency.\r\n \r\n \r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nFacilityListItem.displayName = 'FacilityListItem';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\n\r\nimport { mdiFileUploadOutline, mdiPlusCircleOutline } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport styles from './NoFacilities.module.css';\r\nimport { Flex } from '@chakra-ui/react';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype NoFacilitiesProps = {};\r\n\r\nexport const NoFacilities: FC = () => {\r\n const { folderId } = useFilterAndSort();\r\n\r\n return (\r\n <>\r\n \r\n {folderId ? (\r\n \r\n There are no facilities assigned to this folder\r\n \r\n ) : (\r\n \r\n \r\n Welcome to the Smart Water Navigator!\r\n \r\n \r\n There aren't any facility records to display at the moment. Let's\r\n change that.\r\n
\r\n Click the Add Facility button or upload multiple facilities and\r\n begin entering information for a specific location.\r\n
\r\n
\r\n \r\n \r\n ADD NEW FACILITY\r\n \r\n \r\n \r\n Upload Multiple Facilities\r\n \r\n
\r\n\r\n \r\n Visit the{' '}\r\n \r\n Take Action\r\n {' '}\r\n page to learn more about the facility information required by the\r\n tool and the outputs the Smart Water Navigator can produce.\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nNoFacilities.displayName = 'NoFacilities';\r\n","import { mdiPlusCircleOutline } from '@mdi/js';\r\nimport { Icon } from '@mdi/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { filter } from 'src/hooks/useFilterAndSort/utils';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\nimport { FacilityListItem } from '../FacilityListItem';\r\nimport { NoFacilities } from '../NoFacilities';\r\nimport styles from './FacilityList.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport type FacilityListProps = {\r\n aggregates: AggregateResults;\r\n};\r\n\r\nexport const FacilityList: FC = ({ aggregates }) => {\r\n const filterState = useFilterAndSort();\r\n const filteredFacilities = useDeepCompareMemo(\r\n () => filter(aggregates, filterState),\r\n [aggregates, filterState]\r\n );\r\n\r\n if (!aggregates.length) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n ADD NEW FACILITY\r\n \r\n
\r\n\r\n
\r\n \r\n Incoming Water\r\n
\r\n (m3 per year)\r\n
\r\n
\r\n
\r\n \r\n WRI Overall\r\n
\r\n Water Stress Indicator\r\n
\r\n
\r\n
\r\n \r\n Water Risk\r\n
\r\n Premium\r\n
\r\n \r\n for incoming and outgoing water\r\n \r\n
\r\n
\r\n \r\n Potential Revenue
at Risk\r\n
\r\n \r\n Due to water quantity risk\r\n \r\n
\r\n
\r\n \r\n Facility
Rank\r\n
\r\n \r\n Based on water quantities, monetized risk and likelihood\r\n \r\n
\r\n
\r\n {filteredFacilities.map((aggregate) => (\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nFacilityList.displayName = 'FacilityList';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\n\r\nimport { Heading, Stack } from '@chakra-ui/react';\r\nimport { useQuery } from 'react-query';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport { getAggregates } from 'src/clients/api/v5.aggregates';\r\nimport { getFolderAggregates, getFolders } from 'src/clients/api/v5.folders';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { FacilityList } from 'src/components/FacilityList';\r\nimport { FilterAndSort } from 'src/components/FilterAndSort';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\nimport { Folders } from 'src/types/folder';\r\nimport styles from './Dashboard.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype DashboardProps = {};\r\n\r\nconst DashboardWrapper: FC<{\r\n aggregates: AggregateResults;\r\n folders: Folders;\r\n}> = ({ children, aggregates, folders }) => (\r\n \r\n \r\n Facility Dashboard\r\n \r\n
\r\n \r\n {children}\r\n
\r\n
\r\n);\r\n\r\nexport const Dashboard: FC<\r\n DashboardProps & RouteComponentProps<{ year: string }>\r\n> = () => {\r\n const { folderId } = useFilterAndSort();\r\n\r\n const { data: folderData, isLoading: isLoadingFolders } = useQuery(\r\n ['folders'],\r\n () => getFolders()\r\n );\r\n\r\n const { isLoading, isFetching, data, error, refetch } = useQuery(\r\n ['aggregates', ...(folderId ? ['folder', folderId] : [])],\r\n () => (folderId ? getFolderAggregates(folderId) : getAggregates()),\r\n {\r\n cacheTime: 0,\r\n enabled: !isLoadingFolders,\r\n }\r\n );\r\n\r\n const aggregates =\r\n data?.status === 'success' && data?.value.data ? data?.value.data : [];\r\n\r\n const folders =\r\n folderData?.status === 'success' && folderData?.value.data\r\n ? folderData?.value.data\r\n : [];\r\n\r\n if (isLoading || isFetching || isLoadingFolders) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (error || !data || data.status === 'error') {\r\n const noFacilities = data?.code === 404;\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nDashboard.displayName = 'Dashboard';\r\n","import {\r\n Button,\r\n Flex,\r\n Heading,\r\n HStack,\r\n List,\r\n ListItem,\r\n Spacer,\r\n Stack,\r\n Text,\r\n Tooltip,\r\n} from '@chakra-ui/react';\r\nimport { mdiAlertOctagon, mdiDownloadBoxOutline } from '@mdi/js';\r\nimport classnames from 'classnames/bind';\r\nimport natsort from 'natsort';\r\nimport React, { FC, useState } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport {\r\n getFacilitiesList,\r\n getFacilitiesListExport,\r\n} from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { NoFacilities } from 'src/components/NoFacilities';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { Facility } from 'src/types/v5.facility';\r\nimport styles from './Facilities.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst FILTER_OPTIONS = {\r\n facilityName: 'Name',\r\n cityName: 'City Name',\r\n regionName: 'State Name',\r\n countryName: 'Country Name',\r\n sectorName: 'Sector Name',\r\n active: 'Status',\r\n modelingOnly: 'Modeling Only',\r\n} as const;\r\n\r\ntype FacilitiesListItemProps = {\r\n facility: Facility;\r\n};\r\n\r\nconst FacilitiesListItem: FC = ({ facility }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {facility.facilityName} | {facility.cityName}, {facility.regionName}\r\n \r\n \r\n {!facility.hasWrmData ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n \r\n \r\n \r\n {facility.active ? 'ACTIVE' : 'INACTIVE'}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\ntype FacilitiesProps = {};\r\nexport const Facilities: FC = () => {\r\n const { accountId } = useAuth();\r\n const [isSubmitting, setIsSubmitting] = useState(false);\r\n const [sortState, setSortState] = useState<{\r\n key: keyof typeof FILTER_OPTIONS;\r\n dir: 'asc' | 'desc';\r\n }>({\r\n key: 'facilityName',\r\n dir: 'asc',\r\n });\r\n\r\n const { isLoading, isFetching, data, error, refetch } = useQuery(\r\n ['facilities'],\r\n () => getFacilitiesList()\r\n );\r\n\r\n const facilities =\r\n data?.status === 'success' && data?.value.data ? data?.value.data : [];\r\n\r\n const sortedFacilities = useDeepCompareMemo(() => {\r\n const sorter = natsort({ desc: sortState.dir === 'desc' });\r\n return facilities.sort((a, b) => {\r\n return sorter(\r\n `${(a[sortState.key] ?? '').toString()}`,\r\n `${(b[sortState.key] ?? '').toString()}`\r\n );\r\n });\r\n }, [facilities, sortState]);\r\n\r\n if (isLoading || isFetching) {\r\n return ;\r\n }\r\n\r\n if (error || !data || data.status === 'error') {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (!facilities.length) {\r\n return ;\r\n }\r\n\r\n const handleExport = async () => {\r\n setIsSubmitting(true);\r\n try {\r\n if (accountId) {\r\n const result = await getFacilitiesListExport();\r\n\r\n if (result.status === 'success') {\r\n window.open(result.value.data, '_self');\r\n }\r\n\r\n setIsSubmitting(false);\r\n } else {\r\n throw new Error();\r\n }\r\n } catch (e) {\r\n setIsSubmitting(false);\r\n }\r\n };\r\n const handleSortChange = (value: string) => {\r\n if (sortState.key === value) {\r\n setSortState({\r\n ...sortState,\r\n dir: sortState.dir === 'asc' ? 'desc' : 'asc',\r\n });\r\n } else {\r\n setSortState({\r\n ...sortState,\r\n key: value as keyof typeof FILTER_OPTIONS,\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n Facilities\r\n \r\n \r\n \r\n \r\n Sort by:\r\n \r\n ({\r\n value,\r\n label,\r\n }))}\r\n value={sortState.key}\r\n placeholder=\" \"\r\n onChange={handleSortChange}\r\n />\r\n \r\n \r\n \r\n }\r\n onClick={handleExport}\r\n isLoading={isSubmitting}\r\n >\r\n Export Facilities\r\n \r\n \r\n \r\n\r\n \r\n {sortedFacilities.map((f) => (\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nFacilities.displayName = 'Facilities';\r\n","import React, { FC } from 'react';\r\nimport { Redirect } from 'react-router-dom';\r\n\r\ntype EnterpriseProps = {};\r\n\r\nexport const Enterprise: FC = () => (\r\n \r\n);\r\n\r\nEnterprise.displayName = 'Enterprise';\r\n","import {\r\n AlertDialog,\r\n AlertDialogOverlay,\r\n AlertDialogContent,\r\n AlertDialogHeader,\r\n AlertDialogCloseButton,\r\n AlertDialogBody,\r\n AlertDialogFooter,\r\n Button,\r\n AlertDialogProps,\r\n} from '@chakra-ui/react';\r\nimport React, { useRef } from 'react';\r\nimport type { FC, PropsWithChildren } from 'react';\r\n\r\ntype ModalDialogProps = {\r\n isLoading?: boolean;\r\n title: string;\r\n description: string;\r\n confirmButtonText?: string;\r\n cancelButtonText?: string;\r\n onConfirm: () => void;\r\n} & Omit;\r\n\r\nexport const ModalDialog: FC> = ({\r\n title,\r\n description,\r\n confirmButtonText = 'Confirm',\r\n cancelButtonText = 'Cancel',\r\n isOpen,\r\n children,\r\n onClose,\r\n onConfirm,\r\n}) => {\r\n const cancelRef = useRef(null);\r\n\r\n if (!isOpen) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n {title}\r\n \r\n \r\n

{description}

\r\n {children}\r\n
\r\n \r\n \r\n {cancelButtonText}\r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nModalDialog.displayName = 'ModalDialog';\r\n","import {\r\n Button,\r\n ButtonGroup,\r\n IconButton,\r\n Text,\r\n useBoolean,\r\n useToast,\r\n} from '@chakra-ui/react';\r\nimport {\r\n mdiAlertCircle,\r\n mdiPencilOutline,\r\n mdiPlus,\r\n mdiSync,\r\n mdiTrashCanOutline,\r\n} from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useState } from 'react';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { useHistory } from 'react-router-dom';\r\nimport {\r\n deleteFacilityReportingYear,\r\n getFacilityReportingYears,\r\n} from 'src/clients/api/v5.facility';\r\nimport { useDeepCompareEffect } from 'src/hooks/useDeepCompare';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { BlockError } from '../BlockError';\r\nimport { LoadingSpinner } from '../LoadingSpinner';\r\nimport { ModalDialog } from '../ModalDialog/ModalDialog';\r\nimport styles from './ReportingYearsList.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ReportingYearsListProps = {\r\n facilityId: string;\r\n};\r\n\r\nexport const ReportingYearsList: FC = ({\r\n facilityId,\r\n}) => {\r\n const toast = useToast();\r\n const [isLoadingDelete, setIsLoadingDelete] = useBoolean();\r\n const [isDeleting, setIsDeleting] = useState();\r\n const queryClient = useQueryClient();\r\n const history = useHistory();\r\n\r\n const { data, error, refetch, isFetching, isLoading } = useQuery(\r\n ['facilities', facilityId, 'reportingYears'],\r\n () => getFacilityReportingYears(facilityId),\r\n { cacheTime: 0 }\r\n );\r\n\r\n useDeepCompareEffect(() => {\r\n if (!isFetching && data?.status === 'success') {\r\n const hasProcessing = data.value.data.some(\r\n (reportingYear) => !reportingYear.processed\r\n );\r\n\r\n if (hasProcessing) {\r\n window.setTimeout(refetch, 10_000);\r\n }\r\n }\r\n }, [data, refetch, isFetching]);\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n if (error || (data && data.status === 'error' && data.code !== 404)) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const reportingYears =\r\n data && data.status === 'success'\r\n ? data.value.data.sort((a, b) => b.reportingYear - a.reportingYear)\r\n : ([] as Array);\r\n\r\n const handleDelete = (reportingYearId: string | number) => {\r\n setIsLoadingDelete.on();\r\n\r\n deleteFacilityReportingYear(facilityId, reportingYearId)\r\n .then((result) => {\r\n if (result.status === 'error') {\r\n throw new Error();\r\n }\r\n\r\n queryClient.invalidateQueries(['aggregates']);\r\n queryClient.invalidateQueries(['facilities']);\r\n\r\n toast({\r\n title: 'Reporting year deleted successfully!',\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n history.push(`/app/facilities/${facilityId}`);\r\n })\r\n .catch(() => {\r\n setIsLoadingDelete.off();\r\n\r\n toast({\r\n title: 'There was an error.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n })\r\n .finally(() => {\r\n setIsLoadingDelete.off();\r\n setIsDeleting(undefined);\r\n });\r\n };\r\n\r\n return (\r\n <>\r\n setIsDeleting(undefined)}\r\n onConfirm={() => handleDelete(isDeleting!)}\r\n isOpen={!!isDeleting}\r\n title={'Are you sure you want to delete the reporting year?'}\r\n description={\r\n 'This action cannot be undone and all data associated with this reporting year will be permanently deleted.'\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\n {!reportingYears.length ? (\r\n \r\n \r\n \r\n ) : (\r\n reportingYears.map((year) => (\r\n \r\n \r\n \r\n \r\n ))\r\n )}\r\n \r\n
Reporting Years\r\n \r\n \r\n history.push(\r\n `/app/facilities/${facilityId}/reporting-years/new`\r\n )\r\n }\r\n leftIcon={}\r\n aria-label=\"Edit Reporing Year\"\r\n colorScheme=\"blue\"\r\n size={'sm'}\r\n >\r\n Add Reporting Year\r\n \r\n \r\n
No reporting years available
{year.reportingYear}\r\n
\r\n {year.error ? (\r\n <>\r\n {' '}\r\n Error\r\n \r\n ) : null}\r\n\r\n {!year.processed ? (\r\n <>\r\n {' '}\r\n \r\n Processing\r\n \r\n \r\n ) : null}\r\n\r\n \r\n {year.processed ? (\r\n \r\n history.push(\r\n `/app/facilities/${year.facilityId}/reporting-years/${year.facilityReportingYearId}`\r\n )\r\n }\r\n aria-label=\"Edit Reporing Year\"\r\n icon={\r\n \r\n }\r\n />\r\n ) : null}\r\n\r\n \r\n setIsDeleting(year.facilityReportingYearId)\r\n }\r\n isLoading={isLoadingDelete}\r\n aria-label=\"Delete Reporing Year\"\r\n icon={}\r\n colorScheme=\"red\"\r\n />\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nReportingYearsList.displayName = 'ReportingYearsList';\r\n","import {\r\n Box,\r\n Button,\r\n ButtonGroup,\r\n IconButton,\r\n useBoolean,\r\n useToast,\r\n} from '@chakra-ui/react';\r\nimport {\r\n mdiChevronDoubleLeft,\r\n mdiLabelOutline,\r\n mdiMapMarkerOutline,\r\n mdiPencilOutline,\r\n mdiTrashCanOutline,\r\n} from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { Link, RouteComponentProps } from 'react-router-dom';\r\nimport { deleteFacility, getFacility } from 'src/clients/api/v5.facility';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { ModalDialog } from 'src/components/ModalDialog';\r\nimport { ReportingYearsList } from 'src/components/ReportingYearsList';\r\nimport styles from './Facility.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype FacilityProps = {};\r\n\r\nexport const Facility: FC<\r\n FacilityProps &\r\n RouteComponentProps<\r\n { id: string },\r\n {},\r\n {\r\n referrer?: {\r\n pathname: string;\r\n title: string;\r\n };\r\n }\r\n >\r\n> = ({ match, history, location }) => {\r\n const toast = useToast();\r\n const [isDeleting, setIsDeleting] = useBoolean();\r\n const queryClient = useQueryClient();\r\n const { id } = match.params;\r\n\r\n const { data, isLoading, refetch, isFetching } = useQuery(\r\n ['facilities', id],\r\n () => getFacility(id)\r\n );\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n if (data && data.status === 'error') {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (data && data.status === 'success') {\r\n const facility = data.value.data;\r\n\r\n const handleDelete = () => {\r\n setIsDeleting.on();\r\n\r\n deleteFacility(id)\r\n .then((result) => {\r\n if (result.status === 'error') {\r\n throw new Error();\r\n }\r\n\r\n toast({\r\n title: `Facility deleted successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n queryClient.refetchQueries(['aggregates']);\r\n queryClient.refetchQueries(['facilities']);\r\n\r\n history.push(`/app/facilities`);\r\n })\r\n .catch((e) => {\r\n setIsDeleting.off();\r\n\r\n toast({\r\n title: e.message ?? 'There was an error deleting your facility.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n });\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {' '}\r\n {`Back to ${\r\n location.state?.referrer\r\n ? location.state.referrer.title\r\n : 'Dashboard'\r\n }`}\r\n \r\n \r\n

{facility.facilityName}

\r\n
\r\n \r\n \r\n {facility.cityName}, {facility.regionName},{' '}\r\n {facility.countryName}\r\n \r\n
\r\n {facility.facilityLabel ? (\r\n
\r\n \r\n {facility.facilityLabel}\r\n
\r\n ) : null}\r\n
\r\n
\r\n
\r\n
\r\n \r\n history.push(`/app/facilities/${id}/edit`)}\r\n icon={}\r\n aria-label=\"Edit Facility\"\r\n />\r\n\r\n }\r\n aria-label=\"Delete Facility\"\r\n colorScheme={'red'}\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\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nFacility.displayName = 'Facility';\r\n","import { WrappedResponse } from '../types';\r\nimport * as request from '../request';\r\nimport { Classifications as ClassificationsType } from '../../types/classification';\r\nimport { Env } from '../../constants/env';\r\n\r\nexport type ClassificationsResponseType = WrappedResponse;\r\n\r\nexport function getClassifications(level: string = '1', parent: string = '0') {\r\n return request.get(\r\n `${Env.apiUrl}/v5/reference-data/sectors/levels/${level}/parents/${parent}`\r\n );\r\n}\r\n","import { WrappedResponse } from '../types';\r\nimport * as request from '../request';\r\nimport { Countries as CountriesType } from '../../types/country';\r\nimport { Regions as RegionsType } from '../../types/region';\r\nimport { Cities as CitiesType } from '../../types/city';\r\nimport { Env } from '../../constants/env';\r\n\r\nexport type CountriesResponseType = WrappedResponse;\r\n\r\nexport function getCountries() {\r\n return request.get(\r\n `${Env.apiUrl}/v5/reference-data/countries`\r\n );\r\n}\r\n\r\nexport type RegionsResponseType = WrappedResponse;\r\n\r\nexport function getRegions(countryId: number | string) {\r\n return request.get(\r\n `${Env.apiUrl}/v5/reference-data/countries/${countryId}/regions`\r\n );\r\n}\r\n\r\nexport type CitiesResponseType = WrappedResponse;\r\n\r\nexport function getCities(\r\n countryId: number | string,\r\n regionId: number | string\r\n) {\r\n return request.get(\r\n `${Env.apiUrl}/v5/reference-data/countries/${countryId}/regions/${regionId}/cities`\r\n );\r\n}\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from '../../Tabs/Tabs.module.css';\r\nimport { Button } from 'src/components/Button';\r\nimport { useAsyncFormState } from 'src/hooks/useAsyncFormState';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface FacilityTabFooterProps {\r\n canNext?: boolean;\r\n canBack?: boolean;\r\n nextButtonText?: string;\r\n backButtonText?: string;\r\n onNext: (values?: any) => void;\r\n onBack?: () => void;\r\n onCancel: () => void;\r\n onDelete?: () => void;\r\n isSaving?: boolean;\r\n}\r\n\r\nexport const FacilityTabFooter: FC = ({\r\n onNext,\r\n onBack,\r\n onCancel,\r\n onDelete,\r\n backButtonText = 'previous',\r\n nextButtonText = 'save',\r\n canNext = true,\r\n canBack = false,\r\n isSaving = false,\r\n}) => {\r\n const { saveState } = useAsyncFormState();\r\n\r\n return (\r\n
\r\n
\r\n \r\n cancel\r\n \r\n {onDelete ? (\r\n \r\n delete\r\n \r\n ) : null}\r\n
\r\n
\r\n {onBack ? (\r\n \r\n {backButtonText}\r\n \r\n ) : null}\r\n  \r\n \r\n {nextButtonText}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nFacilityTabFooter.displayName = 'FacilityTabFooter';\r\n","import { Env } from './env';\r\n\r\nconst startingYear = 2010;\r\nconst endingYear = Env.maxReportingYear;\r\n\r\n// Used to automatically add \"current year\" to the available years if the\r\n// current month is greater than October, then the current year is added.\r\n// new Date().getUTCFullYear() - (new Date().getUTCMonth() < 10 ? 1 : 0);\r\n\r\nexport const REPORTING_YEARS = Array(endingYear - startingYear + 1)\r\n .fill(null)\r\n .map((_v, k) => startingYear + k)\r\n .reverse();\r\n","export enum UploadFlowError {\r\n Assessment = 'assessment',\r\n General = 'general',\r\n}\r\n\r\nexport type UploadErrorRowType = {\r\n field: string;\r\n message: string;\r\n};\r\n","import { REPORTING_YEARS } from 'src/constants/years';\r\nimport * as yup from 'yup';\r\n\r\nconst transformEmptyString = (v: any) => {\r\n if ([v === null, v === '', v === undefined, Number.isNaN(v)].some(Boolean)) {\r\n return undefined;\r\n }\r\n\r\n return v;\r\n};\r\nconst optionalOneOf = (v: any, options: Array) =>\r\n !v || v === '' ? true : options.includes(v);\r\n\r\nexport const facilityInformationSchemaProperties = {\r\n facilityName: yup.string().trim().required('Required'),\r\n countryId: yup.number().transform(transformEmptyString).required('Required'),\r\n regionId: yup.number().transform(transformEmptyString).required('Required'),\r\n cityId: yup.number().transform(transformEmptyString).required('Required'),\r\n sector1Id: yup.number().transform(transformEmptyString).required('Required'),\r\n sector2Id: yup.number().transform(transformEmptyString).required('Required'),\r\n sector3Id: yup.number().transform(transformEmptyString).required('Required'),\r\n facilityLabel: yup.string().trim(),\r\n active: yup.bool().required('Required'),\r\n modelingOnly: yup.bool().required('Required'),\r\n};\r\nexport const facilityInformationSchema = yup.object(\r\n facilityInformationSchemaProperties\r\n);\r\nexport type FacilityInformationSchemaForm = yup.InferType<\r\n typeof facilityInformationSchema\r\n>;\r\n\r\nconst options = {\r\n timePeriodOptions: ['Weekly', 'Monthly', 'Quarterly', 'Annual'],\r\n locationOfWaterSourceOptions: ['1', '2', '3', '4', '5'],\r\n locationOfWaterTreatmentOptions: ['A', 'B', 'C'],\r\n revenueLostOptions: ['A', 'B', 'C'],\r\n regulationOfWaterInLocalCommunityQuestionOptions: [\r\n 'A',\r\n 'B',\r\n 'C',\r\n 'D',\r\n 'E',\r\n 'F',\r\n ],\r\n facilityEnvironmentalReputationQuestionOptions: ['A', 'B', 'C', 'D'],\r\n dependingSameWaterSourceQuestionOptions: ['A', 'B', 'C', 'D'],\r\n waterRestrictionQuestionOptions: ['A', 'B', 'C'],\r\n incomingWaterQualityComparisonOptions: ['A', 'B', 'C'],\r\n alternativeWaterSourceQuestionOptions: ['A', 'B', 'C', 'D'],\r\n thirdPartyCapacityOptions: ['A', 'B', 'C'],\r\n waterUnits: [9, 16, 32],\r\n currencies: [\r\n 'BRL',\r\n 'CAD',\r\n 'CHF',\r\n 'CNY',\r\n 'EUR',\r\n 'GBP',\r\n 'INR',\r\n 'JPY',\r\n 'RUB',\r\n 'USD',\r\n ],\r\n};\r\n\r\nconst facilityDetailsSchemaProperties = {\r\n reportingYear: yup\r\n .string()\r\n .trim()\r\n .oneOf(\r\n REPORTING_YEARS.map((y) => `${y}`),\r\n 'Invalid year'\r\n )\r\n .required('Required'),\r\n incomingWaterTimePeriod: yup\r\n .string()\r\n .trim()\r\n .oneOf(options.timePeriodOptions, 'Invalid period')\r\n .required('Required'),\r\n incomingWaterQuantity: yup\r\n .number()\r\n .positive()\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n incomingWaterQuantityUnit: yup\r\n .number()\r\n .oneOf(options.waterUnits, 'Invalid unit')\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n incomingWaterPrice: yup\r\n .number()\r\n .positive()\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n incomingWaterPriceCurrencyCode: yup\r\n .string()\r\n .oneOf(options.currencies, 'Invalid currency')\r\n .required('Required'),\r\n incomingWaterPriceUnit: yup\r\n .number()\r\n .oneOf(options.waterUnits, 'Invalid unit')\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n incomingWaterSource: yup\r\n .string()\r\n .trim()\r\n .oneOf(options.locationOfWaterSourceOptions, 'Invalid location')\r\n .required('Required'),\r\n waterWithdrawalReplenishment: yup.bool().required('Required'),\r\n waterWithdrawalAnnualizedVolumetricBenefit: yup\r\n .number()\r\n .when('waterWithdrawalReplenishment', {\r\n is: true,\r\n then: yup.number().typeError('Invalid number').required('Required'),\r\n otherwise: yup.number(),\r\n }),\r\n waterWithdrawalAnnualizedVolumetricBenefitUOMId: yup\r\n .number()\r\n .oneOf(options.waterUnits, 'Invalid unit')\r\n .transform(transformEmptyString)\r\n .when('waterWithdrawalReplenishment', {\r\n is: true,\r\n then: yup.number().typeError('Invalid number').required('Required'),\r\n otherwise: yup.number(),\r\n }),\r\n waterWithdrawalSupportingReplenishmentWaterFund: yup\r\n .string()\r\n .trim()\r\n .when('waterWithdrawalReplenishment', {\r\n is: true,\r\n then: yup.string().typeError('Invalid value').required('Required'),\r\n otherwise: yup.string(),\r\n }),\r\n waterWithdrawalReplenishmentDurationInYears: yup\r\n .number()\r\n .when('waterWithdrawalReplenishment', {\r\n is: true,\r\n then: yup.number().typeError('Invalid number').required('Required'),\r\n otherwise: yup.number(),\r\n }),\r\n waterWithdrawalThirdPartyVerified: yup\r\n .bool()\r\n .when('waterWithdrawalReplenishment', {\r\n is: true,\r\n then: yup.bool().required('Required'),\r\n otherwise: yup.bool(),\r\n }),\r\n waterWithdrawalThirdPartyVerifier: yup\r\n .string()\r\n .trim()\r\n .when('waterWithdrawalThirdPartyVerified', {\r\n is: true,\r\n then: yup.string().required('Required'),\r\n otherwise: yup.string(),\r\n }),\r\n outgoingWaterTimePeriod: yup\r\n .string()\r\n .trim()\r\n .oneOf(options.timePeriodOptions, 'Invalid period')\r\n .required('Required'),\r\n outgoingWaterQuantity: yup\r\n .number()\r\n .positive()\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n outgoingWaterQuantityUnit: yup\r\n .number()\r\n .oneOf(options.waterUnits, 'Invalid unit')\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n outgoingWaterPrice: yup\r\n .number()\r\n .positive()\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n outgoingWaterPriceCurrencyCode: yup\r\n .string()\r\n .oneOf(options.currencies, 'Invalid currency')\r\n .required('Required'),\r\n outgoingWaterPriceUnit: yup\r\n .number()\r\n .oneOf(options.waterUnits, 'Invalid unit')\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n outgoingWaterTreatmentSource: yup\r\n .string()\r\n .oneOf(options.locationOfWaterTreatmentOptions, 'Invalid location')\r\n .required('Required'),\r\n facilityOutput: yup\r\n .number()\r\n .positive()\r\n .transform(transformEmptyString)\r\n .typeError('Required')\r\n .required('Required'),\r\n facilityOutputUnitsOfMeasure: yup.string().required('Required'),\r\n projectedFacilityOutputIncrease: yup\r\n .number()\r\n .moreThan(-101, 'Must be greater than -101')\r\n .transform(transformEmptyString)\r\n .required('Required'),\r\n};\r\nexport const facilityDetailsSchema = yup.object(\r\n facilityDetailsSchemaProperties\r\n);\r\nexport type FacilityDetailSchemaForm = yup.InferType<\r\n typeof facilityDetailsSchema\r\n>;\r\n\r\nconst businessInformationSchemaProperties = {\r\n droughScenario: yup.bool(),\r\n projectedIncomingWaterPriceIncrease: yup.lazy((value) => {\r\n if (value !== undefined) {\r\n return yup\r\n .number()\r\n .typeError('Must be a number')\r\n .transform(transformEmptyString)\r\n .moreThan(-101, 'Must be greater than -101')\r\n .required();\r\n }\r\n return yup.mixed().notRequired();\r\n }),\r\n projectedIncomingWaterQuantityIncrease: yup.lazy((value) => {\r\n if (value !== undefined) {\r\n return yup\r\n .number()\r\n .typeError('Must be a number')\r\n .transform(transformEmptyString)\r\n .moreThan(-101, 'Must be greater than -101')\r\n .required();\r\n }\r\n return yup.mixed().notRequired();\r\n }),\r\n projectedOutgoingWaterPriceIncrease: yup.lazy((value) => {\r\n if (value !== undefined) {\r\n return yup\r\n .number()\r\n .typeError('Must be a number')\r\n .transform(transformEmptyString)\r\n .moreThan(-101, 'Must be greater than -101')\r\n .required();\r\n }\r\n return yup.mixed().notRequired();\r\n }),\r\n projectedOutgoingWaterQuantityIncrease: yup.lazy((value) => {\r\n if (value !== undefined) {\r\n return yup\r\n .number()\r\n .typeError('Must be a number')\r\n .transform(transformEmptyString)\r\n .moreThan(-101, 'Must be greater than -101')\r\n .required();\r\n }\r\n return yup.mixed().notRequired();\r\n }),\r\n revenue: yup.lazy((value) => {\r\n if (value !== undefined) {\r\n return yup\r\n .number()\r\n .typeError('Must be a number')\r\n .transform(transformEmptyString)\r\n .moreThan(-101, 'Must be greater than -101')\r\n .required();\r\n }\r\n return yup.mixed().notRequired();\r\n }),\r\n revenueCurrencyCode: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.currencies)\r\n ),\r\n projectedRevenueIncrease: yup.lazy((value) => {\r\n if (value !== undefined) {\r\n return yup\r\n .number()\r\n .typeError('Must be a number')\r\n .transform(transformEmptyString)\r\n .moreThan(-101, 'Must be greater than -101')\r\n .required();\r\n }\r\n return yup.mixed().notRequired();\r\n }),\r\n revenueLostDueToWaterScarcity: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.revenueLostOptions)\r\n ),\r\n};\r\nexport const businessInformationSchema = yup.object(\r\n businessInformationSchemaProperties\r\n);\r\nexport type BusinessInformationSchemaForm = yup.InferType<\r\n typeof businessInformationSchema\r\n>;\r\n\r\nconst regulationReputationSchemaProperties = {\r\n regulationOfWaterInLocalCommunityQuestion: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.regulationOfWaterInLocalCommunityQuestionOptions)\r\n ),\r\n facilityEnvironmentalReputationQuestion: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.facilityEnvironmentalReputationQuestionOptions)\r\n ),\r\n dependingSameWaterSourceQuestion: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.dependingSameWaterSourceQuestionOptions)\r\n ),\r\n exemptWaterRestrictionQuestion: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.waterRestrictionQuestionOptions)\r\n ),\r\n ngoLocalPressureQuestion: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.waterRestrictionQuestionOptions)\r\n ),\r\n};\r\nexport const regulationReputationSchema = yup.object(\r\n regulationReputationSchemaProperties\r\n);\r\nexport type RegulationReputationSchemaForm = yup.InferType<\r\n typeof regulationReputationSchema\r\n>;\r\n\r\nconst waterQualitySchemaProperties = {\r\n incomingWaterQualityComparison: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.incomingWaterQualityComparisonOptions)\r\n ),\r\n alternativeWaterSourceQuestion: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.alternativeWaterSourceQuestionOptions)\r\n ),\r\n outgoingWaterOnsiteTreatmentCapacity: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.thirdPartyCapacityOptions)\r\n ),\r\n outgoingWaterOffsiteTreatmentCapacity: yup\r\n .string()\r\n .trim()\r\n .test('optional-one-of', 'Invalid selection', (v) =>\r\n optionalOneOf(v, options.thirdPartyCapacityOptions)\r\n ),\r\n incomingWaterImpairmentSalinity: yup.bool(),\r\n incomingWaterImpairmentOrganics: yup.bool(),\r\n incomingWaterImpairmentSuspendedSolids: yup.bool(),\r\n incomingWaterImpairmentTaste: yup.bool(),\r\n incomingWaterImpairmentOdor: yup.bool(),\r\n};\r\nexport const waterQualitySchema = yup.object(waterQualitySchemaProperties);\r\nexport type WaterQualitySchemaForm = yup.InferType;\r\n\r\nexport const pollutantsSchemaProperties = {\r\n ownOutgoingWaterStandards: yup.bool(),\r\n pollutants: yup.array().of(\r\n yup.object().shape({\r\n threshold: yup.number().transform(transformEmptyString),\r\n concentration: yup.number().transform(transformEmptyString),\r\n })\r\n ),\r\n facilityDilutionFactor: yup\r\n .number()\r\n .min(0, 'Must be greater than or equal to 0')\r\n .max(1, 'Must be less than or equal to 1')\r\n .transform(transformEmptyString),\r\n};\r\nexport const pollutantsSchema = yup.object(pollutantsSchemaProperties);\r\nexport type PollutantsSchemaForm = yup.InferType;\r\n\r\nconst waterActionAssessmentAnswersSchemaProperties = {\r\n assessment: yup\r\n .object()\r\n .shape({\r\n questionnaireId: yup.string(),\r\n reportingyearId: yup.string().nullable(true),\r\n assessmentAnswers: yup.object(),\r\n })\r\n .nullable(true),\r\n};\r\nexport const waterActionAssessmentAnswersSchema = yup.object(\r\n waterActionAssessmentAnswersSchemaProperties\r\n);\r\nexport type WaterActionAssessmentAnswersSchemaForm = yup.InferType<\r\n typeof waterActionAssessmentAnswersSchema\r\n>;\r\n\r\nexport const facilityFormSchema = yup.object({\r\n ...facilityDetailsSchemaProperties,\r\n ...businessInformationSchemaProperties,\r\n ...regulationReputationSchemaProperties,\r\n ...waterQualitySchemaProperties,\r\n ...pollutantsSchemaProperties,\r\n ...waterActionAssessmentAnswersSchemaProperties,\r\n});\r\n\r\nexport type FacilityFormSchema = yup.InferType;\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport { UseFormHelpProps } from 'src/hooks/useFormHelp';\r\nimport Icon from '@mdi/react';\r\nimport { mdiWindowClose } from '@mdi/js';\r\n\r\nimport styles from './FormHelp.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport const FormHelpButton: FC<{\r\n name: string;\r\n formHelp: UseFormHelpProps;\r\n}> = ({ name, formHelp }) => {\r\n return (\r\n formHelp.setHelpKey(name)}\r\n >\r\n ?\r\n \r\n );\r\n};\r\n\r\nexport const FormHelpText: FC<{\r\n name: string;\r\n formHelp: UseFormHelpProps;\r\n}> = ({ name, formHelp, children }) => {\r\n return formHelp.helpKey === name ? (\r\n
\r\n formHelp.setHelpKey('')}>\r\n \r\n \r\n {children}\r\n
\r\n ) : null;\r\n};\r\n\r\nexport const FormHelpTooltip: FC<{ text: string }> = ({ text }) => {\r\n return (\r\n
\r\n
?
\r\n
\r\n {text}\r\n \r\n
\r\n
\r\n );\r\n};\r\n","import { useState } from 'react';\r\n\r\nexport type UseFormHelpProps = {\r\n helpKey: string;\r\n setHelpKey: (newKey: string) => void;\r\n};\r\n\r\nexport function useFormHelp(): UseFormHelpProps {\r\n const [key, setKey] = useState('');\r\n\r\n const setActiveKey = (newKey: string) => setKey(key !== newKey ? newKey : '');\r\n\r\n return { helpKey: key, setHelpKey: setActiveKey };\r\n}\r\n","import { ParsedUploadRowResults } from 'src/types/upload';\r\nimport { Facility } from 'src/types/v5.facility';\r\n\r\nexport function mapDefaultFacilityFormValues(\r\n seed?: Partial\r\n): Partial {\r\n const mapped = {\r\n active: true,\r\n cityId: undefined,\r\n countryId: undefined,\r\n facilityName: '',\r\n modelingOnly: false,\r\n regionId: undefined,\r\n sector3Id: undefined,\r\n facilityLabel: '',\r\n\r\n ...(seed\r\n ? {\r\n active: seed.active?.toLocaleLowerCase() === 'yes',\r\n cityId: seed.cityId ? Number(seed.cityId) : undefined,\r\n countryId: seed.countryId ? Number(seed.countryId) : undefined,\r\n facilityName: seed.facilityName ? seed.facilityName : undefined,\r\n modelingOnly: seed.modelingOnly?.toLocaleLowerCase() === 'yes',\r\n regionId: seed.regionId ? Number(seed.regionId) : undefined,\r\n sector1Id: seed.sector1Id ? Number(seed.sector1Id) : undefined,\r\n sector2Id: seed.sector2Id ? Number(seed.sector2Id) : undefined,\r\n sector3Id: seed.sector3Id ? Number(seed.sector3Id) : undefined,\r\n facilityLabel: seed.facilityLabel ? seed.facilityLabel : undefined,\r\n }\r\n : {}),\r\n };\r\n\r\n return mapped;\r\n}\r\n","import {\r\n Alert,\r\n AlertDescription,\r\n AlertIcon,\r\n AlertTitle,\r\n Box,\r\n Stack,\r\n} from '@chakra-ui/react';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useEffect, useMemo, useState } from 'react';\r\nimport { Controller, useForm } from 'react-hook-form';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { RouteComponentProps, useLocation } from 'react-router-dom';\r\nimport { getClassifications } from 'src/clients/api/classification';\r\nimport { getCities, getCountries, getRegions } from 'src/clients/api/country';\r\nimport { createWrmFacility } from 'src/clients/api/v5.facility';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { FacilityTabFooter } from 'src/components/FacilityForm/Helpers/FacilityTabFooter';\r\nimport {\r\n facilityInformationSchema,\r\n FacilityInformationSchemaForm,\r\n} from 'src/components/FacilityForm/validation';\r\nimport { FormHelpButton, FormHelpText } from 'src/components/FormHelp';\r\nimport { ModalDialog } from 'src/components/ModalDialog';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { UploadFlowError } from 'src/constants/errors';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\nimport {\r\n ParsedUploadRowErrors,\r\n ParsedUploadRowResults,\r\n} from 'src/types/upload';\r\nimport styles from './FacilityCreate.module.css';\r\nimport { mapDefaultFacilityFormValues } from './helpers';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype FacilityCreateProps = {};\r\n\r\nexport const FacilityCreate: FC<\r\n FacilityCreateProps & RouteComponentProps<{ id: string }, {}>\r\n> = ({ history }) => {\r\n const queryClient = useQueryClient();\r\n const [asyncState, setAsyncState] = useAsyncState();\r\n const [isCancelling, setIsCancelling] = useState(false);\r\n const { state } = useLocation<\r\n | {\r\n uploadResults: {\r\n rowResults: ParsedUploadRowResults;\r\n rowErrors: ParsedUploadRowErrors;\r\n rowId: string;\r\n errorType: UploadFlowError;\r\n };\r\n }\r\n | undefined\r\n >();\r\n const uploadResults = state?.uploadResults;\r\n\r\n const isUploadResolutionFlow = useMemo(() => !!uploadResults, [\r\n uploadResults,\r\n ]);\r\n\r\n const formHelp = useFormHelp();\r\n\r\n const {\r\n control,\r\n formState: { errors, isValid, isDirty },\r\n watch,\r\n register,\r\n handleSubmit,\r\n trigger,\r\n } = useForm({\r\n defaultValues: mapDefaultFacilityFormValues(uploadResults?.rowResults),\r\n resolver: yupResolver(facilityInformationSchema),\r\n mode: 'onChange',\r\n });\r\n\r\n const {\r\n data: countriesData,\r\n isLoading: isLoadingCountries,\r\n status: countriesDataStatus,\r\n } = useQuery(['countries'], () => getCountries());\r\n\r\n const countries =\r\n (countriesData?.status === 'success' && countriesData.value.data) || [];\r\n\r\n const countryId = watch('countryId');\r\n const {\r\n data: regionData,\r\n isLoading: isLoadingRegions,\r\n status: regionsDataStatus,\r\n } = useQuery(['regions', countryId], () => getRegions(countryId), {\r\n enabled: !!countryId,\r\n });\r\n\r\n const regions =\r\n (regionData?.status === 'success' && regionData.value.data) || [];\r\n\r\n const regionId = watch('regionId');\r\n const {\r\n data: cityData,\r\n isLoading: isLoadingCities,\r\n status: citiesDataStatus,\r\n } = useQuery(['citys', regionId], () => getCities(countryId, regionId), {\r\n enabled: !!(countryId && regionId),\r\n });\r\n\r\n const citys = (cityData?.status === 'success' && cityData.value.data) || [];\r\n\r\n const {\r\n data: sectorsLevelOneData,\r\n isLoading: isLoadingClassificationsLevelOne,\r\n status: sectorsLevelOneDataStatus,\r\n } = useQuery(['sectors', 'levelOne'], () => getClassifications());\r\n\r\n const sectorsLevelOne =\r\n (sectorsLevelOneData?.status === 'success' &&\r\n sectorsLevelOneData.value.data) ||\r\n [];\r\n\r\n const sector1Id = watch('sector1Id');\r\n const {\r\n data: sectorsLevelTwoData,\r\n isLoading: isLoadingClassificationsLevelTwo,\r\n status: sectorsLevelTwoDataStatus,\r\n } = useQuery(\r\n ['sectors', 'levelTwo', sector1Id],\r\n () => getClassifications('2', `${sector1Id}`),\r\n {\r\n enabled: !!sector1Id,\r\n }\r\n );\r\n\r\n const sectorsLevelTwo =\r\n (sectorsLevelTwoData?.status === 'success' &&\r\n sectorsLevelTwoData.value.data) ||\r\n [];\r\n\r\n const sector2Id = watch('sector2Id');\r\n const {\r\n data: sectorsLevelThreeData,\r\n isLoading: isLoadingClassificationsLevelThree,\r\n status: sectorsLevelThreeDataStatus,\r\n } = useQuery(\r\n ['sectors', 'levelThree', sector2Id],\r\n () => getClassifications('3', `${sector2Id}`),\r\n {\r\n enabled: !!sector2Id,\r\n }\r\n );\r\n\r\n const sectorsLevelThree =\r\n (sectorsLevelThreeData?.status === 'success' &&\r\n sectorsLevelThreeData.value.data) ||\r\n [];\r\n\r\n useEffect(() => {\r\n if (!isUploadResolutionFlow) {\r\n return;\r\n }\r\n\r\n trigger();\r\n }, [\r\n isUploadResolutionFlow,\r\n citiesDataStatus,\r\n countriesDataStatus,\r\n regionsDataStatus,\r\n sectorsLevelOneDataStatus,\r\n sectorsLevelTwoDataStatus,\r\n sectorsLevelThreeDataStatus,\r\n trigger,\r\n ]);\r\n\r\n const onSave = handleSubmit(async (values) => {\r\n try {\r\n setAsyncState({ status: 'loading' });\r\n\r\n const payload = {\r\n ...values,\r\n };\r\n\r\n const result = await createWrmFacility({\r\n accountId: localStorage.getItem('__ECOLAB_WAP_ACCOUNT__') ?? '',\r\n ...payload,\r\n });\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setAsyncState({\r\n status: 'success',\r\n message: 'Facility created successfully!',\r\n });\r\n\r\n const id = result.value.data.facilityId;\r\n\r\n queryClient.invalidateQueries(['facilities', id]);\r\n queryClient.invalidateQueries(['aggregates']);\r\n\r\n // Clear the history state so that the user can't go back to the upload resolution\r\n window.history.replaceState({}, document.title);\r\n\r\n if (isUploadResolutionFlow) {\r\n queryClient.invalidateQueries(['activeUploads']);\r\n history.push(\r\n `/app/facilities/${id}/reporting-years/new${\r\n uploadResults?.errorType === UploadFlowError.Assessment\r\n ? '?tab=water-action-assessment'\r\n : ''\r\n }`,\r\n {\r\n uploadResults,\r\n }\r\n );\r\n } else {\r\n history.push(`/app/facilities/${id}`);\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n setAsyncState({\r\n status: 'error',\r\n message:\r\n e.message ?? 'There was an error submitting your facility data.',\r\n });\r\n }\r\n });\r\n\r\n const onCancel = () => {\r\n if (isDirty) {\r\n setIsCancelling(true);\r\n } else {\r\n history.go(-1);\r\n }\r\n };\r\n\r\n const hasFormError =\r\n asyncState.status === 'error' || (isUploadResolutionFlow && !isValid);\r\n\r\n return (\r\n <>\r\n
\r\n Create Facility\r\n\r\n \r\n Your privacy is important to us. Precautions are in place to protect\r\n your information against any misuse. Please refer to the{' '}\r\n PRIVACY NOTICE for\r\n additional details.\r\n \r\n
\r\n
\r\n
\r\n {hasFormError ? (\r\n \r\n {asyncState.status === 'error' ? (\r\n \r\n \r\n \r\n Form could not be submitted\r\n {asyncState.message}\r\n \r\n \r\n ) : null}\r\n {isUploadResolutionFlow && !isValid ? (\r\n \r\n \r\n \r\n You have upload conflicts\r\n \r\n Your upload data was not able to be mapped successfully.\r\n Please resolve the conflicts below before continuing.\r\n \r\n \r\n \r\n ) : null}\r\n \r\n ) : null}\r\n\r\n
\r\n
\r\n
\r\n Facility Name\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Country\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: localName,\r\n value: `${id}`,\r\n }))}\r\n placeholder=\" \"\r\n error={errors.countryId}\r\n disabled={countriesData?.status !== 'success'}\r\n loading={isLoadingCountries}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n State/Province\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: localName,\r\n value: `${id}`,\r\n }))}\r\n placeholder=\" \"\r\n className={cx('inputField')}\r\n disabled={regionData?.status !== 'success'}\r\n loading={isLoadingRegions}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n City\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: localName,\r\n value: `${id}`,\r\n }))}\r\n className={cx('inputField')}\r\n disabled={cityData?.status !== 'success'}\r\n loading={isLoadingCities}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Industry Classification\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label,\r\n value: `${fkSector}`,\r\n })\r\n )}\r\n className={cx('inputField')}\r\n disabled={sectorsLevelOneData?.status !== 'success'}\r\n loading={isLoadingClassificationsLevelOne}\r\n onChange={(val) => props.onChange(val)}\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\n label,\r\n value: `${fkSector}`,\r\n })\r\n )}\r\n className={cx('inputField')}\r\n disabled={sectorsLevelTwoData?.status !== 'success'}\r\n loading={isLoadingClassificationsLevelTwo}\r\n onChange={(val) => props.onChange(val)}\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\n label,\r\n value: `${fkSector}`,\r\n })\r\n )}\r\n className={cx('inputField')}\r\n disabled={sectorsLevelThreeData?.status !== 'success'}\r\n loading={isLoadingClassificationsLevelThree}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Active\r\n \r\n
\r\n
\r\n
\r\n (\r\n \r\n )}\r\n >\r\n
\r\n \r\n Indicates whether a facility is active or inactive. This field\r\n is helpful if facilities are closed at certain times or\r\n permanently.\r\n \r\n
\r\n
\r\n
\r\n
\r\n Modeling Only\r\n \r\n
\r\n
\r\n
\r\n (\r\n \r\n )}\r\n >\r\n
\r\n \r\n Indicates if a facility is to be used for modeling purposes\r\n only i.e., if theoretical data will be input to model\r\n different scenarios or plan for new facilities.\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n setIsCancelling(false)}\r\n onConfirm={() => history.go(-1)}\r\n isOpen={isCancelling}\r\n title={'Form has unsaved changes'}\r\n description={\r\n 'You have unsaved changes. Are you sure you want to cancel?'\r\n }\r\n />\r\n \r\n );\r\n};\r\n\r\nFacilityCreate.displayName = 'FacilityCreate';\r\n","import { useBoolean, useToast } from '@chakra-ui/react';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useEffect } from 'react';\r\nimport { Controller, useForm } from 'react-hook-form';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport { getClassifications } from 'src/clients/api/classification';\r\nimport { getCities, getCountries, getRegions } from 'src/clients/api/country';\r\nimport {\r\n deleteFacility,\r\n getFacility,\r\n updateWrmFacility,\r\n} from 'src/clients/api/v5.facility';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { FacilityTabFooter } from 'src/components/FacilityForm/Helpers/FacilityTabFooter';\r\nimport {\r\n facilityInformationSchema,\r\n FacilityInformationSchemaForm,\r\n} from 'src/components/FacilityForm/validation';\r\nimport { FormHelpButton, FormHelpText } from 'src/components/FormHelp';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { ModalDialog } from 'src/components/ModalDialog';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\nimport styles from './FacilityEdit.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype FacilityEditProps = {};\r\n\r\nexport const FacilityEdit: FC<\r\n FacilityEditProps & RouteComponentProps<{ id: string }>\r\n> = ({ match, history }) => {\r\n const { id } = match.params;\r\n const queryClient = useQueryClient();\r\n const [asyncState, setAsyncState] = useAsyncState();\r\n const toast = useToast();\r\n const [isDeleting, setIsDeleting] = useBoolean();\r\n const [isCancelling, setIsCancelling] = useBoolean();\r\n\r\n const {\r\n data: facilityData,\r\n isLoading,\r\n error,\r\n refetch,\r\n isFetching,\r\n } = useQuery(['facilities', id], () => getFacility(id));\r\n\r\n const formHelp = useFormHelp();\r\n\r\n const {\r\n control,\r\n formState: { errors, isDirty },\r\n watch,\r\n register,\r\n reset,\r\n handleSubmit,\r\n } = useForm({\r\n defaultValues: {},\r\n resolver: yupResolver(facilityInformationSchema),\r\n });\r\n\r\n const { data: countriesData, isLoading: isLoadingCountries } = useQuery(\r\n ['countries'],\r\n () => getCountries()\r\n );\r\n\r\n const countries =\r\n (countriesData?.status === 'success' && countriesData.value.data) || [];\r\n\r\n const countryId = watch('countryId');\r\n const { data: regionData, isLoading: isLoadingRegions } = useQuery(\r\n ['regions', countryId],\r\n () => getRegions(countryId),\r\n {\r\n enabled: !!countryId,\r\n }\r\n );\r\n\r\n const regions =\r\n (regionData?.status === 'success' && regionData.value.data) || [];\r\n\r\n const regionId = watch('regionId');\r\n const { data: cityData, isLoading: isLoadingCities } = useQuery(\r\n ['citys', regionId],\r\n () => getCities(countryId, regionId),\r\n {\r\n enabled: !!(countryId && regionId),\r\n }\r\n );\r\n\r\n const citys = (cityData?.status === 'success' && cityData.value.data) || [];\r\n\r\n const {\r\n data: sectorsLevelOneData,\r\n isLoading: isLoadingClassificationsLevelOne,\r\n } = useQuery(['sectors', 'levelOne'], () => getClassifications());\r\n\r\n const sectorsLevelOne =\r\n (sectorsLevelOneData?.status === 'success' &&\r\n sectorsLevelOneData.value.data) ||\r\n [];\r\n\r\n const sector1Id = watch('sector1Id');\r\n const {\r\n data: sectorsLevelTwoData,\r\n isLoading: isLoadingClassificationsLevelTwo,\r\n } = useQuery(\r\n ['sectors', 'levelTwo', sector1Id],\r\n () => getClassifications('2', `${sector1Id}`),\r\n {\r\n enabled: !!sector1Id,\r\n }\r\n );\r\n\r\n const sectorsLevelTwo =\r\n (sectorsLevelTwoData?.status === 'success' &&\r\n sectorsLevelTwoData.value.data) ||\r\n [];\r\n\r\n const sector2Id = watch('sector2Id');\r\n const {\r\n data: sectorsLevelThreeData,\r\n isLoading: isLoadingClassificationsLevelThree,\r\n } = useQuery(\r\n ['sectors', 'levelThree', sector2Id],\r\n () => getClassifications('3', `${sector2Id}`),\r\n {\r\n enabled: !!sector2Id,\r\n }\r\n );\r\n\r\n const sectorsLevelThree =\r\n (sectorsLevelThreeData?.status === 'success' &&\r\n sectorsLevelThreeData.value.data) ||\r\n [];\r\n\r\n useEffect(() => {\r\n if (facilityData?.status === 'success') {\r\n reset(facilityData.value.data);\r\n }\r\n }, [facilityData, reset]);\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n if (error || !facilityData || facilityData.status === 'error') {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const facility = facilityData.value.data;\r\n\r\n const onSave = handleSubmit(async (values: FacilityInformationSchemaForm) => {\r\n try {\r\n setAsyncState({ status: 'loading' });\r\n\r\n const payload = {\r\n ...facility,\r\n ...values,\r\n };\r\n\r\n const result = await updateWrmFacility(id, payload);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setAsyncState({\r\n status: 'success',\r\n message: 'Facility created successfully!',\r\n });\r\n\r\n queryClient.invalidateQueries(['facilities']);\r\n queryClient.invalidateQueries(['aggregates']);\r\n\r\n history.push(`/app/facilities/${id}`);\r\n } catch (e) {\r\n setAsyncState({\r\n status: 'error',\r\n message:\r\n e.message ?? 'There was an error submitting your facility data.',\r\n });\r\n }\r\n });\r\n\r\n const onDelete = async () => {\r\n try {\r\n setAsyncState({ status: 'loading' });\r\n\r\n await deleteFacility(id);\r\n\r\n toast({\r\n title: `Facility deleted successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n queryClient.refetchQueries(['facilities']);\r\n history.push('/app/dashboard');\r\n } catch (e) {\r\n toast({\r\n title: e.message ?? 'There was an error deleting your facility.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n }\r\n };\r\n\r\n const handleCancel = () => {\r\n if (isDirty) {\r\n setIsCancelling.on();\r\n } else {\r\n history.push(`/app/facilities/${id}`);\r\n }\r\n };\r\n\r\n const onCancel = () => {\r\n setIsCancelling.off();\r\n history.push(`/app/facilities/${id}`);\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n Edit Facility\r\n\r\n \r\n Your privacy is important to us. Precautions are in place to protect\r\n your information against any misuse. Please refer to the{' '}\r\n PRIVACY NOTICE for\r\n additional details.\r\n \r\n
\r\n
\r\n
\r\n {asyncState.status === 'error' ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n Facility Name\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n Country\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: localName,\r\n value: `${id}`,\r\n }))}\r\n placeholder=\" \"\r\n error={errors.countryId}\r\n disabled={countriesData?.status !== 'success'}\r\n loading={isLoadingCountries}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n State/Province\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: localName,\r\n value: `${id}`,\r\n }))}\r\n placeholder=\" \"\r\n className={cx('inputField')}\r\n disabled={regionData?.status !== 'success'}\r\n loading={isLoadingRegions}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n City\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: localName,\r\n value: `${id}`,\r\n }))}\r\n className={cx('inputField')}\r\n disabled={cityData?.status !== 'success'}\r\n loading={isLoadingCities}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Industry Classification\r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label,\r\n value: `${fkSector}`,\r\n })\r\n )}\r\n className={cx('inputField')}\r\n disabled={true}\r\n loading={isLoadingClassificationsLevelOne}\r\n onChange={(val) => props.onChange(val)}\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\n label,\r\n value: `${fkSector}`,\r\n })\r\n )}\r\n className={cx('inputField')}\r\n disabled={true}\r\n loading={isLoadingClassificationsLevelTwo}\r\n onChange={(val) => props.onChange(val)}\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\n label,\r\n value: `${fkSector}`,\r\n })\r\n )}\r\n className={cx('inputField')}\r\n disabled={true}\r\n loading={isLoadingClassificationsLevelThree}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Facility Label\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Enter a label that classifies this facility and can be used to\r\n filter your facilities.\r\n \r\n
\r\n
\r\n
\r\n
\r\n Active\r\n \r\n
\r\n
\r\n
\r\n (\r\n \r\n )}\r\n >\r\n
\r\n \r\n Indicates whether a facility is active or inactive. This field\r\n is helpful if facilities are closed at certain times or\r\n permanently.\r\n \r\n
\r\n
\r\n
\r\n
\r\n Modeling Only\r\n \r\n
\r\n
\r\n
\r\n (\r\n \r\n )}\r\n >\r\n
\r\n \r\n Indicates if a facility is to be used for modeling purposes\r\n only i.e., if theoretical data will be input to model\r\n different scenarios or plan for new facilities.\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\n\r\nFacilityEdit.displayName = 'FacilityEdit';\r\n","import {\r\n Button,\r\n FormControl,\r\n FormErrorMessage,\r\n FormHelperText,\r\n FormLabel,\r\n Input,\r\n Modal,\r\n ModalBody,\r\n ModalCloseButton,\r\n ModalContent,\r\n ModalFooter,\r\n ModalHeader,\r\n ModalOverlay,\r\n useBoolean,\r\n useToast,\r\n} from '@chakra-ui/react';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport React, { FC } from 'react';\r\nimport { useForm } from 'react-hook-form';\r\nimport { useQueryClient } from 'react-query';\r\nimport { createFolder, updateFolder } from 'src/clients/api/v5.folders';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { Folder } from 'src/types/folder';\r\nimport * as yup from 'yup';\r\n\r\ntype FolderMutateModalProps = {\r\n folder?: Folder;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n};\r\n\r\nconst createFolderFormSchema = yup.object({\r\n folderName: yup.string().defined('Required'),\r\n});\r\n\r\nconst RESOLVER = yupResolver(createFolderFormSchema);\r\n\r\nexport const FolderMutateModal: FC = ({\r\n folder,\r\n isOpen = false,\r\n onClose,\r\n}) => {\r\n const toast = useToast();\r\n const queryClient = useQueryClient();\r\n const { setFilterState } = useFilterAndSort();\r\n const [isLoading, setIsLoading] = useBoolean();\r\n\r\n const {\r\n register,\r\n formState: { isValid, isDirty, errors },\r\n handleSubmit,\r\n } = useForm({\r\n mode: 'onChange',\r\n resolver: RESOLVER,\r\n defaultValues: {\r\n folderName: folder?.folderName ?? '',\r\n },\r\n });\r\n\r\n const handleCreateFolder = handleSubmit(async (values) => {\r\n try {\r\n setIsLoading.on();\r\n const result = folder?.folderId\r\n ? await updateFolder(folder.folderId, values.folderName)\r\n : await createFolder(values.folderName);\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n toast({\r\n title: `Folder ${\r\n folder?.folderId ? 'edited' : 'created'\r\n } successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n setFilterState!('folderId', null);\r\n queryClient.refetchQueries(['folders']);\r\n queryClient.invalidateQueries(['aggregates']);\r\n\r\n onClose();\r\n } catch (e) {\r\n toast({\r\n title: e.message ?? 'There was an error deleting your folder.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n } finally {\r\n setIsLoading.off();\r\n }\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {folder?.folderId ? 'Update' : 'Create'} Folder\r\n \r\n \r\n \r\n \r\n Folder Name\r\n \r\n \r\n Enter the name of your new folder.\r\n \r\n {errors.email?.message}\r\n \r\n \r\n\r\n \r\n \r\n Cancel\r\n \r\n \r\n {folder?.folderId ? 'Update' : 'Create'}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nFolderMutateModal.displayName = 'FolderMutateModal';\r\n","import {\r\n Button,\r\n Flex,\r\n FormControl,\r\n FormHelperText,\r\n FormLabel,\r\n Modal,\r\n ModalBody,\r\n ModalCloseButton,\r\n ModalContent,\r\n ModalFooter,\r\n ModalHeader,\r\n ModalOverlay,\r\n Select,\r\n Stack,\r\n useToast,\r\n} from '@chakra-ui/react';\r\nimport React, { FC, PropsWithChildren, useMemo, useState } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { addFacilityFolderAssociation } from 'src/clients/api/v5.facility';\r\nimport { AsyncState } from 'src/types/asyncState';\r\nimport { Folder } from 'src/types/folder';\r\nimport { Facility } from 'src/types/v5.facility';\r\n\r\ntype AddFolderFacilityModalProps = {\r\n folder: Folder;\r\n isOpen: boolean;\r\n onClose: () => void;\r\n facilities: Array;\r\n};\r\n\r\nexport const AddFolderFacilityModal: FC> = ({ facilities, folder, isOpen, onClose }) => {\r\n const toast = useToast();\r\n const queryClient = useQueryClient();\r\n const [asyncState, setAsyncState] = useState({ state: 'idle' });\r\n const [selectedFacilityId, setSelectedFacilityId] = useState();\r\n\r\n const selectedFacility = useMemo(() => {\r\n return facilities?.find((f) => f.facilityId === Number(selectedFacilityId));\r\n }, [facilities, selectedFacilityId]);\r\n\r\n const filteredFacilities = useMemo(\r\n () =>\r\n facilities?.filter(\r\n (f) =>\r\n !folder.facilitiesInFolder\r\n .map((ff) => ff.facilityId)\r\n .includes(f.facilityId)\r\n ),\r\n [facilities, folder.facilitiesInFolder]\r\n );\r\n\r\n const onAddFacility = async () => {\r\n if (selectedFacility) {\r\n try {\r\n setAsyncState({ state: 'loading' });\r\n\r\n const result = await addFacilityFolderAssociation(\r\n selectedFacility.facilityId,\r\n folder.folderId\r\n );\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n toast({\r\n title: `Facility added successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n queryClient.refetchQueries(['folders']);\r\n queryClient.refetchQueries(['aggregates']);\r\n\r\n onClose();\r\n } catch (e) {\r\n toast({\r\n title: `Failed to add facility to folder`,\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n } finally {\r\n setAsyncState({ state: 'idle' });\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n Modal Title\r\n \r\n \r\n \r\n \r\n \r\n Add facility to folder\r\n \r\n \r\n {\r\n const val = Number(e.target.value);\r\n\r\n if (val) {\r\n setSelectedFacilityId(val);\r\n }\r\n }}\r\n >\r\n {(filteredFacilities ?? []).map((facility) => (\r\n \r\n {facility.facilityName}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n This will remove the facility from its current folder.\r\n \r\n \r\n \r\n\r\n \r\n \r\n Cancel\r\n \r\n \r\n Add Facility\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAddFolderFacilityModal.displayName = 'AddFolderFacilityModal';\r\n","import {\r\n Flex,\r\n IconButton,\r\n Stack,\r\n Text,\r\n useBoolean,\r\n useToast,\r\n} from '@chakra-ui/react';\r\nimport { mdiFolderRemoveOutline } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { removeFacilityFolderAssociation } from 'src/clients/api/v5.facility';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { ModalDialog } from 'src/components/ModalDialog/ModalDialog';\r\nimport { TruncatedFacility } from 'src/types/facility';\r\n\r\ntype FacilityItemProps = {\r\n folderId: number;\r\n facility: TruncatedFacility;\r\n};\r\n\r\nexport const FacilityItem: FC = ({ folderId, facility }) => {\r\n const queryClient = useQueryClient();\r\n const toast = useToast();\r\n const [isDeleting, setIsDeleting] = useBoolean();\r\n const [isLoading, setIsLoading] = useBoolean();\r\n\r\n const handleRemoveFacility = async () => {\r\n try {\r\n setIsLoading.on();\r\n const result = await removeFacilityFolderAssociation(\r\n facility.facilityId,\r\n folderId\r\n );\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n toast({\r\n title: `Facility removed successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n queryClient.refetchQueries(['folders']);\r\n queryClient.refetchQueries(['facilities']);\r\n } catch (e) {\r\n toast({\r\n title: e.message ?? 'There was an error removing your folder.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n } finally {\r\n setIsLoading.off();\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {facility.facilityName}\r\n \r\n\r\n \r\n\r\n }\r\n colorScheme=\"red\"\r\n aria-label=\"Remove facility from folder\"\r\n ml=\"2\"\r\n onClick={setIsDeleting.on}\r\n />\r\n \r\n );\r\n};\r\n","import { Button, useBoolean, useToast } from '@chakra-ui/react';\r\nimport { mdiTrashCan } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { deleteFolder } from 'src/clients/api/v5.folders';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { ModalDialog } from 'src/components/ModalDialog/ModalDialog';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { Folder } from 'src/types/folder';\r\n\r\ntype FolderDeletePopoverProps = {\r\n folderId: Folder['folderId'];\r\n isDisabled: boolean;\r\n onDelete: () => void;\r\n};\r\n\r\nexport const FolderDeletePopover: FC = ({\r\n folderId,\r\n isDisabled,\r\n onDelete,\r\n}) => {\r\n const toast = useToast();\r\n const queryClient = useQueryClient();\r\n const { setFilterState } = useFilterAndSort();\r\n const [isLoading, setIsLoading] = useBoolean();\r\n const [isDeleting, setIsDeleting] = useBoolean();\r\n\r\n const handleDeleteFolder = async () => {\r\n try {\r\n setIsLoading.on();\r\n const result = await deleteFolder(folderId);\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n toast({\r\n title: `Folder deleted successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n setFilterState!('folderId', null);\r\n queryClient.refetchQueries(['folders']);\r\n queryClient.invalidateQueries(['aggregates']);\r\n\r\n onDelete();\r\n } catch (e) {\r\n toast({\r\n title: e.message ?? 'There was an error deleting your folder.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n } finally {\r\n setIsLoading.off();\r\n }\r\n };\r\n\r\n if (isDisabled) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n }\r\n colorScheme=\"red\"\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n isLoading={isLoading}\r\n onClick={setIsDeleting.on}\r\n >\r\n Delete Folder\r\n \r\n {isDeleting ? (\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nFolderDeletePopover.displayName = 'FolderDeletePopover';\r\n","import { Transfer } from 'src/types/transfer';\r\nimport { urlWithAccountId } from '../helpers';\r\nimport request from '../request';\r\nimport { WrappedResponse } from '../types';\r\n\r\nexport type GetTransfersResponseType = WrappedResponse>;\r\nexport function getTransfers() {\r\n return request.get(urlWithAccountId(`transfers`));\r\n}\r\n\r\nexport type CreateTransferRequestType = {};\r\nexport type CreateTransferResponseType = WrappedResponse<{}>;\r\nexport function createTransfer(folderId: number, email: string) {\r\n return request.post(\r\n urlWithAccountId(`transfers`),\r\n {\r\n assetId: folderId,\r\n transferToUsername: email,\r\n type: 'folder',\r\n }\r\n );\r\n}\r\n\r\nexport type UpdateTransferRequestType = Transfer;\r\nexport type UpdateTransferResponseType = WrappedResponse<{}>;\r\nexport function updateTransfer(transferId: string, data: Transfer) {\r\n return request.put(\r\n urlWithAccountId(`transfers/${transferId}`),\r\n data\r\n );\r\n}\r\n\r\nexport type DeleteTransferResponseType = WrappedResponse<{}>;\r\nexport function deleteTransfer(transferId: string) {\r\n return request.del(\r\n urlWithAccountId(`transfers/${transferId}`)\r\n );\r\n}\r\n","import {\r\n Button,\r\n Modal,\r\n ModalOverlay,\r\n ModalContent,\r\n ModalHeader,\r\n ModalCloseButton,\r\n ModalBody,\r\n FormControl,\r\n FormLabel,\r\n Input,\r\n FormHelperText,\r\n FormErrorMessage,\r\n ModalFooter,\r\n useToast,\r\n useBoolean,\r\n} from '@chakra-ui/react';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { mdiTransferUp } from '@mdi/js';\r\nimport React from 'react';\r\nimport { FC } from 'react';\r\nimport { useForm } from 'react-hook-form';\r\nimport { useQueryClient } from 'react-query';\r\nimport { createTransfer } from 'src/clients/api/v5.transfers';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { Folder } from 'src/types/folder';\r\nimport * as yup from 'yup';\r\n\r\ntype TransferModalProps = {\r\n folderId: Folder['folderId'];\r\n isOpen: boolean;\r\n onClose: () => void;\r\n};\r\n\r\nconst schema = yup\r\n .object({\r\n email: yup.string().email().required(),\r\n })\r\n .required();\r\n\r\nexport const TransferModal: FC = ({\r\n folderId,\r\n isOpen,\r\n onClose,\r\n}) => {\r\n const toast = useToast();\r\n const queryClient = useQueryClient();\r\n const { setFilterState } = useFilterAndSort();\r\n const [isLoading, setIsLoading] = useBoolean();\r\n\r\n const {\r\n register,\r\n handleSubmit,\r\n formState: { isValid, isDirty, errors },\r\n } = useForm({\r\n mode: 'onChange',\r\n resolver: yupResolver(schema),\r\n defaultValues: {\r\n email: '',\r\n },\r\n });\r\n\r\n const handleTransferFolder = handleSubmit(async (values) => {\r\n try {\r\n setIsLoading.on();\r\n const result = await createTransfer(folderId, values.email);\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n toast({\r\n title: 'Transfer submitted successfully!',\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n setFilterState!('folderId', null);\r\n queryClient.refetchQueries(['folders']);\r\n queryClient.invalidateQueries(['aggregates']);\r\n queryClient.invalidateQueries(['transfers']);\r\n\r\n onClose();\r\n } catch (e) {\r\n toast({\r\n title: e?.message?.length\r\n ? e.message\r\n : 'There was an error transfering the folder.',\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n } finally {\r\n setIsLoading.off();\r\n }\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Transfer Folder\r\n \r\n \r\n \r\n \r\n Recipient Email\r\n \r\n \r\n Enter the email of the account you want to send this folder to.\r\n Once a folder has been transferred, you will no longer have access\r\n to the facilities.\r\n \r\n {errors.email?.message}\r\n \r\n \r\n\r\n \r\n \r\n Cancel\r\n \r\n \r\n Transfer\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nTransferModal.displayName = 'TransferModal';\r\n","import {\r\n Box,\r\n Button,\r\n Flex,\r\n SlideFade,\r\n Spacer,\r\n Stack,\r\n Text,\r\n useBoolean,\r\n} from '@chakra-ui/react';\r\nimport { mdiFolderEdit, mdiTextBoxSearchOutline, mdiTransferUp } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { AddFolderFacilityModal } from 'src/components/AddFolderFacilityModal';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { Folder } from 'src/types/folder';\r\nimport { Facility } from 'src/types/v5.facility';\r\nimport { FacilityItem } from './FacilityItem';\r\nimport { FolderDeletePopover } from './FolderDeletePopover';\r\nimport { FolderMutateModal } from './FolderMutateModal';\r\nimport { TransferModal } from './TransferModal';\r\n\r\ntype FolderItemContentsProps = {\r\n facilities?: Array;\r\n folder: Folder;\r\n isOpen: boolean;\r\n isFrozen: boolean;\r\n onToggle: () => void;\r\n};\r\n\r\nexport const FolderItemContents: FC = ({\r\n facilities,\r\n folder,\r\n isOpen,\r\n isFrozen,\r\n onToggle,\r\n}) => {\r\n const history = useHistory();\r\n const [isMutating, setIsMutating] = useBoolean();\r\n const [isTransferring, setIsTransferring] = useBoolean();\r\n const [isAddingToFolder, setIsAddingToFolder] = useBoolean();\r\n const { setFilterState } = useFilterAndSort();\r\n\r\n const hasChildren = folder.facilitiesInFolder.length > 0;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n }\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n onClick={setIsMutating.on}\r\n isDisabled={isFrozen}\r\n >\r\n Edit Folder\r\n \r\n \r\n\r\n }\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n onClick={setIsAddingToFolder.on}\r\n isDisabled={!facilities?.length || isFrozen}\r\n >\r\n Add Facility\r\n \r\n {facilities?.length ? (\r\n \r\n ) : null}\r\n\r\n }\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n onClick={setIsTransferring.on}\r\n isDisabled={!hasChildren || isFrozen}\r\n >\r\n Transfer Folder\r\n \r\n \r\n\r\n }\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n onClick={() => {\r\n setFilterState!('folderId', `${folder.folderId}`);\r\n history.push('/app/dashboard');\r\n }}\r\n isDisabled={!hasChildren}\r\n >\r\n View on Dashboard\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\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Folder Facilities\r\n \r\n \r\n\r\n {folder.facilitiesInFolder.length ? (\r\n folder.facilitiesInFolder.map((facility) => (\r\n \r\n ))\r\n ) : (\r\n \r\n Folder has no facilities\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nFolderItemContents.displayName = 'FolderItemContents';\r\n","import {\r\n AccordionButton,\r\n AccordionIcon,\r\n AccordionItem,\r\n AccordionPanel,\r\n Flex,\r\n FlexProps,\r\n Hide,\r\n Stack,\r\n Text,\r\n} from '@chakra-ui/react';\r\nimport { mdiFolderOpenOutline, mdiFolderOutline } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { Folder } from 'src/types/folder';\r\nimport { Facility } from 'src/types/v5.facility';\r\nimport { FolderItemContents } from './FolderItemContents';\r\n\r\ntype FolderListItemProps = {\r\n facilities?: Array;\r\n folder: Folder;\r\n isOpen: boolean;\r\n isFrozen: boolean;\r\n onToggle: () => void;\r\n} & FlexProps;\r\n\r\nexport const FolderItem: FC = ({\r\n facilities,\r\n folder,\r\n isOpen,\r\n isFrozen = false,\r\n onToggle,\r\n}) => {\r\n return (\r\n \r\n {({ isExpanded }) => (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {folder.folderName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {isExpanded ? (\r\n \r\n ) : null}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n","import { Tag, TagLeftIcon, TagLabel } from '@chakra-ui/react';\r\nimport {\r\n mdiCancel,\r\n mdiCheck,\r\n mdiCheckAll,\r\n mdiProgressAlert,\r\n mdiSync,\r\n} from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { Transfer } from 'src/types/transfer';\r\n\r\ntype TransferStatusTagProps = {\r\n status: Transfer['status'];\r\n};\r\n\r\nenum STATUS_COLOR {\r\n transferred = 'green',\r\n failed = 'red',\r\n accepted = 'green',\r\n declined = 'red',\r\n queued = 'gray',\r\n}\r\n\r\nconst STATUS_ICON = {\r\n transferred: mdiCheckAll,\r\n failed: mdiProgressAlert,\r\n accepted: mdiCheck,\r\n declined: mdiCancel,\r\n queued: mdiSync,\r\n};\r\n\r\nconst getStatusText = (status: TransferStatusTagProps['status']) => {\r\n switch (status) {\r\n case 'queued': {\r\n return 'pending';\r\n }\r\n default: {\r\n return status;\r\n }\r\n }\r\n};\r\n\r\nexport const TransferStatusTag: FC = ({ status }) => {\r\n return (\r\n \r\n \r\n \r\n {getStatusText(status)}\r\n \r\n \r\n );\r\n};\r\n\r\nTransferStatusTag.displayName = 'TransferStatusTag';\r\n","import { Accordion, ExpandedIndex, Text } from '@chakra-ui/react';\r\nimport React, { FC, useState } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { getFacilitiesList } from 'src/clients/api/v5.facility';\r\nimport { getFolders } from 'src/clients/api/v5.folders';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { FolderItem } from './FolderItem';\r\n\r\ntype FolderListProps = {\r\n sort: 'asc' | 'desc';\r\n frozen: Set;\r\n};\r\n\r\nexport const FolderList: FC = ({ sort, frozen }) => {\r\n const [accordionIndex, setAccordionIndex] = useState(-1);\r\n const folderRes = useQuery(['folders'], () => getFolders());\r\n\r\n const facilitiesRes = useQuery(['facilities'], () => getFacilitiesList());\r\n\r\n const facilities =\r\n facilitiesRes.data?.status === 'success' && facilitiesRes.data?.value.data\r\n ? facilitiesRes.data?.value.data\r\n : [];\r\n\r\n const folders =\r\n folderRes.data?.status === 'success' && !!folderRes.data?.value.data\r\n ? folderRes.data?.value.data\r\n : [];\r\n\r\n const sortedFolders = useDeepCompareMemo(() => {\r\n const arr = [...folders].sort((a, b) => {\r\n const aProp = a.folderName;\r\n const bProp = b.folderName;\r\n if (aProp && bProp) {\r\n if (aProp < bProp) {\r\n return -1;\r\n }\r\n if (aProp > bProp) {\r\n return 1;\r\n }\r\n }\r\n\r\n return 0;\r\n });\r\n\r\n if (sort === 'desc') {\r\n return arr.reverse();\r\n }\r\n\r\n return arr;\r\n }, [folders, sort]);\r\n\r\n const { data, isLoading, isError, refetch, isFetching } = folderRes;\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n if (isError || (data && data.status === 'error')) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n setAccordionIndex(val)}\r\n allowToggle\r\n >\r\n {sortedFolders.length > 0 ? (\r\n sortedFolders.map((folder, idx) => (\r\n \r\n setAccordionIndex(accordionIndex === idx ? -1 : idx)\r\n }\r\n />\r\n ))\r\n ) : (\r\n No folders found\r\n )}\r\n \r\n );\r\n};\r\n","import {\r\n Button,\r\n Flex,\r\n Popover,\r\n PopoverArrow,\r\n PopoverBody,\r\n PopoverCloseButton,\r\n PopoverContent,\r\n PopoverHeader,\r\n PopoverTrigger,\r\n Portal,\r\n Stack,\r\n Text,\r\n useBoolean,\r\n useToast,\r\n} from '@chakra-ui/react';\r\nimport { mdiAccountArrowRightOutline, mdiCancel, mdiCheck } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { updateTransfer } from 'src/clients/api/v5.transfers';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { TransferStatusTag } from 'src/components/TransferStatusTag';\r\nimport { Transfer } from 'src/types/transfer';\r\n\r\ntype TransferListItemProps = {\r\n transfer: Transfer;\r\n direction?: 'in' | 'out';\r\n color: 'gray' | 'red';\r\n};\r\n\r\nexport const TransferListItem: FC = ({\r\n transfer,\r\n direction,\r\n color,\r\n}) => {\r\n const toast = useToast();\r\n const queryClient = useQueryClient();\r\n const [isLoading, setIsLoading] = useBoolean();\r\n\r\n const handleReaction = async (reaction: Transfer['status']) => {\r\n try {\r\n setIsLoading.on();\r\n\r\n const result = await updateTransfer(transfer.transferId, {\r\n ...transfer,\r\n status: reaction,\r\n });\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value?.errors?.[0].message);\r\n }\r\n\r\n toast({\r\n title: `Transfer ${\r\n reaction === 'accepted' ? 'accept' : 'decline'\r\n } successfully!`,\r\n status: 'success',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n\r\n queryClient.refetchQueries('transfers');\r\n queryClient.refetchQueries('folders');\r\n queryClient.invalidateQueries('activeUploads');\r\n queryClient.invalidateQueries('facilities');\r\n } catch (e) {\r\n toast({\r\n title: e?.message?.length\r\n ? e.message\r\n : `Could not ${\r\n reaction === 'accepted' ? 'accept' : 'decline'\r\n } the folder transfer.`,\r\n status: 'error',\r\n position: 'top-right',\r\n isClosable: true,\r\n });\r\n } finally {\r\n setIsLoading.off();\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {transfer.assetName} ({transfer.facilityCount} facilities)\r\n \r\n \r\n \r\n \r\n {direction === 'in'\r\n ? `${transfer.transferFromName} (${transfer.transferFromUsername})`\r\n : transfer.transferToUsername}\r\n \r\n \r\n \r\n\r\n \r\n {direction === 'in' ? (\r\n }\r\n onClick={() => {\r\n handleReaction('accepted');\r\n }}\r\n w={{ base: 'full', md: 'auto' }}\r\n flex={{ base: '1 1 100%', md: '1 1 auto' }}\r\n px=\"2\"\r\n py=\"1\"\r\n height=\"32px\"\r\n isLoading={isLoading}\r\n >\r\n Accept\r\n \r\n ) : (\r\n \r\n )}\r\n\r\n {direction === 'in' ? (\r\n \r\n {({ onClose }) => (\r\n <>\r\n \r\n }\r\n colorScheme=\"red\"\r\n isLoading={isLoading}\r\n w={{ base: 'full', md: 'auto' }}\r\n flex={{ base: '1 1 100%', md: '1 1 auto' }}\r\n px=\"2\"\r\n py=\"1\"\r\n >\r\n Reject\r\n \r\n \r\n \r\n \r\n \r\n \r\n Reject Transfer\r\n \r\n \r\n\r\n \r\n \r\n Are you sure you want to reject this transfer?\r\n \r\n {\r\n handleReaction('declined');\r\n onClose();\r\n }}\r\n >\r\n Yes, reject this transfer\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n ) : null}\r\n \r\n \r\n );\r\n};\r\n","import { Flex, Stack, Text } from '@chakra-ui/react';\r\nimport { mdiHistory, mdiTransferDown, mdiTransferUp } from '@mdi/js';\r\nimport React, { FC, useMemo } from 'react';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { Transfer } from 'src/types/transfer';\r\nimport { TransferListItem } from './TransferListItem';\r\n\r\ntype TransferListProps = {\r\n direction?: 'in' | 'out';\r\n transfers: Array;\r\n};\r\n\r\nexport const TransferList: FC = ({\r\n direction,\r\n transfers = [],\r\n}) => {\r\n const display = useMemo(() => {\r\n switch (direction) {\r\n case 'in':\r\n return {\r\n title: 'Incoming',\r\n icon: mdiTransferDown,\r\n color: 'gray' as const,\r\n };\r\n case 'out':\r\n return {\r\n title: 'Outgoing',\r\n icon: mdiTransferUp,\r\n color: 'gray' as const,\r\n };\r\n default:\r\n return {\r\n title: 'Past',\r\n icon: mdiHistory,\r\n color: 'gray' as const,\r\n };\r\n }\r\n }, [direction]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {display.title} Transfers\r\n \r\n \r\n\r\n {transfers.map((transfer) => (\r\n \r\n ))}\r\n \r\n );\r\n};\r\n","import { Flex, Text } from '@chakra-ui/react';\r\nimport { mdiSwapHorizontal } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { getTransfers } from 'src/clients/api/v5.transfers';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { Transfer } from 'src/types/transfer';\r\nimport { TransferList } from './TransferList';\r\n\r\ntype TransfersGroupProps = {\r\n showPast?: boolean;\r\n};\r\n\r\nexport const TransfersGroup: FC = ({\r\n showPast = false,\r\n}) => {\r\n const { userId } = useAuth();\r\n const { data, isLoading } = useQuery(['transfers'], () => getTransfers());\r\n\r\n const transfers =\r\n data?.status === 'success' && !!data?.value.data\r\n ? data?.value.data\r\n : ([] as Array);\r\n\r\n if (isLoading || transfers.length === 0) {\r\n return <>;\r\n }\r\n\r\n if (showPast) {\r\n const other = transfers.filter((transfer) => transfer.status !== 'queued');\r\n\r\n if (other.length === 0) {\r\n return (\r\n \r\n \r\n There are no past transfers\r\n \r\n );\r\n }\r\n\r\n return ;\r\n }\r\n\r\n const incoming = transfers.filter(\r\n (transfer) =>\r\n transfer.status === 'queued' &&\r\n transfer.transferToUserId === Number(userId)\r\n );\r\n const outgoing = transfers.filter(\r\n (transfer) =>\r\n transfer.status === 'queued' &&\r\n transfer.transferFromUserId === Number(userId)\r\n );\r\n\r\n if (transfers.length === 0) {\r\n return (\r\n \r\n \r\n There are no active transfers\r\n \r\n );\r\n }\r\n\r\n return (\r\n <>\r\n {incoming.length ? (\r\n \r\n ) : null}\r\n {outgoing.length ? (\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nTransfersGroup.displayName = 'TransfersGroup';\r\n","import { Button, Flex, Heading, Stack, useBoolean } from '@chakra-ui/react';\r\nimport {\r\n mdiArrowDown,\r\n mdiArrowUp,\r\n mdiPlusCircleOutline,\r\n mdiSync,\r\n} from '@mdi/js';\r\nimport React, { FC, useEffect, useRef, useState } from 'react';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { FolderMutateModal } from './FolderMutateModal';\r\nimport { FolderList } from './FolderList';\r\nimport { TransfersGroup } from './TransfersGroup';\r\nimport {\r\n getTransfers,\r\n GetTransfersResponseType,\r\n} from 'src/clients/api/v5.transfers';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport equal from 'fast-deep-equal';\r\n\r\ntype FolderManagerProps = {};\r\n\r\nexport const FolderManager: FC = () => {\r\n const previous = useRef();\r\n const queryClient = useQueryClient();\r\n const [isCreating, setIsCreating] = useBoolean();\r\n const [sortState, setSortState] = useState<'asc' | 'desc'>('asc');\r\n const [isViewingPast, setIsViewingPast] = useBoolean();\r\n\r\n const { data, refetch, isFetching } = useQuery(\r\n ['transfers'],\r\n () => getTransfers(),\r\n {\r\n refetchInterval: 15000,\r\n onSettled: () => {},\r\n }\r\n );\r\n\r\n const frozen = useDeepCompareMemo(() => {\r\n if (data?.status === 'success' && data?.value.data) {\r\n return new Set(\r\n data.value.data\r\n .filter((t) => t.status === 'queued' && !isNaN(Number(t.assetId)))\r\n .map((t) => Number(t.assetId))\r\n );\r\n }\r\n\r\n return new Set() as Set;\r\n }, [data]);\r\n\r\n useEffect(() => {\r\n if (data?.status === 'success' && data?.value.data) {\r\n if (!equal(previous.current, data)) {\r\n queryClient.refetchQueries(['folders']);\r\n }\r\n\r\n previous.current = data?.value;\r\n }\r\n }, [data, queryClient]);\r\n\r\n return (\r\n \r\n \r\n \r\n Folder Manager\r\n \r\n }\r\n onClick={setIsCreating.on}\r\n >\r\n Create Folder\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n Activity\r\n \r\n \r\n Show {isViewingPast ? 'Active Transfers' : 'Past Transfers'}\r\n \r\n \r\n \r\n \r\n }\r\n onClick={() => refetch()}\r\n isDisabled={isFetching}\r\n py=\"1\"\r\n px=\"2\"\r\n >\r\n Refresh\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Folders\r\n \r\n \r\n }\r\n onClick={() => setSortState(sortState === 'asc' ? 'desc' : 'asc')}\r\n py=\"1\"\r\n px=\"2\"\r\n >\r\n Sort ({sortState})\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nFolderManager.displayName = 'FolderManager';\r\n","import { useLocation } from 'react-router-dom';\r\nimport { Path } from 'history';\r\n\r\nexport function useQueryParams() {\r\n // return new URLSearchParams(useLocation().search);\r\n return getQueryParam(useLocation().search);\r\n}\r\n\r\nexport function getQueryParam(search: Path['search']) {\r\n return new URLSearchParams(search);\r\n}\r\n","export function compareByProp(prop: K, a: T, b: T) {\r\n if (a[prop] < b[prop]) {\r\n return -1;\r\n }\r\n if (a[prop] > b[prop]) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, useState } from 'react';\r\nimport { Controller, useFormContext } from 'react-hook-form';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { RadioList } from 'src/components/RadioList';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { Choice, Question } from 'src/types/assessment';\r\nimport { compareByProp } from 'src/utils/array';\r\nimport { FacilityTabFooter } from '../../Helpers/FacilityTabFooter';\r\nimport styles from '../Tabs.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype CarouselProps = {\r\n assessmentId: string;\r\n reportingYearId?: string;\r\n questions: Record;\r\n className?: string;\r\n onSave: (values: any) => void;\r\n onCancel: () => void;\r\n};\r\n\r\nexport const Carousel: FC = ({\r\n reportingYearId,\r\n assessmentId,\r\n className,\r\n questions,\r\n onSave,\r\n onCancel,\r\n}) => {\r\n const { control, errors, watch } = useFormContext();\r\n const answers = watch('assessment.assessmentAnswers');\r\n\r\n const sortedQuestions = Object.values(questions).sort((...props) =>\r\n compareByProp('displayOrder', ...props)\r\n );\r\n\r\n const slideshow = useDeepCompareMemo(() => {\r\n return sortedQuestions.reduce>((acc, question) => {\r\n if (!question.conditional) {\r\n return [...acc, question];\r\n }\r\n\r\n if (\r\n answers[question.parentConditionChoiceId] ===\r\n question.parentConditionChoiceValue\r\n ) {\r\n return [...acc, question];\r\n }\r\n\r\n return acc;\r\n }, []);\r\n }, [answers]);\r\n\r\n const questionsCount = slideshow.length;\r\n const [activeQuestionIndex, setActiveQuestionIndex] = useState(0);\r\n\r\n const handleNext = () => {\r\n if (!!answers[slideshow[activeQuestionIndex].questionId]) {\r\n setActiveQuestionIndex(activeQuestionIndex + 1);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n {activeQuestionIndex + 1} / {questionsCount}\r\n \r\n }\r\n />\r\n }\r\n />\r\n {slideshow.map((question, index) => (\r\n \r\n {question.displayText}\r\n
\r\n {question.displaySubText}\r\n
\r\n (\r\n ({\r\n label: c.displayText,\r\n value: c.questionChoiceId,\r\n }))}\r\n error={\r\n errors?.assessment?.assessmentAnswers\r\n ? errors.assessment.assessmentAnswers[\r\n question.questionId\r\n ]\r\n : undefined\r\n }\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n ))}\r\n
\r\n {activeQuestionIndex < questionsCount - 1 ? (\r\n setActiveQuestionIndex(activeQuestionIndex - 1)}\r\n onCancel={onCancel}\r\n />\r\n ) : (\r\n setActiveQuestionIndex(activeQuestionIndex - 1)}\r\n onNext={onSave}\r\n onCancel={onCancel}\r\n />\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nCarousel.displayName = 'Carousel';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { Assessment, Question } from 'src/types/assessment';\r\nimport styles from '../Tabs/Tabs.module.css';\r\nimport { Carousel } from '../Tabs/Carousel';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype AssessmentCarouselProps = {\r\n assessment: Assessment;\r\n reportingYearId?: string;\r\n onSave: (values: any) => void;\r\n onCancel: () => void;\r\n className?: string;\r\n};\r\n\r\nexport const AssessmentCarousel: FC = ({\r\n assessment,\r\n reportingYearId,\r\n onSave,\r\n onCancel,\r\n className,\r\n}) => {\r\n const questions = useDeepCompareMemo(\r\n () =>\r\n assessment.categories\r\n .map((cat) => cat.questions)\r\n .flat(1)\r\n .reduce>(\r\n (acc, q) => ({\r\n ...acc,\r\n [q.questionId]: q,\r\n }),\r\n {}\r\n ),\r\n [assessment]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nAssessmentCarousel.displayName = 'AssessmentCarousel';\r\n","import { Box, Tooltip } from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport styles from './FacilityTabNavigator.module.css';\r\nimport { UseTabNavigator } from './useTabNavigator';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport type FacilityTabNavigatorProps = {\r\n tabNavigator: UseTabNavigator;\r\n clickToNavigate?: boolean;\r\n tabsInError?: Set;\r\n};\r\n\r\nexport const FacilityTabNavigator: FC = ({\r\n tabNavigator,\r\n tabsInError,\r\n clickToNavigate = true,\r\n}) => {\r\n const { activeTabIndex, setActiveTabIndex, tabs } = tabNavigator;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nFacilityTabNavigator.displayName = 'FacilityTabNavigator';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from '../Tabs.module.css';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { Controller, useFormContext } from 'react-hook-form';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { MappedReferenceData } from 'src/types/referenceData';\r\nimport { FacilityTabFooter } from '../../Helpers/FacilityTabFooter';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\nimport { FormHelpButton, FormHelpText } from '../../../FormHelp';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype BusinessInformationProps = {\r\n referenceData: MappedReferenceData;\r\n reportingYear?: ReportingYear;\r\n onSave: () => void;\r\n onCancel: () => void;\r\n className?: string;\r\n};\r\n\r\nexport const BusinessInformation: FC = ({\r\n referenceData,\r\n onCancel,\r\n onSave,\r\n className,\r\n}) => {\r\n const formHelp = useFormHelp();\r\n\r\n const {\r\n control,\r\n formState: { errors },\r\n register,\r\n } = useFormContext();\r\n\r\n const currencies = referenceData.currencies.map((c) => ({\r\n label: c.code,\r\n value: c.code,\r\n }));\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Business Information

\r\n
\r\n
\r\n \r\n Drought Scenario\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\n
\r\n \r\n Projected Incoming Water Price Over 3 Years (%)\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Projection of how the incoming water price at the facility will\r\n change over the next three years. For example, if you are\r\n expecting an increase of 3% in the price of incoming water over\r\n the next 3 years, enter 3. You can specify an increase or a\r\n decrease (by entering a negative percentage). If your facility\r\n incoming water price is likely to stay constant, please enter\r\n '0'. This is an optional field. If you do not enter a value, the\r\n tool uses historical trend data on country-level water tariffs.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Projected Incoming Water Quantity Over 3 Years (%)\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Projection of how the water use at the facility will change over\r\n the next three years. For example, if you are projecting an\r\n increase in 10% of water use over the next 3 years, enter 10.\r\n You can specify an increase or a decrease. If your facility\r\n water use is likely to stay constant please enter '0'.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Projected Outgoing Water Price Over 3 Years (%)\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Projection of how the outgoing water price at the facility will\r\n change over the next three years. For example, if you are\r\n expecting an increase of 3% in the price of outgoing water over\r\n the next 3 years, enter 3. You can specify an increase or a\r\n decrease (by entering a negative percentage). If your facility\r\n outgoing water price is likely to stay constant, please enter\r\n '0'. This is an optional field. If you do not enter a value, the\r\n tool uses historical trend data on country-level water tariffs.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Projected Outgoing Water Quantity Over 3 Years (%)\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Projection of how the outgoing water quantity at the facility\r\n will change over the next three years. For example, if you are\r\n expecting an increase of 10% in the amount of outgoing water\r\n over the next three years, enter 10. You can specify an increase\r\n or a decrease (by entering a negative percentage). If your\r\n facility outgoing water quantity is likely to stay constant,\r\n please enter '0'. This is an optional field. If you do not enter\r\n a value, outgoing water will remain constant.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Total Facility Revenue Per Year\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Annual revenue produced by your facility. This is an optional\r\n field. If you do not enter a value, your facility's revenue will\r\n be estimated using data modeled by Trucost (2015) based on\r\n industry average economic data and your facility's industry\r\n classification.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Projected Revenue Increase Over 3 Years (%)\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Projection of how the revenue produced by the facility will\r\n change over the next three years. For example, if you are\r\n expecting an increase of 10% revenue generated over the next\r\n three years, enter 10. You can specify an increase or a decrease\r\n (by entering a negative percentage). If your facility revenue is\r\n likely to stay constant, please enter '0'. This is an optional\r\n field. If you do not enter a value, revenue will remain\r\n constant.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Has your business lost revenue due to water scarcity in the last\r\n year?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The tool provides a revenue at risk likelihood score which\r\n examines water scarcity, your industry's importance to the local\r\n economy, your industry's water requirement, the quality of local\r\n regulations and your facility's historical trend of revenue\r\n loss. To customize the tool's revenue at risk likelihood score\r\n to be more specific to local conditions, please indicate whether\r\n your business has lost revenue due to water scarcity in the\r\n recent past. If local water scarcity has affected your\r\n facility's revenue, the revenue at risk likelihood score will be\r\n higher. If you are unsure, please select 'Do not know or N/A'.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from '../Tabs.module.css';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { Controller, useFormContext } from 'react-hook-form';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { MappedReferenceData } from 'src/types/referenceData';\r\nimport { FacilityTabFooter } from '../../Helpers/FacilityTabFooter';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\nimport { FormHelpButton, FormHelpText } from '../../../FormHelp';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype FacilityDetailsProps = {\r\n availableYears: Array;\r\n referenceData: MappedReferenceData;\r\n onSave: () => void;\r\n isEditing?: boolean;\r\n onCancel: () => void;\r\n className?: string;\r\n};\r\n\r\nexport const FacilityDetails: FC = ({\r\n availableYears,\r\n referenceData,\r\n onSave,\r\n isEditing,\r\n onCancel,\r\n className,\r\n}) => {\r\n const formHelp = useFormHelp();\r\n\r\n const {\r\n control,\r\n formState: { errors },\r\n register,\r\n watch,\r\n } = useFormContext();\r\n\r\n const hasWaterWithdrawalReplenishment = watch('waterWithdrawalReplenishment');\r\n const hasWaterWithdrawalThirdPartyVerified = watch(\r\n 'waterWithdrawalThirdPartyVerified'\r\n );\r\n\r\n const waterUnits = referenceData.waterUnits.map((u) => ({\r\n label: u.name,\r\n value: `${u.unitId}`,\r\n }));\r\n\r\n const timePeriods = referenceData.options.timePeriodOptions;\r\n\r\n const currencies = referenceData.currencies.map((c) => ({\r\n label: c.code,\r\n value: c.code,\r\n }));\r\n\r\n return (\r\n
\r\n \r\n * All information on this tab is required.\r\n \r\n
\r\n
\r\n

Reporting Year

\r\n
\r\n
\r\n \r\n Reporting Year\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n ({\r\n label: `${year}`,\r\n value: `${year}`,\r\n }))}\r\n placeholder=\" \"\r\n error={errors.reportingYear}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The year in which data entered refers to. This is a required\r\n field. Updates will be made to the tool to include additional\r\n reporting years as annual datasets are finalized.\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Incoming Water

\r\n
\r\n
\r\n \r\n Incoming Water Time Period\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The total quantity of incoming water can be entered on a weekly,\r\n monthly, quarterly or annual basis. Enter the time period in\r\n this field; the tool will automatically calculate the annual\r\n amount as needed, based on the time period and volume entered in\r\n the following field. For example, if your facility uses 1,000 m3\r\n per month, please select Monthly in the 'Incoming Water Time\r\n Period' field and type 1000 and select m3 within the 'Incoming\r\n Water Quantity' fields. Data will be annualized automatically to\r\n 12,000 m3 by the tool.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Incoming Water Quantity\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n u.value !== '16')}\r\n placeholder=\" \"\r\n error={errors.incomingWaterQuantityUnit}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The total amount of incoming water to the facility, excluding\r\n any recycled water. Please enter the volume as a number in the\r\n text field and select the correct units from the dropdown list.\r\n For example, to enter 1,000 m3 for the 'Incoming Water Quantity'\r\n field, type 1000 into the text field and select m3 from the\r\n dropdown list.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Incoming Water Price\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n (\r\n u.value !== '32')}\r\n placeholder=\" \"\r\n error={errors.incomingWaterPriceUnit}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Total price paid for incoming water to your facility. Exclude\r\n any fees paid for wastewater treatment or other charges.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Location of Water Source\r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Water Replenishment

\r\n
\r\n
\r\n \r\n Are you replenishing any of this site’s incoming water through a\r\n nature-based solution within the water basin?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n \r\n )}\r\n >\r\n
\r\n \r\n Replenishment is when a facility replaces water withdrawals by\r\n returning water back to the basin or leaving more water\r\n available to support the ecological health of waterways. While\r\n replenishment activities do not affect the water withdrawal\r\n risk, it is a useful metric to include when determining a site’s\r\n overall relationship to its water sources. If a facility has\r\n current replenishment projects underway, select the checkbox.\r\n \r\n
\r\n
\r\n {hasWaterWithdrawalReplenishment ? (\r\n <>\r\n
\r\n
\r\n \r\n What is the annualized volumetric benefit returned to the\r\n water basin?\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n u.value !== '16')}\r\n placeholder=\" \"\r\n error={\r\n errors.waterWithdrawalAnnualizedVolumetricBenefitUOMId\r\n }\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The total amount of annual water accounted for in\r\n replenishment solutions. Please enter the annual water\r\n replenishment volume as a number in the text field and\r\n select the correct units from the dropdown list.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n What water fund is the replenishment supporting?\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Water funds are organizations that design and promote water\r\n security through nature-based solutions. If your\r\n organization is partnering with a water fund on\r\n replenishment solutions, enter the name of the fund.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n What is the duration of the volumetric benefit of the\r\n nature-based solution?\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Nature-based replenishment solutions often have time limits\r\n on the benefits attributed to the project. Given the\r\n selected Reporting Year, enter how many more years the\r\n benefits of the nature-based solution may be accounted for,\r\n anywhere from one to 10 years. Though the duration of the\r\n volumetric benefit of the nature-based solution may exceed\r\n 10 years, the tool only forecasts water withdrawal risk out\r\n 10 years from the Reporting Year.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Have you verified the replenishment amount with a third\r\n party?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n \r\n )}\r\n >\r\n
\r\n \r\n Third parties use volumetric water benefit accounting\r\n methods to assess the benefits of water stewardship\r\n activities in a comparable way and ensure they address\r\n current or projected water challenges. If the nature-based\r\n solution providing water replenishment at this site has been\r\n verified by a third party, select the checkbox.\r\n \r\n
\r\n
\r\n {hasWaterWithdrawalThirdPartyVerified ? (\r\n
\r\n
\r\n \r\n What is the name of the verifier?\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n If the nature-based solution providing water replenishment\r\n at this site has been verified by a third party, enter the\r\n name of that organization.\r\n \r\n
\r\n
\r\n ) : null}\r\n \r\n ) : null}\r\n
\r\n
\r\n

Outgoing Water

\r\n
\r\n
\r\n \r\n Outgoing Water Time Period\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The total quantity of outgoing water can be entered on a weekly,\r\n monthly, quarterly or annual basis. Enter the time period in\r\n this field; the tool will automatically calculate the annual\r\n amount as needed, based on the time period and volume entered in\r\n the following field. For example, if your facility emits 1,000\r\n m3 per month, please select Monthly in the 'Outgoing Water Time\r\n Period' field and type 1000 and select m3 within the 'Outgoing\r\n Water Quantity' fields. Data will be annualized automatically to\r\n 12,000 m3 by the tool.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Outgoing Water Quantity\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n u.value !== '16')}\r\n placeholder=\" \"\r\n error={errors.outgoingWaterQuantityUnit}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The total amount of outgoing water from the facility. Please\r\n enter the volume as a number in the text field and select the\r\n correct units from the dropdown list. For example, to enter\r\n 1,000 m3 for the 'Outgoing Water Quantity' field, type 1000 into\r\n the text field and select m3 from the dropdown list.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Outgoing Water Price\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n (\r\n u.value !== '32')}\r\n placeholder=\" \"\r\n error={errors.outgoingWaterPriceUnit}\r\n onChange={(val) => props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Total price paid for wastewater treatment at your facility. This\r\n includes operating expenses for on-site water treatment and fees\r\n paid to a third party.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Where is your outgoing water treated?\r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Facility Details

\r\n
\r\n
\r\n \r\n Total Facility Output By Year\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Total number of units of output from your facility per year. For\r\n example, if your facility produces 10,000 cars per annum, you\r\n would enter 'Cars' in the 'Facility Output' field and '10000' in\r\n this field.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Facility Output\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n The units of output or throughput from your facility. For\r\n example, if your facility produces cars, please enter 'Cars'\r\n into this field. If you are in the hospitality industry, you\r\n could enter 'rooms booked.'\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Projected Facility Output Over 3 Years (%)\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Projection of how the output produced by the facility will\r\n change over the next three years. For example, if your facility\r\n produces cars and you are expecting an increase of 10% cars\r\n produced at the facility over the next three years, enter 10.\r\n You can specify an increase or a decrease (by entering a\r\n negative percentage). If your facility output is likely to stay\r\n constant, please enter '0'. This input is used by the tool to\r\n determine the growth at the facility.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nFacilityDetails.displayName = 'FacilityDetails';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport { Controller, useFieldArray, useFormContext } from 'react-hook-form';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport styles from '../Tabs.module.css';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { FacilityTabFooter } from '../../Helpers/FacilityTabFooter';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport {\r\n FormHelpButton,\r\n FormHelpText,\r\n FormHelpTooltip,\r\n} from '../../../FormHelp';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype PollutantsProps = {\r\n reportingYear?: ReportingYear;\r\n onSave: () => void;\r\n onCancel: () => void;\r\n className?: string;\r\n};\r\n\r\nexport const Pollutants: FC = ({\r\n onSave,\r\n onCancel,\r\n className,\r\n}) => {\r\n const formHelp = useFormHelp();\r\n const {\r\n control,\r\n formState: { errors },\r\n register,\r\n } = useFormContext();\r\n\r\n const { fields } = useFieldArray({\r\n control,\r\n name: 'facilityPollutants',\r\n keyName: 'key',\r\n });\r\n\r\n const hiddenPollutantFields = [\r\n 'casNumber',\r\n 'created',\r\n 'deleted',\r\n 'facilityId',\r\n 'resourceId',\r\n 'id',\r\n 'modified',\r\n 'pollutantName',\r\n ];\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Pollutants

\r\n
\r\n (\r\n \r\n The tool uses water quality standards for material pollutants\r\n as the levels to which outgoing water should be treated. If\r\n you wish to use your own standards please click here.\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\n \r\n \r\n \r\n {fields.map((pollutant, index) => (\r\n \r\n \r\n \r\n \r\n \r\n {hiddenPollutantFields.map((fieldName) => (\r\n <>}\r\n defaultValue={\r\n `facilityPollutants.${index}.${fieldName}` ?? ''\r\n }\r\n />\r\n ))}\r\n \r\n )) ?? null}\r\n \r\n
\r\n CAS Number{' '}\r\n \r\n \r\n Pollutant Name{' '}\r\n \r\n \r\n Threshold (mg/L){' '}\r\n \r\n \r\n Concentration (mg/L){' '}\r\n \r\n
{pollutant.casNumber}{pollutant.name ?? pollutant.pollutantName}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n

\r\n If you know the dilution factor at your facility's discharge\r\n location please enter it here:\r\n \r\n

\r\n
\r\n
\r\n \r\n
\r\n \r\n Value must be between 0 and 1\r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import React from 'react';\r\nimport { REPORTING_YEARS } from 'src/constants/years';\r\nimport { Facility } from 'src/types/facility';\r\nimport { Pollutant } from 'src/types/pollutant';\r\nimport { ParsedUploadRowResults } from 'src/types/upload';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { FacilityFormSchema } from './validation';\r\nimport { Text } from '@chakra-ui/react';\r\nimport { TabNavigatorTab } from './Helpers/FacilityTabNavigator/useTabNavigator';\r\n\r\nexport enum TabStatus {\r\n Warning = 'warning',\r\n Error = 'error',\r\n}\r\n\r\nexport const TAB_MAP: Array = [\r\n {\r\n label: 'Facility Details',\r\n urlQueryParam: 'facility-details',\r\n index: 0,\r\n component: (\r\n \r\n Facility Details{' '}\r\n \r\n *\r\n \r\n \r\n ),\r\n },\r\n {\r\n label: 'Business Information',\r\n urlQueryParam: 'business-information',\r\n index: 1,\r\n component: Business Information,\r\n },\r\n {\r\n label: 'Regulation & Reputation',\r\n urlQueryParam: 'regulation-reputation',\r\n index: 2,\r\n component: (\r\n {`Regulation ${String.fromCharCode(0x0026)} Reputation`}\r\n ),\r\n },\r\n {\r\n label: 'Water Quality',\r\n urlQueryParam: 'water-quality',\r\n index: 3,\r\n component: Water Quality,\r\n },\r\n {\r\n label: 'Pollutants',\r\n urlQueryParam: 'pollutants',\r\n index: 4,\r\n component: Pollutants,\r\n },\r\n {\r\n label: 'Water Action Assessment',\r\n urlQueryParam: 'water-action-assessment',\r\n index: 5,\r\n component: Water Action Assessment,\r\n },\r\n];\r\n\r\nexport const TAB_INPUT_MAP = {\r\n reportingYear: 0,\r\n incomingWaterTimePeriod: 0,\r\n incomingWaterQuantity: 0,\r\n incomingWaterQuantityUnit: 0,\r\n incomingWaterPrice: 0,\r\n incomingWaterPriceCurrencyCode: 0,\r\n incomingWaterPriceUnit: 0,\r\n incomingWaterSource: 0,\r\n waterWithdrawalReplenishment: 0,\r\n waterWithdrawalAnnualizedVolumetricBenefit: 0,\r\n waterWithdrawalAnnualizedVolumetricBenefitUOMId: 0,\r\n waterWithdrawalSupportingReplenishmentWaterFund: 0,\r\n waterWithdrawalReplenishmentDurationInYears: 0,\r\n waterWithdrawalThirdPartyVerified: 0,\r\n waterWithdrawalThirdPartyVerifier: 0,\r\n outgoingWaterTimePeriod: 0,\r\n outgoingWaterQuantity: 0,\r\n outgoingWaterQuantityUnit: 0,\r\n outgoingWaterPrice: 0,\r\n outgoingWaterPriceCurrencyCode: 0,\r\n outgoingWaterPriceUnit: 0,\r\n outgoingWaterTreatmentSource: 0,\r\n facilityOutput: 0,\r\n facilityOutputUnitsOfMeasure: 0,\r\n projectedFacilityOutputIncrease: 0,\r\n\r\n // Tab Two\r\n droughScenario: 1,\r\n projectedIncomingWaterPriceIncrease: 1,\r\n projectedIncomingWaterQuantityIncrease: 1,\r\n projectedOutgoingWaterPriceIncrease: 1,\r\n projectedOutgoingWaterQuantityIncrease: 1,\r\n revenue: 1,\r\n revenueCurrencyCode: 1,\r\n projectedRevenueIncrease: 1,\r\n revenueLostDueToWaterScarcity: 1,\r\n\r\n // Tab Three\r\n regulationOfWaterInLocalCommunityQuestion: 2,\r\n facilityEnvironmentalReputationQuestion: 2,\r\n dependingSameWaterSourceQuestion: 2,\r\n exemptWaterRestrictionQuestion: 2,\r\n ngoLocalPressureQuestion: 2,\r\n\r\n // Tab Four\r\n incomingWaterQualityComparison: 3,\r\n alternativeWaterSourceQuestion: 3,\r\n outgoingWaterOnsiteTreatmentCapacity: 3,\r\n outgoingWaterOffsiteTreatmentCapacity: 3,\r\n incomingWaterImpairmentSalinity: 3,\r\n incomingWaterImpairmentOrganics: 3,\r\n incomingWaterImpairmentSuspendedSolids: 3,\r\n incomingWaterImpairmentTaste: 3,\r\n incomingWaterImpairmentOdor: 3,\r\n\r\n // Tab Five\r\n facilityPollutants: 4,\r\n ownOutgoingWaterStandards: 4,\r\n facilityDilutionFactor: 4,\r\n\r\n // Tab 6\r\n assessment: 5,\r\n};\r\n\r\nfunction getValueAsNumber(\r\n first: number | undefined,\r\n second: string | number | undefined\r\n): number | undefined {\r\n if (first) {\r\n return first;\r\n }\r\n\r\n const converted = Number(second);\r\n\r\n if (!isNaN(converted)) {\r\n return converted;\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction getValueAsBoolean(\r\n first: boolean | undefined,\r\n second: string | boolean | undefined\r\n): boolean | undefined {\r\n if (first) {\r\n return first;\r\n }\r\n\r\n if (typeof second === 'string') {\r\n return second.toLowerCase() === 'yes';\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function mapDefaultReportingYearFormValues(\r\n reportingYear?: ReportingYear,\r\n hydrationData?: ParsedUploadRowResults\r\n) {\r\n const { input } = reportingYear ?? {};\r\n\r\n const data: Partial<\r\n FacilityFormSchema & { facilityPollutants: Array }\r\n > = {\r\n // Tab One\r\n reportingYear: `${\r\n reportingYear?.reportingYear ??\r\n hydrationData?.reportingYear ??\r\n REPORTING_YEARS[0]\r\n }`,\r\n\r\n incomingWaterTimePeriod:\r\n input?.incomingWaterTimePeriod ?? hydrationData?.incomingWaterTimePeriod,\r\n\r\n incomingWaterQuantity: getValueAsNumber(\r\n input?.incomingWaterQuantity,\r\n hydrationData?.incomingWaterQuantity\r\n ),\r\n\r\n incomingWaterQuantityUnit: getValueAsNumber(\r\n input?.incomingWaterQuantityUnit,\r\n hydrationData?.incomingWaterQuantityUnit\r\n ),\r\n\r\n incomingWaterPrice: getValueAsNumber(\r\n input?.incomingWaterPrice,\r\n hydrationData?.incomingWaterPrice\r\n ),\r\n\r\n incomingWaterPriceCurrencyCode:\r\n input?.incomingWaterPriceCurrencyCode ??\r\n hydrationData?.incomingWaterPriceCurrencyCode,\r\n\r\n incomingWaterPriceUnit: getValueAsNumber(\r\n input?.incomingWaterPriceUnit,\r\n hydrationData?.incomingWaterPriceUnit\r\n ),\r\n\r\n incomingWaterSource:\r\n input?.incomingWaterSource ?? hydrationData?.incomingWaterSource,\r\n\r\n waterWithdrawalReplenishment: getValueAsBoolean(\r\n input?.waterWithdrawalReplenishment,\r\n hydrationData?.waterWithdrawalReplenishment\r\n ),\r\n\r\n waterWithdrawalAnnualizedVolumetricBenefit: getValueAsNumber(\r\n input?.waterWithdrawalAnnualizedVolumetricBenefit,\r\n hydrationData?.waterWithdrawalAnnualizedVolumetricBenefit\r\n ),\r\n\r\n waterWithdrawalAnnualizedVolumetricBenefitUOMId: getValueAsNumber(\r\n input?.waterWithdrawalAnnualizedVolumetricBenefitUOMId,\r\n hydrationData?.waterWithdrawalAnnualizedVolumetricBenefitUOMId\r\n ),\r\n\r\n waterWithdrawalSupportingReplenishmentWaterFund:\r\n input?.waterWithdrawalSupportingReplenishmentWaterFund ??\r\n hydrationData?.waterWithdrawalSupportingReplenishmentWaterFund,\r\n\r\n waterWithdrawalReplenishmentDurationInYears: getValueAsNumber(\r\n input?.waterWithdrawalReplenishmentDurationInYears,\r\n hydrationData?.waterWithdrawalReplenishmentDurationInYears\r\n ),\r\n\r\n waterWithdrawalThirdPartyVerified: getValueAsBoolean(\r\n input?.waterWithdrawalThirdPartyVerified,\r\n hydrationData?.waterWithdrawalThirdPartyVerified\r\n ),\r\n\r\n waterWithdrawalThirdPartyVerifier:\r\n input?.waterWithdrawalThirdPartyVerifier ??\r\n hydrationData?.waterWithdrawalThirdPartyVerifier,\r\n\r\n outgoingWaterTimePeriod:\r\n input?.outgoingWaterTimePeriod ?? hydrationData?.outgoingWaterTimePeriod,\r\n\r\n outgoingWaterQuantity: getValueAsNumber(\r\n input?.outgoingWaterQuantity,\r\n hydrationData?.outgoingWaterQuantity\r\n ),\r\n\r\n outgoingWaterQuantityUnit: getValueAsNumber(\r\n input?.outgoingWaterQuantityUnit,\r\n hydrationData?.outgoingWaterQuantityUnit\r\n ),\r\n\r\n outgoingWaterPrice: getValueAsNumber(\r\n input?.outgoingWaterPrice,\r\n hydrationData?.outgoingWaterPrice\r\n ),\r\n\r\n outgoingWaterPriceCurrencyCode:\r\n input?.outgoingWaterPriceCurrencyCode ??\r\n hydrationData?.outgoingWaterPriceCurrencyCode,\r\n\r\n outgoingWaterPriceUnit: getValueAsNumber(\r\n input?.outgoingWaterPriceUnit,\r\n hydrationData?.outgoingWaterPriceUnit\r\n ),\r\n\r\n outgoingWaterTreatmentSource:\r\n input?.outgoingWaterTreatmentSource ??\r\n hydrationData?.outgoingWaterTreatmentSource,\r\n\r\n facilityOutput: getValueAsNumber(\r\n input?.facilityOutput,\r\n hydrationData?.facilityOutput\r\n ),\r\n\r\n facilityOutputUnitsOfMeasure:\r\n input?.facilityOutputUnitsOfMeasure ??\r\n hydrationData?.facilityOutputUnitsOfMeasure,\r\n\r\n projectedFacilityOutputIncrease: getValueAsNumber(\r\n input?.projectedFacilityOutputIncrease,\r\n hydrationData?.projectedFacilityOutputIncrease\r\n ),\r\n\r\n // Tab Two\r\n droughScenario: getValueAsBoolean(\r\n input?.droughScenario,\r\n hydrationData?.droughScenario\r\n ),\r\n\r\n projectedIncomingWaterPriceIncrease: getValueAsNumber(\r\n input?.projectedIncomingWaterPriceIncrease,\r\n hydrationData?.projectedIncomingWaterPriceIncrease\r\n ),\r\n\r\n projectedIncomingWaterQuantityIncrease: getValueAsNumber(\r\n input?.projectedIncomingWaterQuantityIncrease,\r\n hydrationData?.projectedIncomingWaterQuantityIncrease\r\n ),\r\n\r\n projectedOutgoingWaterPriceIncrease: getValueAsNumber(\r\n input?.projectedOutgoingWaterPriceIncrease,\r\n hydrationData?.projectedOutgoingWaterPriceIncrease\r\n ),\r\n\r\n projectedOutgoingWaterQuantityIncrease: getValueAsNumber(\r\n input?.projectedOutgoingWaterQuantityIncrease,\r\n hydrationData?.projectedOutgoingWaterQuantityIncrease\r\n ),\r\n\r\n revenue: getValueAsNumber(input?.revenue, hydrationData?.revenue),\r\n\r\n revenueCurrencyCode:\r\n input?.revenueCurrencyCode ?? hydrationData?.revenueCurrencyCode,\r\n\r\n projectedRevenueIncrease: getValueAsNumber(\r\n input?.projectedRevenueIncrease,\r\n hydrationData?.projectedRevenueIncrease\r\n ),\r\n\r\n revenueLostDueToWaterScarcity:\r\n input?.revenueLostDueToWaterScarcity ??\r\n hydrationData?.revenueLostDueToWaterScarcity,\r\n\r\n // Tab Three\r\n regulationOfWaterInLocalCommunityQuestion:\r\n input?.regulationOfWaterInLocalCommunityQuestion ??\r\n hydrationData?.regulationOfWaterInLocalCommunityQuestion,\r\n\r\n facilityEnvironmentalReputationQuestion:\r\n input?.facilityEnvironmentalReputationQuestion ??\r\n hydrationData?.facilityEnvironmentalReputationQuestion,\r\n\r\n dependingSameWaterSourceQuestion:\r\n input?.dependingSameWaterSourceQuestion ??\r\n hydrationData?.dependingSameWaterSourceQuestion,\r\n\r\n exemptWaterRestrictionQuestion:\r\n input?.exemptWaterRestrictionQuestion ??\r\n hydrationData?.exemptWaterRestrictionQuestion,\r\n\r\n ngoLocalPressureQuestion:\r\n input?.ngoLocalPressureQuestion ??\r\n hydrationData?.ngoLocalPressureQuestion,\r\n\r\n // Tab Four\r\n incomingWaterQualityComparison:\r\n input?.incomingWaterQualityComparison ??\r\n hydrationData?.incomingWaterQualityComparison,\r\n\r\n alternativeWaterSourceQuestion:\r\n input?.alternativeWaterSourceQuestion ??\r\n hydrationData?.alternativeWaterSourceQuestion,\r\n\r\n outgoingWaterOnsiteTreatmentCapacity:\r\n input?.outgoingWaterOnsiteTreatmentCapacity ??\r\n hydrationData?.outgoingWaterOnsiteTreatmentCapacity,\r\n\r\n outgoingWaterOffsiteTreatmentCapacity:\r\n input?.outgoingWaterOffsiteTreatmentCapacity ??\r\n hydrationData?.outgoingWaterOffsiteTreatmentCapacity,\r\n\r\n incomingWaterImpairmentSalinity: getValueAsBoolean(\r\n input?.incomingWaterImpairmentSalinity,\r\n hydrationData?.incomingWaterImpairmentSalinity\r\n ),\r\n\r\n incomingWaterImpairmentOrganics: getValueAsBoolean(\r\n input?.incomingWaterImpairmentOrganics,\r\n hydrationData?.incomingWaterImpairmentOrganics\r\n ),\r\n\r\n incomingWaterImpairmentSuspendedSolids: getValueAsBoolean(\r\n input?.incomingWaterImpairmentSuspendedSolids,\r\n hydrationData?.incomingWaterImpairmentSuspendedSolids\r\n ),\r\n\r\n incomingWaterImpairmentTaste: getValueAsBoolean(\r\n input?.incomingWaterImpairmentTaste,\r\n hydrationData?.incomingWaterImpairmentTaste\r\n ),\r\n\r\n incomingWaterImpairmentOdor: getValueAsBoolean(\r\n input?.incomingWaterImpairmentOdor,\r\n hydrationData?.incomingWaterImpairmentOdor\r\n ),\r\n\r\n // Tab Five\r\n ownOutgoingWaterStandards: getValueAsBoolean(\r\n input?.ownOutgoingWaterStandards,\r\n hydrationData?.ownOutgoingWaterStandards\r\n ),\r\n facilityPollutants: input?.facilityPollutants, // No hydration, cannot be changed on create\r\n facilityDilutionFactor: getValueAsNumber(\r\n input?.facilityDilutionFactor,\r\n hydrationData?.facilityDilutionFactor\r\n ),\r\n\r\n // Tab Six\r\n assessment: {\r\n questionaireId: reportingYear?.input.assessment?.questionnaireId,\r\n reportingyearId: reportingYear?.input.assessment?.reportingyearId,\r\n assessmentAnswers: {\r\n ...(reportingYear?.input.assessment?.assessmentAnswers.reduce<\r\n Record\r\n >(\r\n (acc, answer) => ({\r\n ...acc,\r\n [answer.questionId]: answer.questionChoiceId,\r\n }),\r\n {}\r\n ) ?? {}),\r\n },\r\n },\r\n };\r\n\r\n return data;\r\n}\r\n\r\nexport function mergeFacilityAndAssessment(\r\n reportingYear?: number,\r\n facility?: Facility\r\n) {\r\n const data = {\r\n // Tab One\r\n facilityName: facility?.facilityName ?? '',\r\n fkCountry: facility?.fkCountry ?? '',\r\n fkState: facility?.fkState ?? '',\r\n fkCity: facility?.fkCity ?? '',\r\n level1SectorId: `${facility?.level1SectorId ?? ''}`,\r\n level2SectorId: `${facility?.level2SectorId ?? ''}`,\r\n fkSector: `${facility?.fkSector ?? ''}`,\r\n label: facility?.label ?? '',\r\n active: facility?.active ?? true,\r\n modelingOnly: facility?.modelingOnly ?? false,\r\n reportingYear: `${reportingYear ?? REPORTING_YEARS[0]}`,\r\n };\r\n return data;\r\n}\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from '../Tabs.module.css';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { Controller, useFormContext } from 'react-hook-form';\r\nimport { MappedReferenceData } from 'src/types/referenceData';\r\nimport { FacilityTabFooter } from '../../Helpers/FacilityTabFooter';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\nimport { FormHelpButton, FormHelpText } from '../../../FormHelp';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype RegulationReputationProps = {\r\n referenceData: MappedReferenceData;\r\n reportingYear?: ReportingYear;\r\n onSave: () => void;\r\n onCancel: () => void;\r\n className?: string;\r\n};\r\n\r\nexport const RegulationReputation: FC = ({\r\n referenceData,\r\n onSave,\r\n onCancel,\r\n className,\r\n}) => {\r\n const formHelp = useFormHelp();\r\n const {\r\n control,\r\n formState: { errors },\r\n } = useFormContext();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Regulation & Reputation

\r\n
\r\n
\r\n \r\n How would you rate the regulation of water in your local\r\n community compared to the country as a whole?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Select an answer to customize the tool's regulatory risk score\r\n to the specific local area of the facility. Please consider the\r\n quality, strength and coverage of the water legal framework in\r\n your local area. If it is worse than the country as a whole then\r\n the regulatory risk score will be lower. The regulatory risk\r\n score impacts the incoming, outgoing and revenue at risk\r\n likelihood scores. If you are unsure, please select 'Do not know\r\n or N/A' and the country level score will be used as a default.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Have there been environmental issues at your facility that have\r\n affected your company's reputation?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Select an answer to customize the tool's reputational risk score\r\n for your facility to be specific to your local area. If there\r\n have been environmental issues at your facility that have\r\n affected your company's reputation, the reputational risk score\r\n will be higher. The reputational risk score impacts the incoming\r\n and outgoing risk likelihood scores. If you are unsure, please\r\n select 'Do not know or N/A' and the country level score will be\r\n used as a default.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Is your facility aware of the stakeholders depending on the same\r\n water resources?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Select an answer to customize the reputational risk score for\r\n your facility to the specific local area of the facility. If you\r\n do not know what other businesses or organizations depend on the\r\n same water resources as your facility, the reputational risk\r\n score will be higher. The reputational risk score impacts the\r\n incoming and outgoing risk likelihood scores. If you are unsure,\r\n please select 'Do not know or N/A' and the country level score\r\n will be used as a default.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Is your facility's industry exempt from potential water\r\n restrictions imposed by local regulators?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The tool provides a revenue at risk likelihood score which\r\n examines water scarcity, your industry's importance to the local\r\n economy, your industry's water requirement, the quality of local\r\n regulations and your facility's historical trend of revenue\r\n loss. To customize the tool's revenue at risk likelihood score\r\n to be specific to local conditions, please indicate if your\r\n industry is exempt from potential water restrictions imposed by\r\n local regulators. If your facility's industry is exempt from\r\n potential water restrictions, the revenue at risk likelihood\r\n score will be lower. If you are unsure, please select 'Do not\r\n know or N/A'.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Has there been any local pressure from NGOs or the public\r\n relating to water quality issues that have led to a change in\r\n water management practices at your facility?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n The tool provides an outgoing risk likelihood score which\r\n examines water stress, regulatory and reputational risk and\r\n population density. To customize the tool's outgoing risk\r\n likelihood score to be more specific to local conditions, please\r\n indicate whether there has been any local pressure from NGOs or\r\n the public relating to water quality issues that have led to a\r\n change in water management practices at your facility. If there\r\n has been a change in water management practices because of local\r\n stakeholder pressure, the outgoing risk likelihood score will be\r\n higher. If you are unsure, please select 'Do not know or N/A'.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from '../Tabs.module.css';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { Controller, useFormContext } from 'react-hook-form';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { MappedReferenceData } from 'src/types/referenceData';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { FacilityTabFooter } from '../../Helpers/FacilityTabFooter';\r\nimport { FormHelpButton, FormHelpText } from '../../../FormHelp';\r\nimport { useFormHelp } from 'src/hooks/useFormHelp';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype WaterQualityProps = {\r\n referenceData: MappedReferenceData;\r\n reportingYear?: ReportingYear;\r\n onSave: () => void;\r\n onCancel: () => void;\r\n className?: string;\r\n};\r\n\r\nexport const WaterQuality: FC = ({\r\n referenceData,\r\n reportingYear,\r\n onSave,\r\n onCancel,\r\n className,\r\n}) => {\r\n const formHelp = useFormHelp();\r\n const {\r\n control,\r\n formState: { errors },\r\n } = useFormContext();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Water Quality

\r\n
\r\n
\r\n \r\n How would you rate the quality of incoming water for this year\r\n compared to previous years?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Please indicate how you would rate the quality of incoming\r\n water. If incoming water quality is getting worse, you can\r\n specify the type of impairment below. If the quality is the same\r\n or getting better this will remove the incoming quality risk\r\n premium. If you are unsure, please select \"Do not know\".\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n What type of local water impairment, if any, is there for\r\n incoming water? (Check all that apply):\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n (\r\n \r\n A. Salinity\r\n \r\n )}\r\n >\r\n (\r\n \r\n B. Organics\r\n \r\n )}\r\n >\r\n (\r\n \r\n C. Suspended Solids\r\n \r\n )}\r\n >\r\n (\r\n \r\n D. Taste\r\n \r\n )}\r\n >\r\n (\r\n \r\n E. Odor\r\n \r\n )}\r\n >\r\n
\r\n
\r\n \r\n If local water quality is getting worse, please specify the type\r\n of local water impairment by checking all boxes that apply. If\r\n you do not know the type of impairment, leave all the boxes\r\n unchecked. This will influence the incoming quality risk\r\n calculation.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Are there alternative sources of water available for this\r\n facility?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Please indicate whether there are alternative sources of water\r\n available for your facility. This will influence the incoming\r\n quality risk premium calculation.\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n If treating outgoing water on-site, is your water treatment\r\n facility close to capacity?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Please indicate whether your on-site water treatment facility is\r\n close to capacity. On-site treatment facilities that are close\r\n to capacity will have an outgoing risk premium even if local\r\n water quality thresholds are not currently being breached. Your\r\n facility will also be more likely to realize increased operating\r\n costs in the future. If you are unsure, please select \"Do Not\r\n Know\".\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n If sending outgoing water to a third party for treatment, is the\r\n third party close to capacity?\r\n \r\n \r\n
\r\n
\r\n
\r\n (\r\n props.onChange(val)}\r\n />\r\n )}\r\n />\r\n
\r\n \r\n Please indicate whether your third party water treatment\r\n facility is close to capacity. Third party treatment facilities\r\n that are close to capacity will have an outgoing risk premium\r\n even if local water quality thresholds are not currently being\r\n breached. Your facility will also be more likely to realize\r\n increased operating costs in the future. If you are unsure,\r\n please select \"Do Not Know\".\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import {\r\n AlertIcon,\r\n Box,\r\n AlertTitle,\r\n AlertDescription,\r\n Stack,\r\n Alert,\r\n keyframes,\r\n} from '@chakra-ui/react';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\r\nimport { FormProvider, useForm } from 'react-hook-form';\r\nimport { useQuery } from 'react-query';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { getClassifications } from 'src/clients/api/classification';\r\nimport { getCountries } from 'src/clients/api/country';\r\nimport { getReferenceData } from 'src/clients/api/v5.referenceData';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { ModalDialog } from 'src/components/ModalDialog/ModalDialog';\r\nimport { UploadFlowError } from 'src/constants/errors';\r\nimport { useQueryParams } from 'src/hooks/useQueryParams';\r\nimport { Pollutant } from 'src/types/pollutant';\r\nimport { MappedReferenceOptions } from 'src/types/referenceData';\r\nimport { ParsedUploadRowResults } from 'src/types/upload';\r\nimport { ReportingYear } from 'src/types/v5.reportingYear';\r\nimport { AssessmentCarousel } from '../AssessmentCarousel';\r\nimport styles from '../FacilityForm.module.css';\r\nimport { FacilityTabNavigator } from '../Helpers/FacilityTabNavigator';\r\nimport { useTabNavigator } from '../Helpers/FacilityTabNavigator/useTabNavigator';\r\nimport { BusinessInformation } from '../Tabs/BusinessInformation';\r\nimport { FacilityDetails } from '../Tabs/FacilityDetails';\r\nimport { Pollutants } from '../Tabs/Pollutants';\r\nimport { RegulationReputation } from '../Tabs/RegulationReputation';\r\nimport { WaterQuality } from '../Tabs/WaterQuality';\r\nimport {\r\n mapDefaultReportingYearFormValues,\r\n TAB_INPUT_MAP,\r\n TAB_MAP,\r\n} from '../utils';\r\nimport { FacilityFormSchema, facilityFormSchema } from '../validation';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport type WrmFormProps = {\r\n availableYears: Array;\r\n reportingYear?: ReportingYear;\r\n onSave: (values: FacilityFormSchema) => void;\r\n isEditing?: boolean;\r\n hydrateWith?: ParsedUploadRowResults;\r\n defaultPollutants?: Array;\r\n uploadErrorType?: UploadFlowError;\r\n};\r\n\r\nconst jiggle = keyframes`\r\n 8%, 41% { transform: translateX(-10px) }\r\n 25%, 58% { transform: translateX(10px) }\r\n 75% { transform: translateX(-5px) }\r\n 92% { transform: translateX(5px) }\r\n 0%, 100% { transform: translateX(0) }\r\n`;\r\n\r\nexport const WrmForm: FC = ({\r\n availableYears,\r\n reportingYear,\r\n defaultPollutants,\r\n onSave,\r\n isEditing,\r\n hydrateWith,\r\n uploadErrorType,\r\n}) => {\r\n const history = useHistory();\r\n const params = useQueryParams();\r\n const initialTabKey = params.get('tab');\r\n const [isCancelling, setIsCancelling] = useState(false);\r\n\r\n const initialTab = useMemo(\r\n () => TAB_MAP.find((t) => t.urlQueryParam === initialTabKey)?.index,\r\n [initialTabKey]\r\n );\r\n\r\n const tabNavigator = useTabNavigator(TAB_MAP, initialTab);\r\n const { activeTabIndex } = tabNavigator;\r\n\r\n const isUploadResolutionFlow = !!hydrateWith;\r\n const isAssessmentError = uploadErrorType === UploadFlowError.Assessment;\r\n\r\n const { isLoading: isLoadingCountries } = useQuery('countries', () =>\r\n getCountries()\r\n );\r\n\r\n const { isLoading: isLoadingClassifications } = useQuery(\r\n ['classifications', 'levelOne'],\r\n () => getClassifications()\r\n );\r\n\r\n const { isLoading: isLoadingReferenceData, data: referenceData } = useQuery(\r\n ['referenceData'],\r\n () => getReferenceData()\r\n );\r\n\r\n const mappedDefaultValues = mapDefaultReportingYearFormValues(\r\n reportingYear,\r\n hydrateWith\r\n );\r\n\r\n if (!mappedDefaultValues.facilityPollutants?.length) {\r\n mappedDefaultValues.facilityPollutants = defaultPollutants ?? [];\r\n }\r\n\r\n const methods = useForm({\r\n mode: 'onChange',\r\n defaultValues: mappedDefaultValues,\r\n resolver: yupResolver(facilityFormSchema),\r\n });\r\n\r\n const { formState } = methods;\r\n const tabsInError = useMemo(\r\n () =>\r\n new Set([\r\n ...Object.keys(formState.errors).map(\r\n (key) => TAB_INPUT_MAP[key as keyof typeof TAB_INPUT_MAP]\r\n ),\r\n ...(isAssessmentError ? [5] : []),\r\n ]),\r\n [formState.errors, isAssessmentError]\r\n );\r\n\r\n const onCancel = useCallback(() => {\r\n if (formState.isDirty) {\r\n setIsCancelling(true);\r\n } else {\r\n history.go(-1);\r\n }\r\n }, [formState.isDirty, history]);\r\n\r\n useEffect(() => {\r\n if (!isUploadResolutionFlow) {\r\n return;\r\n }\r\n\r\n methods.trigger();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n isUploadResolutionFlow,\r\n isLoadingCountries,\r\n isLoadingClassifications,\r\n isLoadingReferenceData,\r\n ]);\r\n\r\n if (\r\n isLoadingCountries ||\r\n isLoadingClassifications ||\r\n isLoadingReferenceData\r\n ) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n const animation = `${jiggle} .5s linear`;\r\n const handleSave = methods.handleSubmit(onSave, () => {\r\n document.getElementById('AppContent')?.scrollTo({\r\n top: 0,\r\n behavior: 'smooth',\r\n });\r\n });\r\n\r\n if (referenceData && referenceData?.status === 'success') {\r\n const formReferenceData = {\r\n waterUnits: referenceData.value.data.waterUnits,\r\n currencies: referenceData.value.data.currencies,\r\n options: referenceData.value.data.options.reduce(\r\n (out, option) => ({\r\n ...out,\r\n [option.type]: option.options,\r\n }),\r\n {} as MappedReferenceOptions\r\n ),\r\n };\r\n\r\n const hasSubmitError =\r\n formState.isSubmitted && !formState.isSubmitSuccessful;\r\n const hasConflictError =\r\n isUploadResolutionFlow && (!formState.isValid || isAssessmentError);\r\n const hasFormError = hasSubmitError || hasConflictError;\r\n\r\n return (\r\n \r\n setIsCancelling(false)}\r\n onConfirm={() => history.go(-1)}\r\n isOpen={isCancelling}\r\n title={'Form has unsaved changes'}\r\n description={\r\n 'You have unsaved changes. Are you sure you want to cancel?'\r\n }\r\n />\r\n {hasFormError ? (\r\n \r\n {hasSubmitError ? (\r\n \r\n \r\n \r\n Form could not be submitted\r\n \r\n Some form values are invalid.\r\n \r\n \r\n
\r\n ) : null}\r\n {isUploadResolutionFlow && hasConflictError ? (\r\n <>\r\n {isAssessmentError ? (\r\n \r\n \r\n \r\n You have upload conflicts\r\n \r\n Please complete your water action assessement.\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n You have upload conflicts\r\n \r\n Your upload data was not able to be mapped successfully.\r\n Please resolve the conflicts below before continuing.\r\n \r\n \r\n \r\n )}\r\n \r\n ) : null}\r\n \r\n ) : null}\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\n );\r\n }\r\n\r\n return ;\r\n};\r\n\r\nWrmForm.displayName = 'WrmForm';\r\n","import { ReactNode, useState } from 'react';\r\n\r\nexport type TabNavigatorTab = {\r\n label: string;\r\n index: number;\r\n urlQueryParam: string;\r\n component: ReactNode;\r\n};\r\n\r\nexport type UseTabNavigator = {\r\n tabs: Array;\r\n canNext: boolean;\r\n onNextTab: () => void;\r\n activeTabIndex: number;\r\n setActiveTabIndex: React.Dispatch>;\r\n};\r\n\r\nexport function useTabNavigator(\r\n tabs: UseTabNavigator['tabs'],\r\n initializedIndex: number = 0\r\n): UseTabNavigator {\r\n const [activeTabIndex, setActiveTabIndex] = useState(\r\n initializedIndex\r\n );\r\n\r\n const canNext = activeTabIndex < tabs.length - 1;\r\n\r\n const onNextTab = () => {\r\n if (canNext) {\r\n setActiveTabIndex(activeTabIndex + 1);\r\n }\r\n };\r\n\r\n return {\r\n tabs,\r\n onNextTab,\r\n activeTabIndex,\r\n setActiveTabIndex,\r\n canNext,\r\n };\r\n}\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, useEffect } from 'react';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { RouteComponentProps, useLocation } from 'react-router-dom';\r\nimport {\r\n createFacilityReportingYear,\r\n getFacility,\r\n getFacilityReportingYears,\r\n} from 'src/clients/api/v5.facility';\r\nimport { getUserIdInStorage } from 'src/clients/helpers';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { FacilityFormSchema } from 'src/components/FacilityForm/validation';\r\nimport { WrmForm } from 'src/components/FacilityForm/WrmForm';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { UploadFlowError } from 'src/constants/errors';\r\nimport { REPORTING_YEARS } from 'src/constants/years';\r\nimport { useAsyncFormState } from 'src/hooks/useAsyncFormState';\r\nimport {\r\n ParsedUploadRowErrors,\r\n ParsedUploadRowResults,\r\n} from 'src/types/upload';\r\nimport styles from './ReportingYearCreate.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ReportingYearCreateProps = {};\r\n\r\nexport const ReportingYearCreate: FC<\r\n ReportingYearCreateProps & RouteComponentProps<{ id: string }>\r\n> = ({ match, history }) => {\r\n const { id } = match.params;\r\n const { state } = useLocation<\r\n | {\r\n uploadResults?: {\r\n rowResults: ParsedUploadRowResults;\r\n rowErrors: ParsedUploadRowErrors;\r\n rowId: string;\r\n errorType: UploadFlowError;\r\n };\r\n }\r\n | undefined\r\n >();\r\n\r\n const uploadResults = state?.uploadResults;\r\n\r\n const { setState, resetState } = useAsyncFormState();\r\n const queryClient = useQueryClient();\r\n\r\n useEffect(() => {\r\n if (resetState) {\r\n resetState();\r\n }\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const facilityQuery = useQuery(['facilities', id], () => getFacility(id));\r\n\r\n const yearsQuery = useQuery(['facilities', id, 'reportingYears'], () =>\r\n getFacilityReportingYears(id)\r\n );\r\n\r\n if (facilityQuery.isLoading || yearsQuery.isLoading) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n const onSave = async (values: FacilityFormSchema) => {\r\n if (setState) {\r\n try {\r\n setState('saveState', { status: 'loading' });\r\n\r\n const assessmentEntries = Object.entries(\r\n values.assessment.assessmentAnswers\r\n );\r\n\r\n const cleanedEntries = assessmentEntries.filter(\r\n ([_key, value]) => !!value\r\n );\r\n\r\n const assessment =\r\n cleanedEntries.length > 0 && cleanedEntries.length < 13\r\n ? null\r\n : {\r\n ...values.assessment,\r\n assessmentAnswers: assessmentEntries.map(\r\n ([questionId, questionChoiceId]) => ({\r\n questionId,\r\n questionChoiceId,\r\n })\r\n ),\r\n };\r\n\r\n const result = await createFacilityReportingYear(\r\n id,\r\n {\r\n ...values,\r\n userId: `${getUserIdInStorage()}`,\r\n projectedFacilityOutputIncrease: Number(\r\n values.projectedFacilityOutputIncrease\r\n ),\r\n assessment,\r\n },\r\n {\r\n ...(uploadResults?.rowId\r\n ? {\r\n query: {\r\n batchUploadRowId: uploadResults.rowId,\r\n },\r\n }\r\n : {}),\r\n }\r\n );\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState('saveState', {\r\n status: 'success',\r\n message: 'Facility created successfully!',\r\n });\r\n\r\n if (uploadResults) {\r\n queryClient.refetchQueries(['activeUploads']);\r\n }\r\n\r\n queryClient.invalidateQueries(['facilities', id, 'reportingYears']);\r\n queryClient.invalidateQueries(['aggregates']);\r\n\r\n history.push(`/app/facilities/${id}`);\r\n } catch (e) {\r\n setState('saveState', {\r\n status: 'error',\r\n message: 'There was an error saving your facility.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n const yearsData = yearsQuery.data;\r\n const takenYears =\r\n (yearsData &&\r\n yearsData.status === 'success' &&\r\n yearsData.value.data.map((ry) => ry.reportingYear)) ||\r\n [];\r\n\r\n const facilityData = facilityQuery.data;\r\n const defaultPollutants =\r\n facilityData && facilityData.status === 'success'\r\n ? facilityData.value.data.defaultPollutants\r\n : [];\r\n\r\n return (\r\n <>\r\n
\r\n Add Reporting Year\r\n\r\n \r\n Your privacy is important to us. Precautions are in place to protect\r\n your information against any misuse. Please refer to the{' '}\r\n PRIVACY NOTICE for\r\n additional details.\r\n \r\n
\r\n !takenYears.includes(x))}\r\n onSave={onSave}\r\n uploadErrorType={uploadResults?.errorType}\r\n />\r\n \r\n );\r\n};\r\n\r\nReportingYearCreate.displayName = 'ReportingYearCreate';\r\n","import { Button } from '@chakra-ui/react';\r\nimport { mdiChevronDoubleLeft } from '@mdi/js';\r\nimport Icon from '@mdi/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useEffect } from 'react';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { Link, RouteComponentProps } from 'react-router-dom';\r\nimport {\r\n getFacilityReportingYear,\r\n updateFacilityReportingYear,\r\n} from 'src/clients/api/v5.facility';\r\nimport { getUserIdInStorage } from 'src/clients/helpers';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { FacilityFormSchema } from 'src/components/FacilityForm/validation';\r\nimport { WrmForm } from 'src/components/FacilityForm/WrmForm';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { REPORTING_YEARS } from 'src/constants/years';\r\nimport { useAsyncFormState } from 'src/hooks/useAsyncFormState';\r\nimport styles from './ReportingYearEdit.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype ReportingYearEditProps = {};\r\n\r\nexport const ReportingYearEdit: FC<\r\n ReportingYearEditProps &\r\n RouteComponentProps<{ id: string; reportingYearId: string }>\r\n> = ({ match, history }) => {\r\n const { id, reportingYearId } = match.params;\r\n const { setState, resetState } = useAsyncFormState();\r\n const queryClient = useQueryClient();\r\n\r\n useEffect(() => {\r\n if (resetState) {\r\n resetState();\r\n }\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const { data, isLoading, error, refetch, isFetching } = useQuery(\r\n ['facilities', id, 'reportingYear', reportingYearId],\r\n () => getFacilityReportingYear(id, reportingYearId)\r\n );\r\n\r\n if (isLoading) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n if (error || !data || data.status === 'error') {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const onSave = async (values: FacilityFormSchema) => {\r\n if (setState) {\r\n try {\r\n setState('saveState', { status: 'loading' });\r\n\r\n const data = {\r\n ...values,\r\n userId: `${getUserIdInStorage()}`,\r\n projectedFacilityOutputIncrease: Number(\r\n values.projectedFacilityOutputIncrease\r\n ),\r\n assessment: {\r\n ...values.assessment,\r\n assessmentAnswers: Object.entries(\r\n values.assessment.assessmentAnswers\r\n ).map(([questionId, questionChoiceId]) => ({\r\n questionId,\r\n questionChoiceId,\r\n })),\r\n },\r\n };\r\n\r\n const result = await updateFacilityReportingYear(\r\n id,\r\n reportingYearId,\r\n data\r\n );\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState('saveState', {\r\n status: 'success',\r\n message: 'Facility created successfully!',\r\n });\r\n\r\n queryClient.invalidateQueries(['facilities', id]);\r\n queryClient.invalidateQueries(['aggregates']);\r\n\r\n history.push(`/app/facilities/${id}`);\r\n } catch (e) {\r\n setState('saveState', {\r\n status: 'error',\r\n message: 'There was an error saving your facility.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n \r\n\r\n Edit Reporting Year\r\n\r\n \r\n Your privacy is important to us. Precautions are in place to protect\r\n your information against any misuse. Please refer to the{' '}\r\n PRIVACY NOTICE for\r\n additional details.\r\n \r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nReportingYearEdit.displayName = 'ReportingYearEdit';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './RiskAnalysisChart.module.css';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { riskAnalysisChartDataGenerator } from 'src/utils/chart';\r\nimport HighchartsReact from 'highcharts-react-official';\r\nimport Highcharts from 'highcharts';\r\nimport { useFacilityRiskFilter } from 'src/hooks/useFacilityRiskFilter';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype RiskAnalysisChartProps = {};\r\n\r\nexport const RiskAnalysisChart: FC = () => {\r\n const { filteredAggregates, hiddenAggregates } = useFacilityRiskFilter();\r\n\r\n const chart = useDeepCompareMemo(\r\n () => riskAnalysisChartDataGenerator(filteredAggregates, hiddenAggregates),\r\n [filteredAggregates, hiddenAggregates]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n Monitor basin conditions and regional growth\r\n
\r\n
\r\n Prioritize these locations for water reduction investment\r\n
\r\n
\r\n

\r\n User-defined revenue or output (over 3 years)\r\n

\r\n
\r\n
\r\n
Low Growth
\r\n
\r\n
\r\n
High Growth
\r\n
\r\n
\r\n \r\n
\r\n
\r\n Maintain Operational Efficiency\r\n
\r\n
\r\n \r\n Facilities for engagement with local water users and stakeholders\r\n to ensure continued license to operate.\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Low water scarcity
\r\n
\r\n
\r\n
High water scarcity
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nRiskAnalysisChart.displayName = 'RiskAnalysisChart';\r\n","import {\r\n ListItem,\r\n OrderedList,\r\n Table,\r\n Text,\r\n Tbody,\r\n Td,\r\n Thead,\r\n Tr,\r\n UnorderedList,\r\n Box,\r\n Stack,\r\n} from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport { getAggregates } from 'src/clients/api/v5.aggregates';\r\nimport { getFolderAggregates, getFolders } from 'src/clients/api/v5.folders';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Copy } from 'src/components/Copy';\r\nimport tabStyles from 'src/components/FacilityForm/Helpers/FacilityTabNavigator/FacilityTabNavigator.module.css';\r\nimport { FacilityRiskFilter } from 'src/components/FacilityRiskFilter';\r\nimport { FilterAndSort } from 'src/components/FilterAndSort';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { RiskAnalysisChart } from 'src/components/RiskAnalysisChart';\r\nimport { useDeepCompareMemo } from 'src/hooks/useDeepCompare';\r\nimport { FacilityRiskFilterProvider } from 'src/hooks/useFacilityRiskFilter';\r\nimport { useFilterAndSort } from 'src/hooks/useFilterAndSort';\r\nimport { filter } from 'src/hooks/useFilterAndSort/utils';\r\nimport { AggregateResults } from 'src/types/aggregates';\r\nimport { Folders } from 'src/types/folder';\r\nimport styles from './RiskAnalysis.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype RiskAnalysisProps = {\r\n aggregates: AggregateResults;\r\n folders: Folders;\r\n};\r\n\r\nconst RiskAnalysisWrapper: FC = ({\r\n children,\r\n aggregates,\r\n folders,\r\n}) => (\r\n <>\r\n
\r\n \r\n
\r\n
\r\n
\r\n Quantify Risk\r\n \r\n This Water Risk Analysis charts a company's enterprise risk profile by\r\n assessing each facility's risk based on three year projected output\r\n growth and location-specific water stress and assigns action plans for\r\n facilities based on risk likelihood. This analysis allows business\r\n leaders to prioritize and determine appropriate risk mitigation\r\n strategies for each location to reduce a company's overall risk\r\n profile.\r\n \r\n
\r\n \r\n The following steps can be used to develop a successful corporate\r\n water strategy:\r\n \r\n \r\n \r\n Establish a water management plan\r\n \r\n \r\n \r\n Assess and monetize business risks to prioritize actions at\r\n specific sites\r\n \r\n \r\n \r\n \r\n Identify opportunities to minimize water risk, maximize\r\n performance results and optimize costs\r\n \r\n \r\n \r\n \r\n Execute water management plan using a \"plan-do-check-act\" cycle\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n {children}\r\n
\r\n \r\n);\r\n\r\nexport const RiskAnalysis: FC = () => {\r\n const filterState = useFilterAndSort();\r\n\r\n const { data: folderData, isLoading: isLoadingFolders } = useQuery(\r\n ['folders'],\r\n () => getFolders()\r\n );\r\n\r\n const folderId = filterState.folderId;\r\n const { isLoading, isFetching, data, error, refetch } = useQuery(\r\n ['aggregates', ...(folderId ? ['folder', folderId] : [])],\r\n () => (folderId ? getFolderAggregates(folderId) : getAggregates()),\r\n {\r\n cacheTime: 0,\r\n enabled: !isLoadingFolders,\r\n }\r\n );\r\n\r\n const aggregates =\r\n data?.status === 'success' && data?.value.data ? data?.value.data : [];\r\n\r\n const folders =\r\n folderData?.status === 'success' && folderData?.value.data\r\n ? folderData?.value.data\r\n : [];\r\n\r\n const filteredAggregates = useDeepCompareMemo(() => {\r\n return filter(aggregates, filterState);\r\n }, [aggregates, filterState]);\r\n\r\n if (isLoading || isLoadingFolders) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (error || data?.status === 'error') {\r\n return (\r\n \r\n \r\n \r\n );\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 Key:\r\n \r\n tr': {\r\n borderBottom: '1px solid',\r\n borderColor: 'gray.400',\r\n },\r\n '& tbody > tr:nth-child(even)': {\r\n bgColor: 'gray.200',\r\n },\r\n '& tbody td': {\r\n verticalAlign: 'top',\r\n borderRight: '1px solid',\r\n borderColor: 'gray.400',\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n Facility Risk Level\r\n \r\n \r\n Context\r\n \r\n \r\n Actions\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Significant potential for business risk\r\n \r\n \r\n (High Growth & High Water Scarcity)\r\n \r\n \r\n \r\n \r\n \r\n Today, more than ever before, companies recognize\r\n that water poses a significant risk to business. For\r\n some facilities located in high water stress basins,\r\n urgent action is required to prevent threats to\r\n business vitality ranging from disruptions in\r\n operations and rising costs to reputational damage\r\n and loss of license to operate. Facilities in\r\n locations where high growth rates could be hindered\r\n by high water scarcity should take the following\r\n steps:\r\n \r\n \r\n \r\n \r\n Prioritize locations for targeted action plans\r\n based on site-specific risk (locations where\r\n water risk is most material)\r\n \r\n \r\n \r\n \r\n Identify opportunities to minimize water risk,\r\n maximize performance results and optimize costs\r\n (reduce, reuse and recycle)\r\n \r\n \r\n \r\n \r\n Execute water management plan using a\r\n “plan-do-check-act” cycle\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n INVEST:\r\n \r\n \r\n \r\n \r\n Explore the “Take Action” tab on your dashboard\r\n to review your tailored guide to implement\r\n improvements in water management, use,\r\n target-setting and stewardship practices\r\n \r\n \r\n \r\n \r\n Use the Risk Analysis Investment Calculator to\r\n model project investment outcomes\r\n \r\n \r\n \r\n \r\n Establish a process to monitor local water\r\n availability (for example droughts or pollution\r\n incidents) so that acute events can be managed\r\n in a way that reduces business disruption or\r\n cost\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Moderate potential for business risk based on low\r\n growth potential\r\n \r\n \r\n (Low Growth & High Water Scarcity)\r\n \r\n \r\n \r\n \r\n \r\n Today, more than ever before, companies recognize\r\n the growing challenges posed by resource scarcity,\r\n energy demands, climate change and increasing\r\n competition for freshwater resources. Even at\r\n current use levels, companies operating in water\r\n scarce regions face increasingly tangible business\r\n risks. Water is a shared resource and therefore\r\n requires a stewardship approach to ensure\r\n sustainable outcomes for all.\r\n \r\n \r\n Good water stewards understand their own water use,\r\n catchment context and shared concerns related to\r\n water governance, water balance and water quality.\r\n With this awareness, good water stewards engage in\r\n meaningful individual and collective actions that\r\n benefit people and the environment.\r\n \r\n \r\n \r\n \r\n \r\n \r\n ENGAGE:\r\n \r\n \r\n \r\n \r\n Explore the “Take Action” tab on your dashboard\r\n to review your tailored guide to implement\r\n improvements in water management, use,\r\n target-setting and stewardship practices\r\n \r\n \r\n \r\n \r\n Use the Risk Analysis Investment Calculator to\r\n model project investment outcomes\r\n \r\n \r\n \r\n \r\n Meet with local water service providers to\r\n understand the current state of the watershed,\r\n plans to manage stakeholder needs, how water\r\n will be allocated in the future, how future\r\n water rates may be linked to availability and\r\n quality and current and future treatment\r\n capacity. Model scenarios of productivity, local\r\n community growth, and water provider plans to\r\n understand how these variables will impact\r\n future water demand and risk.\r\n \r\n \r\n \r\n \r\n Collaborate with other local users on a water\r\n stewardship plan and explore where there may be\r\n opportunities to share data that would minimize\r\n risk.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Low potential for business risk based on low water\r\n scarcity\r\n \r\n \r\n (High Growth & Low Water Scarcity)\r\n \r\n \r\n \r\n \r\n Water dependency is known but business risk is low\r\n because sufficient water is available given current\r\n conditions. To manage acute risks and prevent future\r\n risk, develop a plan to monitor changes in water\r\n quality and quantity. Update your facility data in the\r\n Smart Water Navigator annually using updated growth\r\n projections.\r\n \r\n \r\n \r\n \r\n \r\n MONITOR:\r\n \r\n \r\n \r\n \r\n Explore the “Take Action” tab on your dashboard\r\n to review your tailored guide to implement\r\n improvements in water management, use,\r\n target-setting and stewardship practices\r\n \r\n \r\n \r\n \r\n Monitor water availability and growth in the\r\n basin and enact a process to respond to changes\r\n that could place the facility at a higher risk.\r\n Monitoring growth and local water availability\r\n can include a combination of private and public\r\n efforts. Examples include trends in water demand\r\n by category (agricultural, domestic and\r\n industrial), real time satellite data on water\r\n availability, water use intensity within the\r\n region, changes in economic development or\r\n basin-wide water conservation initiatives.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Low potential for business risk scarcity\r\n \r\n \r\n (Low Growth & Low Water Scarcity)\r\n \r\n \r\n \r\n \r\n While water is necessary for operations, facilities\r\n with low growth potential in areas of low water stress\r\n face minimal business risk.\r\n \r\n \r\n \r\n \r\n \r\n CONTINUE ONGOING CONSERVATION:\r\n \r\n \r\n \r\n \r\n Continue ongoing water efficiency efforts to\r\n reduce reliance on fresh water\r\n \r\n \r\n \r\n \r\n Explore the “Take Action” tab on your dashboard\r\n to review your tailored guide to implement\r\n improvements in water management, use,\r\n target-setting and stewardship practices\r\n \r\n \r\n \r\n \r\n Periodically assess water basin conditions and\r\n local growth to understand changes that might\r\n increase risk\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\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nRiskAnalysis.displayName = 'RiskAnalysis';\r\n","import {\r\n Box,\r\n Button,\r\n CircularProgress,\r\n CircularProgressLabel,\r\n Flex,\r\n FlexProps,\r\n Hide,\r\n HStack,\r\n IconButton,\r\n Popover,\r\n PopoverArrow,\r\n PopoverBody,\r\n PopoverCloseButton,\r\n PopoverContent,\r\n PopoverHeader,\r\n PopoverTrigger,\r\n Portal,\r\n Stack,\r\n Tag,\r\n TagLabel,\r\n TagLeftIcon,\r\n Text,\r\n} from '@chakra-ui/react';\r\nimport {\r\n mdiCheck,\r\n mdiCloudCheck,\r\n mdiCloudCheckOutline,\r\n mdiCloudRemove,\r\n mdiCloudRemoveOutline,\r\n mdiCloudSyncOutline,\r\n mdiFileDocumentOutline,\r\n mdiRefresh,\r\n mdiTrashCan,\r\n mdiWrenchCog,\r\n} from '@mdi/js';\r\n// import Icon from '@mdi/react';\r\nimport React, { FC, useMemo } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { deleteActiveBatchUpload } from 'src/clients/api/upload';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { ActiveUpload } from 'src/types/upload';\r\n\r\ntype ActiveUploadCardProps = {\r\n upload: ActiveUpload;\r\n canInspect?: boolean;\r\n} & FlexProps;\r\n\r\nenum STATUS_COLOR {\r\n SUCCESS = 'green.400',\r\n ERROR = 'red.400',\r\n INIT = 'gray.300',\r\n}\r\n\r\nfunction convertColorKeyToVarName(colorKey: string) {\r\n return `--chakra-colors-${colorKey.replace('.', '-')}`;\r\n}\r\n\r\nexport const ActiveUploadCard: FC = ({\r\n upload: {\r\n processedCount,\r\n totalRowCount,\r\n errorCount,\r\n id,\r\n processed,\r\n fileName,\r\n fileHash,\r\n },\r\n canInspect = false,\r\n children,\r\n ...props\r\n}) => {\r\n const queryClient = useQueryClient();\r\n const [asyncState, setAsyncState] = useAsyncState();\r\n\r\n const isNotProcessed = !processed;\r\n const percent = Number(processedCount / totalRowCount) * 100;\r\n const hasErrors = errorCount > 0;\r\n\r\n const statusColor = useMemo(() => {\r\n if (hasErrors) {\r\n return STATUS_COLOR.ERROR;\r\n }\r\n\r\n if (!isNotProcessed) {\r\n return STATUS_COLOR.SUCCESS;\r\n }\r\n\r\n return STATUS_COLOR.INIT;\r\n }, [hasErrors, isNotProcessed]);\r\n\r\n const handleDeleteUpload = async () => {\r\n try {\r\n setAsyncState({ status: 'loading' });\r\n const result = await deleteActiveBatchUpload(id);\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n setAsyncState({\r\n status: 'success',\r\n message: `Upload deleted successfully!`,\r\n });\r\n\r\n queryClient.refetchQueries('activeUploads');\r\n queryClient.invalidateQueries('facilities');\r\n queryClient.invalidateQueries('folders');\r\n } catch (e) {\r\n setAsyncState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error deleting your upload.',\r\n });\r\n }\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\n\r\n \r\n \r\n \r\n (\r\n \r\n )}\r\n />\r\n \r\n {isNotProcessed\r\n ? 'Processing Facilities'\r\n : 'Facilities Processed'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {fileName}\r\n \r\n ({fileHash})\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n Imported:\r\n \r\n \r\n \r\n {processedCount}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Errored:\r\n \r\n \r\n \r\n {errorCount}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Total:\r\n \r\n \r\n \r\n {totalRowCount}\r\n \r\n \r\n \r\n \r\n\r\n {canInspect ? (\r\n \r\n }\r\n colorScheme={errorCount > 0 ? 'red' : 'green'}\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n >\r\n Inspect\r\n \r\n\r\n {isNotProcessed ? (\r\n \r\n {({ onClose }) => (\r\n <>\r\n \r\n }\r\n colorScheme=\"red\"\r\n borderRadius={{ base: 'none', md: 'md' }}\r\n aria-label=\"Delete Upload\"\r\n isLoading={asyncState.status === 'loading'}\r\n >\r\n Delete\r\n \r\n \r\n \r\n \r\n \r\n \r\n Confirm Delete\r\n \r\n \r\n\r\n \r\n \r\n Are you sure you want to delete this active upload?\r\n \r\n {\r\n handleDeleteUpload();\r\n onClose();\r\n }}\r\n >\r\n Yes, delete this upload\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n ) : null}\r\n \r\n ) : null}\r\n \r\n {children ? (\r\n \r\n {children}\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nActiveUploadCard.displayName = 'ActiveUploadCard';\r\n","import {\r\n Button,\r\n Flex,\r\n IconButton,\r\n Popover,\r\n PopoverArrow,\r\n PopoverBody,\r\n PopoverCloseButton,\r\n PopoverContent,\r\n PopoverHeader,\r\n PopoverTrigger,\r\n Portal,\r\n Stack,\r\n Text,\r\n} from '@chakra-ui/react';\r\nimport { mdiMerge, mdiTrashCan } from '@mdi/js';\r\nimport React, { FC } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport { deleteActiveBatchUploadRow } from 'src/clients/api/upload';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { UploadFlowError } from 'src/constants/errors';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { ActiveUploadRow } from 'src/types/upload';\r\nimport { UPLOAD_STATUS_COLOR } from './RowResultsList';\r\n\r\ntype RowResultsListItemProps = {\r\n variant: 'error' | 'success' | 'processing';\r\n row: ActiveUploadRow;\r\n uploadId: string;\r\n};\r\n\r\ntype RowErrorType = { field: string; message: string };\r\n\r\nconst parseErrors = (errorJson: string): Array => {\r\n const parsed = JSON.parse(errorJson);\r\n\r\n return parsed.errors;\r\n};\r\n\r\nexport const RowResultsListItem: FC = ({\r\n row: { id, errorJson, rowJson },\r\n variant,\r\n uploadId,\r\n}) => {\r\n const queryClient = useQueryClient();\r\n const [asyncState, setAsyncState] = useAsyncState();\r\n const tableColor = UPLOAD_STATUS_COLOR[variant];\r\n\r\n let rowErrors: {\r\n errors: Array;\r\n } = {\r\n errors: [],\r\n };\r\n\r\n let rowResults;\r\n\r\n let parseError;\r\n\r\n try {\r\n rowErrors.errors = parseErrors(errorJson);\r\n rowResults = JSON.parse(rowJson);\r\n } catch (e) {\r\n parseError = e;\r\n }\r\n\r\n const isAssessmentError = rowErrors.errors?.some(\r\n (e) => e.field === 'waterActionAssessment'\r\n );\r\n\r\n const handleDeleteUpload = async () => {\r\n try {\r\n setAsyncState({ status: 'loading' });\r\n const result = await deleteActiveBatchUploadRow(uploadId, id);\r\n\r\n if (result.status !== 'success') {\r\n throw Error(result.value.errors[0].message);\r\n }\r\n\r\n setAsyncState({\r\n status: 'success',\r\n message: `Upload deleted successfully!`,\r\n });\r\n\r\n queryClient.refetchQueries('activeUploads');\r\n queryClient.invalidateQueries('facilities');\r\n queryClient.invalidateQueries('folders');\r\n } catch (e) {\r\n setAsyncState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error deleting your upload.',\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n {parseError ? (\r\n \r\n Could not process this row's data.\r\n \r\n ) : (\r\n <>\r\n \r\n {rowResults.facilityName}\r\n \r\n\r\n {variant === 'error' ? (\r\n \r\n }\r\n width=\"100%\"\r\n to={{\r\n pathname: '/app/facilities/new',\r\n state: {\r\n uploadResults: {\r\n rowErrors,\r\n rowResults,\r\n rowId: id,\r\n errorType: isAssessmentError\r\n ? UploadFlowError.Assessment\r\n : UploadFlowError.General,\r\n },\r\n },\r\n }}\r\n >\r\n Resolve\r\n \r\n \r\n ) : null}\r\n\r\n {variant === 'error' || variant === 'processing' ? (\r\n \r\n {({ onClose }) => (\r\n <>\r\n \r\n }\r\n colorScheme=\"red\"\r\n aria-label=\"Delete Upload Row\"\r\n isLoading={asyncState.status === 'loading'}\r\n ml=\"2\"\r\n >\r\n Delete\r\n \r\n \r\n \r\n \r\n \r\n \r\n Confirm Delete\r\n \r\n \r\n\r\n \r\n \r\n Are you sure you want to delete this active upload\r\n row?\r\n \r\n {\r\n handleDeleteUpload();\r\n onClose();\r\n }}\r\n >\r\n Yes, delete this row\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n ) : null}\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import { Flex, Stack, StackDivider, Text } from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { Icon } from 'src/components/Icon';\r\nimport { ActiveUploadRow } from 'src/types/upload';\r\nimport { RowResultsListItem } from './RowResultListItem';\r\n\r\ntype RowResultsListProps = {\r\n variant: 'error' | 'success' | 'processing';\r\n rows: Array;\r\n headerIcon: string;\r\n headerText: string;\r\n uploadId: string;\r\n};\r\n\r\nexport enum UPLOAD_STATUS_COLOR {\r\n success = 'green',\r\n error = 'red',\r\n processing = 'gray',\r\n}\r\n\r\nexport const RowResultsList: FC = ({\r\n variant = 'error',\r\n rows = [],\r\n headerIcon,\r\n headerText,\r\n uploadId,\r\n}) => {\r\n if (rows.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n }\r\n border=\"1px solid\"\r\n borderColor={`${UPLOAD_STATUS_COLOR[variant]}.400`}\r\n >\r\n \r\n \r\n \r\n {headerText}\r\n \r\n \r\n\r\n {rows.map((row) => (\r\n \r\n ))}\r\n \r\n );\r\n};\r\n","import { Flex, Heading, ScaleFade, Spinner, Stack } from '@chakra-ui/react';\r\nimport { mdiTableAlert, mdiTableCheck, mdiTableSync } from '@mdi/js';\r\nimport React, { FC, useCallback, useEffect, useRef } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { RouteComponentProps } from 'react-router-dom';\r\nimport { getActiveBatchUpload } from 'src/clients/api/upload';\r\nimport { ActiveUploadCard } from 'src/components/ActiveUploadCard';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { ActiveUploadRow } from 'src/types/upload';\r\nimport { RowResultsList } from './RowResultsList';\r\n\r\ntype UploadProps = {};\r\n\r\nconst SORT_WEIGHT = {\r\n processed: 0,\r\n validated: 1,\r\n validatedWithErrors: 2,\r\n processedWithErrors: 3,\r\n};\r\n\r\ntype RowStatusMap = Record>;\r\n\r\ntype DisplayStatus = {\r\n status: 'idle' | 'active' | 'error';\r\n};\r\n\r\nexport const Upload: FC> = ({\r\n match,\r\n}) => {\r\n const timeout = useRef(null);\r\n const { id } = match.params;\r\n\r\n const { data, isLoading, error, refetch, isFetching } = useQuery(\r\n ['activeUploads', id],\r\n () => getActiveBatchUpload(id),\r\n { enabled: !!id }\r\n );\r\n\r\n const check = useCallback(() => window.setTimeout(refetch, 20000), [refetch]);\r\n\r\n const checking = isLoading || isFetching;\r\n const isSuccess = data?.status === 'success';\r\n\r\n useEffect(() => {\r\n if (!checking) {\r\n if (isSuccess) {\r\n const upload = data.value.data;\r\n const status = upload.status;\r\n\r\n if (status === 'unprocessed') {\r\n // Turn on polling because there are still unprocessed uploads\r\n timeout.current = check();\r\n }\r\n }\r\n }\r\n\r\n return () => {\r\n if (timeout.current) {\r\n window.clearTimeout(timeout.current);\r\n }\r\n };\r\n }, [data, isSuccess, check, checking]);\r\n\r\n if (isLoading) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (error || !data || data.status === 'error') {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const upload = data?.value.data;\r\n const filteredRows = upload?.rows.reduce((acc, row) => {\r\n if (!acc[row.status]) {\r\n acc[row.status] = [];\r\n }\r\n\r\n acc[row.status].push(row);\r\n\r\n return acc;\r\n }, {} as RowStatusMap);\r\n\r\n return (\r\n \r\n \r\n Upload Status\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\n};\r\n\r\nUpload.displayName = 'Upload';\r\n","import {\r\n Box,\r\n Button,\r\n Flex,\r\n Heading,\r\n ListItem,\r\n OrderedList,\r\n Stack,\r\n} from '@chakra-ui/react';\r\nimport React, { Dispatch, FC, SetStateAction, useRef, useState } from 'react';\r\nimport { useQueryClient } from 'react-query';\r\nimport { postWrmBatchUpload } from 'src/clients/api/upload';\r\nimport { Button as LegacyButton } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { AsyncStateType } from 'src/hooks/useAsyncState';\r\n\r\ntype UploaderProps = {\r\n asyncUploadState: AsyncStateType;\r\n setAsyncUploadState: Dispatch>;\r\n};\r\n\r\nexport const Uploader: FC = ({\r\n asyncUploadState,\r\n setAsyncUploadState,\r\n}) => {\r\n const fileRef = useRef(null);\r\n const [canUpload, setCanUpload] = useState(false);\r\n const queryClient = useQueryClient();\r\n\r\n const handleUpload = async () => {\r\n const value = fileRef.current;\r\n if (value && value.files) {\r\n try {\r\n setAsyncUploadState({ status: 'loading' });\r\n\r\n const result = await postWrmBatchUpload(value.files[0]);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(\r\n result.value.errors?.at(0)?.message ??\r\n 'There was an error uploading your file.'\r\n );\r\n }\r\n\r\n setAsyncUploadState({\r\n status: 'success',\r\n message:\r\n 'File uploaded successfully, check status of active uploads below.',\r\n });\r\n\r\n queryClient.refetchQueries('activeUploads');\r\n } catch (e) {\r\n setAsyncUploadState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error uploading your file.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n const handleDownload = async () => {\r\n window.open(`/documents/swn-batch-upload-template.xlsx`, '_self');\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Upload Instructions\r\n \r\n \r\n \r\n \r\n Download the facility information template{' '}\r\n \r\n \r\n \r\n \r\n \r\n Complete the template by entering your facility information\r\n \r\n \r\n \r\n \r\n Save the Facility Form Questions tab from the template as a .csv\r\n and upload the file for automatic data entry\r\n \r\n \r\n \r\n \r\n Once you've completed the .csv template, select your file to\r\n complete the batch facility upload.\r\n \r\n \r\n \r\n\r\n \r\n setCanUpload(!!value)}\r\n ref={fileRef}\r\n />\r\n \r\n Upload File\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUploader.displayName = 'Uploader';\r\n","import {\r\n Alert,\r\n AlertIcon,\r\n Box,\r\n CloseButton,\r\n Flex,\r\n Heading,\r\n ScaleFade,\r\n SlideFade,\r\n Spinner,\r\n Stack,\r\n Text,\r\n useDisclosure,\r\n} from '@chakra-ui/react';\r\nimport natsort from 'natsort';\r\nimport React, { FC, useEffect } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { getActiveBatchUploads } from 'src/clients/api/upload';\r\nimport { ActiveUploadCard } from 'src/components/ActiveUploadCard';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Uploader } from 'src/components/Uploader';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\n\r\ntype UploadProps = {};\r\n\r\nconst sorter = natsort();\r\n\r\nexport const Uploads: FC = () => {\r\n const [asyncUploadState, setAsyncUploadState] = useAsyncState();\r\n const { isOpen, onClose, onOpen } = useDisclosure();\r\n\r\n const { isLoading, data, refetch, isFetching, isError } = useQuery(\r\n ['activeUploads'],\r\n () => getActiveBatchUploads()\r\n );\r\n\r\n const shouldShowAlertStatus =\r\n asyncUploadState.status === 'success' ||\r\n asyncUploadState.status === 'error';\r\n\r\n useEffect(() => {\r\n if (shouldShowAlertStatus) {\r\n onOpen();\r\n }\r\n }, [shouldShowAlertStatus, onOpen]);\r\n\r\n if (isLoading) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (isError || (data && data.status === 'error')) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const uploads = data?.value.data ?? [];\r\n uploads.sort((a, b) => {\r\n if (a.status === 'processed' && b.status !== 'processed') {\r\n return -1;\r\n }\r\n\r\n return 0;\r\n });\r\n\r\n const shouldShowUploader = !uploads.find(\r\n (upload) => upload.status !== 'processed'\r\n );\r\n\r\n uploads.sort((a, b) => sorter(a.createdDate, b.createdDate));\r\n\r\n const completed = uploads.filter((upload) => upload.status === 'processed');\r\n const incomplete = uploads.filter((upload) => upload.status !== 'processed');\r\n\r\n return (\r\n \r\n Batch Upload\r\n\r\n {shouldShowAlertStatus && isOpen ? (\r\n \r\n \r\n \r\n \r\n {asyncUploadState.message}\r\n \r\n \r\n \r\n \r\n ) : null}\r\n\r\n {shouldShowUploader ? (\r\n \r\n \r\n \r\n ) : null}\r\n\r\n \r\n Active Upload\r\n \r\n {incomplete.length > 0 ? (\r\n incomplete.map((upload, index) => (\r\n \r\n \r\n \r\n ))\r\n ) : (\r\n No active uploads\r\n )}\r\n \r\n \r\n\r\n {completed.length > 0 ? (\r\n <>\r\n \r\n\r\n \r\n Past Uploads\r\n \r\n {completed.map((upload, index) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nUploads.displayName = 'Uploads';\r\n","import { RouteProps } from 'src/components/Route';\r\nimport { Benchmarking } from './Benchmarking';\r\nimport { Calculator } from './Calculator';\r\nimport { Dashboard } from './Dashboard';\r\nimport { Facilities } from './Facilities';\r\nimport { Enterprise } from './Enterprise';\r\nimport { Facility } from './Facility';\r\nimport { FacilityCreate } from './FacilityCreate';\r\nimport { FacilityEdit } from './FacilityEdit';\r\nimport { FolderManager } from './FolderManager';\r\nimport { ReportingYearCreate } from './ReportingYearCreate';\r\nimport { ReportingYearEdit } from './ReportingYearEdit';\r\nimport { RiskAnalysis } from './RiskAnalysis';\r\nimport { Upload } from './Upload';\r\nimport { Uploads } from './Uploads';\r\nimport { Redirect } from 'react-router-dom';\r\nimport React from 'react';\r\n\r\nexport const routes: Array = [\r\n {\r\n path: `/app`,\r\n component: () => {\r\n return ;\r\n },\r\n },\r\n {\r\n path: `/app/dashboard`,\r\n component: Dashboard,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities`,\r\n component: Facilities,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities/new`,\r\n component: FacilityCreate,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities/:id`,\r\n component: Facility,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities/:id/edit`,\r\n component: FacilityEdit,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities/:id/reporting-years/new`,\r\n component: ReportingYearCreate,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities/:id/reporting-years/:reportingYearId`,\r\n component: ReportingYearEdit,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/facilities/:id/calculator`,\r\n component: Calculator,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/folders`,\r\n component: FolderManager,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/enterprise`,\r\n component: Enterprise,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/enterprise/risk-analysis`,\r\n component: RiskAnalysis,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/enterprise/benchmarking`,\r\n component: Benchmarking,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/uploads`,\r\n component: Uploads,\r\n variant: 'protected',\r\n },\r\n {\r\n path: `/app/uploads/:id`,\r\n component: Upload,\r\n variant: 'protected',\r\n },\r\n];\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { Redirect, Switch } from 'react-router-dom';\r\nimport { AppFooter } from 'src/components/AppFooter';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { Route } from 'src/components/Route';\r\nimport { SidebarNav } from 'src/components/SidebarNav';\r\nimport { AsyncFormStateProvider } from 'src/hooks/useAsyncFormState';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { FilterAndSortProvider } from 'src/hooks/useFilterAndSort';\r\nimport { useThemeManager } from 'src/hooks/useThemeManager';\r\nimport styles from './index.module.css';\r\nimport { routes } from './routes';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ninterface AppProps {\r\n isCurrentlyUnderMaintenance?: boolean;\r\n maintenanceMessage?: string;\r\n}\r\n\r\nexport const App: FC = ({\r\n isCurrentlyUnderMaintenance,\r\n maintenanceMessage,\r\n}) => {\r\n const themeManager = useThemeManager();\r\n const { fetchUser, isAuthenticated } = useAuth();\r\n\r\n const { isLoading, data, error } = useQuery(['user', 'current'], fetchUser!, {\r\n enabled: !!fetchUser && !!isAuthenticated,\r\n cacheTime: 0,\r\n });\r\n\r\n if (isCurrentlyUnderMaintenance) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n if (error || data?.status === 'error') {\r\n return ;\r\n }\r\n\r\n if (data?.status === 'success' && data.value.data.verified !== true) {\r\n return ;\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n {themeManager.showSidebar ? : null}\r\n\r\n \r\n \r\n
\r\n \r\n {routes.map((route) => (\r\n \r\n ))}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n","import React, { FC } from 'react';\r\nimport { Helmet as Helm, HelmetProps } from 'react-helmet';\r\n\r\nconst HELMET_DEFAULTS = {\r\n defaultTitle:\r\n 'Smart Water Navigator - Guide Your Water Strategy with Smart Water Tools',\r\n titleTemplate: '%s - Smart Water Navigator',\r\n};\r\n\r\nexport const Helmet: FC = ({ children, ...props }) => {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nHelmet.displayName = 'Helmet';\r\n","import React, { FC, useEffect, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './ImageRotator.module.css';\r\nimport { useTransition, config, animated } from 'react-spring';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst images = [\r\n {\r\n id: 0,\r\n url: '/images/water-banner-one.jpg',\r\n alt: 'Turquoise water and rocky shoreline.',\r\n },\r\n {\r\n id: 1,\r\n url: '/images/water-banner-two.jpg',\r\n alt: 'Water flowing out of a large dam.',\r\n },\r\n {\r\n id: 2,\r\n url: '/images/water-banner-three.jpg',\r\n alt: 'Causeway in the middle of a large body of blue water.',\r\n },\r\n];\r\n\r\nexport interface ImageRotatorProps\r\n extends React.HTMLAttributes {}\r\n\r\nexport const ImageRotator: FC = ({ className }) => {\r\n const [index, set] = useState(0);\r\n const transitions = useTransition(images[index], (item) => item.id, {\r\n from: { opacity: 0 },\r\n enter: { opacity: 1 },\r\n leave: { opacity: 0 },\r\n config: config.molasses,\r\n });\r\n\r\n useEffect(() => {\r\n const interval = setInterval(() => set((state) => (state + 1) % 3), 5000);\r\n return () => clearInterval(interval);\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n {transitions.map(({ item, props, key }) => (\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nImageRotator.displayName = 'ImageRotator';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './RouteContentScrollable.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface RouteContentScrollableProps\r\n extends React.HTMLAttributes {}\r\n\r\nexport const RouteContentScrollable: FC = ({\r\n className,\r\n ...props\r\n}) => {\r\n return
;\r\n};\r\n\r\nRouteContentScrollable.displayName = 'RouteContentScrollable';\r\n","import { Box, Text } from '@chakra-ui/react';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { Pressable } from '../Pressable';\r\nimport styles from './SiteFooter.module.css';\r\nimport { UpdateCookiePrefButton } from '../UpdateCookiePrefButton';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface SiteFooterProps extends React.HTMLAttributes {\r\n solid?: boolean;\r\n}\r\n\r\nexport const SiteFooter: FC = ({\r\n children,\r\n className,\r\n solid = true,\r\n ...props\r\n}) => {\r\n return (\r\n
\r\n
\r\n \r\n \r\n Developed by Ecolab in collaboration with S&P Global Sustainable1\r\n \r\n \r\n\r\n \r\n \r\n \r\n Terms of Service\r\n \r\n \r\n\r\n \r\n \r\n Privacy Notice\r\n \r\n \r\n\r\n \r\n \r\n Cookies\r\n \r\n \r\n\r\n \r\n \r\n Contact\r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n © {new Date().getFullYear()} Smart Water Navigator, All\r\n Rights Reserved\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nSiteFooter.displayName = 'SiteFooter';\r\n","export const PARTNERS = [\r\n {\r\n image: 'world-resources-institute.jpeg',\r\n href: 'https://www.wri.org/',\r\n },\r\n {\r\n image: 'ceo-water-mandate.png',\r\n href: 'https://ceowatermandate.org/',\r\n },\r\n {\r\n image: 'pacific-institute.png',\r\n href: 'https://thepacificinstitute.com/',\r\n },\r\n {\r\n image: 'alliance-for-water-stewardship.png',\r\n href: 'https://a4ws.org/',\r\n },\r\n {\r\n image: 'global-sustainable1.png',\r\n href: 'https://www.spglobal.com/esg/',\r\n },\r\n];\r\n","export const manualUrlDecode = (str: string): string => {\r\n return str.replace(/%([0-9A-F]{2})/g, (match, p1) => {\r\n return String.fromCharCode(parseInt(p1, 16));\r\n }).replace(/\\+/g, ' ');\r\n};\r\n\r\nexport const getCookieValue = (name: string): string | null => {\r\n const value = `; ${document.cookie}`;\r\n const parts = value.split(`; ${name}=`);\r\n if (parts.length === 2) {\r\n const cookieValue = parts.pop();\r\n if (cookieValue) {\r\n return cookieValue.split(';')[0];\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const checkCookieValue = (cookieName: string, checkValue: string): boolean => {\r\n const cookieValue = getCookieValue(cookieName);\r\n if (cookieValue) {\r\n const decodedCookieValue = manualUrlDecode(cookieValue);\r\n return decodedCookieValue.includes(checkValue);\r\n }\r\n return false;\r\n};","import {\r\n AspectRatio,\r\n Box,\r\n Button as ChakraButton,\r\n ButtonGroup,\r\n Container,\r\n Flex,\r\n Heading,\r\n Link as ChakraLink,\r\n HStack,\r\n Image,\r\n SimpleGrid,\r\n SlideFade,\r\n Stack,\r\n Text,\r\n IconButton,\r\n} from '@chakra-ui/react';\r\nimport { mdiClose } from '@mdi/js';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useState, useEffect } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { Icon } from 'src/components/Icon';\r\nimport {\r\n BrandContactIcon,\r\n BrandFaqsIcon,\r\n BrandResourcesIcon,\r\n} from 'src/components/Icons';\r\nimport { ImageRotator } from 'src/components/ImageRotator';\r\nimport { Pressable } from 'src/components/Pressable';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\nimport {\r\n JourneyStep,\r\n JourneyTitles,\r\n TIMELINE_COLORS,\r\n} from 'src/constants/journey';\r\nimport { PARTNERS } from 'src/constants/partners';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport styles from './Home.module.css';\r\nimport { UpdateCookiePrefButton } from 'src/components/UpdateCookiePrefButton';\r\nimport { checkCookieValue } from 'src/utils/readCookie';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface HomeProps extends React.HTMLAttributes {}\r\n\r\nconst PopperContainer: FC<{ step: JourneyStep }> = ({ children, step }) => (\r\n \r\n {children}\r\n\r\n \r\n \r\n Explore More\r\n \r\n \r\n \r\n);\r\n\r\nconst IdentifyPopper: FC<{ isOpen: boolean; step: JourneyStep }> = ({\r\n step,\r\n}) => (\r\n \r\n \r\n \r\n \r\n Identify and monetize water risks: Understand the gap\r\n between what your business pays for water and its true value to your\r\n operations to help make the business case for change.\r\n \r\n \r\n \r\n \r\n \r\n Benchmark water-use efficiency: Compare water-use\r\n efficiency performance across your facilities with industry standards\r\n to identify and prioritize strategies to address performance gaps.\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst ImplementPopper: FC<{ isOpen: boolean; step: JourneyStep }> = ({\r\n step,\r\n}) => (\r\n \r\n \r\n \r\n \r\n Develop a plan to reduce water use: Follow a roadmap\r\n to implement improvements in your water management, use,\r\n target-setting and stewardship practices to set your business up for\r\n success in a water-scarce world.\r\n \r\n \r\n \r\n \r\n \r\n Prioritize investments in water projects: Compare\r\n conventional and risk-adjusted prices for financial investments to\r\n make the business case for a proactive water.\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst TargetPopper: FC<{ isOpen: boolean; step: JourneyStep }> = ({ step }) => (\r\n \r\n \r\n \r\n Set sustainable water withdrawal targets: Understand\r\n the risk posed by your current water withdrawal volumes and calculate\r\n future targets based on local conditions to avoid future negative\r\n impacts on your operations and reputation while increasing profitability\r\n and opportunities for growth.\r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst TrackPopper: FC<{ isOpen: boolean; step: JourneyStep }> = ({ step }) => (\r\n \r\n \r\n \r\n Monitor water use over time: Chart your facility’s\r\n incoming, outgoing and calculated consumptive water use over several\r\n years to continue to identify new risks and growth opportunities.\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport const Home: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const [popoverVisible, setPopoverVisible] = useState(\r\n undefined\r\n );\r\n const [ytCookieActive, setYtCookieActive] = useState(false);\r\n const { isAuthenticated } = useAuth();\r\n\r\n useEffect(() => {\r\n const maxChecks = 10;\r\n let checksPerformed = 0;\r\n const checkCookie = () => {\r\n checksPerformed += 1;\r\n const socialCookie = checkCookieValue('OptanonConsent', 'C0007:1');\r\n setYtCookieActive(socialCookie);\r\n };\r\n\r\n checkCookie();\r\n\r\n const intervalId = setInterval(() => {\r\n if (checksPerformed < maxChecks) {\r\n checkCookie();\r\n } else {\r\n clearInterval(intervalId);\r\n }\r\n }, 500);\r\n\r\n return () => clearInterval(intervalId);\r\n }, []);\r\n\r\n const handleJourneyClick = (step: JourneyStep) => {\r\n if (popoverVisible === step) {\r\n setPopoverVisible(undefined);\r\n } else {\r\n setPopoverVisible(step);\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n div:nth-child(even):not(:last-child)': {\r\n bgColor: TIMELINE_COLORS[0],\r\n p: '20px',\r\n },\r\n }}\r\n >\r\n
\r\n \r\n
\r\n \r\n Achieve business resilience through smart water management\r\n \r\n \r\n Determine how water availability, quality and current business\r\n practices impact your bottom line, and how to become a smarter\r\n water user today.\r\n \r\n\r\n {!isAuthenticated ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n Now is the time for companies to act\r\n \r\n\r\n \r\n \r\n \r\n Climate change, water scarcity, public health concerns,\r\n population growth and economic downturns are affecting\r\n businesses across all industries today. As supply chains\r\n and water supply are disrupted globally, companies are\r\n often left with increased operating costs and a shortage\r\n of key resources needed for their operations. In a world\r\n where water scarcity is the new normal, companies must\r\n future-proof their facilities to safeguard their growth –\r\n minimizing risk, maximizing performance and growing\r\n profitability.\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\n \r\n \r\n Water is a business issue\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Water scarcity is a function of quantity and quality,\r\n resulting in increasing operating costs for businesses and\r\n human, health and environmental costs for communities.\r\n \r\n\r\n \r\n \r\n \r\n Quantity\r\n \r\n \r\n Demand for fresh water is outpacing available supplies\r\n which impacts availability\r\n \r\n \r\n \r\n \r\n Quality\r\n \r\n \r\n Fresh water supplies are increasingly contaminated\r\n which impacts usability\r\n \r\n \r\n \r\n\r\n \r\n \r\n The Smart Water Navigator helps you understand your\r\n water quantity and quality risks and take action to\r\n mitigate business impacts.\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\n Take a step toward a smarter water strategy\r\n \r\n
\r\n \r\n Whether you are just beginning your smart water journey or are\r\n ready to track year-over-year performance, the Smart Water\r\n Navigator can guide you on each step along the way.\r\n \r\n
\r\n \r\n\r\n \r\n \r\n handleJourneyClick(JourneyStep.Identify)}\r\n />\r\n handleJourneyClick(JourneyStep.Target)}\r\n />\r\n handleJourneyClick(JourneyStep.Implement)}\r\n />\r\n handleJourneyClick(JourneyStep.Track)}\r\n />\r\n \r\n\r\n {popoverVisible ? (\r\n \r\n }\r\n aria-label=\"close\"\r\n position=\"absolute\"\r\n top=\"5px\"\r\n right=\"5px\"\r\n zIndex=\"5\"\r\n onClick={() => setPopoverVisible(undefined)}\r\n />\r\n \r\n {popoverVisible === JourneyStep.Identify ? (\r\n \r\n ) : null}\r\n {popoverVisible === JourneyStep.Implement ? (\r\n \r\n ) : null}\r\n {popoverVisible === JourneyStep.Track ? (\r\n \r\n ) : null}\r\n {popoverVisible === JourneyStep.Target ? (\r\n \r\n ) : null}\r\n \r\n \r\n ) : null}\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n Learn more about the Smart Water Navigator\r\n \r\n {ytCookieActive ? (\r\n \r\n \r\n \r\n ) : (\r\n
\r\n
\r\n We Use Cookies.\r\n
\r\n
\r\n To watch embedded YouTube videos on our website, you{' '}\r\n must opt in to{' '}\r\n \r\n Embedded YouTube Video cookies\r\n {' '}\r\n by clicking the button below and updating your cookie\r\n preferences.\r\n
\r\n
\r\n \r\n
\r\n
\r\n Or visit the Ecolab YouTube channel to watch{' '}\r\n \r\n window.open(\r\n 'https://www.youtube.com/embed/tPBdf1ej2do',\r\n '_blank'\r\n )\r\n }\r\n >\r\n this video\r\n \r\n .\r\n
\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n Explore\r\n \r\n
\r\n
\r\n \r\n \r\n FAQs\r\n \r\n
\r\n
\r\n \r\n \r\n Resources\r\n \r\n
\r\n
\r\n \r\n \r\n Contact\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n Development Partners\r\n \r\n\r\n \r\n \r\n {PARTNERS.map((partner) => (\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\n
\r\n );\r\n};\r\n\r\nconst ImplementIcon: FC<{}> = () => (\r\n \r\n \r\n \r\n);\r\n\r\nconst TrackIcon: FC<{}> = () => (\r\n \r\n \r\n \r\n);\r\n\r\nconst TargetIcon: FC<{}> = () => (\r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst IdentifyIcon: FC<{}> = () => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst STEPS = {\r\n [JourneyStep.Identify]: {\r\n icon: IdentifyIcon,\r\n title: JourneyTitles[JourneyStep.Identify],\r\n subtitle: 'Assess your current water use and risks',\r\n },\r\n [JourneyStep.Target]: {\r\n icon: TargetIcon,\r\n title: JourneyTitles[JourneyStep.Target],\r\n subtitle: 'Set your water risk reduction targets',\r\n },\r\n [JourneyStep.Implement]: {\r\n icon: ImplementIcon,\r\n title: JourneyTitles[JourneyStep.Implement],\r\n subtitle:\r\n 'Develop a plan and implement solutions to meet your water targets',\r\n },\r\n [JourneyStep.Track]: {\r\n icon: TrackIcon,\r\n title: JourneyTitles[JourneyStep.Track],\r\n subtitle: 'Track your water management progress over time',\r\n },\r\n};\r\n\r\nexport const JourneyIcon: FC<{\r\n step: JourneyStep;\r\n isOpen: boolean;\r\n onClick: (step: JourneyStep) => void;\r\n}> = ({ step, isOpen, onClick }) => {\r\n const { icon: Icon, title, subtitle } = STEPS[step];\r\n\r\n return (\r\n \r\n onClick(step)}\r\n boxSize=\"120px\"\r\n p=\"30px\"\r\n bgColor={'white'}\r\n borderRadius=\"full\"\r\n boxShadow=\"0px 4px 12px 0px rgba(30, 41, 55, 0.24)\"\r\n alignItems=\"center\"\r\n justifyContent=\"center\"\r\n mb=\"4\"\r\n _hover={{ bgColor: !isOpen ? '#005075' : 'white' }}\r\n sx={{\r\n '& svg': {\r\n boxSize: '60px',\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {subtitle}\r\n \r\n \r\n );\r\n};\r\n","import { config } from 'react-spring';\r\n\r\nexport const FADE_IN_DOWN = {\r\n opacity: 1,\r\n transform: 'translate(0px, 0px)',\r\n from: { opacity: 0, transform: 'translate(0px, -10px)' },\r\n config: config.molasses,\r\n};\r\n","import React, { FC, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport * as yup from 'yup';\r\nimport { Dialog } from 'src/components/Dialog';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { Button } from 'src/components/Button';\r\nimport { useForm } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport styles from './UserInviteDialog.module.css';\r\nimport { RadioList } from '../RadioList';\r\nimport { inviteUser, InviteUserRequestType } from 'src/clients/api/account';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { animated } from 'react-spring';\r\nimport { Alert } from '../Alert';\r\nimport { FADE_IN_DOWN } from 'src/constants/animations';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst RESOLVER = yupResolver(\r\n yup.object().shape({\r\n email: yup.string().email().required('Required'),\r\n })\r\n);\r\n\r\nconst OPTIONS = [\r\n {\r\n value: 'internal',\r\n label:\r\n 'Invite an internal user, such as an employee, or an external collaborator and give them access to your account. The user will have full access to your account.',\r\n },\r\n // {\r\n // value: 'consolidate',\r\n // label:\r\n // 'Invite an internal user, such as an employee, and merge the users account with yours. All facility and folder data will be merged. The user will have full access to your account.',\r\n // },\r\n];\r\n\r\ntype UserInviteDialogProps = {\r\n isOpen: boolean;\r\n onSave: () => void;\r\n onClose: () => void;\r\n accountId: string;\r\n isShare?: boolean;\r\n};\r\nexport const UserInviteDialog: FC = ({\r\n isOpen,\r\n onClose,\r\n onSave,\r\n accountId,\r\n isShare = false,\r\n}) => {\r\n const [inviteType, setInviteType] = useState<\r\n 'external' | 'internal' | 'consolidate'\r\n >('internal');\r\n const [state, setState] = useAsyncState();\r\n const {\r\n register,\r\n formState: { errors },\r\n handleSubmit,\r\n } = useForm({\r\n resolver: RESOLVER,\r\n defaultValues: {\r\n email: '',\r\n },\r\n });\r\n\r\n const handleInviteUser = handleSubmit(\r\n async (values: InviteUserRequestType) => {\r\n if (values) {\r\n try {\r\n setState({ status: 'loading' });\r\n\r\n const result = await inviteUser({\r\n accountId: accountId,\r\n email: values.email,\r\n externalInvite: isShare,\r\n consolidateAccount: !isShare && inviteType === 'consolidate',\r\n internalInvite: !isShare && inviteType !== 'consolidate',\r\n });\r\n\r\n if (result.status !== 'success') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: `User invited successfully!`,\r\n });\r\n\r\n onSave();\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error sending your invite.',\r\n });\r\n }\r\n }\r\n }\r\n );\r\n\r\n return (\r\n \r\n {state.status === 'error' && (\r\n
\r\n \r\n \r\n \r\n
\r\n )}\r\n\r\n \r\n\r\n {!isShare ? (\r\n \r\n setInviteType(v as 'external' | 'internal' | 'consolidate')\r\n }\r\n />\r\n ) : null}\r\n\r\n
\r\n \r\n Cancel\r\n \r\n \r\n Save\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nUserInviteDialog.displayName = 'UserInviteDialog';\r\n","import React, { FC, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from './Account.module.css';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport Icon from '@mdi/react';\r\nimport { mdiDomain, mdiPlusCircleOutline } from '@mdi/js';\r\nimport { getUserAccounts } from 'src/clients/api/user';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { UserInviteDialog } from 'src/components/UserInviteDialog';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { deleteUserFromAccount } from 'src/clients/api/account';\r\nimport { Button } from 'src/components/Button';\r\nimport { animated } from 'react-spring';\r\nimport { FADE_IN_DOWN } from 'src/constants/animations';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype AccountProps = {};\r\n\r\nconst SHOW_INVITE = true;\r\n\r\nexport const Account: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const { accountId, userId } = useAuth();\r\n const [isInvitingUser, setIsInvitingUser] = useState(false);\r\n const [state, setState] = useAsyncState();\r\n const queryClient = useQueryClient();\r\n\r\n const { isLoading, error, data: accounts } = useQuery(\r\n ['user', userId!, 'accounts'],\r\n () => getUserAccounts(userId!),\r\n {\r\n enabled: !!userId,\r\n }\r\n );\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n const currentAccount = (accounts?.status === 'success'\r\n ? accounts.value.data\r\n : []\r\n ).find((a) => {\r\n return a.accountId === accountId;\r\n });\r\n\r\n if (error || accounts?.status !== 'success' || !currentAccount) {\r\n return ;\r\n }\r\n\r\n const currentAccountUsers = currentAccount.users ?? [];\r\n currentAccountUsers.sort((a, b) =>\r\n `${a.lastName}, ${a.firstName}` > `${b.lastName}, ${b.firstName}` ? 1 : -1\r\n );\r\n\r\n const currentAccountUser = (currentAccount?.users\r\n ? currentAccount?.users\r\n : []\r\n ).find((u) => `${u.userId}` === userId);\r\n\r\n const removeUserFromAccount = async (uid: string) => {\r\n try {\r\n setState({ status: 'loading' });\r\n await deleteUserFromAccount(uid);\r\n setState({\r\n status: 'success',\r\n message: 'User removed from account successfully.',\r\n });\r\n queryClient.refetchQueries(['user', userId!, 'accounts']);\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: 'Error removing user from account.',\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n Account Management\r\n {!currentAccountUser?.primary ? (\r\n
\r\n \r\n
\r\n ) : (\r\n <>\r\n {state.status === 'error' && (\r\n
\r\n \r\n \r\n \r\n
\r\n )}\r\n
\r\n {SHOW_INVITE ? (\r\n setIsInvitingUser(true)}\r\n >\r\n \r\n INVITE USER\r\n \r\n ) : null}\r\n
\r\n {isInvitingUser ? (\r\n setIsInvitingUser(false)}\r\n onClose={() => setIsInvitingUser(false)}\r\n accountId={currentAccount.accountId}\r\n />\r\n ) : null}\r\n
\r\n {currentAccount.users.map((u) => (\r\n
\r\n
\r\n \r\n {u.lastName}, {u.firstName}\r\n \r\n {u.email}\r\n
\r\n
\r\n {u.userId !== currentAccountUser.userId ? (\r\n <>\r\n {/* {!u.primary ? (\r\n \r\n ) : (\r\n \r\n )} */}\r\n \r\n removeUserFromAccount(`${u.userId}`)\r\n }\r\n isLoading={state.status === 'loading'}\r\n >\r\n Remove User\r\n \r\n \r\n ) : null}\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\n};\r\n\r\nAccount.displayName = 'Account';\r\n","import { Box, Flex, Image } from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\n\r\ntype PageHeaderProps = {\r\n title: FC;\r\n subtitle?: FC;\r\n image: string;\r\n actions?: FC;\r\n};\r\n\r\nexport const PageHeader: FC = ({\r\n title: Title,\r\n image,\r\n subtitle: Subtitle,\r\n actions: Actions,\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 {Subtitle ? <Subtitle /> : null}\r\n {Actions ? <Actions /> : null}\r\n </Box>\r\n </Flex>\r\n </Flex>\r\n );\r\n};\r\n\r\nPageHeader.displayName = 'PageHeader';\r\n","import * as yup from 'yup';\r\n\r\nconst contactFormSchemaProperties = {\r\n firstName: yup.string().required('Required'),\r\n lastName: yup.string().required('Required'),\r\n company: yup.string(),\r\n city: yup.string(),\r\n country: yup.string(),\r\n email: yup.string().email().required('Required'),\r\n comments: yup.string().required('Required'),\r\n requiredMiddleName: yup.string(),\r\n};\r\nexport const contactFormSchema = yup.object(contactFormSchemaProperties);\r\nexport type ContactFormSchemaPayload = yup.InferType<typeof contactFormSchema>;\r\n","import React, { FC, useEffect } from 'react';\r\nimport { Env } from '../../../constants/env';\r\n\r\nexport interface DashboardProps extends React.HTMLAttributes<HTMLDivElement> {}\r\n\r\nexport const Dashboard: FC<DashboardProps> = () => {\r\n useEffect(() => {\r\n window.location.href = Env.apiUrl.replace('/api', '');\r\n }, []);\r\n\r\n return <div />;\r\n};\r\n\r\nDashboard.displayName = 'Dashboard';\r\n","import {\r\n Accordion,\r\n AccordionButton,\r\n AccordionIcon,\r\n AccordionItem,\r\n AccordionPanel,\r\n Box,\r\n Heading,\r\n Link,\r\n ListItem,\r\n Stack,\r\n Text,\r\n UnorderedList,\r\n} from '@chakra-ui/react';\r\nimport React, { FC, PropsWithChildren } from 'react';\r\nimport { Link as RRLink } from 'react-router-dom';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\n\r\ntype FaqProps = Record<string, unknown>;\r\n\r\nconst FaqItem: FC<PropsWithChildren<{ title: string }>> = ({\r\n title,\r\n children,\r\n}) => {\r\n return (\r\n <AccordionItem border=\"none\" mb=\"15px\">\r\n <AccordionButton border=\"1px solid #eee\">\r\n <AccordionIcon />\r\n <Box flex=\"1\" textAlign=\"left\" p=\"10px\">\r\n <Heading as=\"h3\" size=\"md\">\r\n {title}\r\n </Heading>\r\n </Box>\r\n </AccordionButton>\r\n <AccordionPanel pb={4}>\r\n <Stack direction=\"column\" spacing=\"15px\" my=\"15px\">\r\n {children}\r\n </Stack>\r\n </AccordionPanel>\r\n </AccordionItem>\r\n );\r\n};\r\n\r\nexport const Faq: FC<PropsWithChildren<FaqProps>> = () => {\r\n return (\r\n <RouteContentScrollable>\r\n <PageHeader\r\n image=\"/images/clarifiers.jpg\"\r\n title={() => (\r\n <Heading as=\"h1\" size=\"2xl\">\r\n Frequently <br />\r\n asked <br />\r\n questions\r\n </Heading>\r\n )}\r\n />\r\n <Stack\r\n direction=\"column\"\r\n spacing={{ base: '60px', md: 'calc(10vh)' }}\r\n p=\"20px\"\r\n pb=\"40px\"\r\n maxW={1920 / 1.5}\r\n >\r\n <Stack spacing=\"24px\">\r\n <Heading as=\"h2\" size=\"2xl\" textAlign=\"center\">\r\n Smart Water Navigator FAQ\r\n </Heading>\r\n <Text>\r\n Are you a user of the tool looking for more details about its\r\n underlying calculations, potential uses and outputs, or other\r\n information related to the Smart Water Navigator? Review the FAQ to\r\n find answers to commonly asked questions about the Smart Water\r\n Navigator.\r\n </Text>\r\n <Text>\r\n <strong>\r\n For additional questions, please reach out to our{' '}\r\n <Link\r\n color=\"brand.primary\"\r\n href=\"mailto:SmartWaterNavigator@ecolab.com\"\r\n >\r\n support team\r\n </Link>\r\n .\r\n </strong>\r\n </Text>\r\n </Stack>\r\n\r\n <Accordion defaultIndex={[0]} allowToggle>\r\n <FaqItem title=\"What is the Ecolab Smart Water Navigator?\">\r\n <Text>\r\n Water is essential to the health of our environment, communities\r\n and our economy. By 2030, businesses water use is expected to\r\n surpass supply by 56% (World Resources Institute) a disparity that\r\n will continue to increase if nothing changes. Businesses rely on\r\n water to operate and grow and water scarcity presents a growing\r\n risk to organizations. While most corporations have established\r\n goals to reduce water use, it can be difficult to make progress\r\n due to lack of tools and expertise at the facility level.\r\n </Text>\r\n <Text>\r\n The Ecolab Smart Water Navigator is a publicly available, online\r\n tool that can help you protect your business and ensure continued\r\n growth. It offers a proven methodology to help organizations\r\n bridge the gap between corporate goals and local action. Ecolab’s\r\n Smart Water Navigator can help you by:\r\n </Text>\r\n <UnorderedList pl=\"20px\">\r\n <ListItem>\r\n Enhancing your understanding of local water risks and the full\r\n value of water to your operations in financial terms\r\n </ListItem>\r\n <ListItem>\r\n Providing water targets that are proportional to the local water\r\n stress\r\n </ListItem>\r\n <ListItem>\r\n Delivering an industry-specific smart water roadmap to guide\r\n improved performance over time\r\n </ListItem>\r\n </UnorderedList>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"Did the Smart Water Navigator replace the Water Risk Monetizer?\">\r\n <Text>\r\n As global water scarcity grows increasingly severe, posing an\r\n increased risk to businesses worldwide, it’s more important than\r\n ever for companies to prioritize sustainable water management. In\r\n order to align with these global industry trends and create a\r\n seamless user experience along all points of creating and\r\n executing a smart water management plan, the Smart Water Navigator\r\n and the Water Risk Monetizer were combined into one tool. Users\r\n still have access to all of the same features to identify risks,\r\n set targets, implement action plans and track progress over time.\r\n The integrated Smart Water Navigator now features one unified\r\n dashboard and consolidated downloadable PDF reports with water\r\n risk data, checklists, resources and case studies to support you\r\n along all stages of your water management journey.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How does the Smart Water Navigator work?\">\r\n <Text>\r\n The tool uses a proven, four-step process, to enhance business\r\n resilience in your organization through smart water management.\r\n </Text>\r\n <Text>\r\n <strong>Step 1: Identify</strong> | To get started on your smart\r\n water journey, the tool will help you identify the role of water\r\n in your operations, assess your current water use and quantify\r\n water-related risks in financial terms\r\n </Text>\r\n <Text>\r\n <strong>Step 2: Target</strong> | Then, you’ll set sustainable\r\n water withdrawal targets for your facility to manage water-use\r\n risk\r\n </Text>\r\n <Text>\r\n <strong>Step 3: Implement</strong> | Next, the Ecolab Smart Water\r\n Navigator will provide you with a practical, industry-specific\r\n guide to implement solutions that will improve water management\r\n practices at an individual facility level\r\n </Text>\r\n <Text>\r\n <strong>Step 4: Track</strong> | In the final step, you can track\r\n your progress over time and revisit your smart water action plan\r\n to make adjustments based on changing circumstances.\r\n </Text>\r\n <Text>\r\n Using the Smart Water Navigator, you’ll have the ability to:\r\n </Text>\r\n\r\n <UnorderedList pl=\"20px\">\r\n <ListItem>\r\n Set clear targets and drive internal accountability to help\r\n reach those targets\r\n </ListItem>\r\n <ListItem>\r\n Optimize water-use performance to help ensure more resilient\r\n operations\r\n </ListItem>\r\n <ListItem>\r\n Build trust and credibility with stakeholders to drive\r\n collective action\r\n </ListItem>\r\n </UnorderedList>\r\n\r\n <Text>\r\n And, by addressing shared water challenges, you will contribute to\r\n a world with enough water for all.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How are the incoming and outgoing water risk premiums calculated?\">\r\n <Text>\r\n The Smart Water Navigator uses scientific models developed by S&P\r\n Global Sustainable1 to estimate incoming and outgoing water risk\r\n in monetary terms. The incoming water risk premium is made up of\r\n the incoming quantity and incoming quality risk premiums. It looks\r\n at the amount and quality of water available at a specific\r\n location, the amount of water used by a facility, additional\r\n demands on the supply of water and the impact of a facility's\r\n water use on the local water basin. The outgoing water risk\r\n premium is made up of the outgoing quality risk premium. It looks\r\n at the amount and quality of water discharged by a facility, local\r\n water quality thresholds and the impact of water pollution on the\r\n local water basin.\r\n </Text>\r\n <Text>\r\n The incoming and outgoing water risk premiums are a monetary\r\n estimate of the increased price of water, which may be realized by\r\n a business as an increase in its operating costs. The water risk\r\n premium is calculated based on the full value of water to a\r\n facility, as estimated based on local water stress and local water\r\n quality.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How is potential revenue at risk calculated?\">\r\n <Text>\r\n Potential revenue at risk is the estimated monetary value of the\r\n revenue that could potentially be lost at a facility as a result\r\n of stress on water availability. Because water is a finite\r\n resource that is shared by many users in a water basin, the amount\r\n of water that should be available to a facility may be less than\r\n what a facility needs. The amount available could also change over\r\n time, as water stress increases or as a local economy grows. The\r\n model estimates the amount of water a facility requires to\r\n generate revenue, and compares it to the facility's share of water\r\n in the basin if water were allocated among water users based on\r\n economic activity (contribution to basin-level GDP). If more water\r\n is required than the basin share of water allocated (as determined\r\n by the model), then the facility's revenue is potentially at risk.\r\n The Smart Water Navigator has a built-in water risk threshold that\r\n prevents water withdrawals breaching 20% water stress within any\r\n water basin.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"Does the Smart Water Navigator predict or forecast future water prices?\">\r\n <Text>\r\n The Smart Water Navigator does not predict whether water risks\r\n will be realized in a water bill. Water providers set their local\r\n prices based on local water stress and water quality, as well as a\r\n variety of factors. It's not possible in a global tool like this\r\n to address all those local factors. The Smart Water Navigator\r\n provides risk-adjusted water prices that businesses should use for\r\n budgeting, planning, strategy development, and when considering\r\n the return on CapEx or OpEx investments for water projects. The\r\n water risk premiums should be used as one data point in a\r\n comprehensive risk assessment process and is intended to be\r\n refined based on local conditions and business particulars.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"Does the user need to enter facility-specific revenue to calculate potential revenue at risk?\">\r\n <Text>\r\n The user has the option to enter facility-specific revenue to\r\n calculate potential revenue at risk due to stress on water\r\n availability. This input is optional. If the user does not enter\r\n facility revenue, the Smart Water Navigator will estimate revenue\r\n based on the facility's industry classification and industry\r\n average economic data based on S&P Global Sustainable1’s\r\n environmentally extended input-output (EEI-O) model. S&P Global\r\n Sustainable1’s EEI-O model is informed by the US Bureau of\r\n Economic Analysis (BEA) data.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"Does the Smart Water Navigator calculate the full value of water and the full business value at risk?\">\r\n <Text>\r\n The Smart Water Navigator addresses business risk related to the\r\n price paid for water and revenue dependent on water availability.\r\n There are other water-related business risks and costs that the\r\n tool currently does not address quantitatively, for example, the\r\n water risk in supply chains, brand reputational loss, aging\r\n infrastructure etc. If you would like to directly measure and\r\n monetize supply chain risks or other business risks, understand\r\n the full value of water at your location, or use a more\r\n site-specific information to better understand and manage water\r\n risks, please contact{' '}\r\n <Link color=\"brand.primary\" href=\"mailto:S1SAS@spglobal.com\">\r\n S&P Global Sustainable1\r\n </Link>\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"What is the likelihood that my business will have to pay a water risk premium or experience revenue loss?\">\r\n <Text>\r\n The likelihood that businesses will have to pay a water risk\r\n premium or lose revenue will depend on a number of local factors,\r\n including local water stress and quality, reputational issues\r\n related to water, the amount of water required for facility\r\n operations and the regulatory framework governing water allocation\r\n and pricing. The Smart Water Navigator calculates likelihood\r\n scores as high, medium or low. Facilities with likelihood scores\r\n that are high or medium are more likely to pay a water risk\r\n premium or experience revenue loss and should take immediate steps\r\n to better understand their local situation, including factors like\r\n local water subsidies, infrastructure leakage rates and other\r\n demands for water in their basin. These businesses should also\r\n take immediate steps to understand how investing in water\r\n efficiency programs can reduce those risks.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How do risk levels correlate with likelihood of impact?\">\r\n <Text>\r\n If a facility has a high or medium risk, the likelihood of\r\n increased water costs or revenue loss in the context of\r\n site-specific issues should be evaluated. In particular, a\r\n business should identify local development or growth pressures\r\n that may affect the availability of water, the extent to which\r\n other water users have plans for growth, whether water subsidies\r\n are expected to continue, any plans that the local water agency\r\n may have to reassess or review water risks and costs, and other\r\n locally specific issues that will factor into the price paid for\r\n water and the ability to generate expected revenue.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How does the Smart Water Navigator address locations currently in drought?\">\r\n <Text>\r\n Global water databases reflect long-term water conditions. Some\r\n regions and cities may be experiencing droughts that are not\r\n captured in global databases and the tools that use those\r\n databases, including the Smart Water Navigator. As a result, water\r\n quantity and water quality risks may not reflect that there is\r\n currently a drought. To provide additional insights for users, the\r\n Smart Water Navigator has a Drought Scenario feature. This feature\r\n provides the user with risk-based water price and revenue at risk\r\n results that reflect a drought condition, regardless of long-term\r\n water conditions in the underlying water database. If you select\r\n the Drought Scenario when entering a facility location, we\r\n recommend that you also evaluate your facility under the baseline\r\n conditions so that you have a more complete understanding of water\r\n stress issues. For more information, please refer to the{' '}\r\n <Link as={RRLink} color=\"brand.primary\" to=\"/methodology\">\r\n \"Methodology\" page\r\n </Link>\r\n .\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How is the Smart Water Navigator different from other publicly available water tools?\">\r\n <Text>\r\n Several water frameworks and tools provide a good starting point\r\n for quantitative and systematic assessments of water risk. These\r\n include the World Resource Institute’s Aqueduct Tool and the World\r\n Wildlife Fund’s Water Risk Filter. The Smart Water Navigator is\r\n the first tool to place a monetary value on water quantity and\r\n water quality risks and provide users with an action plan to help\r\n mitigate and adapt to those risks.\r\n </Text>\r\n <Text>\r\n The Smart Water Navigator is a publicly available global water\r\n risk tool that uses best-in-class local water basin datasets and\r\n scientific methodologies to monetize business water risks. It\r\n defines water quantity and water quality risks in financial terms\r\n to estimate potential risk-related increases in operating costs\r\n and possible loss of revenue their businesses. The Smart Water\r\n Navigator uses a water action assessment to provide users with a\r\n high-level overview of where they land on the water maturity curve\r\n and detailed action steps they can take to improve their water\r\n management practices. One way to improve water management\r\n practices is to make the business case for projects or\r\n technologies that help them better manage water. In other words,\r\n the Smart Water Navigator can both help users identify how they\r\n are doing in terms of smart water management and make the business\r\n case for change.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"Why is the Smart Water Navigator vital to addressing global water challenges?\">\r\n <Text>\r\n Global water scarcity, a function of quantity (availability) and\r\n quantity of clean, freshwater threatens business vitality and\r\n demands action. The current cost of water does not account for\r\n real and future risks, making it hard to justify business\r\n decisions to reduce use. In addition, decreasing water\r\n availability and declining water quality factors make it harder\r\n for businesses to access the water they need to operate, which\r\n puts revenue at risk. The Smart Water Navigator provides valuable,\r\n actionable information including risk-adjusted water prices for\r\n incoming and outgoing water and calculation of potential revenue\r\n at risk. This helps businesses better understand risks and\r\n potential impacts so they can make more informed decisions around\r\n strategies and investments to mitigate water risks and enable\r\n growth.\r\n </Text>\r\n <Text>\r\n The Smart Water Navigator can also help guide corporate and\r\n facility managers to reduce water use and utilize this valuable\r\n resource for long-term revenue growth. Managing a site’s water\r\n resources sustainably can result in reduced operating costs,\r\n reduced utility bills, reduced liability risk and occasionally\r\n increased reputational benefits. As competition for clean water\r\n increases, so will water-related expenditures. The Smart Water\r\n Navigator is designed to support assessment of a site’s current\r\n state of water performance, benchmark its performance over time,\r\n and help improve water performance by providing customized\r\n resources.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How do I share outputs from the Smart Water Navigator?\">\r\n <Text>\r\n There are options to download outputs as reports in .csv (comma\r\n separated values) or PDF formats. To share this information with\r\n someone else, just download the .csv or PDF report.\r\n </Text>\r\n <Text>\r\n There is also the option to invite others to use the Ecolab Smart\r\n Water Navigator. This will not enable them to view your facility\r\n Dashboard. Other users in the same company with the same company\r\n email address will be able to view benchmarking data for the same\r\n company, but will not be able to view data for individual\r\n facilities.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"How do I know the data I input into the Smart Water Navigator is kept confidential?\">\r\n <Text>\r\n All accounts are private and other users do not have access to\r\n information in individual accounts. Please view Ecolab’s{' '}\r\n <Link\r\n color=\"brand.primary\"\r\n href=\"https://www.ecolab.com/privacy-policy\"\r\n isExternal\r\n >\r\n Privacy notice\r\n </Link>{' '}\r\n for more information.\r\n </Text>\r\n </FaqItem>\r\n\r\n <FaqItem title=\"Who can I reach out to if I have other questions or need help?\">\r\n <Text>\r\n For more information, you can download the complete{' '}\r\n <Link\r\n color=\"brand.primary\"\r\n as={RRLink}\r\n to=\"/documents/2024_SmartWaterNavigatorMethodology.pdf\"\r\n target=\"_blank\"\r\n >\r\n methodology\r\n </Link>{' '}\r\n for the Smart Water Navigator, which includes information on the\r\n tool’s data sources and key assumptions. And, Ecolab’s\r\n sustainability team is here to help support you: please reach out\r\n to our{' '}\r\n <Link\r\n color=\"brand.primary\"\r\n href=\"mailto:SmartWaterNavigator@ecolab.com\"\r\n >\r\n support team\r\n </Link>\r\n .\r\n </Text>\r\n </FaqItem>\r\n </Accordion>\r\n </Stack>\r\n\r\n <SiteFooter solid style={{ width: '100%', maxWidth: '1920px' }} />\r\n </RouteContentScrollable>\r\n );\r\n};\r\n\r\nFaq.displayName = 'Faq';\r\n","import { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useForm } from 'react-hook-form';\r\nimport {\r\n forgotPasswordFormSchema,\r\n ForgotPasswordSchemaPayload,\r\n} from 'src/clients/auth';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport styles from './ForgotPassword.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface ForgotPasswordProps\r\n extends React.HTMLAttributes<HTMLDivElement> {}\r\n\r\nconst RESOLVER = yupResolver<ForgotPasswordSchemaPayload>(\r\n forgotPasswordFormSchema\r\n);\r\n\r\nexport const ForgotPassword: FC<ForgotPasswordProps> = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const { forgotPassword } = useAuth();\r\n\r\n const {\r\n handleSubmit,\r\n formState: { errors },\r\n register,\r\n } = useForm<ForgotPasswordSchemaPayload>({\r\n mode: 'all',\r\n resolver: RESOLVER,\r\n });\r\n\r\n const [state, setState] = useAsyncState();\r\n\r\n const onSubmit = async ({ email }: ForgotPasswordSchemaPayload) => {\r\n if (forgotPassword) {\r\n try {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await forgotPassword({ email });\r\n\r\n if (result.status !== 'success') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message:\r\n 'Your change password request was received. If you are a valid user you will receive an email with instructions to change your password.',\r\n });\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error with your request.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n if (hasActiveMaintenance) {\r\n return <Maintenance />;\r\n }\r\n\r\n return (\r\n <RouteContentScrollable className={cx('scrollable')}>\r\n <div>\r\n <article className={cx('forgotPassword')} data-testid=\"forgotPassword\">\r\n <section>\r\n <div className={cx('forgotPasswordBox')}>\r\n <Copy as=\"h2\">Reset Password</Copy>\r\n {state.status === 'success' ? (\r\n <div role=\"alert\">\r\n <span>{state.message}</span>\r\n </div>\r\n ) : (\r\n <>\r\n {state.status === 'error' && (\r\n <div role=\"alert\">\r\n <span>{state.message}</span>\r\n </div>\r\n )}\r\n <form\r\n onSubmit={handleSubmit(onSubmit)}\r\n className={cx('forgotPasswordForm')}\r\n >\r\n <TextInput\r\n type=\"text\"\r\n placeholder=\"Email address\"\r\n autoComplete=\"email\"\r\n name=\"email\"\r\n error={errors.email}\r\n className={cx('input')}\r\n ref={register}\r\n />\r\n\r\n <Button\r\n type=\"submit\"\r\n className={cx('buttonSubmit')}\r\n isLoading={state.status === 'loading'}\r\n >\r\n Reset Password\r\n </Button>\r\n </form>\r\n </>\r\n )}\r\n </div>\r\n </section>\r\n </article>\r\n </div>\r\n </RouteContentScrollable>\r\n );\r\n};\r\n\r\nForgotPassword.displayName = 'ForgotPassword';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useQuery } from 'react-query';\r\nimport { Link } from 'react-router-dom';\r\nimport { animated, useSpring } from 'react-spring';\r\nimport { acceptInvite, getInvite } from 'src/clients/api/account';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { FADE_IN_DOWN } from 'src/constants/animations';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport { useQueryParams } from 'src/hooks/useQueryParams';\r\nimport styles from './Invitation.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface InvitationProps extends React.HTMLAttributes<HTMLDivElement> {}\r\n\r\nexport const Invitation: FC<InvitationProps> = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const params = useQueryParams();\r\n const accountId = params.get('aid');\r\n const invitationId = params.get('inv');\r\n\r\n const [state, setState] = useAsyncState();\r\n\r\n const { isLoading, error, data, refetch, isFetching } = useQuery(\r\n ['invite', accountId, invitationId],\r\n () => getInvite(accountId!, invitationId!),\r\n {\r\n enabled: !!(accountId && invitationId),\r\n }\r\n );\r\n\r\n const animate = useSpring(FADE_IN_DOWN);\r\n\r\n const onSubmit = async (accepted: boolean) => {\r\n if (accountId && invitationId) {\r\n try {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await acceptInvite(accountId, invitationId, {\r\n accepted,\r\n });\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: `Invitation ${\r\n accepted ? 'accepted' : 'declined'\r\n } successfully.`,\r\n });\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message:\r\n e.message ??\r\n `There was an error ${\r\n accepted ? 'accepting' : 'declining'\r\n } this invitation.`,\r\n });\r\n }\r\n }\r\n };\r\n\r\n if (hasActiveMaintenance) {\r\n return <Maintenance />;\r\n }\r\n\r\n if (isLoading) {\r\n return <LoadingSpinner />;\r\n }\r\n\r\n if (error || !data || data.status === 'error') {\r\n return (\r\n <BlockError\r\n retry={refetch}\r\n isLoading={isFetching}\r\n title=\"Error loading invitation\"\r\n message=\"We were unable to load your invitation successfully\"\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <RouteContentScrollable className={cx('scrollable')}>\r\n <div>\r\n <article className={cx('pendingInvite')} data-testid=\"pendingInvite\">\r\n <section>\r\n <div className={cx('pendingInviteBox')}>\r\n <h2>Pending Invitation</h2>\r\n {state.status === 'success' ? (\r\n <animated.div style={animate}>\r\n <Alert\r\n variant=\"success\"\r\n message={state.message}\r\n className={cx('success')}\r\n />\r\n\r\n <Link to={'/login'}>\r\n <Button>Login</Button>\r\n </Link>\r\n </animated.div>\r\n ) : (\r\n <>\r\n {state.status === 'error' && (\r\n <div className={cx('error')}>\r\n <animated.div style={animate}>\r\n <Alert\r\n variant=\"danger\"\r\n message={\r\n state.message ??\r\n 'There was an error resetting your password. Please try again.'\r\n }\r\n />\r\n </animated.div>\r\n </div>\r\n )}\r\n\r\n <div>\r\n <Copy>\r\n You have been invited by{' '}\r\n <strong>\r\n {data.value.data.userName} (\r\n {data.value.data.accountName})\r\n </strong>{' '}\r\n to join Smart Water Navigator.\r\n </Copy>\r\n <div className={cx('actions')}>\r\n <Button\r\n variant=\"secondary\"\r\n onClick={() => onSubmit(false)}\r\n isLoading={state.status === 'loading'}\r\n >\r\n No\r\n </Button>\r\n <Button\r\n variant=\"primary\"\r\n onClick={() => onSubmit(true)}\r\n isLoading={state.status === 'loading'}\r\n >\r\n Yes\r\n </Button>\r\n </div>\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n </section>\r\n </article>\r\n </div>\r\n </RouteContentScrollable>\r\n );\r\n};\r\n\r\nInvitation.displayName = 'Invitation';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './JourneyStepBubble.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface JourneyStepBubbleProps\r\n extends React.HTMLAttributes<HTMLDivElement> {}\r\n\r\nexport const JourneyStepBubble: FC<JourneyStepBubbleProps> = ({\r\n children,\r\n className,\r\n}) => {\r\n return <div className={cx('journeyStepBubble', className)}>{children}</div>;\r\n};\r\n\r\nJourneyStepBubble.displayName = 'JourneyStepBubble';\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, PropsWithChildren, useState } from 'react';\r\n\r\nimport { Link, useLocation } from 'react-router-dom';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { JourneyStepBubble } from 'src/components/JourneyStepBubble';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\n\r\nimport { Helmet } from 'react-helmet';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport styles from './HowItWorks.module.css';\r\nimport { JourneyStep, JourneyTitles } from 'src/constants/journey';\r\nimport { Box, Container, Heading, Stack, Text } from '@chakra-ui/react';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface HowItWorksProps extends React.HTMLAttributes<HTMLDivElement> {}\r\n\r\nconst RainDrop: FC<{ number: number; numberOnly?: boolean }> = ({\r\n number,\r\n numberOnly = false,\r\n}) => {\r\n return (\r\n <div className={cx('raindrop')}>\r\n <div className={cx('content')}>\r\n {!numberOnly && <span className={cx('title')}>Step</span>}\r\n <span className={cx('number')}>{number}</span>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nconst Section: FC<PropsWithChildren<{\r\n number: number;\r\n title: string;\r\n}>> = ({ title, number, children }) => {\r\n return (\r\n <section className={cx('section')}>\r\n <div className={cx('sectionIcon')}>\r\n <div className={cx('icon')}>\r\n <RainDrop number={number} />\r\n </div>\r\n </div>\r\n <div className={cx('content')}>\r\n <div className={cx('sectionHeader')}>\r\n <div className={cx('iconXs')}>\r\n <RainDrop number={number} />\r\n </div>\r\n <Copy as=\"h1\">{title}</Copy>\r\n </div>\r\n {children}\r\n </div>\r\n </section>\r\n );\r\n};\r\n\r\nconst STEP_COLLECTION = [\r\n { title: JourneyTitles[JourneyStep.Identify], key: JourneyStep.Identify },\r\n { title: JourneyTitles[JourneyStep.Target], key: JourneyStep.Target },\r\n { title: JourneyTitles[JourneyStep.Implement], key: JourneyStep.Implement },\r\n { title: JourneyTitles[JourneyStep.Track], key: JourneyStep.Track },\r\n];\r\n\r\nexport const HowItWorks: FC<HowItWorksProps> = () => {\r\n const location = useLocation();\r\n const tagIndex = STEP_COLLECTION.findIndex(\r\n (step) =>\r\n step.key.toLowerCase() === location.hash.replace('#', '').toLowerCase()\r\n );\r\n\r\n const [step, setStep] = useState<number>(tagIndex > 0 ? tagIndex + 1 : 1);\r\n\r\n return (\r\n <RouteContentScrollable>\r\n <Helmet>\r\n <title>\r\n 4 Steps Toward Your Corporate Water Targets - Smart Water Navigator\r\n \r\n \r\n \r\n (\r\n \r\n How it\r\n
works\r\n
\r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n Take a step toward a smarter water strategy\r\n \r\n \r\n \r\n \r\n The Smart Water Navigator uses a proven, four-step process to\r\n enhance business resilience at all levels of an organization\r\n through smart water management. This process includes\r\n identifying water-related business risks, setting water\r\n withdrawal targets, implementing practical projects to advance\r\n corporate water targets and tracking performance over time.\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\n {STEP_COLLECTION.map(({ title }, index) => {\r\n return (\r\n setStep(index + 1)}\r\n >\r\n \r\n {title}\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n {step === 1 && (\r\n
\r\n \r\n A successful smart water journey begins with an understanding\r\n of where you are right now. How can you determine this? By\r\n assessing and monetizing the water-related risks to your\r\n business through a holistic analysis of its use across your\r\n organization.\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n Assess Water-Related Business Risks\r\n
\r\n
\r\n \r\n In many parts of the world, water is both undervalued and\r\n underpriced. This can cause businesses to overlook\r\n potential water-related risks. The Smart Water Navigator\r\n is the ideal first step in your smart water journey. It is\r\n a publicly available global tool that will help you better\r\n understand the gap between what your business pays for\r\n water and its true value to your operations. And, with its\r\n best-in-class local water basin datasets and scientific\r\n methodologies, it will enable you monetize your\r\n water-related business risks to help you make the business\r\n case for change.\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\n \r\n \r\n
\r\n Benchmark Water-Use Efficiency\r\n
\r\n
\r\n \r\n Benchmarking helps you identify performance gaps to\r\n achieve competitive advantage. The Smart Water Navigator\r\n enables you to compare water-use efficiency performance at\r\n each of your facilities with industry and organizational\r\n standards. This analysis will help you prioritize and\r\n determine the appropriate water-use efficiency strategies\r\n for each of your locations.\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n )}\r\n\r\n {step === 2 && (\r\n
\r\n \r\n Climate change, population growth and economic progress have\r\n led to increased competition for water resources. As a result,\r\n water will become scarcer and costlier in the years to come.\r\n That’s why it’s essential to take action by establishing\r\n targets for sustainable water use. Not only will this enhance\r\n operational resiliency, it can increase your profitability and\r\n opportunities for growth. And because water quantity and\r\n quality vary by location, it is crucial to set context-based\r\n targets based on local water conditions and the needs of the\r\n surrounding communities.\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\n \r\n Set Sustainable Water Withdrawal Targets\r\n \r\n
\r\n
\r\n \r\n A facility’s water use should be sustainable, which means\r\n it should meet its needs without compromising the future\r\n ability of others in the surrounding area to do the same.\r\n If water use is higher than it should be, a facility may\r\n have to decrease use to avoid a negative impact on its\r\n operations and, potentially, its reputation. The Smart\r\n Water Navigator helps you identify the risks posed by your\r\n current water withdrawal volume and calculate future\r\n targets based on local conditions.\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n )}\r\n\r\n {step === 3 && (\r\n
\r\n \r\n In a world where water scarcity is the new normal, progressive\r\n companies are futureproofing their operations to safeguard\r\n growth – minimizing risk, maximizing performance and\r\n optimizing costs. But today, many companies struggle to\r\n execute their water targets because they lack the practical\r\n tools and insights to build smart water management practices\r\n at the individual facility level.\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n Develop a Plan to Reduce Water Use\r\n
\r\n
\r\n \r\n The Smart Water Navigator offers a practical roadmap that\r\n will help you improve the way your facilities use water.\r\n Based on a simple, 13-question Water Action Assessment, it\r\n provides you with a guide to smart, sustainable water\r\n practices.\r\n \r\n \r\n You can use the guide to implement improvements in your\r\n water management, use, target-setting and stewardship\r\n practices. It will set your business up for success in a\r\n water-scare world and enable you to operate more\r\n efficiently so you can do your part to ensure that there\r\n is enough water for all.\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\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n Prioritize Investments in Water Projects\r\n \r\n
\r\n
\r\n \r\n Once you’ve identified your water reduction projects,\r\n based on the risk factors of business growth and water\r\n scarcity, the next step is to take action.\r\n \r\n \r\n The Risk Analysis Investment Calculator delivers results\r\n based on financial investment inputs. These inputs help\r\n guide decisions according to conventional (local water\r\n price) and risk-adjusted factors. The comparison between\r\n these can help support the business case for prioritizing\r\n water reduction efforts, optimize water efficiency and\r\n help you monitor conditions. These projects can deliver\r\n benefits beyond water savings and the tool can help move\r\n the needle on a proactive water management strategy.\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n )}\r\n\r\n {step === 4 && (\r\n
\r\n \r\n A smart water management strategy is an ongoing and cyclical\r\n process. After the full value of water to an operation has\r\n been realized, targets have been set and water reduction\r\n projects have been prioritized and completed, it is crucial to\r\n document progress against goals and continually reassess\r\n operations for new risks and growth opportunities.\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n Monitor Water Use Over Time\r\n
\r\n
\r\n \r\n The Smart Water Navigator enables you to chart your\r\n facility's performance over time. This will provide you\r\n with a clear picture of the variations in incoming,\r\n outgoing and calculated consumptive water use over several\r\n years. And it will help facility leaders visualize and\r\n contextualize the interdependence among production volume,\r\n revenue and water use, to enhance overall water\r\n efficiency.\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\n \r\n \r\n );\r\n};\r\n\r\nHowItWorks.displayName = 'HowItWorks';\r\n","import { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC, useState } from 'react';\r\nimport { useForm } from 'react-hook-form';\r\nimport { Link, RouteComponentProps, useHistory } from 'react-router-dom';\r\nimport { animated, config, useSpring } from 'react-spring';\r\nimport { loginFormSchema, LoginFormSchemaPayload } from 'src/clients/auth';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport { useQueryParams } from 'src/hooks/useQueryParams';\r\nimport styles from './Login.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst RESOLVER = yupResolver(loginFormSchema);\r\n\r\ntype LoginPropsType = RouteComponentProps<\r\n {},\r\n {},\r\n {\r\n referrer: string;\r\n }\r\n>;\r\n\r\nexport const Login: FC = ({ location }) => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const params = useQueryParams();\r\n const reason = params.get('r');\r\n const history = useHistory();\r\n const [shouldShowExpiredBanner, setShouldShowExpiredBanner] = useState(\r\n reason === 'sess_exp'\r\n );\r\n const { login } = useAuth();\r\n\r\n const { handleSubmit, errors, register } = useForm({\r\n resolver: RESOLVER,\r\n });\r\n\r\n const [state, setState] = useAsyncState();\r\n\r\n const animate = useSpring({\r\n opacity: 1,\r\n transform: 'translate(0px, 0px)',\r\n from: { opacity: 0, transform: 'translate(0px, -10px)' },\r\n config: config.molasses,\r\n });\r\n\r\n const onSubmit = async ({ email, password }: LoginFormSchemaPayload) => {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n if (login) {\r\n try {\r\n setShouldShowExpiredBanner(false);\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await login({ email, password });\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: 'Login successful.',\r\n });\r\n\r\n history.push(location?.state?.referrer ?? '/');\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error logging you in.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n Login\r\n {shouldShowExpiredBanner && (\r\n
\r\n \r\n \r\n \r\n
\r\n )}\r\n {state.status === 'error' && (\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\n
\r\n \r\n Forgot Password?\r\n \r\n
\r\n\r\n \r\n Login\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","export const COUNTRY_MAP = {\r\n AFG: 'Afghanistan',\r\n ALB: 'Albania',\r\n DZA: 'Algeria',\r\n ASM: 'American Samoa',\r\n AND: 'Andorra',\r\n AGO: 'Angola',\r\n AIA: 'Anguilla',\r\n ATG: 'Antigua and Barbuda',\r\n ARG: 'Argentina',\r\n ARM: 'Armenia',\r\n ABW: 'Aruba',\r\n AUS: 'Australia',\r\n AUT: 'Austria',\r\n AZE: 'Azerbaijan',\r\n BHS: 'Bahamas',\r\n BHR: 'Bahrain',\r\n BGD: 'Bangladesh',\r\n BRB: 'Barbados',\r\n BLR: 'Belarus',\r\n BEL: 'Belgium',\r\n BLZ: 'Belize',\r\n BEN: 'Benin',\r\n BMU: 'Bermuda',\r\n BTN: 'Bhutan',\r\n BOL: 'Bolivia',\r\n BIH: 'Bosnia and Herzegovina',\r\n BWA: 'Botswana',\r\n BRA: 'Brazil',\r\n VGB: 'British Virgin Islands',\r\n BRN: 'Brunei',\r\n BGR: 'Bulgaria',\r\n BFA: 'Burkina Faso',\r\n BDI: 'Burundi',\r\n KHM: 'Cambodia',\r\n CMR: 'Cameroon',\r\n CAN: 'Canada',\r\n CPV: 'Cape Verde',\r\n CYM: 'Cayman Islands',\r\n CAF: 'Central African Republic',\r\n TCD: 'Chad',\r\n CHL: 'Chile',\r\n CHN: 'China',\r\n COL: 'Colombia',\r\n COM: 'Comoros',\r\n COK: 'Cook Islands',\r\n CRI: 'Costa Rica',\r\n CIV: `Cote d'Ivoire`,\r\n HRV: 'Croatia',\r\n CUB: 'Cuba',\r\n CYP: 'Cyprus',\r\n CZE: 'Czech Republic',\r\n COD: 'Democratic Republic of the Congo',\r\n DNK: 'Denmark',\r\n DJI: 'Djibouti',\r\n DMA: 'Dominica',\r\n DOM: 'Dominican Republic',\r\n TLS: 'East Timor',\r\n ECU: 'Ecuador',\r\n EGY: 'Egypt',\r\n SLV: 'El Salvador',\r\n GNQ: 'Equatorial Guinea',\r\n ERI: 'Eritrea',\r\n EST: 'Estonia',\r\n ETH: 'Ethiopia',\r\n FLK: 'Falkland Islands',\r\n FJI: 'Fiji',\r\n FIN: 'Finland',\r\n FRA: 'France',\r\n GUF: 'French Guiana',\r\n PYF: 'French Polynesia',\r\n GAB: 'Gabon',\r\n GMB: 'Gambia',\r\n GEO: 'Georgia',\r\n DEU: 'Germany',\r\n GHA: 'Ghana',\r\n GIB: 'Gibraltar',\r\n GRC: 'Greece',\r\n GRL: 'Greenland',\r\n GRD: 'Grenada',\r\n GLP: 'Guadeloupe',\r\n GUM: 'Guam',\r\n GTM: 'Guatemala',\r\n GIN: 'Guinea',\r\n GNB: 'Guinea-Bissau',\r\n GUY: 'Guyana',\r\n HTI: 'Haiti',\r\n HND: 'Honduras',\r\n HKG: 'Hong Kong',\r\n HUN: 'Hungary',\r\n ISL: 'Iceland',\r\n IND: 'India',\r\n IDN: 'Indonesia',\r\n IRN: 'Iran',\r\n IRQ: 'Iraq',\r\n IRL: 'Ireland',\r\n IMN: 'Isle of Man',\r\n ISR: 'Israel',\r\n ITA: 'Italy',\r\n JAM: 'Jamaica',\r\n JPN: 'Japan',\r\n JOR: 'Jordan',\r\n KAZ: 'Kazakhstan',\r\n KEN: 'Kenya',\r\n KIR: 'Kiribati',\r\n KWT: 'Kuwait',\r\n KGZ: 'Kyrgyzstan',\r\n LAO: 'Laos',\r\n LVA: 'Latvia',\r\n LBN: 'Lebanon',\r\n LSO: 'Lesotho',\r\n LBR: 'Liberia',\r\n LBY: 'Libya',\r\n LIE: 'Liechtenstein',\r\n LTU: 'Lithuania',\r\n LUX: 'Luxembourg',\r\n MKD: 'Macedonia',\r\n MDG: 'Madagascar',\r\n MWI: 'Malawi',\r\n MYS: 'Malaysia',\r\n MDV: 'Maldives',\r\n MLI: 'Mali',\r\n MLT: 'Malta',\r\n MHL: 'Marshall Islands',\r\n MTQ: 'Martinique',\r\n MRT: 'Mauritania',\r\n MUS: 'Mauritius',\r\n MYT: 'Mayotte',\r\n MEX: 'Mexico',\r\n FSM: 'Micronesia',\r\n MDA: 'Moldova',\r\n MCO: 'Monaco',\r\n MNG: 'Mongolia',\r\n MNE: 'Montenegro',\r\n MSR: 'Montserrat',\r\n MAR: 'Morocco',\r\n MOZ: 'Mozambique',\r\n MMR: 'Myanmar',\r\n NAM: 'Namibia',\r\n NRU: 'Nauru',\r\n NPL: 'Nepal',\r\n NLD: 'Netherlands',\r\n NCL: 'New Caledonia',\r\n NZL: 'New Zealand',\r\n NIC: 'Nicaragua',\r\n NER: 'Niger',\r\n NGA: 'Nigeria',\r\n NIU: 'Niue',\r\n PRK: 'North Korea',\r\n MNP: 'Northern Mariana Islands',\r\n NOR: 'Norway',\r\n OMN: 'Oman',\r\n PAK: 'Pakistan',\r\n PLW: 'Palau',\r\n PAN: 'Panama',\r\n PNG: 'Papua New Guinea',\r\n PRY: 'Paraguay',\r\n PER: 'Peru',\r\n PHL: 'Philippines',\r\n POL: 'Poland',\r\n PRT: 'Portugal',\r\n PRI: 'Puerto Rico',\r\n QAT: 'Qatar',\r\n COG: 'Republic of Congo',\r\n REU: 'Reunion',\r\n ROU: 'Romania',\r\n RUS: 'Russia',\r\n RWA: 'Rwanda',\r\n KNA: 'Saint Kitts and Nevis',\r\n LCA: 'Saint Lucia',\r\n VCT: 'Saint Vincent and the Grenadines',\r\n WSM: 'Samoa',\r\n SMR: 'San Marino',\r\n STP: 'Sao Tome and Principe',\r\n SAU: 'Saudi Arabia',\r\n SEN: 'Senegal',\r\n SRB: 'Serbia',\r\n SYC: 'Seychelles',\r\n SLE: 'Sierra Leone',\r\n SGP: 'Singapore',\r\n SVK: 'Slovakia',\r\n SVN: 'Slovenia',\r\n SLB: 'Solomon Islands',\r\n SOM: 'Somalia',\r\n ZAF: 'South Africa',\r\n KOR: 'South Korea',\r\n ESP: 'Spain',\r\n LKA: 'Sri Lanka',\r\n SDN: 'Sudan',\r\n SUR: 'Suriname',\r\n SWZ: 'Swaziland',\r\n SWE: 'Sweden',\r\n CHE: 'Switzerland',\r\n SYR: 'Syria',\r\n TWN: 'Taiwan',\r\n TJK: 'Tajikistan',\r\n TZA: 'Tanzania',\r\n THA: 'Thailand',\r\n TGO: 'Togo',\r\n TKL: 'Tokelau',\r\n TON: 'Tonga',\r\n TTO: 'Trinidad and Tobago',\r\n TUN: 'Tunisia',\r\n TUR: 'Turkey',\r\n TKM: 'Turkmenistan',\r\n TCA: 'Turks and Caicos Islands',\r\n TUV: 'Tuvalu',\r\n UGA: 'Uganda',\r\n UKR: 'Ukraine',\r\n ARE: 'United Arab Emirates',\r\n GBR: 'United Kingdom',\r\n USA: 'United States',\r\n URY: 'Uruguay',\r\n UZB: 'Uzbekistan',\r\n VUT: 'Vanuatu',\r\n VEN: 'Venezuela',\r\n VNM: 'Vietnam',\r\n VIR: 'Virgin Islands, U.S.',\r\n YEM: 'Yemen',\r\n ZMB: 'Zambia',\r\n ZWE: 'Zimbabwe',\r\n};\r\n","import { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { Controller, useForm } from 'react-hook-form';\r\nimport { Link, RouteComponentProps, useHistory } from 'react-router-dom';\r\nimport { animated, config, useSpring } from 'react-spring';\r\nimport {\r\n RegisterFormSchemaPayload,\r\n registrationFormSchema,\r\n} from 'src/clients/auth';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { Button } from 'src/components/Button';\r\nimport { CheckboxInput } from 'src/components/CheckboxInput';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SelectInput } from 'src/components/SelectInput';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { COUNTRY_MAP } from 'src/constants/countries';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport styles from './Registration.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nconst RESOLVER = yupResolver(registrationFormSchema);\r\n\r\ntype RegistrationPropsType = RouteComponentProps<\r\n {},\r\n {},\r\n {\r\n referrer: string;\r\n }\r\n>;\r\n\r\nexport const Registration: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const history = useHistory();\r\n const { register: registerUser } = useAuth();\r\n\r\n const { handleSubmit, errors, register, control } = useForm<\r\n RegisterFormSchemaPayload\r\n >({\r\n resolver: RESOLVER,\r\n mode: 'onChange',\r\n });\r\n\r\n const [state, setState] = useAsyncState();\r\n\r\n const onSubmit = async (form: RegisterFormSchemaPayload) => {\r\n if (registerUser) {\r\n try {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await registerUser(form);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: 'Registration successful. Please log in.',\r\n });\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error with your request.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n const animate = useSpring({\r\n opacity: 1,\r\n transform: 'translate(0px, 0px)',\r\n from: { opacity: 0, transform: 'translate(0px, -10px)' },\r\n config: config.molasses,\r\n });\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n {state.status !== 'success' && (\r\n \r\n )}\r\n\r\n
\r\n
\r\n Create account\r\n\r\n {state.status === 'success' ? (\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n {state.status === 'error' && (\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\n\r\n \r\n\r\n (\r\n ({\r\n label: name,\r\n value: abbr,\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\n {/* @ts-ignore */}\r\n (\r\n \r\n I agree to the terms and conditions and acknowledge\r\n that Ecolab will treat my personal data consistent\r\n with the privacy notice.\r\n \r\n )}\r\n />\r\n\r\n {/* @ts-ignore */}\r\n (\r\n \r\n By checking this box, you are agreeing that Ecolab may\r\n contact you via email with promotional offers. For\r\n more information about how we may use personal data to\r\n send marketing communications, please refer to our\r\n privacy notice.\r\n \r\n )}\r\n />\r\n\r\n \r\n Sign up\r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import { yupResolver } from '@hookform/resolvers/yup';\r\nimport classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\nimport { useForm } from 'react-hook-form';\r\nimport { Link } from 'react-router-dom';\r\nimport { animated, config, useSpring } from 'react-spring';\r\nimport {\r\n resetPasswordFormSchema,\r\n ResetPasswordSchemaPayload,\r\n} from 'src/clients/auth';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { Button } from 'src/components/Button';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport { useQueryParams } from 'src/hooks/useQueryParams';\r\nimport styles from './ResetPassword.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface ResetPasswordProps\r\n extends React.HTMLAttributes {}\r\n\r\nconst RESOLVER = yupResolver(\r\n resetPasswordFormSchema\r\n);\r\n\r\nexport const ResetPassword: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const { resetPassword } = useAuth();\r\n const params = useQueryParams();\r\n\r\n const { handleSubmit, errors, register } = useForm<\r\n ResetPasswordSchemaPayload\r\n >({\r\n resolver: RESOLVER,\r\n mode: 'onChange',\r\n });\r\n\r\n const [state, setState] = useAsyncState();\r\n\r\n const animate = useSpring({\r\n opacity: 1,\r\n transform: 'translate(0px, 0px)',\r\n from: { opacity: 0, transform: 'translate(0px, -10px)' },\r\n config: config.molasses,\r\n });\r\n\r\n const onSubmit = async (form: ResetPasswordSchemaPayload) => {\r\n if (resetPassword) {\r\n try {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await resetPassword(form);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: 'Password reset email sent successfully.',\r\n });\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error with your request.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Reset Password

\r\n {state.status === 'success' ? (\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n {state.status === 'error' && (\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\n\r\n \r\n Reset Password\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\nResetPassword.displayName = 'ResetPassword';\r\n","import React, { FC, useState } from 'react';\r\nimport classnames from 'classnames/bind';\r\n\r\nimport styles from './User.module.css';\r\nimport { TextInput } from 'src/components/TextInput';\r\nimport { useForm } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport {\r\n editUserFormSchema,\r\n saveUser,\r\n SaveUserRequestType,\r\n} from 'src/clients/api/user';\r\nimport { Button } from 'src/components/Button';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { useQuery, useQueryClient } from 'react-query';\r\nimport { useEffect } from 'react';\r\nimport { LoadingSpinner } from 'src/components/LoadingSpinner';\r\nimport { BlockError } from 'src/components/BlockError';\r\nimport { animated, config, useSpring } from 'react-spring';\r\nimport { Alert } from 'src/components/Alert';\r\nimport Icon from '@mdi/react';\r\nimport { mdiAccountCircle } from '@mdi/js';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\n\r\nconst cx = classnames.bind(styles);\r\nconst RESOLVER = yupResolver(editUserFormSchema);\r\n\r\ntype UserProps = {};\r\n\r\nexport const User: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const { fetchUser, isAuthenticated } = useAuth();\r\n const queryClient = useQueryClient();\r\n const [submission, setSubmission] = useState<\r\n { state: 'success' | 'error'; message: string } | undefined\r\n >();\r\n\r\n const { isLoading, error, data } = useQuery(['user', 'current'], fetchUser!, {\r\n enabled: !!isAuthenticated,\r\n });\r\n\r\n const [isSaving, setIsSaving] = useState(false);\r\n\r\n const {\r\n handleSubmit,\r\n register,\r\n reset,\r\n formState: { errors, isValid },\r\n } = useForm({\r\n resolver: RESOLVER,\r\n mode: 'onChange',\r\n });\r\n\r\n useEffect(() => {\r\n if (data?.status === 'success') {\r\n const {\r\n firstName,\r\n lastName,\r\n companyName,\r\n jobTitle,\r\n email,\r\n } = data.value.data;\r\n reset({ firstName, lastName, companyName, jobTitle, email });\r\n }\r\n }, [data, reset]);\r\n\r\n const onSubmit = async (values: SaveUserRequestType) => {\r\n if (data?.status === 'success' && data.value.data.userId) {\r\n setSubmission(undefined);\r\n setIsSaving(true);\r\n try {\r\n const result = await saveUser(`${data.value.data.userId}`, values);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setIsSaving(false);\r\n setSubmission({\r\n state: 'success',\r\n message: 'User information updated successfully',\r\n });\r\n queryClient.refetchQueries(['user', 'current']);\r\n } catch (e) {\r\n setIsSaving(false);\r\n setSubmission({\r\n state: 'error',\r\n message:\r\n e.message ?? 'There was an error updating your user information.',\r\n });\r\n }\r\n }\r\n };\r\n\r\n const animate = useSpring({\r\n opacity: 1,\r\n transform: 'translate(0px, 0px)',\r\n from: { opacity: 0, transform: 'translate(0px, -10px)' },\r\n config: config.molasses,\r\n });\r\n\r\n if (isLoading) {\r\n return ;\r\n }\r\n\r\n if (error || data?.status !== 'success') {\r\n return ;\r\n }\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n Edit Profile\r\n {submission && (\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\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n Save\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nUser.displayName = 'User';\r\n","import React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport styles from './VerificationRequired.module.css';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { animated, useSpring } from 'react-spring';\r\nimport { FADE_IN_DOWN } from 'src/constants/animations';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { Link } from 'react-router-dom';\r\nimport { Button } from 'src/components/Button';\r\nimport { Copy } from 'src/components/Copy';\r\nimport { resendVerificationEmail } from 'src/clients/api/user';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ntype VerificationRequiredProps = {};\r\n\r\nexport const VerificationRequired: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const { userId } = useAuth();\r\n const [state, setState] = useAsyncState();\r\n\r\n const animate = useSpring(FADE_IN_DOWN);\r\n\r\n const handleResend = async () => {\r\n try {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await resendVerificationEmail(userId!);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: `Verification mail sent successfully. Please check your email.`,\r\n });\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message:\r\n e.message ?? `There was an error sending your verification email.`,\r\n });\r\n }\r\n };\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n
\r\n

Email Validation Required

\r\n {state.status === 'success' ? (\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n {state.status === 'error' && (\r\n
\r\n \r\n \r\n \r\n
\r\n )}\r\n\r\n
\r\n \r\n Please click the “Validate Email” link in the registration\r\n confirmation email.\r\n \r\n
\r\n \r\n Resend Validation Email\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\n\r\nVerificationRequired.displayName = 'VerificationRequired';\r\n","import { EffectCallback, useEffect } from 'react';\r\n\r\nexport const useEffectOnce = (effect: EffectCallback) => {\r\n useEffect(effect, []);\r\n};\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC } from 'react';\r\n\r\nimport { useQueryClient } from 'react-query';\r\nimport { useHistory, useParams } from 'react-router-dom';\r\nimport { animated, config, useSpring } from 'react-spring';\r\nimport { Alert } from 'src/components/Alert';\r\nimport { Button } from 'src/components/Button';\r\nimport { LoaderIcon } from 'src/components/Icons';\r\nimport { Maintenance } from 'src/components/Maintenance';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useEffectOnce } from 'src/hooks/useEffectOnce';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport styles from './VerifyAccount.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface VerifyAccountProps\r\n extends React.HTMLAttributes {}\r\n\r\nexport const VerifyAccount: FC = () => {\r\n const { hasActiveMaintenance } = useMaintenance();\r\n const history = useHistory();\r\n const queryClient = useQueryClient();\r\n const [asyncState, setAsyncState] = useAsyncState({\r\n status: 'idle',\r\n });\r\n const { verifyAccount } = useAuth();\r\n\r\n const { code } = useParams<{ code: string }>();\r\n\r\n useEffectOnce(() => {\r\n if (verifyAccount && !!code) {\r\n verifyAccount({ code: `${code}` }).then((result) => {\r\n if (result.status === 'success') {\r\n setAsyncState({\r\n status: 'success',\r\n message: 'Your account has been verified.',\r\n });\r\n } else {\r\n setAsyncState({\r\n status: 'error',\r\n message:\r\n result.value?.errors[0]?.message ??\r\n 'There was an error verifying your account. Please try again.',\r\n });\r\n }\r\n });\r\n }\r\n });\r\n\r\n const animate = useSpring({\r\n opacity: 1,\r\n transform: 'translate(0px, 0px)',\r\n from: { opacity: 0, transform: 'translate(0px, -10px)' },\r\n config: config.molasses,\r\n });\r\n\r\n let result;\r\n switch (asyncState.status) {\r\n case 'success': {\r\n result = (\r\n \r\n \r\n\r\n {\r\n queryClient.refetchQueries(['user', 'current']).then(() => {\r\n history.push({ pathname: '/app/dashboard' });\r\n });\r\n }}\r\n >\r\n Home\r\n \r\n \r\n );\r\n break;\r\n }\r\n\r\n case 'error': {\r\n result = (\r\n \r\n \r\n \r\n );\r\n break;\r\n }\r\n\r\n default: {\r\n result = ;\r\n break;\r\n }\r\n }\r\n\r\n if (hasActiveMaintenance) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Verify Account

\r\n {result}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nVerifyAccount.displayName = 'VerifyAccount';\r\n","import {\r\n Box,\r\n Container,\r\n Flex,\r\n Heading,\r\n Image,\r\n SimpleGrid,\r\n Stack,\r\n Text,\r\n VStack,\r\n} from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\n\r\nexport interface ResourcesProps extends React.HTMLAttributes {}\r\n\r\ntype ResourceRef = {\r\n key: string;\r\n title: string;\r\n subtitle?: string;\r\n image: string;\r\n href: string;\r\n order: number;\r\n light?: boolean;\r\n};\r\n\r\nconst REPORTS: Array = [\r\n {\r\n key: 'report-1',\r\n title: 'You’ve Set Corporate Water Goals. Now What?',\r\n subtitle: 'Ecolab, S&P Global Sustainable1 & Bluerisk, 2021',\r\n image: 'corp-water-goals.png',\r\n href:\r\n 'https://ecolab.widen.net/s/8mlk7dwnsp/smart-water-navigator-working-paper',\r\n order: 0,\r\n },\r\n {\r\n key: 'report-2',\r\n title: 'Global Water Report',\r\n subtitle: 'CDP, 2023',\r\n image: 'global-water-report.png',\r\n href:\r\n 'https://www.cdp.net/en/research/global-reports/global-water-report-2023',\r\n order: 3,\r\n },\r\n {\r\n key: 'report-3',\r\n title: 'Setting Enterprise Water Targets: A Guide for Companies',\r\n subtitle:\r\n 'Pacific Institute, CEO Water Mandate, CDP, The Nature Conservancy, World Resources Institute, WWF, 2021',\r\n image: 'setting-water-targets.png',\r\n href: 'https://pacinst.org/publication/enterprise-water-targets-2021/',\r\n order: 4,\r\n },\r\n {\r\n key: 'report-4',\r\n title: 'UN World Water Development Report',\r\n subtitle: 'United Nations, 2024',\r\n image: 'un-water-report.png',\r\n href:\r\n 'https://www.unwater.org/publications/un-world-water-development-report-2024',\r\n order: 7,\r\n },\r\n {\r\n key: 'report-5',\r\n title:\r\n 'Beyond Volumes: exploring the societal value of corporate water stewardship projects',\r\n subtitle:\r\n 'Valuing Impact, Bluerisk & Bonneville Environmental Foundation, 2022',\r\n image: 'beyond-volumes.png',\r\n href:\r\n 'https://www.ecolab.com/-/media/Ecolab/Ecolab-Home/Documents/DocumentLibrary/LA-Documents/SROI_WaterStewardship_2022_Final_b-pdf.pdf',\r\n order: 1,\r\n },\r\n {\r\n key: 'report-6',\r\n title: 'State of Green Business 2023',\r\n subtitle: 'GreenBiz, 2023',\r\n image: 'state-of-green.png',\r\n href: 'https://www.greenbiz.com/report/state-green-business-2023',\r\n order: 8,\r\n },\r\n {\r\n key: 'report-7',\r\n title: 'The Global Risks Report 2024',\r\n subtitle:\r\n 'World Economic Forum & Marsh McLennan and Zurich Insurance Group, 2024',\r\n image: 'global-risks-report.png',\r\n href: 'https://www.weforum.org/publications/global-risks-report-2024/',\r\n order: 9,\r\n },\r\n {\r\n key: 'report-8',\r\n title:\r\n 'Setting Enterprise Targets: Modeling Downstream Water Use and Consumption',\r\n subtitle: 'World Resources Institute, 2023',\r\n image: 'setting-enterprise-targets.png',\r\n href:\r\n 'https://www.wri.org/research/setting-enterprise-targets-modeling-downstream-water-use-consumption',\r\n order: 2,\r\n },\r\n {\r\n key: 'report-9',\r\n title: 'Development of a Company-Level Cost-Benefit Analysis Framework',\r\n subtitle: 'Ceres & Bluerisk, 2023',\r\n image: 'cost-benefit-analysis.png',\r\n href:\r\n 'https://www.ceres.org/resources/reports/development-company-level-cost-benefit-analysis-framework',\r\n order: 5,\r\n },\r\n {\r\n key: 'report-10',\r\n title: 'Water Stewardship 101: Starting Your Water Journey',\r\n subtitle: 'Figbytes & GreenBiz, 2022',\r\n image: 'water-stewardship.png',\r\n href:\r\n 'https://www.greenbiz.com/whitepaper/water-stewardship-101-starting-your-water-journey',\r\n order: 6,\r\n },\r\n].sort((a, b) => a.order - b.order);\r\n\r\nconst ARTICLES: Array = [\r\n {\r\n key: 'article-1',\r\n title: 'Is Water the ‘Forgotten Piece’ of the Climate Puzzle?',\r\n subtitle: 'Forbes, 2023',\r\n image: 'forgotten-piece.png',\r\n href:\r\n 'https://www.forbes.com/sites/jamiehailstone/2023/05/22/is-water-is-the-forgotten-piece-of-the-climate-puzzle/',\r\n order: 0,\r\n },\r\n {\r\n key: 'article-3',\r\n title: 'How Companies Can Pursue a Positive Impact on Watersheds',\r\n subtitle: 'Forbes, 2023',\r\n image: 'positive-watershed-impacts.png',\r\n href:\r\n 'https://www.forbes.com/sites/insights-ecolab/2023/05/08/how-companies-can-pursue-a-positive-impact-on-watersheds/?sh=6b5389a467ca',\r\n order: 1,\r\n },\r\n {\r\n key: 'article-4',\r\n title:\r\n 'Cost of water risks to business five times higher than cost of taking action',\r\n subtitle: 'CDP, 2021',\r\n image: 'cost-of-water-risks.png',\r\n href:\r\n 'https://www.cdp.net/en/articles/media/cost-of-water-risks-to-business-five-times-higher-than-cost-of-taking-action',\r\n order: 2,\r\n },\r\n {\r\n key: 'article-5',\r\n title: 'Water and Climate Change',\r\n subtitle: 'United Nations Water, 2023',\r\n image: 'water-and-climate-change.png',\r\n href: 'https://www.unwater.org/water-facts/water-and-climate-change',\r\n order: 3,\r\n },\r\n {\r\n key: 'article-7',\r\n title: 'Drought is on the verge of becoming the next pandemic',\r\n subtitle: 'The Guardian, 2023',\r\n image: 'verge-of-drought.png',\r\n href:\r\n 'https://www.theguardian.com/news/2023/jun/15/drought-is-on-the-verge-of-becoming-the-next-pandemic?CMP=Share_iOSApp_Other',\r\n order: 4,\r\n },\r\n {\r\n key: 'article-6',\r\n title: 'Water Quality and Wastewater',\r\n subtitle: 'United Nations Water, 2023',\r\n image: 'water-quality-wastewater.png',\r\n href: 'https://www.unwater.org/water-facts/water-quality-and-wastewater',\r\n order: 5,\r\n },\r\n {\r\n key: 'article-2',\r\n title: 'Water: A human and business priority',\r\n subtitle: 'McKinsey, 2020',\r\n image: 'human-and-bis-priority.png',\r\n href:\r\n 'https://www.mckinsey.com/capabilities/sustainability/our-insights/water-a-human-and-business-priority',\r\n order: 6,\r\n },\r\n].sort((a, b) => a.order - b.order);\r\n\r\nconst TOOLS: Array = [\r\n {\r\n key: 'tool-1',\r\n title: 'World Resources Institute Aqueduct',\r\n image: 'aqueduct.png',\r\n href: 'https://www.wri.org/aqueduct',\r\n order: 0,\r\n },\r\n {\r\n key: 'tool-2',\r\n title: 'WWF Water Risk Filter',\r\n image: 'waterriskfilter.png',\r\n href: 'https://riskfilter.org/',\r\n order: 1,\r\n },\r\n {\r\n key: 'tool-3',\r\n title: 'UN CEO Water Mandate Water Stewardship Toolbox',\r\n image: 'watermandate.png',\r\n href: 'https://ceowatermandate.org/toolbox/',\r\n order: 2,\r\n light: true,\r\n },\r\n {\r\n key: 'tool-4',\r\n title: 'UN Global Compact Water Action Hub',\r\n image: 'wateractionhub.png',\r\n href: 'https://wateractionhub.org/',\r\n order: 3,\r\n },\r\n {\r\n key: 'tool-5',\r\n title: 'United States Environmental Protection Agency WATERS Tools',\r\n image: 'epa.png',\r\n href: 'https://www.epa.gov/waterdata/waters-tools',\r\n order: 4,\r\n },\r\n];\r\n\r\nconst SIZES = {\r\n sm: '200px',\r\n md: '300px',\r\n lg: '400px',\r\n} as const;\r\n\r\nconst Resource: FC<{\r\n resource: ResourceRef & { subtitle?: string };\r\n size?: 'sm' | 'md' | 'lg';\r\n variant?: 'horizontal' | 'vertical';\r\n}> = ({\r\n resource: { image, title, subtitle, href, light = false },\r\n size = 'lg',\r\n variant = 'vertical',\r\n}) => {\r\n const height = SIZES[size];\r\n\r\n return (\r\n \r\n {variant === 'horizontal' ? (\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\n {title}\r\n \r\n {subtitle ? (\r\n \r\n {subtitle}\r\n \r\n ) : null}\r\n \r\n \r\n );\r\n};\r\n\r\nexport const Resources: FC = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n Resources\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n Resources and Tools\r\n \r\n \r\n \r\n \r\n The Ecolab Smart Water Navigator encourages global efforts to\r\n help industry reuse, recycle and reduce water, supporting\r\n resilient operations and healthy communities. There are a number\r\n of resources and tools businesses can use to understand and\r\n address water-related risks and opportunities to better develop\r\n strategies for managing water.\r\n \r\n \r\n \r\n \r\n\r\n \r\n Reports\r\n \r\n \r\n {REPORTS.map((report) => (\r\n \r\n ))}\r\n \r\n\r\n \r\n Articles\r\n \r\n \r\n {ARTICLES.map((article) => (\r\n \r\n ))}\r\n \r\n\r\n \r\n Tools\r\n \r\n \r\n {TOOLS.map((tool) => (\r\n \r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n","import { Box, BoxProps } from '@chakra-ui/react';\r\nimport React from 'react';\r\nimport { FC, PropsWithChildren } from 'react';\r\n\r\ntype RaindropProps = BoxProps;\r\n\r\nexport const Raindrop: FC> = ({\r\n boxSize = '60px',\r\n ...props\r\n}) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nRaindrop.displayName = 'Raindrop';\r\n","import { useEffect } from 'react';\r\nimport { useLocation } from 'react-router-dom';\r\n\r\nexport function useScrollToAnchor() {\r\n const { pathname, hash, key } = useLocation();\r\n\r\n useEffect(() => {\r\n if (hash === '') {\r\n window.scrollTo(0, 0);\r\n } else {\r\n setTimeout(() => {\r\n const id = hash.replace('#', '');\r\n const element = document.getElementById(id);\r\n if (element) {\r\n element.scrollIntoView({\r\n behavior: 'smooth',\r\n });\r\n }\r\n }, 0);\r\n }\r\n }, [pathname, hash, key]);\r\n}\r\n","import {\r\n Box,\r\n Button,\r\n ButtonGroup,\r\n Container,\r\n Flex,\r\n Heading,\r\n Hide,\r\n ListItem,\r\n Stack,\r\n Image,\r\n Text,\r\n UnorderedList,\r\n} from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { Raindrop } from 'src/components/Raindrop/Raindrop';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\nimport { useScrollToAnchor } from 'src/hooks/useScrollToAnchor';\r\n\r\nexport interface AboutProps extends React.HTMLAttributes {}\r\n\r\nconst KEY_MILESTONES = {\r\n 2014: 'The Water Risk Monetizer was introduced to help businesses quantify the risk of increased operating costs from insufficient quantity of incoming water.',\r\n 2015: 'New functionality added to monetize revenue at risk. Underlying water risk data sets were updated.',\r\n 2017: 'New functionality added to monetize quality-related water risks. New user interface was launched.',\r\n 2019: 'Launched the Smart Water Navigator to help users along all steps of setting and executing a water management strategy. Updated underlying global water risk datasets.',\r\n 2021: 'Started integration of the Water Risk Monetizer with the Smart Water Navigator to create a seamless user experience. New functionality added to allow benchmarking and tracking performance over time.',\r\n 2024: 'Completed unification of the Water Risk Monetizer and Smart Water Navigator into one tool: the Smart Water Navigator. Updated underlying water risk datasets.',\r\n};\r\n\r\nconst TIMELINE_COLORS = [\r\n '#e6eef2',\r\n '#ccdde4',\r\n '#99bbca',\r\n '#6698af',\r\n '#337695',\r\n '#00547a',\r\n];\r\n\r\nexport const About: FC = () => {\r\n useScrollToAnchor();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n About the Smart Water Navigator\r\n \r\n )}\r\n actions={() => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n />\r\n div:nth-child(even)': {\r\n bgColor: TIMELINE_COLORS[0],\r\n p: '20px',\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n Overview\r\n \r\n \r\n \r\n \r\n \r\n The Smart Water Navigator is a publicly-available, online tool\r\n that helps organizations assess water risk, set informed,\r\n context-based water goals and develop a plan to achieve them.\r\n The tool helps increase water resilience and support responsible\r\n business growth by turning corporate water targets into real,\r\n on-the-ground results. By assessing the impact of declining\r\n water quantity and quality on operations, the Smart Water\r\n Navigator provides actionable information to help companies turn\r\n water risks into business strategies that enable growth. This is\r\n accomplished through a holistic approach to corporate water\r\n management, supported by a practical guide to smart, sustainable\r\n water practices at the facility level.\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Who should use the Smart Water Navigator?\r\n \r\n \r\n \r\n \r\n \r\n \r\n The tool is designed for use by a range of business\r\n decision-makers, including:\r\n \r\n \r\n \r\n Individuals and teams who set enterprise business strategy\r\n for corporates (supply chain, operations, quality,\r\n engineering, sustainability)\r\n \r\n \r\n Facility and operations managers (site level) – individuals\r\n and teams responsible for improving performance at the local\r\n level\r\n \r\n \r\n Business consultants – third-party experts who help shape\r\n corporate strategy\r\n \r\n \r\n Nongovernmental organizations (NGOs) – organizations that\r\n influence global water stewardship practices\r\n \r\n \r\n \r\n The Smart Water Navigator uses targeted industry data for\r\n almost 100 industries, from mining and construction to finance\r\n and food service. Visit your dashboard and add a facility to\r\n explore all the industries served by the tool.\r\n \r\n \r\n \r\n Add Facility\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Why the Smart Water Navigator?\r\n \r\n \r\n\r\n \r\n \r\n \r\n Several water frameworks and tools provide a good starting\r\n point for quantitative and systematic assessments of water\r\n risk. The Smart Water Navigator incorporates data from these\r\n tools to create an integrated view of targeted water risk data\r\n and action plans to mitigate and adapt to those risks. This\r\n allows users to understand how they are doing in terms of\r\n smart water management, what impact that could have on their\r\n business and how to improve their water management strategy,\r\n all in one tool.\r\n \r\n \r\n The relatively low price of water often means the risks\r\n associated with its use are overlooked. The Smart Water\r\n Navigator helps businesses assess water-related risks in order\r\n to understand the gap between what their business pays for\r\n water and the potential costs of water risks to the business.\r\n The tool also provides credible, actionable information that\r\n businesses can use to make more informed decisions to protect\r\n against water quantity and quality constraints to growth. The\r\n Water Risk Monetizer has helped businesses quantify the risk\r\n of increased operating costs due to insufficient water\r\n quantity and quality. The Smart Water Navigator has allowed\r\n users to set action plans to improve water management\r\n practices in their enterprise. The Smart Water Navigator and\r\n Water Risk Monetizer were combined into one tool in order to\r\n create a seamless user experience along all points of creating\r\n and executing a smart water management plan. The integration\r\n of the Water Risk Monetizer and the Smart Water Navigator has\r\n continued to enhance benefits for businesses in monetizing\r\n risk and ensuring alignment with industry trends.\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\n History\r\n \r\n \r\n \r\n \r\n \r\n \r\n {Object.entries(KEY_MILESTONES).map(([year, text], idx) => {\r\n const isEven = idx % 2;\r\n return (\r\n \r\n \r\n {year}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n 2 ? 'white' : 'initial'}\r\n boxShadow=\"base\"\r\n transition=\"all .2s ease-in-out\"\r\n _hover={{\r\n transform: {\r\n base: `translate(10px, 0)`,\r\n lg: `translate(${isEven ? '-10px' : '10px'}, 0)`,\r\n },\r\n boxShadow: 'lg',\r\n }}\r\n >\r\n {text}\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\n};\r\n","import {\r\n Box,\r\n Button,\r\n ButtonGroup,\r\n Heading,\r\n ListItem,\r\n Stack,\r\n Image,\r\n Table,\r\n Tbody,\r\n Td,\r\n Text,\r\n Thead,\r\n Tr,\r\n UnorderedList,\r\n Accordion,\r\n AccordionButton,\r\n AccordionIcon,\r\n AccordionItem,\r\n AccordionPanel,\r\n} from '@chakra-ui/react';\r\nimport React, { FC, PropsWithChildren } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\nimport { useScrollToAnchor } from 'src/hooks/useScrollToAnchor';\r\n\r\nexport interface TakeActionProps extends React.HTMLAttributes {}\r\n\r\nconst TIMELINE_COLORS = [\r\n '#e6eef2',\r\n '#ccdde4',\r\n '#99bbca',\r\n '#6698af',\r\n '#337695',\r\n '#00547a',\r\n];\r\n\r\nconst INPUT_ACTION = [\r\n {\r\n title: 'Incoming water',\r\n content: 'Incoming water quantity, price and source',\r\n },\r\n {\r\n title: 'Water replenishment',\r\n content:\r\n 'Replenishing any of this site’s incoming water through a nature-based solution within the water basin. The name of the water fund this replenishment supports, the duration of the volumetric benefit, the name of the third party verifier (if applicable) and the annualized volumetric benefit returned to the basin.',\r\n },\r\n {\r\n title: 'Outgoing water',\r\n content:\r\n 'Outgoing water quantity, price and treatment location (if applicable)',\r\n },\r\n {\r\n title: 'Facility details',\r\n content:\r\n 'Type and quantity of facility outputs, as well as projected facility output over 3 years',\r\n },\r\n {\r\n title: 'Business information',\r\n content:\r\n 'If the basin your facility is located in is currently experiencing a drought. Projected incoming and outgoing water prices and quantities over three years. Current facility revenue, projected increase over three years and any recent revenue loss due to water scarcity.',\r\n },\r\n {\r\n title: 'Regulation & reputation',\r\n content:\r\n 'Water regulations in the area the facility is located in for your particular industry. Knowledgeability about other water users in the basin and any reputational challenges.',\r\n },\r\n {\r\n title: 'Water quality & pollutants',\r\n content:\r\n 'Water quality impairments and any limitations related to water treatment capacity and availability. Information on particular pollutant concentrations (if applicable).',\r\n },\r\n {\r\n title: 'Water management practices',\r\n content:\r\n 'To what extent water factors into expansion plans, investment decisions and interactions with the surrounding community and employees. Any existing measurement or target setting related to water at the facility or for the enterprise.',\r\n },\r\n {\r\n title: 'Investment inputs',\r\n content:\r\n 'Capital investment, expected water savings, discount rate and projected increase in water costs. Any additional expenses and savings (if applicable).',\r\n },\r\n];\r\n\r\nconst OUTPUT_ACTION = [\r\n {\r\n title: 'Total risk premium',\r\n content:\r\n 'Monetary estimate of the potential increased operating costs resulting from incoming and outgoing water quality and quantity risk. Risk premiums place a monetary value on the local environmental, human-health and domestic supply impacts of water depletion and pollution and the future costs of water treatment. Local water availability, local water quality and local population density are all variables that impact the size of the risk premium. Locations that have high levels of water stress (due to quantity- or quality-related impacts) and high population densities will usually have a higher risk premium; however, the type of water pollutant and its treatment method will also influence the value for outgoing water.',\r\n image: '/charts/total-risk-premium.jpg',\r\n },\r\n {\r\n title: 'Revenue at risk',\r\n content:\r\n \"Revenue at risk compares the estimated amount of water a business requires to generate revenue to the business' share of water available in the water basin if water were allocated among water users based on economic activity. If more water is required than the basin share of water allocated, then a proportion of the business' revenue is potentially at risk.\",\r\n image: '/charts/revenue-risk.jpg',\r\n },\r\n {\r\n title: 'Water withdrawal risk',\r\n content:\r\n 'The facility may use more water than what would be a sustainable amount of water from its surrounding water sources. If the facility’s current water use, subtracting any replenishment volumes, is higher than the current and future sustainable water use amounts, the facility needs to decrease its water use to avoid impacts to its operations from water scarcity. Water-intensive industries located in areas of high levels of water stress will usually have a higher amount of water use risk. Sustainable annual water withdrawal is calculated to achieve a < 40% risk threshold of baseline water stress to a basin.',\r\n },\r\n {\r\n title: 'Checklist',\r\n content:\r\n 'Based on the industry a facility is in and its current water maturity, the Smart Water Navigator provides a personalized checklist for users to identify areas of improvement within their operations. The checklist includes an assessment of current water management practices, as well as existing target setting and water stewardship efforts.',\r\n image: '/charts/checklist.png',\r\n },\r\n {\r\n title: 'Tools and resources',\r\n content:\r\n 'This feature provides 5 steps that a given facility can take to increase its water maturity, with particular examples and links to resources for each.',\r\n image: '/charts/tools-and-resources.png',\r\n },\r\n {\r\n title: 'Business case',\r\n content:\r\n 'Based on a facility’s position on the water maturity curve and the industry it is in, the Smart Water Navigator provides targeted information on the business benefit of investment in water stewardship and efficiency projects. Users also receive personalized information about the potential tangible and intangible benefits of deciding to make these investments in water stewardship for the individual facility and the broader company as a whole.',\r\n image: '/charts/benefits-chart.jpg',\r\n },\r\n {\r\n title: 'Investment calculator',\r\n content:\r\n 'Users can input information about the cost and projected savings of particular investments in water to understand the payback period for the investment, both according to a conventional and risk-adjusted methodology.',\r\n },\r\n {\r\n title: 'Case studies',\r\n content:\r\n 'Based on a water maturity, the Smart Water Navigator provides best-in-class examples from other companies in similar industries who have invested in smart water management. Users can learn more about the particular projects implemented by the company and the benefit recorded to their business.',\r\n image: '/charts/case-studies.jpg',\r\n },\r\n {\r\n title: 'Absolute water volume over time',\r\n content:\r\n 'Comparison of the incoming, outgoing and calculated consumptive water use over multiple years.',\r\n image: '/charts/absolute-water-volume.jpg',\r\n },\r\n {\r\n title: 'Water intensity over time',\r\n content:\r\n 'Comparison of the incoming, outgoing and calculated consumptive water use per production unit and per revenue over multiple years.',\r\n },\r\n {\r\n title: 'Chart your company’s enterprise risk profile',\r\n content:\r\n \"Assess a facility's risk based on three year projected output growth and location-specific water stress. The Smart Water Navigator also assigns action plans for facilities based on risk likelihood. This analysis provides a way for business leaders to prioritize and determine appropriate risk mitigation strategies for each location in order to reduce a company's overall risk profile.\",\r\n image: '/charts/quantify-risk-matrix.jpg',\r\n },\r\n {\r\n title: 'Benchmark performance across sites in your portfolio',\r\n content:\r\n 'Compare the performance of different sites within a facility portfolio. This analysis provides a way for business leaders to prioritize and determine appropriate water use efficiency strategies for each location in order to bring sites closer to the industry, or organizational, average or median water-intensity.',\r\n },\r\n {\r\n title: 'Total and risk-adjusted water bill',\r\n content:\r\n 'Based on the facility water data input into the tool, the Smart Water Navigator provides the total water bill for all facilities across an enterprise, as well as the total price when factoring in the risk water scarcity creates for a business. This allows users to compare what they are paying for water with the true cost of water to their operations.',\r\n },\r\n {\r\n title:\r\n 'Range of total, incoming & outgoing water prices, as compared to risk-adjusted prices',\r\n content:\r\n 'Based on the facility water data input into the tool, the Smart Water Navigator shows the range of total, incoming and outgoing water prices to show the maximum and minimum amounts paid for sourcing and treating water across the enterprise. This is compared to risk-adjusted ranges to show the true cost of water in an enterprise’s operations when accounting for water quality and quantity risks.',\r\n },\r\n {\r\n title: 'Risk analysis quadrant summary',\r\n content:\r\n 'See what percentages of facilities, outputs and water across an enterprise fall into which of the risk quadrants (low water scarcity/low growth, low water scarcity/high growth, high water scarcity/low growth, high water scarcity/high growth). Understand the water risk premiums and percentage of revenue at risk for facilities in each of these quadrants.',\r\n },\r\n];\r\n\r\nconst ActionItem: FC> = ({ title, content, image }) => {\r\n const hasImage = !!image;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {content}\r\n \r\n\r\n {hasImage && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const TakeAction: FC = () => {\r\n useScrollToAnchor();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n Take action\r\n \r\n )}\r\n subtitle={() => (\r\n \r\n Add facility data to get started on your smart water journey\r\n \r\n )}\r\n actions={() => (\r\n \r\n \r\n \r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n From data to personalized insights\r\n \r\n \r\n Input facility data on water sources, uses and quality, as well as\r\n information on a site’s water management practices, to receive\r\n targeted information to help you identify risks, set targets, take\r\n action and monitor progress over time for both individual facilities\r\n and your enterprise as a whole. Review the chart below to learn more\r\n about the inputs required to assess your facilities and the outputs\r\n produced by the Smart Water Navigator.\r\n \r\n \r\n\r\n \r\n tr': {\r\n borderBottom: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n '& tbody > tr:nth-child(even)': {\r\n bgColor: TIMELINE_COLORS[1],\r\n },\r\n '& tbody td': {\r\n verticalAlign: 'top',\r\n borderRight: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n }}\r\n >\r\n \r\n \r\n \r\n Facility\r\n Enterprise\r\n \r\n \r\n \r\n \r\n \r\n Inputs\r\n \r\n \r\n \r\n Incoming water\r\n Water replenishment\r\n Outgoing water\r\n Facility details\r\n Business information\r\n Regulation & reputation\r\n Water quality & pollutants\r\n Water management practices\r\n Investment inputs\r\n \r\n \r\n \r\n \r\n \r\n Automatic compilation of all facility-level inputs\r\n \r\n \r\n \r\n \r\n \r\n \r\n Outputs\r\n \r\n \r\n \r\n Total risk premium\r\n Revenue risk\r\n Water withdrawal risk\r\n Checklist\r\n Tools and resources\r\n Business case\r\n Investment calculator\r\n Case studies\r\n Absolute water volume\r\n Water intensity over time\r\n \r\n \r\n \r\n \r\n \r\n Chart your company’s enterprise risk profile\r\n \r\n \r\n Benchmark performance across sites in your portfolio\r\n \r\n Total and risk-adjusted water bill\r\n \r\n Range of total, incoming & outgoing water prices, as\r\n compared to risk-adjusted prices\r\n \r\n Risk analysis quadrant summary\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Inputs\r\n \r\n \r\n\r\n \r\n {INPUT_ACTION.map((action, index) => (\r\n \r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n \r\n Outputs\r\n \r\n \r\n\r\n \r\n {OUTPUT_ACTION.map((action, index) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n","import React, { FC } from 'react';\r\nimport { Link as RouterLink } from 'react-router-dom';\r\nimport { LinkProps } from 'react-router-dom';\r\n\r\nexport const Link: FC = ({ to, ...props }) => {\r\n return ;\r\n};\r\n\r\nLink.displayName = 'Link';\r\n","import {\r\n Box,\r\n Container,\r\n Heading,\r\n Stack,\r\n Text,\r\n Image,\r\n Table,\r\n Tbody,\r\n Td,\r\n Thead,\r\n Tr,\r\n Flex,\r\n} from '@chakra-ui/react';\r\nimport React, { FC, PropsWithChildren } from 'react';\r\nimport { Helmet } from 'react-helmet';\r\nimport { Button } from 'src/components/Button';\r\nimport { Link } from 'src/components/Link';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\n\r\ntype MethodologyProps = Record;\r\n\r\nconst TIMELINE_COLORS = [\r\n '#e6eef2',\r\n '#ccdde4',\r\n '#99bbca',\r\n '#6698af',\r\n '#337695',\r\n '#00547a',\r\n];\r\n\r\nconst TARGET_STRATEGIES = [\r\n {\r\n decrease: 'Greater than 50%',\r\n riskLevel: 'High',\r\n strategy: 'Invest in smart water strategies immediately',\r\n },\r\n {\r\n decrease: 'Greater than 25% and less than 50%',\r\n riskLevel: 'Medium',\r\n strategy: 'Invest in smart water strategies',\r\n },\r\n {\r\n decrease: 'Less than 25%',\r\n riskLevel: 'Low',\r\n strategy: 'Monitor water issues and invest in smart water strategies',\r\n },\r\n {\r\n decrease: 'Less than 0%',\r\n riskLevel: 'Low',\r\n strategy: 'Monitor water issues',\r\n },\r\n];\r\n\r\nconst TAKE_ACTION_STAGES = [\r\n {\r\n stage: 'Water-smart',\r\n description:\r\n \"Smart, circular water management is fully embedded in your site's decision-making and operations. You are actively working on water issues with the surrounding community.\",\r\n },\r\n {\r\n stage: 'Exploratory',\r\n description:\r\n 'You have mastered water conservation. Your site is deploying pilots for circular water management. You are reaching out to other water users in the surrounding community.',\r\n },\r\n {\r\n stage: 'Linear',\r\n description:\r\n 'Your site is primarily focused on water conservation, with successful water reduction pilots in place.',\r\n },\r\n {\r\n stage: 'Untapped',\r\n description:\r\n 'Your site has not yet adopoted smart water management practices.',\r\n },\r\n];\r\n\r\nexport const Methodology: FC> = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n\r\n (\r\n \r\n Methodology\r\n \r\n )}\r\n />\r\n\r\n div:nth-child(even)': {\r\n bgColor: TIMELINE_COLORS[0],\r\n p: '20px',\r\n },\r\n }}\r\n >\r\n \r\n \r\n Methodology Overview\r\n \r\n \r\n \r\n \r\n \r\n Water scarcity has the potential to increase the cost of\r\n water, which makes operations more expensive and reduces\r\n profit margins. Water scarcity also limits availability,\r\n making it more difficult to access the water a business needs\r\n to operate, which can decrease production and result in loss\r\n of revenue. Water is undervalued, particularly in areas where\r\n water is most scarce.\r\n \r\n \r\n To date, water has been easy to access and available. But the\r\n reality is changing. Decreasing water quantity and quality\r\n poses significant risks to businesses. Businesses need data\r\n and insights on water-related risks to better understand and\r\n internalize the full value of water at the site and enterprise\r\n levels. Once companies understand these risks and the\r\n potential costs to their business, they need tools and\r\n expertise to take meaningful action and create tangible change\r\n in water use practices at their facilities. The Smart Water\r\n Navigator provides the data, insights, tools and expertise\r\n that companies need to decrease risk and costs related to\r\n water while increasing revenue.\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\n Smart Water Navigator Methodology\r\n \r\n \r\n This methodology describes how the Smart Water Navigator\r\n functions, from key data sources and assumptions to inputs\r\n and outputs of the tool.\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\n \r\n \r\n \r\n\r\n \r\n \r\n Identify Risk\r\n \r\n \r\n \r\n \r\n \r\n \r\n The Smart Water Navigator uses best-in-class local water\r\n basin datasets, economic techniques and scientific\r\n methodologies developed by S&P Global Sustainable1 to\r\n monetize water-related business risks. The tool provides a\r\n comprehensive series of risk metrics to help businesses\r\n understand incoming (quantity and quality) risks and\r\n outgoing (quality) risks.\r\n \r\n \r\n The tool takes user-provided business information on water\r\n use, water prices and production data and calculates\r\n incoming and outgoing water risk that could result in\r\n increased operating costs. The monetary value assigned to\r\n this risk takes into account water availability, water\r\n quality and competing uses of water within local water\r\n basins across a three-, five- and 10-year time horizon. The\r\n Smart Water Navigator also calculates the potential loss in\r\n revenue from incoming water quantity risk across the same\r\n time horizons.\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\n Set Targets\r\n \r\n \r\n \r\n \r\n \r\n The Smart Water Navigator uses baseline water stress data to\r\n help users identify facilities in their enterprise that are at\r\n risk of withdrawing unsustainable amounts of water from\r\n surrounding sources to avoid operational impacts from water\r\n scarcity. Once these sites are identified, the tool helps\r\n users set specific, time-bound targets for sustainable water\r\n allocation based on location-based contextual factors informed\r\n by the best available science and analysis.\r\n \r\n \r\n These targets maintain a risk threshold of <40% to minimize\r\n a facility’s impact on the local ecosystem, human health and\r\n economic needs.\r\n \r\n tr': {\r\n borderBottom: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n '& tbody td': {\r\n verticalAlign: 'top',\r\n borderRight: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n }}\r\n >\r\n \r\n \r\n Needed Decrease From Current Water Use\r\n Risk Level\r\n Recommended Strategy\r\n \r\n \r\n \r\n {TARGET_STRATEGIES.map(\r\n ({ decrease, riskLevel, strategy }) => (\r\n \r\n \r\n {decrease}\r\n \r\n {riskLevel}\r\n {strategy}\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\n Take Action\r\n \r\n \r\n \r\n \r\n \r\n Using a 13-question Water Action Assessment informed by\r\n industry frameworks and stakeholder input, the tool offers a\r\n comprehensive guiding philosophy and a practical roadmap to\r\n build circular water management at the site level. The\r\n assessment places sites on a “water maturity curve” from\r\n “untapped” to “water-smart” based on current water management\r\n practices. The site’s water maturity and industry inform a\r\n customized guide with case studies and resources.\r\n \r\n tr': {\r\n borderBottom: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n '& tbody td': {\r\n verticalAlign: 'top',\r\n borderRight: '1px solid',\r\n borderColor: 'gray.600',\r\n },\r\n }}\r\n >\r\n \r\n \r\n Stage\r\n Description\r\n \r\n \r\n \r\n {TAKE_ACTION_STAGES.map(({ stage, description }) => (\r\n \r\n \r\n {stage}\r\n \r\n {description}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Track Progress\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n The Smart Water Navigator allows businesses to assess\r\n water performance at their facilities over time. By\r\n inputting revenue and incoming and outgoing water data\r\n over multiple years, users can not only visualize the\r\n interdependencies amongst production volume, revenue and\r\n water use, they can also see how they are performing\r\n against their water targets and identify new risks and\r\n opportunities for growth.\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\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nMethodology.displayName = 'Methodology';\r\n","import {\r\n Box,\r\n Container,\r\n Heading,\r\n ListItem,\r\n Link as ChakraLink,\r\n Stack,\r\n Text,\r\n UnorderedList,\r\n} from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\n\r\nexport interface TermsOfServiceProps\r\n extends React.HTMLAttributes {}\r\n\r\nexport const TermsOfService: FC = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n Terms of Service\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n Terms of Service\r\n \r\n \r\n \r\n These Terms of Service (\"Agreement\") is made between Ecolab USA\r\n Inc. (\"Ecolab\") and you, or, if your use of the service is on\r\n behalf of an entity or other organization, that entity or\r\n organization (in either case \"You\").\r\n \r\n \r\n \r\n \r\n The{' '}\r\n \r\n www.smartwaternavigator.com\r\n {' '}\r\n website (the \"Site\") is owned by Ecolab and provides You with the\r\n ability to access and use information, data, and other resources\r\n made available through the Site (\"Services\"). In addition to the\r\n terms of this Agreement, Your access to and use of the Site and\r\n Services is subject to Ecolab’s Privacy Policy. You are\r\n responsible for compliance with these terms and policies\r\n applicable to the access and use of the Services and Site.\r\n \r\n \r\n \r\n \r\n By accessing or using the Site or Services, You agree that You\r\n have read and agree to be bound by the Terms of Service.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 1. Account\r\n \r\n \r\n \r\n In order to access some of the Site and Services, You are required\r\n to register as an authorized user and select a username and\r\n password to create an account (\"Account\"). You are responsible for\r\n ensuring the security and confidentiality of Your username and\r\n password and agree to notify Ecolab immediately if any username is\r\n lost, stolen, or otherwise compromised.\r\n \r\n \r\n \r\n \r\n By creating and registering for Your Account, You represent and\r\n warrant that all information You submit to us is truthful and\r\n accurate. You are responsible for updating Your user data in a\r\n timely manner to ensure its accuracy and completeness. By\r\n providing Your Account information to Ecolab , You authorize\r\n Ecolab to use, copy, sublicense and disclose all such information\r\n to: ensure the operation, functionality, and optimization of the\r\n Site, including by aggregating and de-identifying data; provide\r\n data analytics and administration, including through the use of\r\n third parties and subprocessors; comply with applicable federal,\r\n state or local law or a valid order issued by a court or\r\n governmental agency of competent jurisdiction; enforce these terms\r\n and/or to Ecolab or its third party providers to protect their\r\n legal rights, as necessary.\r\n \r\n \r\n \r\n \r\n Ecolab reserves the right to terminate Your access to Your Account\r\n and the Site or any portion of this Site without notice in the\r\n event that You violate this Agreement or for any reason\r\n whatsoever.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 2. Third Party Products and Services\r\n \r\n \r\n \r\n The Services include products, offerings, services, or\r\n functionality developed, provided, or maintained by third party\r\n providers, including S&P Global Sustainable1. Third party products\r\n and services will be subject to the terms of this Agreement. You\r\n are granted no licenses or rights, whether by implication,\r\n estoppel, or otherwise, in or to any products or services from any\r\n third-party provider as a result of this Agreement. Moreover,\r\n Services may include or be based on data or information from\r\n third-party providers and other users of the Site. Ecolab lacks an\r\n independent basis to verify or contradict the accuracy or\r\n completeness of the data and information provided by third parties\r\n and therefore is not responsible for any inaccuracies in that\r\n information and data.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 3. Disclaimer of Warranties\r\n \r\n \r\n \r\n This Site and its content are provided by Ecolab \"as is\", and \"as\r\n available\", \"and Ecolab and its third party providers expressly\r\n disclaim all warranties and representations of any kind with\r\n regard to any subject matter of this agreement, express, statutory\r\n or implied, including, without limitation, warranties of\r\n merchantability, title, non-infringement, fitness for a particular\r\n purpose, and warranties that may arise out of a course of dealing\r\n or performance, usage or trade practice. Ecolab and its\r\n third-party providers provide no warranty and make no\r\n representations of any kind that the Smart Sater Navigator tool\r\n will meet the user’s requirements, achieve any intended results,\r\n be compatible or work with any other software applications,\r\n systems or services, operate without interruption, meet any\r\n performance or reliability standards or be error free or that any\r\n errors or defects can or will be corrected. No oral or written\r\n information, advice, or results provided by Ecolab, including\r\n through the Smart Water Navigator tool, will increase the scope of\r\n this agreement or create any new warranties.\r\n \r\n \r\n \r\n \r\n For the avoidance of doubt, Ecolab makes no representations or\r\n warranties as to the completeness or accuracy of information\r\n provided on the site, including any results or output generated by\r\n the Smart Water Navigator tool. The Smart Water Navigator tool\r\n relies on a series of assumptions and the information provided by\r\n the user and provides proposed solutions and projected outcomes\r\n based on the same. Information provided using the Smart Water\r\n Navigator is not a guarantee of results. Actual results will vary\r\n depending on each user’s circumstances. While we endeavor to keep\r\n the information up to date and correct, we make no representations\r\n or warranties of any kind, express or implied, about the\r\n completeness, accuracy, reliability, suitability or availability\r\n with respect to the website or the information, services,\r\n assessments, results, reports, mitigation actions, maps or related\r\n graphics contained on the website for any purpose. Any reliance\r\n You place on such information is therefore strictly at Your own\r\n risk.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 4. Limitation of Liability\r\n \r\n\r\n \r\n \r\n In no event will Ecolab or its third party providers be liable for\r\n any indirect, incidental, special, exemplary, punitive, or\r\n consequential damages, however caused, under any theory of\r\n liability, whether in contract, strict liability or tort\r\n (including negligence or otherwise), arising in any way in\r\n connection with or out of the use of the platform, services (or\r\n any service content provided through the platform or services\r\n whether directly or on behalf of any user or other third party),\r\n even if Ecolab has been advised of the possibility of such\r\n damages, including, without limitation, any loss of data,\r\n opportunity, revenues or profits, business interruption, or\r\n procurement of substitute goods or services. In jurisdictions\r\n where limitation of liability for consequential or incidental\r\n damages is not permitted, Ecolab’s liability is limited to the\r\n maximum extent permitted by law.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 5. External Content\r\n \r\n \r\n \r\n There are links on this website that take You to other websites\r\n outside of our service. Any links provided to third party websites\r\n outside of this site are provided solely for Your convenience. The\r\n operation and content of such third party websites is beyond our\r\n control, and we do not endorse in any manner whatsoever or accept\r\n any responsibility for the content or other material that may be\r\n contained on such websites, the use of such websites, or any\r\n products or services advertised on or sold through any such\r\n websites. We have no control over the nature, content and\r\n availability of those sites. The inclusion of any links does not\r\n necessarily imply a recommendation or endorse the views expressed\r\n within them.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 6. Facility Locations\r\n \r\n \r\n \r\n The tool asks users to designate the location of their facility.\r\n The terms \"country,\" \"state,\" or \"province\" or \"city\" do not imply\r\n any judgment on the legal status of any territory, or any\r\n endorsement or acceptance of disputed boundaries, on behalf of\r\n Ecolab or its third-party providers.\r\n \r\n \r\n \r\n \r\n Moreover, Ecolab makes no representation that information or\r\n Services available through the Site are appropriate or available\r\n for use under the laws of locations outside of the United States.\r\n \r\n \r\n \r\n \r\n \r\n 7. Intellectual Property\r\n \r\n \r\n \r\n All material contained in this Site is protected by law, including\r\n but not limited to, United States copyright and trademark laws, as\r\n well as other state, national and international laws and\r\n regulations.\r\n \r\n \r\n \r\n \r\n Except as indicated, the entire content of the Site is the sole\r\n and exclusive property of Ecolab, and any commercial use requires\r\n written permission of Ecolab. Ecolab also owns a copyright in this\r\n Site as a collective work and/or compilation, and in the\r\n selection, coordination, arrangement, organization and enhancement\r\n of such content. You may use, reproduce, distribute or reprint\r\n materials available from this Site only for Your personal and\r\n non-commercial use, provided (i) proper copyright notices appear\r\n in all reproductions, (ii) no documents or related images are\r\n modified in any way; and (iii) no graphic images available from\r\n this Site are used, copied or distributed separate from\r\n accompanying text.\r\n \r\n \r\n \r\n \r\n Any text materials on the Site may not be modified in any way. All\r\n marks designating Ecolab’s products and services are proprietary\r\n trademarks of Ecolab. Use or misuse of these trademarks is\r\n expressly prohibited and may violate international, federal and\r\n state trademark laws.\r\n \r\n \r\n \r\n \r\n Please be advised that Ecolab enforces its intellectual property\r\n rights to the fullest extent of the law. If a consultant or other\r\n user would like to use any content or service available on the\r\n Site for commercial purposes, please contact{' '}\r\n \r\n SmartWaterNavigator@ecolab.com\r\n {' '}\r\n for information about licensing.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 8. Provision of Services\r\n \r\n \r\n \r\n Every effort is made to keep the website up and running smoothly.\r\n However, Ecolab takes no responsibility for, and will not be\r\n liable for, the website being virus-free or temporarily\r\n unavailable due to technical issues beyond our control.\r\n \r\n \r\n \r\n \r\n Ecolab reserves the exclusive right to change, complement, delete\r\n or halt publication of, completely or for a limited period, parts\r\n of the webpages or the entire offer without separate notification.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 9. Applicable law and jurisdiction\r\n \r\n \r\n \r\n By accessing the Site, You agree that this Agreement is governed\r\n by and construed in accordance with the laws of the United States,\r\n without regard to conflict of law principles. Any disputes,\r\n controversies, or claims arising out of or in connection to this\r\n Agreement, including those with third party providers, shall be\r\n heard in the federal courts of Hennepin County, Minnesota or\r\n Ramsey County, Minnesota. You expressly consent to the exclusive\r\n jurisdiction of the federals courts of Hennepin County, Minnesota\r\n and Ramsey County, Minnesota for all disputes arising out of or in\r\n connection with this Agreement, including those with third party\r\n providers, and expressly waive any objection to the jurisdiction\r\n of these courts, whether based on convenience or otherwise.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 10. Data Privacy\r\n \r\n \r\n \r\n In addition, the Parties work with other companies to provide the\r\n Smart Water Navigator, including third-party software providers\r\n and cloud-hosting service providers. The Parties may share certain\r\n information with these companies for the purpose of providing\r\n Services through the Site, including information about Your use of\r\n the Smart Water Navigator tool. By accessing the Site, You\r\n expressly consent to the use and disclosure of personally\r\n identifiable and other data and information as described in\r\n Ecolab’s then current privacy policy (\"Privacy Policy\") and agree\r\n that as required by applicable laws You will obtain the consent of\r\n all Account users to such use and disclosure. Notwithstanding the\r\n Privacy Policy, Ecolab and its third party providers have the\r\n right to collect, extract, transfer, compile, aggregate, and/or\r\n archive nonpersonally identifiable data resulting from Your access\r\n to the Site and use of the Services provided, including the Smart\r\n Water Navigator tool. To the extent any such data or information\r\n is collected or generated by Ecolab, the data and information will\r\n be solely owned by Ecolab and may be used by Ecolab for any lawful\r\n business purpose without a duty of accounting to You, provided\r\n that the data and information is used only in an aggregated form,\r\n without directly identifying You, any Account user or customer, or\r\n any other entity or natural person as the source thereof.\r\n \r\n \r\n \r\n\r\n \r\n \r\n 11. Prohibited uses\r\n \r\n \r\n \r\n In addition to uses otherwise prohibited by Ecolab, these Terms,\r\n or applicable law, You will not, and will not allow any third\r\n party, to:\r\n \r\n \r\n \r\n \r\n \r\n Use the Smart Water Navigator and Site for any purpose other\r\n than its intended purpose or in any way beyond the scope of the\r\n license in these Terms.\r\n \r\n \r\n Copy or distribute the Smart Water Navigator and Site without\r\n prior written approval of the Parties.\r\n \r\n \r\n Circumvent, disable or otherwise interfere with security-related\r\n features or features that prevent or restrict use of copying\r\n content or limiting the use of such content.\r\n \r\n \r\n Download, access, use or register for the Smart Water Navigator\r\n and Site if You are under eighteen (18) years old.\r\n \r\n \r\n Access or use the content by artificial means or in a manner\r\n that, in the Parties’ discretion, would inflict an excessive\r\n load on Ecolab’s or its suppliers’ hardware or software.\r\n \r\n \r\n Disclose information or analysis regarding the quality or\r\n performance of the program.\r\n \r\n \r\n Upload or transmit: (i) any content or data that infringe or\r\n violate any rights of any party, including, but not limited to,\r\n any patent, copyright, trademark, trade secret or any\r\n proprietary or other right of Ecolab or a third party, (ii) any\r\n content or data that are, or Ecolab deems to be, unlawful,\r\n illegal, threatening, obscene, defamatory, libelous, profane,\r\n harmful, abusive, racially or ethnically offensive, harassing,\r\n humiliating, invasive of privacy or publicity rights, otherwise\r\n objectionable, or otherwise violate the rights of Ecolab or a\r\n third party, or (iii) any disabling code (defined as computer\r\n code designed to interfere with the normal operation of the\r\n program or Ecolab’s or a third party’s hardware or software) or\r\n any program routine, device or other undisclosed feature,\r\n including, but not limited to, a time bomb, virus, software\r\n lock, drop-dead device, malicious logic, worm, Trojan horse or\r\n trap door which is designed to delete, disable, deactivate,\r\n interfere with or otherwise harm the Program or Ecolab’s or a\r\n third party’s hardware or software.\r\n \r\n \r\n Use the program for benchmarking, monitoring or testing\r\n availability or performance, or any other competitive use,\r\n including, but not limited to, creating programs, products,\r\n services, technology or software that are substantially similar\r\n to the program.\r\n \r\n \r\n Modify, adapt, alter, disassemble, decompile, decode, translate\r\n or convert into human readable form, or reverse engineer, all or\r\n any part of the program or any software, or attempt to\r\n reconstruct or derive any source code (or underlying ideas,\r\n algorithms, structure or organization), modify or create a\r\n derivative work of the program by any means whatsoever.\r\n \r\n \r\n Use or access any data, content or materials for any purpose or\r\n in any manner other than real-time viewing (which prohibits, for\r\n example, screenshots, downloading and storing) unless expressly\r\n permitted by the features of the program.\r\n \r\n \r\n Engage in any other conduct that restricts or inhibits anyone’s\r\n use or enjoyment of the program, or which, as determined by\r\n Ecolab, may harm Ecolab or program users or expose them to\r\n liability.\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n 12. Changes to the Terms\r\n \r\n \r\n \r\n The Parties reserve the right to modify these terms from time to\r\n time at our sole discretion, for any reason or no reason, and\r\n without any notice by posting them on the website. Changes to our\r\n terms become effective on the date they are posted and Your\r\n continued use of the Site after any changes to the terms will\r\n signify Your agreement to be bound by them.\r\n \r\n \r\n \r\n\r\n \r\n \r\n August 2024\r\n \r\n \r\n \r\n Contact Information:\r\n \r\n \r\n \r\n Ecolab:{' '}\r\n \r\n www.ecolab.com\r\n {' '}\r\n or contact{' '}\r\n \r\n SmartWaterNavigator@ecolab.com\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import {\r\n Container,\r\n Heading,\r\n ListItem,\r\n Link as ChakraLink,\r\n Stack,\r\n Text,\r\n OrderedList,\r\n} from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport classnames from 'classnames/bind';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\nimport { UpdateCookiePrefButton } from 'src/components/UpdateCookiePrefButton';\r\nimport styles from './Cookies.module.css';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\nexport interface CookiesProps extends React.HTMLAttributes {}\r\n\r\nexport const Cookies: FC = () => {\r\n const listItemStyle = { paddingTop: 10 };\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n Cookies\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n Cookie Notice\r\n \r\n \r\n \r\n This Cookie Notice explains how Smart Water Navigator uses cookies\r\n and similar technologies (collectively, “Cookies”) to recognize\r\n you when you visit our website. It explains what Cookie\r\n technologies are and why we use them.\r\n \r\n \r\n \r\n\r\n \r\n \r\n What are Cookies?\r\n \r\n \r\n \r\n Cookies are small data files that are placed or accessed on your\r\n device when you visit websites or other digital properties.\r\n Digital property owners can use Cookies for a variety of reasons,\r\n such as enabling their digital properties to work (or work more\r\n efficiently), providing personalized content, and advertising, and\r\n creating analytics. Cookies set by the digital property owner are\r\n called “first-party cookies.” Only the digital property owner can\r\n access the first-party Cookies it sets. Cookies set by parties\r\n other than the digital property owner are called “third-party\r\n Cookies.” Third-party Cookies enable third-party features or\r\n functionality to be provided on or through the digital property\r\n (such as advertising, interactive content, and social sharing).\r\n The parties that set these third-party Cookies can recognize your\r\n device both when it visits the digital property in question and\r\n when it visits other digital properties that have partnered with\r\n them.\r\n \r\n \r\n \r\n\r\n \r\n \r\n Why do we use Cookies on Our Website?\r\n \r\n \r\n \r\n \r\n Strictly Necessary Cookies These cookies are necessary\r\n for the website to function and cannot be switched off in our\r\n systems. They are usually only set in response to actions made\r\n by you which amount to a request for services, such as setting\r\n your privacy preferences, logging in or filling in forms. You\r\n can set your browser to block or alert you about these cookies,\r\n but some parts of the site will not then work. These cookies do\r\n not store any personally identifiable information.\r\n \r\n \r\n Performance Cookies These cookies allow us to count\r\n visits and traffic sources so we can measure and improve the\r\n performance of our site. They help us to know which pages are\r\n the most and least popular and see how visitors move around the\r\n site. All information these cookies collect is aggregated and\r\n therefore anonymous. If you do not allow these cookies we will\r\n not know when you have visited our site, and will not be able to\r\n monitor its performance.\r\n \r\n \r\n Functional Cookies These cookies enable the website to\r\n provide enhanced functionality and personalisation. They may be\r\n set by us or by third party providers whose services we have\r\n added to our pages. If you do not allow these cookies then some\r\n or all of these services may not function properly.\r\n \r\n \r\n Targeting Cookies These cookies may be set through our\r\n site by our advertising partners. They may be used by those\r\n companies to build a profile of your interests and show you\r\n relevant adverts on other sites. They do not store directly\r\n personal information, but are based on uniquely identifying your\r\n browser and internet device. If you do not allow these cookies,\r\n you will experience less targeted advertising.\r\n \r\n \r\n Social Media Cookies These cookies are set by a range of\r\n social media services that we have added to the site to enable\r\n you to share our content with your friends and networks. They\r\n are capable of tracking your browser across other sites and\r\n building up a profile of your interests. This may impact the\r\n content and messages you see on other websites you visit. If you\r\n do not allow these cookies you may not be able to use or see\r\n these sharing tools.\r\n \r\n \r\n Embedded YouTube Video Cookies YouTube is a Google-owned\r\n platform for hosting and sharing videos. YouTube collects user\r\n data through videos embedded in websites, which is aggregated\r\n with profile data from other Google services to display targeted\r\n advertising to web visitors across a broad range of their own\r\n and other websites. If you do not allow these cookies, our\r\n embedded YouTube videos will not display properly.\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Where can you get further information?\r\n \r\n \r\n \r\n You can change your cookie preferences at any time by using the\r\n Cookie Preferences center on the Website.\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n If you have questions about our use of Cookies or other\r\n technologies, please contact us at{' '}\r\n \r\n dataprivacy@ecolab.com\r\n \r\n {'.'}\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n","import { RouteProps } from 'src/components/Route';\r\nimport { Account } from './Account';\r\nimport { Contact } from './Contact';\r\nimport { Dashboard } from './Dashboard';\r\nimport { Faq } from './Faq';\r\nimport { ForgotPassword } from './ForgotPassword';\r\nimport { Invitation } from './Invitation';\r\nimport { HowItWorks } from './HowItWorks';\r\nimport { Login } from './Login';\r\nimport { Logout } from './Logout';\r\nimport { Registration } from './Registration';\r\nimport { ResetPassword } from './ResetPassword';\r\nimport { User } from './User';\r\nimport { VerificationRequired } from './VerificationRequired';\r\nimport { VerifyAccount } from './VerifyAccount';\r\nimport { Resources } from './Resources';\r\nimport { DevelopmentPartners } from './DevelopmentPartners';\r\nimport { About } from './About';\r\nimport { TakeAction } from './TakeAction';\r\nimport { Methodology } from './Methodology';\r\nimport { TermsOfService } from './TermsOfService';\r\nimport { Cookies } from './Cookies';\r\n\r\nconst routes: Array = [\r\n {\r\n path: '/dashboard',\r\n component: Dashboard,\r\n variant: 'protected',\r\n },\r\n {\r\n path: '/login',\r\n component: Login,\r\n variant: 'public',\r\n },\r\n {\r\n path: '/logout',\r\n component: Logout,\r\n },\r\n {\r\n path: '/register',\r\n component: Registration,\r\n variant: 'public',\r\n },\r\n {\r\n path: '/forgot-password',\r\n component: ForgotPassword,\r\n variant: 'public',\r\n },\r\n {\r\n path: '/(reset-password|change-password)',\r\n component: ResetPassword,\r\n variant: 'public',\r\n },\r\n {\r\n path: '/verify-account',\r\n exact: true,\r\n component: VerificationRequired,\r\n },\r\n {\r\n path: '/verify-account/:code',\r\n exact: true,\r\n component: VerifyAccount,\r\n },\r\n {\r\n path: '/user',\r\n component: User,\r\n variant: 'protected',\r\n },\r\n {\r\n path: '/account',\r\n component: Account,\r\n variant: 'protected',\r\n },\r\n {\r\n path: '/invitation',\r\n component: Invitation,\r\n },\r\n {\r\n path: '/how-it-works',\r\n component: HowItWorks,\r\n },\r\n {\r\n path: '/contact',\r\n component: Contact,\r\n },\r\n {\r\n path: '/about',\r\n component: About,\r\n },\r\n {\r\n path: '/faq',\r\n component: Faq,\r\n },\r\n {\r\n path: '/resources',\r\n component: Resources,\r\n },\r\n {\r\n path: '/development-partners',\r\n component: DevelopmentPartners,\r\n },\r\n {\r\n path: '/Methodology',\r\n component: Methodology,\r\n },\r\n {\r\n path: '/take-action',\r\n component: TakeAction,\r\n },\r\n {\r\n path: '/terms-of-service',\r\n component: TermsOfService,\r\n },\r\n {\r\n path: '/cookies',\r\n component: Cookies,\r\n },\r\n];\r\n\r\nexport default routes;\r\n","import React, { FC, useEffect } from 'react';\r\nimport { Redirect } from 'react-router-dom';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\n\r\nexport const Logout: FC<{}> = () => {\r\n const { logout } = useAuth();\r\n\r\n useEffect(() => {\r\n logout!();\r\n }, [logout]);\r\n\r\n return ;\r\n};\r\n","import {\r\n Box,\r\n Flex,\r\n Text,\r\n Heading,\r\n FormLabel,\r\n FormControl,\r\n Stack,\r\n Container,\r\n FormHelperText,\r\n Input,\r\n Textarea,\r\n FormErrorMessage,\r\n Button,\r\n Alert,\r\n AlertDescription,\r\n AlertIcon,\r\n AlertTitle,\r\n} from '@chakra-ui/react';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport React from 'react';\r\nimport { FC } from 'react';\r\nimport { useForm } from 'react-hook-form';\r\nimport { Link } from 'react-router-dom';\r\nimport { sendContactMessage } from 'src/clients/api/contact';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\nimport { useAsyncState } from 'src/hooks/useAsyncState';\r\nimport { contactFormSchema, ContactFormSchemaPayload } from './validation';\r\n\r\nexport interface ContactProps extends React.HTMLAttributes {}\r\n\r\nexport const Contact: FC = () => {\r\n const [state, setState] = useAsyncState();\r\n\r\n const {\r\n formState: { errors },\r\n register,\r\n handleSubmit,\r\n } = useForm({\r\n defaultValues: {},\r\n mode: 'all',\r\n resolver: yupResolver(contactFormSchema),\r\n });\r\n\r\n const onSubmit = handleSubmit(async (values: ContactFormSchemaPayload) => {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n try {\r\n setState({\r\n status: 'loading',\r\n });\r\n\r\n const result = await sendContactMessage(values);\r\n\r\n if (result.status === 'error') {\r\n throw new Error(result.value.errors[0].message);\r\n }\r\n\r\n setState({\r\n status: 'success',\r\n message: 'Message sent successfully',\r\n });\r\n } catch (e) {\r\n setState({\r\n status: 'error',\r\n message: e.message ?? 'There was an error logging you in.',\r\n });\r\n }\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n Contact us\r\n \r\n )}\r\n subtitle={() => (\r\n \r\n To request additional information about the Smart Water Navigator,\r\n please complete the form below and a representative will contact\r\n you.\r\n \r\n )}\r\n />\r\n \r\n \r\n {state.status === 'success' ? (\r\n \r\n \r\n \r\n Success!\r\n \r\n {state.message ?? 'Message sent successfully'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n {state.status === 'error' ? (\r\n \r\n \r\n Error!\r\n \r\n {state.message ?? 'An error was encountered.'}\r\n \r\n \r\n ) : null}\r\n \r\n \r\n \r\n \r\n Name\r\n \r\n \r\n \r\n \r\n \r\n \r\n First\r\n \r\n \r\n {errors.firstName?.message}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Last\r\n \r\n \r\n {errors.lastName?.message}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Company\r\n \r\n \r\n \r\n \r\n {errors.company?.message}\r\n \r\n \r\n \r\n\r\n \r\n \r\n City\r\n \r\n \r\n \r\n \r\n {errors.city?.message}\r\n \r\n \r\n \r\n\r\n \r\n \r\n Country\r\n \r\n \r\n \r\n \r\n {errors.country?.message}\r\n \r\n \r\n \r\n\r\n \r\n \r\n Email Address\r\n \r\n \r\n \r\n \r\n {errors.email?.message}\r\n \r\n \r\n \r\n\r\n \r\n \r\n Question or Comment\r\n \r\n \r\n \r\n \r\n {errors.comments?.message}\r\n \r\n \r\n \r\n\r\n \r\n \r\n Submit\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import { Env } from 'src/constants/env';\r\nimport { ContactFormSchemaPayload } from 'src/routes/marketing/Contact/validation';\r\nimport request from '../request';\r\nimport { WrappedResponse } from '../types';\r\n\r\nexport type ContactRequestType = {};\r\nexport type ContactResponseType = WrappedResponse;\r\nexport function sendContactMessage(payload: ContactFormSchemaPayload) {\r\n return request.post(\r\n `${Env.apiUrl}/v5/contact`,\r\n payload\r\n );\r\n}\r\n","import {\r\n Box,\r\n Container,\r\n Heading,\r\n Link,\r\n Stack,\r\n Text,\r\n Image,\r\n Flex,\r\n SimpleGrid,\r\n} from '@chakra-ui/react';\r\nimport React, { FC } from 'react';\r\nimport { Helmet } from 'src/components/Helmet';\r\nimport { PageHeader } from 'src/components/PageHeader';\r\nimport { RouteContentScrollable } from 'src/components/RouteContentScrollable';\r\nimport { SiteFooter } from 'src/components/SiteFooter';\r\nimport { PARTNERS } from 'src/constants/partners';\r\n\r\nexport interface DevelopmentPartnersProps\r\n extends React.HTMLAttributes {}\r\n\r\nexport const DevelopmentPartners: FC = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n (\r\n \r\n Development partners\r\n \r\n )}\r\n subtitle={() => (\r\n \r\n The Smart Water Navigator was developed by Ecolab in collaboration\r\n with S&P Global Sustainable1.\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n About our partners\r\n \r\n \r\n \r\n \r\n The Smart Water Navigator was developed by Ecolab, a global\r\n leader in water technologies and services and S&P Global\r\n Sustainable1, a global leader in environmental data and risk\r\n analysis. Through this collaboration, the platform leverages\r\n industry insights, advanced analytics and Azure Cloud technology\r\n from legacy partner Microsoft to help business leaders easily\r\n access information to better understand and address the impacts\r\n of water scarcity. Our data partners and advisors include the\r\n World Resources Institute, the UN CEO Water Mandate, the Pacific\r\n Institute and the Alliance for Water Stewardship.\r\n \r\n \r\n \r\n \r\n \r\n {PARTNERS.map((partner) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n Hear from our partners\r\n \r\n \r\n \r\n \r\n \r\n \"Extremely high water stress is already affecting a quarter of\r\n the world's population, and the consequences for people, the\r\n planet and economies will be dire if we don't start\r\n prioritizing improved water management. All water users in a\r\n basin, including corporations, must do their part to prevent\r\n water stress from becoming a water crisis. Tools like the\r\n Smart Water Navigator help businesses on this journey by\r\n enabling them to set meaningful targets and move towards\r\n sustainable water use to ensure a water-secure future for\r\n all.\"\r\n \r\n \r\n \r\n – Samantha Kuzma, Senior Manager Global Water Data Products,\r\n World Resources Institute\r\n \r\n \r\n \r\n \r\n \r\n \"Water stress poses a significant threat to economies\r\n worldwide as water risk is inherently financial risk. The\r\n Smart Water Navigator gives companies who depend on water\r\n across their value chains the tools to understand and quantify\r\n this risk, ultimately making the business case for investing\r\n in smart water management.\"\r\n \r\n \r\n \r\n – Steven Bullock, Managing Director and Global Head of\r\n Research and Methodology, S&P Global Sustainable1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React, { FC } from 'react';\r\nimport { Switch } from 'react-router-dom';\r\nimport { Route } from 'src/components/Route';\r\nimport { Home } from './Home';\r\nimport routes from './routes';\r\n\r\ninterface AppProps {}\r\n\r\nexport const App: FC = () => {\r\n return (\r\n \r\n {routes.map((route) => (\r\n \r\n ))}\r\n\r\n \r\n \r\n \r\n );\r\n};\r\n","import classnames from 'classnames/bind';\r\nimport React, { FC, useEffect } from 'react';\r\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\r\nimport { SiteHeader } from 'src/components/SiteHeader';\r\nimport { SESSION_INVALID } from 'src/constants/events';\r\nimport { useAuth } from 'src/hooks/useAuth';\r\nimport { useMaintenance } from 'src/hooks/useMaintenance';\r\nimport { eventBus } from 'src/utils/eventBus';\r\nimport { App as WebApp } from './app';\r\nimport styles from './index.module.css';\r\nimport { App as Marketing } from './marketing';\r\n\r\nconst cx = classnames.bind(styles);\r\n\r\ninterface AppProps {}\r\n\r\nexport const App: FC = () => {\r\n const { logout } = useAuth();\r\n\r\n const {\r\n hasActiveMaintenance,\r\n hasFutureMaintenance,\r\n maintenanceMessage,\r\n } = useMaintenance();\r\n\r\n useEffect(() => {\r\n const terminate = () => logout && logout('/login?r=sess_exp');\r\n eventBus.on(SESSION_INVALID, terminate);\r\n return () => eventBus.remove(SESSION_INVALID, terminate);\r\n }, [logout]);\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\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { AppProviders } from './components/AppProviders';\r\nimport { PreventIframe } from './components/PreventIframe';\r\nimport './index.css';\r\nimport { App } from './routes';\r\nimport { checkConsentAndUpdateContent } from 'src/utils/cookieConsent';\r\n\r\ndeclare global {\r\n interface Window {\r\n checkConsentAndUpdateContent: () => void;\r\n OnetrustActiveGroups: string[];\r\n }\r\n}\r\n\r\nwindow.checkConsentAndUpdateContent = checkConsentAndUpdateContent;\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n","export function checkConsentAndUpdateContent(): void {\r\n const performanceCookie = 'C0002';\r\n const functionalCookie = 'C0003';\r\n const targetingCookie = 'C0004';\r\n const socialCookie = 'C0005';\r\n let otIniGrps: any;\r\n\r\n // Get initial OnetrustActiveGroups ids\r\n if (typeof (window as any).OptanonWrapperCount === 'undefined') {\r\n otGetInitialGrps();\r\n }\r\n\r\n runScriptForOt(runOnPageLoadAndSaveChangs);\r\n\r\n function runScriptForOt(functionName: () => void) {\r\n setTimeout(functionName, 1000);\r\n }\r\n\r\n function runOnPageLoadAndSaveChangs() {\r\n otDeleteCookie(otIniGrps);\r\n diableScriptByEcolabOnPageLoad();\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n function focusTrap(focusTrapId: string) {\r\n const focusTrapDiv = document.getElementById(focusTrapId);\r\n if (focusTrapDiv) {\r\n const focusableElements = focusTrapDiv.querySelectorAll(\r\n 'a, button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\r\n );\r\n const focusable = Array.from(focusableElements) as HTMLElement[];\r\n const firstElement = focusable[0];\r\n const lastElement = focusable[focusable.length - 1];\r\n\r\n function trapFocus(event: KeyboardEvent) {\r\n if (event.key === 'Tab') {\r\n // Shift + Tab\r\n if (event.shiftKey) {\r\n if (document.activeElement === firstElement) {\r\n event.preventDefault();\r\n lastElement.focus();\r\n }\r\n } else {\r\n // Tab\r\n if (document.activeElement === lastElement) {\r\n event.preventDefault();\r\n firstElement.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n focusTrapDiv.addEventListener('keydown', trapFocus);\r\n }\r\n }\r\n\r\n function diableScriptByEcolabOnPageLoad() {\r\n if (!(window as any).OptanonActiveGroups.includes(performanceCookie)) {\r\n // Custom code for disabling\r\n }\r\n }\r\n\r\n function ecoDeleteCookie(name: string, domainName?: string) {\r\n document.cookie = `${name}=; Max-Age=-99999999; Path=/;Domain=${domainName}`;\r\n document.cookie = `${name}=; Max-Age=-99999999; Path=/;Domain=.ecolab.com`;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n function ecoDeleteLocalStorage(name: string) {\r\n localStorage.removeItem(name);\r\n }\r\n\r\n function otGetInitialGrps() {\r\n (window as any).OptanonWrapperCount = '';\r\n otIniGrps = (window as any).OnetrustActiveGroups;\r\n }\r\n\r\n function otDeleteCookie(iniOptGrpId: any) {\r\n const otDomainGrps = JSON.parse(\r\n JSON.stringify((window as any).Optanon.GetDomainData().Groups)\r\n );\r\n const optanonActiveGroups = (window as any).OptanonActiveGroups ?? [];\r\n const ytCookieActive = optanonActiveGroups.includes('C0007');\r\n localStorage.setItem('ytCookieActive', JSON.stringify(ytCookieActive));\r\n\r\n if (iniOptGrpId !== (window as any).OptanonActiveGroups) {\r\n window.location.reload();\r\n }\r\n\r\n const otDeletedGrpIds = getMissingGroupIds();\r\n\r\n if (otDeletedGrpIds.length !== 0 && otDomainGrps.length !== 0) {\r\n for (const group of otDomainGrps) {\r\n if (\r\n group.CustomGroupId &&\r\n otDeletedGrpIds.includes(group.CustomGroupId)\r\n ) {\r\n for (const cookie of group.Cookies) {\r\n eraseCookie(cookie.Name);\r\n }\r\n }\r\n\r\n for (const host of group.Hosts) {\r\n if (\r\n otDeletedGrpIds.includes(host.HostId) &&\r\n host.Cookies.length !== 0\r\n ) {\r\n for (const cookie of host.Cookies) {\r\n eraseCookie(cookie.Name);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n otGetInitialGrps();\r\n }\r\n\r\n function getMissingGroupIds() {\r\n const missingGroupIds: string[] = [];\r\n const currentGroupIds = (window as any).OptanonActiveGroups;\r\n\r\n if (!currentGroupIds.includes('C0001')) missingGroupIds.push('C0001');\r\n if (!currentGroupIds.includes(performanceCookie))\r\n missingGroupIds.push(performanceCookie);\r\n if (!currentGroupIds.includes(functionalCookie))\r\n missingGroupIds.push(functionalCookie);\r\n if (!currentGroupIds.includes(targetingCookie))\r\n missingGroupIds.push(targetingCookie);\r\n if (!currentGroupIds.includes(socialCookie))\r\n missingGroupIds.push(socialCookie);\r\n\r\n return missingGroupIds;\r\n }\r\n\r\n function eraseCookie(name: string) {\r\n const domainName = window.location.hostname;\r\n\r\n ecoDeleteCookie(name, domainName);\r\n document.cookie = `${name}=; Max-Age=-99999999; Path=/;`;\r\n\r\n localStorage.removeItem(name);\r\n\r\n const pathArray = window.location.pathname.split('/');\r\n for (let i = 0; i < pathArray.length; i++) {\r\n if (pathArray[i]) {\r\n const currentPath = pathArray.slice(0, i + 1).join('/');\r\n document.cookie = `${name}=; Max-Age=-99999999; Path=${currentPath};Domain=${domainName}`;\r\n document.cookie = `${name}=; Max-Age=-99999999; Path=${currentPath};`;\r\n }\r\n }\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"ui-03\":\"#F1F3F5\",\"ui-07\":\"#B7B7B7\",\"dangerColor\":\"#D93942\",\"formGroup\":\"Tabs_formGroup__22ASu\",\"formGroupTitle\":\"Tabs_formGroupTitle__z-nWd\",\"row\":\"Tabs_row__2BWCU\",\"label\":\"Tabs_label__1XtT-\",\"inputGroup\":\"Tabs_inputGroup__2_7F_\",\"input\":\"Tabs_input__PjgFD\",\"inputField\":\"Tabs_inputField__1M_TF\",\"checkbox\":\"Tabs_checkbox__oaaWE\",\"footer\":\"Tabs_footer__1AVgZ\",\"table\":\"Tabs_table__31ae_\",\"tabContent\":\"Tabs_tabContent__3YSEV\",\"active\":\"Tabs_active__1_vfH\",\"question\":\"Tabs_question__M-jiL\",\"questionGroupTitle\":\"Tabs_questionGroupTitle__1whi1\",\"cardStack\":\"Tabs_cardStack__pedAv\",\"card\":\"Tabs_card__2kH5O\",\"required\":\"Tabs_required__wX14S\",\"requiredExp\":\"Tabs_requiredExp__3I3Rn\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-light\":\"#5EB6E4\",\"std-white\":\"#FFFFFF\",\"shadow\":\"FacilityTabNavigator_shadow__3vRsP\",\"tabs\":\"FacilityTabNavigator_tabs__3BczL\",\"tab\":\"FacilityTabNavigator_tab__QAoIP\",\"active\":\"FacilityTabNavigator_active__-YDU5\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"brand-blue-dark\":\"#005075\",\"screen-lg\":\"992px\",\"screen-xl\":\"1200px\",\"header\":\"FacilityList_header__2OAoz\",\"headerTitle\":\"FacilityList_headerTitle__3oexN\",\"headerTitleText\":\"FacilityList_headerTitleText__1m_R_\",\"headerTitleSubtext\":\"FacilityList_headerTitleSubtext__1B5Us\",\"action\":\"FacilityList_action__Av66F\",\"title\":\"FacilityList_title__2Rr53\",\"incoming\":\"FacilityList_incoming__2DVwg\",\"stress\":\"FacilityList_stress__2Djic\",\"risk\":\"FacilityList_risk__94k3J\",\"premium\":\"FacilityList_premium__1TZ0p\",\"rank\":\"FacilityList_rank__3tz5t\",\"listItem\":\"FacilityList_listItem__39mXX\"};"],"sourceRoot":""}