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QAAQo9G,EAAqBroF,KAAK,KAAM,IAC3DyoF,EAAmB56G,KAAOw6G,EAAqBroF,KAAK,KAAMyoF,EAAmB56G,KAAKmyB,KAAKyoF,G,KChDvFtC,EAAoBuC,QAAK59G,ECGzBq7G,EAAoBO,OAAE57G,EAAW,CAAC,MAAM,IAAOq7G,EAAoB,SACnEA,EAAoBO,OAAE57G,EAAW,CAAC,MAAM,IAAOq7G,EAAoB,QACnE,IAAIwC,EAAsBxC,EAAoBO,OAAE57G,EAAW,CAAC,MAAM,IAAOq7G,EAAoB,SAC7FwC,EAAsBxC,EAAoBO,EAAEiC,E","sources":["webpack://core-frontend/webpack/runtime/chunk loaded","webpack://core-frontend/webpack/runtime/create fake namespace object","webpack://core-frontend/./src/config/chains.toml","webpack://core-frontend/./src/config/environments.toml","webpack://core-frontend/./src/shared/utils/styled.ts","webpack://core-frontend/./src/components/Spinner.tsx","webpack://core-frontend/./src/components/Button.tsx","webpack://core-frontend/./src/components/EmptyState.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/CheckmarkIcon.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/MapIcons.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/SocialIcons.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/index.tsx","webpack://core-frontend/./src/utils/exceptions.ts","webpack://core-frontend/./src/modals/BaseModal.tsx","webpack://core-frontend/./src/modals/LightModal.tsx","webpack://core-frontend/./src/utils/Layer.ts","webpack://core-frontend/./src/consts.tsx","webpack://core-frontend/./src/utils/formatConfigUrl.ts","webpack://core-frontend/./src/utils/chainConfigExtension.ts","webpack://core-frontend/./src/utils/chains.ts","webpack://core-frontend/./src/utils/routes.ts","webpack://core-frontend/./src/components/DisclaimerBar.tsx","webpack://core-frontend/./src/components/Footer.tsx","webpack://core-frontend/./src/components/Helmet.tsx","webpack://core-frontend/./src/components/Anchor.tsx","webpack://core-frontend/./src/components/SimpleDropdown.tsx","webpack://core-frontend/./src/getters/getEnvironmentConfig.ts","webpack://core-frontend/./src/shared/components/NetworkIcon/index.tsx","webpack://core-frontend/./src/errors/index.ts","webpack://core-frontend/./src/generated/types/hub/factories/Marketplace/MarketplaceV4__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/Marketplace/RemoteMarketplaceV1__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/Marketplace/Uniswap2AdapterV4__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/ProjectRegistry/ProjectRegistryV1__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/ProjectStaking/ProjectStakingV1__factory.ts","webpack://core-frontend/./src/generated/types/local/factories/Token__factory.ts","webpack://core-frontend/./src/utils/contracts.ts","webpack://core-frontend/./src/getters/getGraphClient.ts","webpack://core-frontend/./src/getters/getClientConfig.ts","webpack://core-frontend/./src/errors/BehindIndexError.ts","webpack://core-frontend/./src/generated/gql/ens.ts","webpack://core-frontend/./src/generated/gql/network.ts","webpack://core-frontend/./src/parsers/Parsable.ts","webpack://core-frontend/./src/utils/ipfs.ts","webpack://core-frontend/./src/parsers/OperatorMetadata.ts","webpack://core-frontend/./src/parsers/Operator.ts","webpack://core-frontend/./src/parsers/Sponsorship.ts","webpack://core-frontend/./src/shared/toasts/AbstractToast.tsx","webpack://core-frontend/./src/shared/toasts/Toast.tsx","webpack://core-frontend/./src/shared/types/index.ts","webpack://core-frontend/./src/types/index.ts","webpack://core-frontend/./src/utils/providers.ts","webpack://core-frontend/./src/utils/toast.tsx","webpack://core-frontend/./src/getters/index.ts","webpack://core-frontend/./src/shared/errors/TimeoutError.ts","webpack://core-frontend/./src/shared/hooks/useIsMounted.ts","webpack://core-frontend/./src/modals/ConnectModal.tsx","webpack://core-frontend/./src/utils/errors.ts","webpack://core-frontend/./src/shared/stores/wallet.ts","webpack://core-frontend/./src/components/Buttons.tsx","webpack://core-frontend/./src/shared/components/PngIcon/index.tsx","webpack://core-frontend/./src/modals/Modal.tsx","webpack://core-frontend/./src/modals/SwitchNetworkModal.tsx","webpack://core-frontend/./src/utils/web3/getChainId.ts","webpack://core-frontend/./src/utils/networkPreflight.ts","webpack://core-frontend/./src/getters/getStreamrClient.ts","webpack://core-frontend/./src/shared/components/Link/index.tsx","webpack://core-frontend/./src/modals/GetCryptoModal.tsx","webpack://core-frontend/./src/shared/utils/text.ts","webpack://core-frontend/./src/parsers/StreamParser.ts","webpack://core-frontend/./src/shared/errors/InsufficientFundsError.ts","webpack://core-frontend/./src/shared/errors/StreamNotFoundError.ts","webpack://core-frontend/./src/shared/utils/nativeToken.ts","webpack://core-frontend/./src/utils/balance.ts","webpack://core-frontend/./src/shared/utils/requirePositiveBalance.ts","webpack://core-frontend/./src/utils/draft.ts","webpack://core-frontend/./src/shared/toasts/TransactionListToast.tsx","webpack://core-frontend/./src/utils/toastedOperation.ts","webpack://core-frontend/./src/stores/streamDraft.tsx","webpack://core-frontend/./src/components/ChainSelector.tsx","webpack://core-frontend/./src/getters/getConfigValueFromChain.ts","webpack://core-frontend/./src/hooks/index.tsx","webpack://core-frontend/./src/modals/ConfirmationModal.tsx","webpack://core-frontend/./src/getters/confirm.ts","webpack://core-frontend/./src/components/Alert.tsx","webpack://core-frontend/./src/components/Slider.tsx","webpack://core-frontend/./src/shared/components/Ui/StateColors.ts","webpack://core-frontend/./src/shared/components/Ui/Label.tsx","webpack://core-frontend/./src/modals/FormModal.tsx","webpack://core-frontend/./src/components/CropImageModal/CropImageModal.tsx","webpack://core-frontend/./src/components/Tooltip.tsx","webpack://core-frontend/./src/components/Hint.tsx","webpack://core-frontend/./src/components/PropertyDropdown.tsx","webpack://core-frontend/./src/shared/errors/RequestError.ts","webpack://core-frontend/./src/shared/utils/request.ts","webpack://core-frontend/./src/shared/utils/api.ts","webpack://core-frontend/./src/services/images.ts","webpack://core-frontend/./src/utils/tx.ts","webpack://core-frontend/./src/services/operators.ts","webpack://core-frontend/./src/shared/components/Logo/index.tsx","webpack://core-frontend/./src/components/FallbackImage.tsx","webpack://core-frontend/./src/shared/components/AvatarImage/Initials.tsx","webpack://core-frontend/./src/shared/components/AvatarImage/Identicon.tsx","webpack://core-frontend/./src/shared/components/AvatarImage/index.tsx","webpack://core-frontend/./src/modals/OperatorModal.tsx","webpack://core-frontend/./src/utils/blocks.ts","webpack://core-frontend/./src/utils/index.tsx","webpack://core-frontend/./src/hooks/operators.tsx","webpack://core-frontend/./src/utils/tokens.ts","webpack://core-frontend/./src/getters/getSponsorshipTokenInfo.ts","webpack://core-frontend/./src/hooks/useSponsorshipFundingHistoryQuery.ts","webpack://core-frontend/./src/getters/getSponsoringEvents.ts","webpack://core-frontend/./src/components/SponsorshipPaymentTokenName.tsx","webpack://core-frontend/./src/components/Decimals.tsx","webpack://core-frontend/./src/shared/components/Checkbox/index.tsx","webpack://core-frontend/./src/components/SponsorshipDisclaimer.tsx","webpack://core-frontend/./src/services/streams.ts","webpack://core-frontend/./src/components/DropdownMenuItem.tsx","webpack://core-frontend/./src/components/StreamIdDropdown.tsx","webpack://core-frontend/./src/utils/sponsorships.tsx","webpack://core-frontend/./src/forms/createSponsorshipForm.ts","webpack://core-frontend/./src/shared/stores/uncollectedEarnings.ts","webpack://core-frontend/./src/services/sponsorships.ts","webpack://core-frontend/./src/modals/CreateSponsorshipModal.tsx","webpack://core-frontend/./src/modals/EditStakeModal.tsx","webpack://core-frontend/./src/utils/pluralizeUnit.ts","webpack://core-frontend/./src/modals/FundSponsorshipModal.tsx","webpack://core-frontend/./src/hooks/useInterceptHeartbeats.ts","webpack://core-frontend/./src/hooks/useOperatorLiveNodes.ts","webpack://core-frontend/./src/marketplace/components/SelectField2/selectField2.styles.tsx","webpack://core-frontend/./src/marketplace/components/SelectField2/index.tsx","webpack://core-frontend/./src/shared/hooks/useCopy.ts","webpack://core-frontend/./src/shared/utils/nodeVersion.ts","webpack://core-frontend/./src/shared/utils/time.ts","webpack://core-frontend/./src/modals/JoinSponsorshipModal.tsx","webpack://core-frontend/./src/shared/stores/flags.ts","webpack://core-frontend/./src/hooks/sponsorships.ts","webpack://core-frontend/./src/getters/getSponsorshipStats.ts","webpack://core-frontend/./src/modals/DelegateFundsModal.tsx","webpack://core-frontend/./src/components/StreamDescription.tsx","webpack://core-frontend/./src/components/avatars.tsx","webpack://core-frontend/./src/components/Table.tsx","webpack://core-frontend/./src/shared/components/Radio/index.tsx","webpack://core-frontend/./src/components/LoadMore.tsx","webpack://core-frontend/./src/components/Meatball.tsx","webpack://core-frontend/./src/shared/utils/compose.ts","webpack://core-frontend/./src/shared/components/Ui/Text/FlushHistoryDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/OnCommitDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/RevertOnEscapeDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/SelectAllOnFocusDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/StyledInput.ts","webpack://core-frontend/./src/shared/components/Ui/Text/index.tsx","webpack://core-frontend/./src/generated/gql/du.ts","webpack://core-frontend/./src/getters/du.ts","webpack://core-frontend/./src/shared/utils/Transaction/index.ts","webpack://core-frontend/./src/marketplace/modules/dataUnion/services.ts","webpack://core-frontend/./src/shared/utils/timeUnit.ts","webpack://core-frontend/./src/types/projects.ts","webpack://core-frontend/./src/marketplace/utils/time.ts","webpack://core-frontend/./src/utils/price.ts","webpack://core-frontend/./src/services/projects.ts","webpack://core-frontend/./src/shared/utils/constants.ts","webpack://core-frontend/./src/marketplace/utils/price.ts","webpack://core-frontend/./src/parsers/ProjectParser.ts","webpack://core-frontend/./src/getters/hub.ts","webpack://core-frontend/./src/shared/utils/tokenAssets.ts","webpack://core-frontend/./src/shared/components/GenericTokenLogo.tsx","webpack://core-frontend/./src/shared/components/TokenLogo.tsx","webpack://core-frontend/./src/modals/ProjectModal.tsx","webpack://core-frontend/./src/modals/AccessPeriodModal.tsx","webpack://core-frontend/./src/shared/components/LoadingIndicator.tsx","webpack://core-frontend/./src/modals/AccessingProjectModal.tsx","webpack://core-frontend/./src/modals/AllowanceModal.tsx","webpack://core-frontend/./src/shared/utils/coingecko.ts","webpack://core-frontend/./src/modals/ChainSelectorModal.tsx","webpack://core-frontend/./src/modals/ConfirmPurchaseModal.tsx","webpack://core-frontend/./src/modals/FailedPurchaseModal.tsx","webpack://core-frontend/./src/modals/PurchaseCompleteModal.tsx","webpack://core-frontend/./src/shared/stores/purchases.ts","webpack://core-frontend/./src/stores/projectDraft.tsx","webpack://core-frontend/./src/components/SalePointSelector/BeneficiaryAddressEditor.tsx","webpack://core-frontend/./src/shared/components/NoData.tsx","webpack://core-frontend/./src/shared/components/ScrollTable/ScrollTable.styles.tsx","webpack://core-frontend/./src/shared/components/ScrollTable/ScrollTable.tsx","webpack://core-frontend/./src/modals/ForceUndelegateModal.tsx","webpack://core-frontend/./src/modals/UndelegateFundsModal.tsx","webpack://core-frontend/./src/components/Nav/User.tsx","webpack://core-frontend/./src/components/Nav/Nav.styles.tsx","webpack://core-frontend/./src/components/Nav/NetworkDropdown.tsx","webpack://core-frontend/./src/components/Nav/NetworkAccordion.tsx","webpack://core-frontend/./src/components/Nav/index.tsx","webpack://core-frontend/./src/components/Layout.tsx","webpack://core-frontend/./src/shared/hooks/useScrollToTop.ts","webpack://core-frontend/./src/pages/GenericErrorPage.tsx","webpack://core-frontend/./src/utils/isPreventable.ts","webpack://core-frontend/./src/shared/components/Tabs.tsx","webpack://core-frontend/./src/components/ChartPeriodTabs.tsx","webpack://core-frontend/./src/components/NetworkChartDisplay.tsx","webpack://core-frontend/./src/components/ColoredBox.tsx","webpack://core-frontend/./src/components/NetworkPageSegment.tsx","webpack://core-frontend/./src/components/QueriedSponsorshipsTable.tsx","webpack://core-frontend/./src/components/Separator.ts","webpack://core-frontend/./src/components/StatGrid.tsx","webpack://core-frontend/./src/components/NoWalletOverlay.tsx","webpack://core-frontend/./src/components/WalletPass.tsx","webpack://core-frontend/./src/generated/gql/indexer.ts","webpack://core-frontend/./src/shared/components/TimeSeriesGraph/index.tsx","webpack://core-frontend/./src/shared/components/TimeSeriesGraph/chartUtils.ts","webpack://core-frontend/./src/pages/NetworkOverviewPage.tsx","webpack://core-frontend/./src/getters/getDelegationStats.ts","webpack://core-frontend/./src/pages/NotFoundPage.tsx","webpack://core-frontend/./src/modals/AddAddressModal.tsx","webpack://core-frontend/./src/components/AddressTable.tsx","webpack://core-frontend/./src/components/BehindBlockErrorDisplay.tsx","webpack://core-frontend/./src/shared/stores/operatorReachability.ts","webpack://core-frontend/./src/pages/OperatorPage/LiveNodesTable.tsx","webpack://core-frontend/./src/components/ActionBars/NetworkActionBar.styles.tsx","webpack://core-frontend/./src/pages/OperatorPage/OperatorActionBar.tsx","webpack://core-frontend/./src/stores/blockNumberDependencies.ts","webpack://core-frontend/./src/pages/OperatorPage/OperatorChecklist.tsx","webpack://core-frontend/./src/components/IconButton.tsx","webpack://core-frontend/./src/icons.tsx","webpack://core-frontend/./src/components/CopyButton.tsx","webpack://core-frontend/./src/pages/OperatorPage/OperatorDetails.tsx","webpack://core-frontend/./src/pages/OperatorPage/OperatorSummary.tsx","webpack://core-frontend/./src/pages/OperatorPage/SponsorshipTable.tsx","webpack://core-frontend/./src/pages/OperatorPage/UndelegationQueue.tsx","webpack://core-frontend/./src/pages/OperatorPage/index.tsx","webpack://core-frontend/./src/getters/getOperatorStats.ts","webpack://core-frontend/./src/shared/components/SearchBar/index.tsx","webpack://core-frontend/./src/components/ActionBars/NetworkActionBar.tsx","webpack://core-frontend/./src/hooks/useTableOrder.ts","webpack://core-frontend/./src/hooks/useUrlParams.ts","webpack://core-frontend/./src/pages/OperatorsPage.tsx","webpack://core-frontend/./src/components/ActionBar.styles.tsx","webpack://core-frontend/./src/components/SalePointSelector/SalePointTokenSelector.tsx","webpack://core-frontend/./src/components/SalePointSelector/SalePointOption.tsx","webpack://core-frontend/./src/modals/ProjectTypeFilter.tsx","webpack://core-frontend/./src/components/ActionBar.tsx","webpack://core-frontend/./src/shared/components/Rect.tsx","webpack://core-frontend/./src/shared/components/Skeleton.tsx","webpack://core-frontend/./src/getters/getStreamStats.ts","webpack://core-frontend/./src/getters/getNeighbors.ts","webpack://core-frontend/./src/shared/components/Tile/Badge.tsx","webpack://core-frontend/./src/hooks/useStreamStats.tsx","webpack://core-frontend/./src/shared/components/Tile/Summary.tsx","webpack://core-frontend/./src/shared/components/Tile/index.tsx","webpack://core-frontend/./src/components/DottedLoadingIndicator.tsx","webpack://core-frontend/./src/marketplace/components/Projects/NoProductsView.tsx","webpack://core-frontend/./src/marketplace/components/Projects/index.tsx","webpack://core-frontend/./src/shared/contexts/ModalApi/index.tsx","webpack://core-frontend/./src/shared/hooks/useModal.ts","webpack://core-frontend/./src/marketplace/components/ProjectTypeChooser/index.tsx","webpack://core-frontend/./src/shared/contexts/ModalPortal/index.tsx","webpack://core-frontend/./src/shared/errors/NoModalRootError/index.ts","webpack://core-frontend/./src/shared/components/ModalPortal/index.ts","webpack://core-frontend/./src/shared/components/ModalDialog/accessibility.ts","webpack://core-frontend/./src/shared/components/ModalDialog/index.tsx","webpack://core-frontend/./src/marketplace/containers/CreateProjectModal/index.tsx","webpack://core-frontend/./src/pages/ProjectListingPage.tsx","webpack://core-frontend/./src/hooks/streams.tsx","webpack://core-frontend/./src/components/QueriedStreamsTable.tsx","webpack://core-frontend/./src/components/TermsOfUse.tsx","webpack://core-frontend/./src/marketplace/containers/ProjectPage/Hero/ProjectHero2.styles.ts","webpack://core-frontend/./src/marketplace/containers/ProjectPage/Hero/ProjectHero2.tsx","webpack://core-frontend/./src/shared/components/DetailsPageHeader/index.tsx","webpack://core-frontend/./src/shared/components/Segment.ts","webpack://core-frontend/./src/shared/stores/streamAbilities.ts","webpack://core-frontend/./src/shared/components/StreamConnect/index.tsx","webpack://core-frontend/./src/shared/components/Ui/Errors.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Cell.ts","webpack://core-frontend/./src/shared/components/StreamPreview/Layout.ts","webpack://core-frontend/./src/shared/components/StreamPreview/ModalStreamSelector.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/IconButton.ts","webpack://core-frontend/./src/shared/components/StreamPreview/Selector.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Toolbar.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Feed.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Foot.ts","webpack://core-frontend/./src/shared/components/StreamPreview/index.tsx","webpack://core-frontend/./src/shared/hooks/useStreamData.ts","webpack://core-frontend/./src/shared/stores/projectAbilities.ts","webpack://core-frontend/./src/components/FormattedPaymentRate.tsx","webpack://core-frontend/./src/pages/ProjectPage/AccessManifest.tsx","webpack://core-frontend/./src/pages/ProjectPage/GetAccess.tsx","webpack://core-frontend/./src/pages/ProjectPage/ProjectLinkTabs.tsx","webpack://core-frontend/./src/pages/ProjectPage/TermsOfUse.tsx","webpack://core-frontend/./src/pages/ProjectPage/DataUnionFee.tsx","webpack://core-frontend/./src/pages/ProjectPage/DataUnionPayment.tsx","webpack://core-frontend/./src/components/RichTextEditor.tsx","webpack://core-frontend/./src/components/ImageFilePicker.tsx","webpack://core-frontend/./src/pages/ProjectPage/CoverImage.tsx","webpack://core-frontend/./src/pages/ProjectPage/EditorHero.tsx","webpack://core-frontend/./src/components/FloatingToolbar.tsx","webpack://core-frontend/./src/hooks/useInViewport.ts","webpack://core-frontend/./src/pages/ProjectPage/EditorNav.tsx","webpack://core-frontend/./src/marketplace/components/LoadMore/index.tsx","webpack://core-frontend/./src/shared/components/StreamSelectTable/index.tsx","webpack://core-frontend/./src/pages/ProjectPage/EditorStreams.tsx","webpack://core-frontend/./src/pages/ProjectPage/ProjectEditorPage.tsx","webpack://core-frontend/./src/pages/ProjectPage/index.tsx","webpack://core-frontend/./src/hooks/projects.tsx","webpack://core-frontend/./src/components/ActionBars/AboutEntity.tsx","webpack://core-frontend/./src/components/ActionBars/AboutSponsorship.tsx","webpack://core-frontend/./src/components/ActionBars/ActionBarButton.tsx","webpack://core-frontend/./src/components/ActionBars/AbstractActionBar.tsx","webpack://core-frontend/./src/components/ActionBars/SponsorshipActionBar.tsx","webpack://core-frontend/./src/pages/SponsorshipPage/SponsorshipSummary.tsx","webpack://core-frontend/./src/pages/SingleSponsorshipPage.tsx","webpack://core-frontend/./src/shared/components/Toggle/index.tsx","webpack://core-frontend/./src/components/SponsorshipFilterButton.tsx","webpack://core-frontend/./src/pages/SponsorshipsPage.tsx","webpack://core-frontend/./src/components/Stats.tsx","webpack://core-frontend/./src/components/StreamSummary.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/Section.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/Checkbox.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/PermissionEditor.tsx","webpack://core-frontend/./src/modals/NewStreamPermissionsModal.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/PermissionItem.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/PermissionList.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/StreamTypeSelector.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/index.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/CreateProjectHint.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/DeleteSection.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/HistorySection/StorageNodeItem.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/HistorySection/StorageNodeList.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/HistorySection/index.tsx","webpack://core-frontend/./src/shared/components/Surround.tsx","webpack://core-frontend/./src/shared/components/Ui/Select.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/InfoSection/useStreamOwnerOptionGroups.ts","webpack://core-frontend/./src/pages/AbstractStreamEditPage/InfoSection/StreamId.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/InfoSection/index.tsx","webpack://core-frontend/./src/shared/components/StatusLabel/index.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/PartitionsSection.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/RelatedProjects.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/SponsorshipsTable.tsx","webpack://core-frontend/./src/pages/StreamPage/index.tsx","webpack://core-frontend/./src/pages/StreamsPage.tsx","webpack://core-frontend/./src/shared/components/Globals.tsx","webpack://core-frontend/./src/utils/sentry.ts","webpack://core-frontend/./src/shared/components/StreamrClientProvider.tsx","webpack://core-frontend/./src/utils/setupSnippets.ts","webpack://core-frontend/./src/app.tsx","webpack://core-frontend/./index.tsx","webpack://core-frontend/./setup.ts","webpack://core-frontend/./src/analytics.ts","webpack://core-frontend/./src/shared/utils/diagnostics.ts","webpack://core-frontend/./src/utils/bn.ts","webpack://core-frontend/webpack/bootstrap","webpack://core-frontend/webpack/runtime/amd options","webpack://core-frontend/webpack/runtime/compat get default export","webpack://core-frontend/webpack/runtime/define property getters","webpack://core-frontend/webpack/runtime/global","webpack://core-frontend/webpack/runtime/hasOwnProperty shorthand","webpack://core-frontend/webpack/runtime/make namespace object","webpack://core-frontend/webpack/runtime/node module decorator","webpack://core-frontend/webpack/runtime/publicPath","webpack://core-frontend/webpack/runtime/jsonp chunk loading","webpack://core-frontend/webpack/runtime/nonce","webpack://core-frontend/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","module.exports    = {\n\t\"ethereum\": {\n\t\t\"displayName\": \"Ethereum Mainnet\"\n\t},\n\t\"binance\": {\n\t\t\"coingeckoNetworkId\": \"binance-smart-chain\",\n\t\t\"displayName\": \"BNB Smart Chain\"\n\t},\n\t\"gnosis\": {\n\t\t\"coingeckoNetworkId\": \"xdai\",\n\t\t\"displayName\": \"Gnosis\"\n\t},\n\t\"dev0\": {\n\t\t\"coingeckoNetworkId\": \"ethereum\",\n\t\t\"dockerHost\": \"localhost\",\n\t\t\"displayName\": \"Dev0\"\n\t},\n\t\"dev1\": {\n\t\t\"coingeckoNetworkId\": \"ethereum\",\n\t\t\"dockerHost\": \"localhost\",\n\t\t\"displayName\": \"Dev1\"\n\t},\n\t\"dev2\": {\n\t\t\"coingeckoNetworkId\": \"ethereum\",\n\t\t\"dataUnionJoinServerUrl\": \":5555\",\n\t\t\"displayName\": \"Dev2\",\n\t\t\"dockerHost\": \"localhost\",\n\t\t\"marketplaceChains\": [\n\t\t\t\"dev2\"\n\t\t],\n\t\t\"networkSubgraphUrl\": \":8800/subgraphs/name/streamr-dev/network-subgraphs\",\n\t\t\"streamIndexerUrl\": \":4001/api\",\n\t\t\"storageNodes\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Local (broker-node-storage-1)\",\n\t\t\t\t\"address\": \"0xde1112f631486CfC759A50196853011528bC5FA0\"\n\t\t\t}\n\t\t],\n\t\t\"dataunionGraphNames\": [\n\t\t\t{\n\t\t\t\t\"chainId\": 31337,\n\t\t\t\t\"name\": \"streamr-dev/dataunion\"\n\t\t\t}\n\t\t]\n\t},\n\t\"polygonAmoy\": {\n\t\t\"dataUnionJoinServerUrl\": \"https://join.dataunions.org/\",\n\t\t\"displayName\": \"Amoy\",\n\t\t\"marketplaceChains\": [\n\t\t\t\"polygonAmoy\"\n\t\t],\n\t\t\"slug\": \"amoy\",\n\t\t\"storageNodes\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Streamr Germany\",\n\t\t\t\t\"address\": \"0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916\"\n\t\t\t}\n\t\t],\n\t\t\"dataunionGraphNames\": [\n\t\t\t{\n\t\t\t\t\"chainId\": 80002,\n\t\t\t\t\"name\": \"samt1803/dataunion-subgraphs\"\n\t\t\t}\n\t\t]\n\t},\n\t\"polygon\": {\n\t\t\"marketplaceChains\": [\n\t\t\t\"gnosis\",\n\t\t\t\"polygon\"\n\t\t],\n\t\t\"networkSubgraphUrl\": \"https://gateway-arbitrum.network.thegraph.com/api/8bcbd55cdd1369cadb0bb813d9817776/subgraphs/id/EGWFdhhiWypDuz22Uy7b3F69E9MEkyfU9iAQMttkH5Rj\",\n\t\t\"streamIndexerUrl\": \"https://stream-metrics.streamr.network/api\",\n\t\t\"storageNodes\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Streamr Germany\",\n\t\t\t\t\"address\": \"0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"name\": \"LogStore Decentralized Storage\",\n\t\t\t\t\"address\": \"0x17f98084757a75add72bf6c5b5a6f69008c28a57\",\n\t\t\t\t\"thirdPartyUrl\": \"https://docs.usher.so/logstore/network/specifics/overview#streamr-storage-provider\"\n\t\t\t}\n\t\t],\n\t\t\"dataunionGraphNames\": [\n\t\t\t{\n\t\t\t\t\"chainId\": 100,\n\t\t\t\t\"name\": \"dataunions/data-unions-gnosis\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"chainId\": 137,\n\t\t\t\t\"name\": \"dataunions/data-unions-polygon\"\n\t\t\t}\n\t\t]\n\t}\n}","module.exports    = {\n\t\"development\": {\n\t\t\"availableChains\": [\n\t\t\t\"dev2\",\n\t\t\t\"polygon\",\n\t\t\t\"polygonAmoy\"\n\t\t],\n\t\t\"platformOriginUrl\": \"\",\n\t\t\"streamrUrl\": \"\"\n\t},\n\t\"polygonAmoy\": {\n\t\t\"availableChains\": [\n\t\t\t\"polygonAmoy\",\n\t\t\t\"polygon\"\n\t\t],\n\t\t\"platformOriginUrl\": \"https://staging.streamr.network\",\n\t\t\"streamrUrl\": \"https://staging.streamr.network\"\n\t},\n\t\"production\": {\n\t\t\"availableChains\": [\n\t\t\t\"polygon\",\n\t\t\t\"polygonAmoy\"\n\t\t]\n\t}\n}","const SM = 375;\nexport const MD = 744;\nconst MDLG = 1100;\nexport const LG = 1440;\nexport const XL = 1920;\nexport const LIGHT = 300;\nexport const REGULAR = 400;\nexport const MEDIUM = 500;\nexport const SANS = \"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif\";\nexport const PHONE = `(min-width: ${SM}px)`;\nexport const TABLET = `(min-width: ${MD}px)`;\nexport const LAPTOP = `(min-width: ${MDLG}px)`;\nexport const DESKTOP = `(min-width: ${LG}px)`;\nexport const MAX_CONTENT_WIDTH = '678px';\nexport const MAX_BODY_WIDTH = 1296;\nexport const COLORS = {\n    primary: '#323232',\n    primaryLight: '#525252',\n    primaryContrast: '#FFF',\n    primaryDisabled: '#A3A3A3',\n    secondary: '#F5F5F5',\n    secondaryHover: '#E7E7E7',\n    secondaryLight: '#F8F8F8',\n    focus: '#9BC1FB',\n    click: '#DEEBFF',\n    selection: '#CCE9FD',\n    disabled: '#ADADAD',\n    section: '#F1F1F1',\n    inputBackground: '#F1F1F1',\n    radioBorder: '#CDCDCD',\n    close: '#848484',\n    link: '#0324FF',\n    linkInactive: '#CDD3FF',\n    error: '#D90C25',\n    warning: '#FFF6F1',\n    dialogBorder: '#F3F3F3',\n    black: '#000',\n    active: '#0EAC1B',\n    greenSpinner: '#29C236',\n    spinnerBorder: '#ADADAD7F',\n    activeBackground: '#0eac1b1a',\n    alertInfoBackground: '#DEEBFF',\n    alertErrorBackground: '#FFF4EE',\n    alertSuccessBackground: '#E7F7E8',\n    // New naming\n    SecondaryText: '#868686',\n    Border: '#efefef',\n    Background: '#ffffff',\n    Text: '#323232',\n};\n","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nconst rotate = keyframes `\n    100% {\n        transform: rotate(360deg);\n    }\n`;\nfunction UnstyledSpinner({ coverage = 0.6, fixed = false, color = 'green', size: sizeProp = 16, strokeWidth = 2, innerRef, ...props }) {\n    const size = sizeProp === 'medium' ? 22 : sizeProp === 'large' ? 40 : sizeProp;\n    const r = (size - strokeWidth) / 2;\n    const d = 2 * Math.PI * r;\n    const [ringColor = COLORS.spinnerBorder, strokeColor] = (() => {\n        switch (color) {\n            case 'green':\n                return [, COLORS.greenSpinner];\n            case 'blue':\n                return [, COLORS.link];\n            case 'white':\n                return [, COLORS.primaryContrast];\n            case 'gray':\n                return [COLORS.primaryContrast, COLORS.spinnerBorder];\n        }\n        const { ring, stroke } = color;\n        return [ring, stroke];\n    })();\n    return (React.createElement(SpinnerRoot, { ...props, \"$animate\": !fixed, ref: innerRef, style: {\n            width: `${size}px`,\n            height: `${size}px`,\n        } },\n        React.createElement(\"svg\", { viewBox: `0 0 ${size} ${size}` },\n            React.createElement(\"circle\", { cx: size / 2, cy: size / 2, r: r, fill: \"none\", strokeWidth: strokeWidth, stroke: ringColor, strokeLinecap: \"round\", strokeDasharray: `${d}, 0`, strokeDashoffset: \"0\" }),\n            React.createElement(\"circle\", { cx: size / 2, cy: size / 2, r: r, fill: \"none\", strokeWidth: strokeWidth, stroke: strokeColor, strokeLinecap: \"round\", strokeDasharray: `${coverage * d}, ${(1 - coverage) * d}`, strokeDashoffset: \"0\" }))));\n}\nconst SpinnerRoot = styled.div.withConfig({ displayName: \"SpinnerRoot\", componentId: \"sc-1ev439o\" }) `\n    svg {\n        display: block;\n        transform: rotate(-90deg);\n    }\n\n    ${({ $animate = false }) => $animate &&\n    css `\n            svg {\n                animation: ${rotate} 1.1s linear infinite;\n                transform: rotate(0);\n            }\n        `}\n`;\nconst Spinner = styled(UnstyledSpinner).withConfig({ displayName: \"Spinner\", componentId: \"sc-1szkycn\" }) ``;\nexport default Spinner;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport PrestyledSpinner from '~/components/Spinner';\nfunction kindCss({ kind = 'primary', outline = false }) {\n    switch (kind) {\n        case 'primary':\n            return css `\n                background-color: #0324ff;\n                border-color: #0324ff;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #ffffff;\n                }\n\n                :hover,\n                :focus {\n                    background-color: #0d009a;\n                    border-color: #0d009a;\n                }\n\n                :active {\n                    background-color: #09006d;\n                    border-color: #09006d;\n                }\n\n                &[disabled] {\n                    background-color: #0324ff;\n                    border-color: #0324ff;\n                    color: rgba(255, 255, 255, 0.5);\n                }\n\n                ${outline &&\n                css `\n                    &,\n                    &[href] {\n                        color: rgb(3, 36, 255, 1);\n                        border-color: #0324ff;\n                    }\n\n                    :hover,\n                    :focus {\n                        color: #0d009a;\n                        border-color: #0d009a;\n                    }\n\n                    :active {\n                        color: #09006d;\n                        border-color: #09006d;\n                    }\n\n                    &[disabled] {\n                        color: rgb(3, 36, 255, 0.5);\n                        border-color: #0324ff;\n                    }\n                `}\n            `;\n        case 'secondary':\n            return css `\n                background-color: #f5f5f5;\n                border-color: #f5f5f5;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: rgba(82, 82, 82, 1);\n                }\n\n                :hover,\n                :focus {\n                    color: inherit;\n                    background-color: #e7e7e7;\n                    border-color: #e7e7e7;\n                }\n\n                :active {\n                    background-color: #d8d8d8;\n                    border-color: #d8d8d8;\n                }\n\n                &[disabled] {\n                    background-color: #f5f5f5;\n                    border-color: #f5f5f5;\n                    color: rgba(82, 82, 82, 0.5);\n                }\n\n                ${outline &&\n                css `\n                    border-color: #525252;\n\n                    :hover,\n                    :focus {\n                        border-color: #323232;\n                    }\n\n                    :active {\n                        border-color: #525252;\n                    }\n\n                    &[disabled] {\n                        border-color: #efefef;\n                    }\n                `}\n            `;\n        case 'destructive':\n            return css `\n                background-color: #ff0f2d;\n                border-color: #ff0f2d;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #ffffff;\n                }\n\n                :hover,\n                :focus {\n                    background-color: #ea112c;\n                    border-color: #ea112c;\n                }\n\n                :active {\n                    background-color: #d50f28;\n                    border-color: #d50f28;\n                }\n\n                &[disabled] {\n                    background-color: #ff0f2d;\n                    border-color: #ff0f2d;\n                    color: rgba(255, 255, 255, 0.5);\n                }\n\n                ${outline &&\n                css `\n                    &,\n                    :link,\n                    :active,\n                    :visited {\n                        color: #ff0f2d;\n                    }\n                `}\n            `;\n        case 'link':\n            return css `\n                background-color: transparent;\n                border-color: transparent;\n                font-weight: var(--regular);\n                padding: 0 0.5rem !important; /* ignore \"size\" classes */\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #525252;\n                }\n\n                :hover,\n                :focus {\n                    color: #323232;\n                    transform: scale(1) translate3d(0, 0, 0);\n                }\n\n                :active {\n                    color: rgba(82, 82, 82, 0.8);\n                    transform: scale(1) translate3d(0, 0, 0);\n                }\n\n                &[disabled] {\n                    border-color: transparent;\n                    color: rgba(82, 82, 82, 0.5);\n                }\n            `;\n        case 'special':\n            return css `\n                background-color: rgba(255, 255, 255, 0.9);\n                border-color: rgba(255, 255, 255, 0.9);\n                border-radius: 20px;\n                font: var(--sans);\n                font-size: 12px !important; /* ignore \"size\" classes */\n                font-weight: var(--medium);\n                height: 40px !important; /* ignore \"size\" classes */\n                letter-spacing: 1px;\n                line-height: 12px !important; /* ignore \"size\" classes */\n                padding: 0 1.5rem !important; /* ignore \"size\" classes */\n                text-transform: uppercase;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: rgba(50, 50, 50, 1);\n                }\n\n                :hover,\n                :focus {\n                    color: inherit;\n                    background-color: rgba(255, 255, 255, 1);\n                    border-color: rgba(255, 255, 255, 1);\n                }\n\n                :active {\n                    background-color: rgba(255, 255, 255, 0.8);\n                    border-color: rgba(255, 255, 255, 0.8);\n                }\n\n                &[disabled] {\n                    background-color: rgba(255, 255, 255, 0.9);\n                    border-color: rgba(255, 255, 255, 0.9);\n                    color: rgba(50, 50, 50, 0.5);\n                }\n            `;\n        case 'primary2':\n            return css `\n                background-color: #323232;\n                border-color: #323232;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #ffffff;\n                }\n\n                :hover,\n                :focus {\n                    background-color: #525252;\n                    border-color: #525252;\n                }\n\n                :active {\n                    background-color: #525252;\n                    border-color: #525252;\n                }\n\n                &[disabled] {\n                    background-color: #323232;\n                    border-color: #323232;\n                    color: #a3a3a3;\n                }\n            `;\n        case 'transparent':\n            return css `\n                background-color: transparent;\n                border-color: transparent;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #525252;\n                }\n\n                &:hover,\n                &:focus {\n                    background-color: transparent;\n                    border-color: transparent;\n                }\n\n                :active {\n                    background-color: transparent;\n                    border-color: transparent;\n                }\n\n                &[disabled] {\n                    background-color: transparent;\n                    border-color: transparent;\n                    color: rgba(82, 82, 82, 0.5);\n                }\n            `;\n        default:\n            return null;\n    }\n}\nfunction sizeCss({ size = 'normal' }) {\n    switch (size) {\n        case 'mini':\n            return css `\n                height: 32px;\n                padding: 0 0.5rem;\n                font-size: 14px;\n                line-height: 16px;\n            `;\n        case 'normal':\n            return css `\n                height: 40px;\n                padding: 0 1rem;\n                font-size: 14px;\n                line-height: 22px;\n            `;\n        case 'big':\n            return css `\n                height: 48px;\n                padding: 0 2rem;\n                font-size: 16px;\n                line-height: 24px;\n            `;\n        default:\n            return null;\n    }\n}\nfunction outlineCss({ outline }) {\n    if (outline) {\n        return css `\n            background-color: transparent !important;\n        `;\n    }\n}\nfunction getButtonAttrs({ children, waiting = false, outline = false, disabled = false, onClick, kind = 'primary', ...props }) {\n    return {\n        ...props,\n        disabled: disabled || waiting,\n        children: (React.createElement(React.Fragment, null,\n            children,\n            waiting && (React.createElement(Spinner, { color: !outline && (kind === 'primary' || kind === 'destructive')\n                    ? 'white'\n                    : 'gray' })))),\n        tabIndex: disabled ? -1 : 0,\n        onClick: (e) => {\n            if (disabled) {\n                e.preventDefault();\n                return;\n            }\n            if (e.currentTarget instanceof HTMLElement) {\n                // Make sure we make the button lose focus after click\n                e.currentTarget.blur();\n            }\n            onClick?.(e);\n        },\n    };\n}\nexport const Button = styled.button.attrs(getButtonAttrs).withConfig({ displayName: \"Button\", componentId: \"sc-1pom3xf\" }) `\n    -webkit-font-smoothing: subpixel-antialiased;\n    align-items: center;\n    backface-visibility: hidden;\n    background-color: transparent;\n    border: 1px solid;\n    border-radius: 8px;\n    cursor: pointer;\n    display: inline-flex;\n    font: var(--sans);\n    font-weight: var(--medium);\n    justify-content: center;\n    letter-spacing: 0;\n    padding: 0;\n    position: relative;\n    text-align: center;\n    transform: translate3d(0, 0, 0);\n    transition: 200ms ease-in-out;\n    transition-property: border-color, background-color, color, transform;\n    user-select: none;\n    white-space: nowrap;\n\n    &,\n    :active,\n    :visited,\n    :hover,\n    :focus {\n        text-decoration: none;\n        outline: none;\n    }\n\n    :hover,\n    :focus {\n        transition-duration: 5ms;\n        transform: scale(1.05) translate3d(0, 0, 0);\n    }\n\n    :active {\n        transform: scale(0.95) translate3d(0, 0, 0);\n    }\n\n    * {\n        width: 100%;\n    }\n\n    &[disabled] {\n        opacity: 0.5;\n        cursor: not-allowed;\n        transform: scale(1) translate3d(0, 0, 0);\n    }\n\n    ${outlineCss}\n\n    ${kindCss}\n\n    ${sizeCss}\n`;\nconst Spinner = styled(PrestyledSpinner).withConfig({ displayName: \"Spinner\", componentId: \"sc-t1h0tf\" }) `\n    width: 16px;\n    height: 16px;\n    margin-left: 0.5rem;\n`;\n/**\n * @todo Create a better button out of the `Button` and `Buttonesque` components.\n * The latter one was brought to existance because extending `Button`\n * is expensive maintenance-wise.\n */\nexport const Buttonesque = styled.button.withConfig({ displayName: \"Buttonesque\", componentId: \"sc-555l0l\" }) `\n    -webkit-font-smoothing: subpixel-antialiased;\n    align-items: center;\n    backface-visibility: hidden;\n    background-color: var(--backgroundColor, transparent);\n    border: var(--border, 0);\n    border-radius: var(--borderRadius, 8px);\n    color: var(--color, inherit);\n    cursor: pointer;\n    display: inline-flex;\n    font: var(--sans);\n    font-size: var(--fontSize, 12px);\n    font-weight: var(--fontWeight, var(--medium));\n    height: var(--height, 32px);\n    justify-content: center;\n    letter-spacing: 0;\n    padding: 0;\n    position: relative;\n    text-align: center;\n    transform: translate3d(0, 0, 0);\n    transition: 200ms ease-in-out;\n    transition-property: border-color, background-color, color, transform;\n    user-select: none;\n    white-space: nowrap;\n\n    &,\n    &:active,\n    &:visited,\n    &:hover,\n    &:focus {\n        text-decoration: none;\n        outline: none;\n    }\n\n    &:hover,\n    &:focus {\n        transition-duration: 5ms;\n        transform: scale(1.05) translate3d(0, 0, 0);\n    }\n\n    &:active {\n        transform: scale(0.95) translate3d(0, 0, 0);\n    }\n\n    * {\n        width: 100%;\n    }\n\n    &[disabled] {\n        opacity: 0.5;\n        cursor: not-allowed;\n        transform: scale(1) translate3d(0, 0, 0);\n    }\n\n    &:hover,\n    &:focus {\n        background-color: var(\n            --hoverBackgroundColor,\n            var(--backgroundColor, transparent)\n        );\n        border: var(--hoverBorder, var(--border, 0));\n        color: var(--hoverColor, var(--color, inherit));\n    }\n\n    ${(props) => props.$css};\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nexport function EmptyState({ children, image, className, link, linkOnMobile }) {\n    return (React.createElement(Root, { className: className },\n        image && React.createElement(ImageWrap, null, image),\n        children,\n        !!link && React.createElement(LinkWrap, { \"$linkOnMobile\": linkOnMobile }, link)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1v8mw0q\" }) `\n    color: var(--greyDark);\n    font-size: 16px;\n    font-weight: var(--regular);\n    padding: 6em 0;\n    text-align: center;\n\n    img {\n        display: block;\n        margin: 0 auto;\n        max-width: 60%;\n    }\n\n    small {\n        display: block;\n        font-size: 12px;\n        margin-top: 0.25em;\n    }\n\n    @media (min-width: 376px) {\n        font-size: 16px;\n\n        small {\n            font-size: 12px;\n        }\n    }\n\n    @media (min-width: 745px) {\n        font-size: 20px;\n        padding: 5em 0;\n\n        a + a {\n            margin-left: 32px;\n        }\n\n        small {\n            font-size: 14px;\n        }\n    }\n\n    @media (min-width: 1441px) {\n        font-size: 24px;\n        padding: 3.75em 0;\n\n        small {\n            font-size: 16px;\n        }\n    }\n`;\nconst ImageWrap = styled.div.withConfig({ displayName: \"ImageWrap\", componentId: \"sc-xodmec\" }) `\n    margin-bottom: 32px;\n`;\nconst LinkWrap = styled.div.withConfig({ displayName: \"LinkWrap\", componentId: \"sc-1f9dhu6\" }) `\n    align-items: center;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    margin-top: 1.25em;\n\n    a + a {\n        margin-left: 0;\n        margin-top: 16px;\n    }\n\n    @media (min-width: 745px) {\n        align-items: unset;\n        flex-direction: row;\n        margin-top: 1.5em;\n\n        a + a {\n            margin: 0 0 0 32px;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nexport function CheckmarkIcon() {\n    return (React.createElement(Root, { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 20 20\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"10\", cy: \"10\", r: \"10\", fill: \"#2AC437\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", d: \"M6.271 10.55l2.2 2.39 5.657-5.658\" }))));\n}\nconst Root = styled.svg.withConfig({ displayName: \"Root\", componentId: \"sc-8nlukj\" }) `\n    display: inline-block;\n    height: 20px;\n    width: 20px;\n`;\n","import React from 'react';\nexport const CircleIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 12 12\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { transform: \"translate(-6 -6)\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" }),\n        React.createElement(\"circle\", { fill: color, cx: \"12\", cy: \"12\", r: \"6\" }))));\nCircleIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const PinIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 12 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { transform: \"translate(-6 -6)\", fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M0 0h24v24H0z\" }),\n        React.createElement(\"path\", { d: \"M12 20c.049 0 6-4.686 6-8a6 6 0 1 0-12 0c0 3.314 5.92 8 6 8z\", fill: color }),\n        React.createElement(\"circle\", { fill: \"#FFF\", cx: \"12\", cy: \"12\", r: \"2\" }))));\nPinIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const ArrowIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 11 10\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M-7-7h24v24H-7z\" }),\n        React.createElement(\"path\", { d: \"M6.5 3.361V8.84a1 1 0 0 1-2 0V3.338L1.86 5.873A1 1 0 0 1 .473 4.431L4.784.294a.997.997 0 0 1 .704-.279.997.997 0 0 1 .705.279l4.309 4.137a1 1 0 0 1-1.385 1.442L6.5 3.361z\", fill: color, fillRule: \"nonzero\" }))));\nArrowIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const ArrowHeadIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 8 9\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M-8-7h24v24H-8z\" }),\n        React.createElement(\"path\", { d: \"M.13 7.7L3.477.897A.5.5 0 0 1 4.37.892l3.478 6.842a.5.5 0 0 1-.772.605L3.917 5.613.913 8.293A.5.5 0 0 1 .13 7.7z\", fill: color }))));\nArrowHeadIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const LongArrowIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 11 16\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M-7-4h24v24H-7z\" }),\n        React.createElement(\"path\", { d: \"M6.333 3.346v11.4a1 1 0 1 1-2 0V3.322l-2.64 2.535A1 1 0 1 1 .307 4.416L4.617.279A.997.997 0 0 1 5.32 0a.997.997 0 0 1 .705.279l4.31 4.137A1 1 0 1 1 8.95 5.858L6.333 3.346z\", fill: color, fillRule: \"nonzero\" }))));\nLongArrowIcon.defaultProps = {\n    color: '#FFFFFF',\n};\n","/* eslint-disable max-len */\nimport React from 'react';\nexport const GitHub = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M11.999 0C5.373 0 0 5.279 0 11.791c0 5.21 3.438 9.629 8.207 11.188.6.109.819-.255.819-.568 0-.28-.01-1.021-.017-2.005-3.337.712-4.042-1.581-4.042-1.581-.546-1.362-1.332-1.725-1.332-1.725-1.09-.731.082-.717.082-.717 1.205.084 1.838 1.216 1.838 1.216 1.07 1.801 2.81 1.281 3.493.98.109-.762.419-1.282.762-1.577-2.665-.297-5.467-1.31-5.467-5.827 0-1.287.468-2.34 1.236-3.164-.124-.298-.536-1.498.118-3.12 0 0 1.007-.318 3.3 1.208A11.685 11.685 0 0 1 12 5.702c1.02.005 2.046.135 3.005.397C17.295 4.573 18.3 4.89 18.3 4.89c.655 1.623.243 2.823.12 3.12.77.824 1.233 1.878 1.233 3.165 0 4.53-2.806 5.526-5.478 5.818.43.364.814 1.084.814 2.184 0 1.576-.015 2.847-.015 3.234 0 .315.217.682.825.567C20.565 21.416 24 17 24 11.791 24 5.28 18.627 0 11.999 0\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Medium = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M0 0h24v24H0V0zm5.727 8.027v7.126a.82.82 0 0 1-.218.707l-1.694 2.054v.271h4.803v-.27L6.924 15.86a.85.85 0 0 1-.233-.707V8.99l4.215 9.195h.49l3.62-9.195v7.33c0 .195 0 .232-.128.36l-1.302 1.264v.271h6.322v-.27l-1.257-1.235a.376.376 0 0 1-.143-.36V7.281a.376.376 0 0 1 .143-.362l1.287-1.234v-.27h-4.456l-3.176 7.923-3.613-7.924H4.019v.271L5.524 7.5a.624.624 0 0 1 .203.527z\", fill: \"currentColor\" })));\nexport const Peepeth = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"g\", { fill: \"currentColor\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M22.665 12.513c-1.269-1.527-3.205-3.036-5.04-2.751-1.836.285-2.804 1.442-3.138 1.795.05-.872.801-3.07 2.97-3.07 3.672 0 5.008 3.07 5.208 4.026zm-21.313 0c.2-.956 1.535-4.026 5.207-4.026 2.17 0 2.92 2.198 2.97 3.07-.333-.353-1.3-1.51-3.137-1.795-1.836-.285-3.772 1.224-5.04 2.75z\", opacity: \".503\" }),\n        React.createElement(\"path\", { d: \"M3.466 13.394c.128.168.33.276.556.276a.704.704 0 1 0 .435-1.257 1.757 1.757 0 0 1 2.386 1.643c0 .973-.785 1.761-1.753 1.761a1.757 1.757 0 0 1-1.752-1.761c0-.234.045-.457.128-.662zm13.836 0c.128.168.33.276.556.276a.704.704 0 1 0 .435-1.257 1.757 1.757 0 0 1 2.386 1.643c0 .973-.785 1.761-1.753 1.761a1.757 1.757 0 0 1-1.752-1.761c0-.234.045-.457.128-.662zM.778 16.824c-1.552-2.987-.567-7.6 1.069-10.133C3.482 4.16 5.769 1.98 12.628 0c-.2.403-.267.42-.6 1.04 3.087 0 6.074 1.09 8.695 3.656 2.62 2.567 4.34 7.9 2.52 12.127 0-1.446-.16-3.928-1.152-5.736-.717-1.308-2.653-2.801-4.79-2.6-2.506.236-2.837 2.7-2.837 3.791 0 1.09.567 2.063 1.302 3.74-.4-.447-1.63-1.867-3.689-4.26a472.851 472.851 0 0 1-3.822 4.294c.501-1.191.768-1.627 1.252-3.17.084-.445.09-.905.025-1.353-.216-1.512-1.227-2.883-2.695-3.025-1.903-.185-4.08 1.003-4.99 2.75-.551 1.058-1.052 2.886-1.069 5.57z\" }),\n        React.createElement(\"path\", { d: \"M8.248 16.794l3.785-1.212v2.834l-3.788-1.618z\" }),\n        React.createElement(\"path\", { opacity: \".703\", d: \"M12.033 18.93v2.054L8.245 17.31l3.788 1.62z\" }),\n        React.createElement(\"path\", { opacity: \".497\", d: \"M12.035 15.59l-3.79 1.208 3.79-4.352z\" }),\n        React.createElement(\"path\", { d: \"M15.819 16.794l-3.786-1.212v2.834l3.789-1.618z\" }),\n        React.createElement(\"path\", { opacity: \".499\", d: \"M12.033 18.93v2.054l3.789-3.674-3.789 1.62z\" }),\n        React.createElement(\"path\", { opacity: \".697\", d: \"M12.031 15.59l3.791 1.208-3.79-4.352z\" }))));\nexport const Reddit = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M15.8 14.195a1.8 1.8 0 1 1 0-3.6 1.8 1.8 0 0 1 0 3.6m-.048 3.004c-1.37.741-2.639.994-3.728.994-2.248 0-3.74-1.073-3.831-1.14a.48.48 0 0 1-.104-.664.462.462 0 0 1 .651-.105c.12.087 2.906 2.06 6.574.077a.464.464 0 0 1 .631.196.479.479 0 0 1-.193.642M6.8 12.395a1.8 1.8 0 1 1 3.6 0 1.8 1.8 0 0 1-3.6 0M19.8 2.2a1.4 1.4 0 0 1 0 2.799c-.772 0-1.4-.628-1.4-1.4 0-.772.628-1.4 1.4-1.4m4.2 8.215c0-1.499-1.231-2.718-2.744-2.718a2.75 2.75 0 0 0-1.837.7c-1.848-1.173-4.224-1.859-6.789-1.963l1.364-4.429 3.659 1.542c0 .016-.003.031-.003.047 0 1.205.99 2.185 2.206 2.185 1.217 0 2.207-.98 2.207-2.185 0-1.204-.99-2.184-2.207-2.184-.895 0-1.666.531-2.011 1.292L13.89 1.034a.434.434 0 0 0-.58.268l-1.577 5.119c-2.713.034-5.246.716-7.2 1.937a2.757 2.757 0 0 0-1.79-.662C1.231 7.696 0 8.916 0 10.414a2.69 2.69 0 0 0 1.254 2.279c-.046.269-.07.54-.07.812 0 1.928 1.144 3.728 3.222 5.067 2.02 1.302 4.698 2.02 7.54 2.02 2.842 0 5.52-.718 7.54-2.02 2.078-1.34 3.223-3.14 3.223-5.067 0-.25-.022-.501-.061-.75A2.709 2.709 0 0 0 24 10.414\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Telegram = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M11.995.045C5.37.045 0 5.415 0 12.04c0 6.624 5.37 11.994 11.995 11.994 6.624 0 11.994-5.37 11.994-11.994C23.99 5.415 18.62.045 11.995.045zM7.824 13.477l-3.027-1.02s-.464-.164-.509-.523c-.045-.36.524-.555.524-.555l12.03-4.719s.99-.434.99.285l-2.143 10.801s-.3.75-1.124.39l-3.048-2.337-1.956 1.783s-.152.116-.32.043l.395-3.37s5.483-4.928 5.708-5.138c.225-.21.15-.255.15-.255.015-.254-.405 0-.405 0l-7.265 4.615z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Trello = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M21 0a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h18zm-1.56 3.12H15a1.44 1.44 0 0 0-1.44 1.44v7.62c0 .795.645 1.44 1.44 1.44h4.44a1.44 1.44 0 0 0 1.44-1.44V4.56a1.44 1.44 0 0 0-1.44-1.44zM9 3.12H4.56a1.44 1.44 0 0 0-1.44 1.44v13.62c0 .795.645 1.44 1.44 1.44H9a1.44 1.44 0 0 0 1.44-1.44V4.56A1.44 1.44 0 0 0 9 3.12z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Twitter = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M7.539 21.592c9.056 0 14.012-7.54 14.012-14.067 0-.212 0-.425-.01-.637A10.055 10.055 0 0 0 24 4.324a9.95 9.95 0 0 1-2.833.78 4.97 4.97 0 0 0 2.17-2.738 9.773 9.773 0 0 1-3.13 1.196A4.906 4.906 0 0 0 16.614 2c-2.718 0-4.927 2.218-4.927 4.946 0 .386.048.762.125 1.128C7.72 7.872 4.09 5.895 1.66 2.906A4.96 4.96 0 0 0 1 5.394c0 1.716.874 3.23 2.19 4.117a4.966 4.966 0 0 1-2.23-.617v.067a4.95 4.95 0 0 0 3.948 4.85 4.784 4.784 0 0 1-1.297.174c-.317 0-.624-.03-.922-.087a4.927 4.927 0 0 0 4.6 3.432 9.853 9.853 0 0 1-6.117 2.121A9.44 9.44 0 0 1 0 19.384a13.968 13.968 0 0 0 7.539 2.208\", fill: \"currentColor\" })));\nexport const Youtube = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M23.498 6.64C24 8.524 24 12.455 24 12.455s0 3.93-.502 5.814a3.016 3.016 0 0 1-2.121 2.135c-1.872.505-9.377.505-9.377.505s-7.505 0-9.377-.505A3.016 3.016 0 0 1 .501 18.27C0 16.385 0 12.455 0 12.455s0-3.93.501-5.815a3.015 3.015 0 0 1 2.122-2.135C4.495 4 12 4 12 4s7.505 0 9.377.505a3.015 3.015 0 0 1 2.121 2.135zM9.545 16.023l6.273-3.568-6.273-3.569v7.137z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const LinkedIn = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M2.87 5.351c1.791 0 2.906-1.19 2.906-2.676C5.743 1.157 4.661 0 2.906 0 1.147 0 0 1.157 0 2.675c0 1.486 1.114 2.676 2.838 2.676h.033zM.304 22.95V7.465h5.135v15.484H.303zM8 22.847S8.067 8.816 8 7.364h5.135v2.245H13.1C13.776 8.552 14.992 7 17.763 7c3.378 0 5.911 2.213 5.911 6.97v8.877H18.54v-8.283c0-2.081-.743-3.502-2.602-3.502-1.418 0-2.263.958-2.634 1.883-.136.33-.17.793-.17 1.255v8.647H8z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Facebook = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 12 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M3 8H0v4h3v12h5V12h3.642L12 8H8V6.333C8 5.378 8.192 5 9.115 5H12V0H8.192C4.596 0 3 1.583 3 4.615V8z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\nexport const Instagram = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M14.829 6.302c-.738-.034-.96-.04-2.829-.04-1.869 0-2.09.007-2.828.04-1.899.087-2.783.986-2.87 2.87-.033.738-.041.959-.041 2.828 0 1.869.008 2.09.041 2.829.087 1.879.967 2.783 2.87 2.87.737.033.959.041 2.828.041 1.87 0 2.091-.007 2.829-.041 1.899-.086 2.782-.988 2.87-2.87.033-.738.04-.96.04-2.829 0-1.869-.007-2.09-.04-2.828-.088-1.883-.973-2.783-2.87-2.87zM12 15.595a3.595 3.595 0 110-7.19 3.595 3.595 0 010 7.19zm3.737-6.491a.84.84 0 110-1.68.84.84 0 010 1.68zM14.333 12a2.333 2.333 0 11-4.666 0 2.333 2.333 0 014.666 0zM12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm6.958 14.886c-.115 2.545-1.532 3.955-4.071 4.072-.747.034-.986.042-2.887.042s-2.139-.008-2.886-.042c-2.544-.117-3.955-1.529-4.072-4.072C5.008 14.14 5 13.901 5 12c0-1.901.008-2.139.042-2.886.117-2.544 1.529-3.955 4.072-4.071C9.861 5.008 10.099 5 12 5c1.901 0 2.14.008 2.887.043 2.545.117 3.957 1.532 4.071 4.071.034.747.042.985.042 2.886 0 1.901-.008 2.14-.042 2.886z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\nexport const Web = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"circle\", { cx: \"12\", cy: \"12\", r: \"12\", fill: \"currentColor\" }),\n    React.createElement(\"path\", { fill: \"#fff\", fillRule: \"evenodd\", d: \"M5.23 7.737A8 8 0 0 1 12 4a8 8 0 0 1 6.77 3.737l.01.016A7.96 7.96 0 0 1 20 12a7.96 7.96 0 0 1-1.227 4.26l-.002.003A8 8 0 0 1 12 20a8 8 0 0 1-6.77-3.737l-.01-.016A7.96 7.96 0 0 1 4 12a7.96 7.96 0 0 1 1.22-4.247zM13.393 19c.428-.627.789-1.486 1.06-2.498H9.546c.248.929.572 1.728.954 2.338q.727.16 1.5.16l.307-.007q.459-.02.9-.097l.289-.057zm-4.88-2.498H6.64a7 7 0 0 0 2.504 1.891c-.246-.563-.457-1.2-.629-1.891m6.342 1.891a7 7 0 0 0 2.505-1.891h-1.876a12 12 0 0 1-.629 1.891m-6.555-2.89a19.6 19.6 0 0 1-.295-3.001H5.018a6.96 6.96 0 0 0 .919 3zm9.762-.002a6.96 6.96 0 0 0 .92-3h-2.989a19.6 19.6 0 0 1-.295 3.001zm-3.382 0c.178-.924.287-1.94.313-3H9.006c.026 1.06.135 2.076.313 3zm-6.675-4a19.6 19.6 0 0 1 .295-3H5.936a6.96 6.96 0 0 0-.918 3zm6.988 0a18.5 18.5 0 0 0-.312-3H9.318c-.177.925-.286 1.94-.312 3zm3.07-3H15.7c.169.937.27 1.95.295 3h2.989a6.96 6.96 0 0 0-.92-3m-9.55-1c.172-.692.383-1.329.63-1.892l-.076.034A7 7 0 0 0 6.638 7.5zm8.848 0a7 7 0 0 0-2.505-1.892l.108.26c.2.496.375 1.044.52 1.632zM13.5 5.16A7 7 0 0 0 12 5l-.307.007a7 7 0 0 0-.9.097l-.29.056.103-.159c-.428.627-.789 1.486-1.06 2.499h4.908c-.249-.93-.573-1.729-.955-2.34\" })));\nexport const X = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { fill: \"currentColor\", d: \"M18.88 1.16h3.68l-8.08 9.2 9.44 12.48h-7.408l-5.8-7.584-6.64 7.584H.392L8.952 13-.088 1.16h7.592l5.24 6.928zm-1.288 19.52h2.04L6.432 3.24H4.24z\" })));\n","import React from 'react';\nimport styled from 'styled-components';\nimport { CheckmarkIcon } from './CheckmarkIcon';\nimport * as MapIcons from './MapIcons';\nimport * as SocialIcons from './SocialIcons';\nconst DefaultPath = styled.path.withConfig({ displayName: \"DefaultPath\", componentId: \"sc-qys7lb\" }) `\n    stroke: #323232;\n`;\n/* eslint-disable max-len */\nconst sources = {\n    back: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 14\" },\n        React.createElement(\"path\", { stroke: \"currentColor\", strokeWidth: \"1.5\", d: \"M7 13L1 7l6-6\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    backArrow: (React.createElement(\"svg\", { width: \"23\", height: \"18\", viewBox: \"0 0 23 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8.1895 17.4096C8.57392 17.794 9.1972 17.794 9.58162 17.4096C9.96604 17.0251 9.96604 16.4019 9.58162 16.0174L3.8364 10.2722L21.8796 10.2722C22.4232 10.2722 22.8639 9.83151 22.8639 9.28785C22.8639 8.74419 22.4232 8.30348 21.8796 8.30348L3.83846 8.30348L9.58162 2.56032C9.96604 2.17589 9.96604 1.55262 9.58162 1.1682C9.19719 0.783777 8.57392 0.783778 8.1895 1.1682L0.774414 8.58329C0.760749 8.59662 0.74747 8.61035 0.734597 8.62446C0.380737 9.01071 0.390831 9.61089 0.764879 9.98494L8.1895 17.4096Z\", fill: \"currentColor\" }))),\n    forward: (React.createElement(\"svg\", { viewBox: \"0 0 8 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { d: \"M1 1.342l5.66 5.66-5.656 5.656\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" })))),\n    caretUp: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 11 6\" },\n        React.createElement(\"path\", { d: \"M1 5.245L5.245 1l4.243 4.243\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    caretDown: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 11 6\" },\n        React.createElement(\"path\", { d: \"M9.488 1.243L5.243 5.488 1 1.245\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    close: (React.createElement(\"svg\", { width: \"9\", height: \"9\", viewBox: \"0 0 9 9\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M7.46875 1.57343L1.53125 7.51092\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }),\n        React.createElement(\"path\", { d: \"M1.53125 1.57343L7.46875 7.51092\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }))),\n    disconnect: (React.createElement(\"svg\", { width: \"12\", height: \"12\", viewBox: \"0 0 12 12\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M11.1242 6.31172L8.82734 8.60859C8.74336 8.68887 8.6318 8.73388 8.51562 8.73438C8.42887 8.73423 8.34412 8.7083 8.27214 8.65987C8.20016 8.61145 8.14421 8.54271 8.11138 8.46241C8.07856 8.38211 8.07035 8.29386 8.0878 8.20888C8.10525 8.1239 8.14756 8.04603 8.20937 7.98516L9.75703 6.4375H4.6875C4.57147 6.4375 4.46019 6.39141 4.37814 6.30936C4.29609 6.22731 4.25 6.11603 4.25 6C4.25 5.88397 4.29609 5.77269 4.37814 5.69064C4.46019 5.60859 4.57147 5.5625 4.6875 5.5625H9.75703L8.20937 4.01484C8.1267 3.9329 8.07997 3.82146 8.07946 3.70506C8.07894 3.58865 8.12469 3.47681 8.20664 3.39414C8.28859 3.31147 8.40002 3.26473 8.51643 3.26422C8.63283 3.26371 8.74467 3.30946 8.82734 3.39141L11.1242 5.68828C11.2064 5.77123 11.2525 5.88325 11.2525 6C11.2525 6.11675 11.2064 6.22877 11.1242 6.31172ZM4.6875 10.375H1.625V1.625H4.6875C4.80353 1.625 4.91481 1.57891 4.99686 1.49686C5.07891 1.41481 5.125 1.30353 5.125 1.1875C5.125 1.07147 5.07891 0.960188 4.99686 0.878141C4.91481 0.796094 4.80353 0.75 4.6875 0.75H1.625C1.39294 0.75 1.17038 0.842187 1.00628 1.00628C0.842187 1.17038 0.75 1.39294 0.75 1.625V10.375C0.75 10.6071 0.842187 10.8296 1.00628 10.9937C1.17038 11.1578 1.39294 11.25 1.625 11.25H4.6875C4.80353 11.25 4.91481 11.2039 4.99686 11.1219C5.07891 11.0398 5.125 10.9285 5.125 10.8125C5.125 10.6965 5.07891 10.5852 4.99686 10.5031C4.91481 10.4211 4.80353 10.375 4.6875 10.375Z\", fill: \"currentColor\" }))),\n    tick: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 10 8\" },\n        React.createElement(\"path\", { d: \"M1.271 4.55l2.2 2.39 5.657-5.658\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    exclamation: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 2 8\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M1 1v3.918M.986 6.904L1 6.918\" })))),\n    cross: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 15 15\" },\n        React.createElement(DefaultPath, { d: \"M1 1l13.2 13.2m0-13.2L1 14.2\", fill: \"none\" }))),\n    crossMedium: (React.createElement(\"svg\", { viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M.757.757l8.486 8.486m0-8.486L.757 9.243\", strokeWidth: \"1.5\", stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" }))),\n    crossHeavy: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 8\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M7.182 6.975L1.525 1.318M1.525 6.975l5.657-5.657\" })))),\n    linkOut: (React.createElement(\"svg\", { width: \"42\", height: \"42\", viewBox: \"0 0 42 42\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M27.8906 24.5684V14.0684H17.3906\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M27.8906 14.0684L13.4531 28.5059\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    play: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\" },\n        React.createElement(DefaultPath, { d: \"M12 22l10-6-10-6z\", strokeLinejoin: \"round\", fill: \"none\", fillRule: \"evenodd\" }))),\n    pause: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\" },\n        React.createElement(DefaultPath, { d: \"M11 10h3v12h-3zm7 0h3v12h-3z\", strokeLinejoin: \"round\", fill: \"none\", fillRule: \"evenodd\" }))),\n    minus: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 2\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { stroke: \"currentColor\", strokeLinecap: \"round\", d: \"M7.2 1H.8\" })))),\n    minusSmall: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 10 2\" },\n        React.createElement(\"path\", { fill: \"none\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeWidth: \"2\", d: \"M1 1h8\" }))),\n    plus: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 8\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"g\", { stroke: \"currentColor\", strokeLinecap: \"round\" },\n                React.createElement(\"path\", { d: \"M4 .8v6.4M7.2 4H.8\" }))))),\n    plusSmall: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 10 10\" },\n        React.createElement(\"path\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeWidth: \"2\", d: \"M1 5h8M5 1v8\" }))),\n    user: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 30 30\" },\n        React.createElement(\"g\", { transform: \"translate(1 1)\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M8.188 7.711a10.622 10.622 0 0 0 11.838 2.381\" }),\n            React.createElement(\"circle\", { cx: \"13.696\", cy: \"10.957\", r: \"6.391\" }),\n            React.createElement(\"path\", { d: \"M22.111 24.501a11.865 11.865 0 0 0-16.831 0\" }),\n            React.createElement(\"circle\", { cx: \"13.696\", cy: \"13.696\", r: \"13.696\" })))),\n    userFull: (React.createElement(\"svg\", { width: \"46\", height: \"46\", viewBox: \"0 0 46 46\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M23 46C35.7025 46 46 35.7025 46 23C46 10.2975 35.7025 0 23 0C10.2975 0 0 10.2975 0 23C0 35.7025 10.2975 46 23 46Z\", fill: \"currentColor\" }),\n        React.createElement(\"path\", { d: \"M18.971 28.8528V29.705C18.971 32.0553 20.882 33.9606 23.2394 33.9606C25.5968 33.9606 27.5078 32.0553 27.5078 29.705V28.8528\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M19.3626 14.958C17.4573 16.5774 16.7666 19.2092 17.6321 21.5514C18.4976 23.8936 20.7358 25.4496 23.2394 25.4496C25.743 25.4496 27.9812 23.8936 28.8467 21.5514C29.7122 19.2092 29.0214 16.5774 27.1162 14.958\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M25.8004 12.6826C24.2645 12.6835 22.9171 11.6619 22.5075 10.186C20.6608 10.277 19.1578 11.6997 18.971 13.5338C18.971 15.4141 20.8821 16.9382 23.2394 16.9382C25.5967 16.9382 27.5078 15.4141 27.5078 13.5338C27.5078 13.0637 27.1256 12.6826 26.6541 12.6826H25.8004Z\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M33.8011 35.6629C32.3186 31.0967 28.0533 28.0034 23.2394 28.0034C18.4255 28.0034 14.1602 31.0967 12.6777 35.6629\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    checkmark: React.createElement(CheckmarkIcon, null),\n    checkmarkOutline: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 112 113\", fill: \"none\" },\n        React.createElement(\"circle\", { opacity: \".1\", cx: \"56\", cy: \"56.5\", r: \"56\", fill: \"#0EAC1B\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M101.833 56.5c0 25.313-20.52 45.833-45.834 45.833-25.313 0-45.833-20.52-45.833-45.833s20.52-45.833 45.833-45.833 45.834 20.52 45.834 45.833Zm-57.831-4.267c.56.24 1.065.589 1.488 1.027l5.926 5.926 15.093-15.093a4.583 4.583 0 1 1 6.48 6.48L54.657 68.908a4.583 4.583 0 0 1-6.48 0l-9.167-9.166a4.585 4.585 0 0 1 3.224-7.88c.608.005 1.21.131 1.769.372Z\", fill: \"#0EAC1B\" }))),\n    checkMarkMono: (React.createElement(\"svg\", { width: \"14\", height: \"11\", viewBox: \"0 0 14 11\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M0.76361 5.82623L4.25997 9.59981L12.5685 1.29131\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    error: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 20 20\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"10\", cy: \"10\", r: \"10\", fill: \"#FF5C00\", fillRule: \"nonzero\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", d: \"M10 11.562V5M10 14.562v-.052\" })))),\n    warning: (React.createElement(\"svg\", { width: \"24px\", height: \"24px\", viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"none\", strokeWidth: \"1\", fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"g\", { transform: \"translate(-505.000000, -2598.000000)\", stroke: \"#0324FF\", strokeWidth: \"1.5\" },\n                React.createElement(\"path\", { d: \"M517,2614.5 C516.792893,2614.5 516.625,2614.66789 516.625,2614.875 C516.625,2615.08211 516.792893,2615.25 517,2615.25 C517.207107,2615.25 517.375,2615.08211 517.375,2614.875 C517.375,2614.66789 517.207107,2614.5 517,2614.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                React.createElement(\"path\", { d: \"M517,2611.5 L517,2603.25\", strokeLinecap: \"round\" }),\n                React.createElement(\"circle\", { cx: \"517\", cy: \"2610\", r: \"11.25\" }))))),\n    refresh: (React.createElement(\"svg\", { viewBox: \"0 0 12 12\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { d: \"M-6-6h24v24H-6z\" }),\n            React.createElement(\"g\", { stroke: \"currentColor\", strokeLinecap: \"round\", strokeWidth: \"1.5\" },\n                React.createElement(\"path\", { d: \"M10.016 3.02a5.001 5.001 0 0 0-8.607.996m.599 4.995a5.001 5.001 0 0 0 8.57-.999\" }),\n                React.createElement(\"path\", { d: \"M1 11V8h3M11 1v3H8\", strokeLinejoin: \"round\" }))))),\n    circle: React.createElement(MapIcons.CircleIcon, null),\n    pin: React.createElement(MapIcons.PinIcon, null),\n    arrow: React.createElement(MapIcons.ArrowIcon, null),\n    longArrow: React.createElement(MapIcons.LongArrowIcon, null),\n    arrowhead: React.createElement(MapIcons.ArrowHeadIcon, null),\n    keyboard: (React.createElement(\"svg\", { viewBox: \"0 0 24 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"rect\", { x: \".75\", y: \".25\", width: \"22.5\", height: \"12\", rx: \"3\" }),\n            React.createElement(\"path\", { d: \"M6.75 3.25h1.5M15.75 3.25h1.5M11.25 3.25h1.5M4.5 6.25H6M9 6.25h1.5M13.5 6.25H15M18 6.25h1.5M6.75 9.25h10.5\" })))),\n    share: (React.createElement(\"svg\", { viewBox: \"0 0 19 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(0 -2)\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M17.788 5.375h-7.013c-1.408 0-2.55 1.12-2.55 2.5V11\" }),\n            React.createElement(\"path\", { d: \"M13.963 9.125l3.825-3.75-3.825-3.75M15.238 12.875v6.25c0 .69-.571 1.25-1.275 1.25H2.488c-.705 0-1.276-.56-1.276-1.25v-10c0-.69.571-1.25 1.276-1.25H4.4\" })))),\n    emptyAvatarUpload: (React.createElement(\"svg\", { viewBox: \"0 0 80 80\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(20 20)\", stroke: \"#D8D8D8\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M13.817 10.489A11.927 11.927 0 0 0 27.11 13.16\" }),\n            React.createElement(\"circle\", { cx: \"20\", cy: \"14.13\", r: \"7.174\" }),\n            React.createElement(\"path\", { d: \"M.435 10.871V3.043A2.609 2.609 0 0 1 3.043.435h7.827M39.565 10.871V3.043A2.609 2.609 0 0 0 36.957.435H29.13M.435 29.13v7.827a2.609 2.609 0 0 0 2.608 2.608h7.827M39.565 29.13v7.827a2.609 2.609 0 0 1-2.608 2.608H29.13M31.02 31.74a11.673 11.673 0 0 0-22.04 0\" })))),\n    profileMan: (React.createElement(\"svg\", { viewBox: \"0 0 80 80\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"g\", { opacity: \"0.5\" },\n                React.createElement(\"ellipse\", { stroke: \"#525252\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\", cx: \"40.5\", cy: \"28\", rx: \"10.762\", ry: \"10.5\" }),\n                React.createElement(\"path\", { d: \"M32.813 44.498V46c0 4.142 3.441 7.5 7.687 7.5s7.688-3.358 7.688-7.5v-1.502\", stroke: \"#525252\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                React.createElement(\"path\", { d: \"M31.226 22.668c3.367 3.408 8.01 5.333 12.861 5.332 2.433 0 4.84-.483 7.073-1.422M20.512 62.5c0-10.77 8.95-19.5 19.988-19.5 11.039 0 19.987 8.73 19.987 19.5\", stroke: \"#525252\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))))),\n    hamburger: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 12 10\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M1 9h10M1 5h10M1 1h10\" })))),\n    search: (React.createElement(\"svg\", { viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", transform: \"translate(-1 -1)\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"circle\", { transform: \"rotate(-23.025 7.593 7.592)\", cx: \"7.593\", cy: \"7.592\", r: \"5.371\" }),\n            React.createElement(\"path\", { d: \"M11.39 11.39l4.166 4.166\" })))),\n    questionMark: (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M9.1 9.286a.75.75 0 0 1-1.5-.001 4.287 4.287 0 1 1 5.716 4.044 1.018 1.018 0 0 0-.68.96v.744a.75.75 0 0 1-1.5 0v-.744a2.52 2.52 0 0 1 1.68-2.374A2.787 2.787 0 1 0 9.1 9.285zm2.782 10.074a1.19 1.19 0 1 1 0-2.38 1.19 1.19 0 0 1 0 2.38z\", fill: \"#525252\" }))),\n    outlineQuestionMark: (React.createElement(\"svg\", { viewBox: \"0 0 18 18\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1 1)\", stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\" }),\n            React.createElement(\"g\", { strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.071\" },\n                React.createElement(\"path\", { d: \"M7.925 12.005a.316.316 0 100 .632.316.316 0 000-.632h0M5.398 5.975a2.526 2.526 0 113.369 2.383 1.263 1.263 0 00-.842 1.19v.532\" }))))),\n    outlineQuestionMark2: (React.createElement(\"svg\", { viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M8.25 16.5a8.25 8.25 0 1 0 0-16.5 8.25 8.25 0 0 0 0 16.5Z\", fill: \"#A3A3A3\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8.435 11.41a1.05 1.05 0 1 0 0 2.1 1.05 1.05 0 0 0 0-2.1Z\", fill: \"#fff\" }),\n        React.createElement(\"path\", { d: \"M6.225 5.853a2.21 2.21 0 1 1 2.947 2.085 1.105 1.105 0 0 0-.737 1.042v.465\", stroke: \"#fff\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    lockOutline: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 18 24\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"rect\", { width: \"16.5\", height: \"13.5\", x: \"0.75\", y: \"9.75\", rx: \"1.5\" }),\n            React.createElement(\"path\", { d: \"M3.75 9.75V6a5.25 5.25 0 1110.5 0v3.75M9 15v3\" })))),\n    lock: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 19 25\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", transform: \"translate(1 1)\" },\n            React.createElement(\"path\", { stroke: \"currentColor\", d: \"M3 9V5.25a5.25 5.25 0 1110.5 0\" }),\n            React.createElement(\"rect\", { width: \"16.5\", height: \"13.5\", y: \"9\", fill: \"currentColor\", stroke: \"currentColor\", rx: \"1.5\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", d: \"M8.5 14v3\" })))),\n    lockClosed: (React.createElement(\"svg\", { fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"9.5 8 13 16\" },\n        React.createElement(\"path\", { d: \"M19.75 15H19v-2a3 3 0 0 0-6 0v2h-.75a.751.751 0 0 0-.75.75v5.5a.751.751 0 0 0 .75.75h7.5a.751.751 0 0 0 .75-.75v-5.5a.751.751 0 0 0-.75-.75Zm-3.275 3.875c.014.04.022.082.025.125a.5.5 0 0 1-1 0 .485.485 0 0 1 .025-.125 1 1 0 1 1 .95 0ZM18 15h-4v-2a2 2 0 0 1 4 0v2Z\", fill: \"currentColor\" }))),\n    checkBadgeOutline: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"path\", { d: \"M15.75 9.749l-3.981 5.308a.75.75 0 01-1.13.08L8.25 12.749\" }),\n            React.createElement(\"path\", { d: \"M10.73 1.357a1.63 1.63 0 012.54 0l1.512 1.881c.348.434.893.66 1.446.6l2.4-.261a1.63 1.63 0 011.8 1.8l-.261 2.4c-.06.553.166 1.098.6 1.446l1.881 1.512a1.63 1.63 0 010 2.54l-1.887 1.505a1.63 1.63 0 00-.6 1.447l.261 2.4a1.629 1.629 0 01-1.8 1.8l-2.4-.261a1.628 1.628 0 00-1.446.6L13.27 22.64a1.629 1.629 0 01-2.54 0l-1.511-1.88a1.631 1.631 0 00-1.447-.6l-2.4.261a1.628 1.628 0 01-1.8-1.8l.261-2.4a1.631 1.631 0 00-.6-1.447l-1.88-1.511a1.629 1.629 0 010-2.54l1.88-1.512c.434-.348.66-.893.6-1.446l-.261-2.4a1.629 1.629 0 011.8-1.8l2.4.261a1.632 1.632 0 001.447-.6l1.511-1.869z\" })))),\n    checkBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"path\", { fill: \"currentColor\", stroke: \"currentColor\", d: \"M10.73 1.357a1.63 1.63 0 012.54 0l1.512 1.881c.348.434.893.66 1.446.6l2.4-.261a1.63 1.63 0 011.8 1.8l-.261 2.4c-.06.553.166 1.098.6 1.446l1.881 1.512a1.63 1.63 0 010 2.54l-1.887 1.505a1.63 1.63 0 00-.6 1.447l.261 2.4a1.629 1.629 0 01-1.8 1.8l-2.4-.261a1.628 1.628 0 00-1.446.6L13.27 22.64a1.629 1.629 0 01-2.54 0l-1.511-1.88a1.631 1.631 0 00-1.447-.6l-2.4.261a1.628 1.628 0 01-1.8-1.8l.261-2.4a1.631 1.631 0 00-.6-1.447l-1.88-1.511a1.629 1.629 0 010-2.54l1.88-1.512c.434-.348.66-.893.6-1.446l-.261-2.4a1.629 1.629 0 011.8-1.8l2.4.261a1.632 1.632 0 001.447-.6l1.511-1.869z\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", d: \"M15.75 9.749l-3.981 5.308a.75.75 0 01-1.13.08L8.25 12.749\" })))),\n    checkBadgeHD: (React.createElement(\"svg\", { viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { fill: \"#0324FF\", d: \"M8 14.88l-1.56.966-1.073-1.49-1.812.296-.42-1.787-1.787-.42.296-1.812L.154 9.56 1.12 8 .154 6.44l1.49-1.073-.296-1.812 1.787-.42.42-1.787 1.812.296L6.44.154 8 1.12 9.56.154l1.073 1.49 1.812-.296.42 1.787 1.787.42-.296 1.812 1.49 1.072L14.88 8l.966 1.56-1.49 1.073.296 1.812-1.787.42-.42 1.787-1.812-.296-1.072 1.49z\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\", d: \"M4.865 8.172l1.65 1.792 4.243-4.243\" })))),\n    dropPlus: (React.createElement(\"svg\", { viewBox: \"0 0 25 25\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1 1)\", fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { fill: \"#FCFBF9\", cx: \"11.5\", cy: \"11.5\", r: \"11.5\" }),\n            React.createElement(\"path\", { d: \"M11.5 23C17.851 23 23 17.851 23 11.5S17.851 0 11.5 0 0 5.149 0 11.5C.007 17.848 5.152 22.993 11.5 23zm-6-12.5h4.75a.25.25 0 0 0 .25-.25V5.5a1 1 0 0 1 2 0v4.75c0 .138.112.25.25.25h4.75a1 1 0 0 1 0 2h-4.75a.25.25 0 0 0-.25.25v4.75a1 1 0 0 1-2 0v-4.75a.25.25 0 0 0-.25-.25H5.5a1 1 0 0 1 0-2z\", fill: \"#FF5C00\", fillRule: \"nonzero\" })))),\n    infoBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 16 16\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", transform: \"matrix(1 0 0 -1 0 16)\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"#0324FF\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"2\", d: \"M8 11.5v.1m0-2.8V4\" })))),\n    warnBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 16 16\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"#FF5C00\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"2\", d: \"M8 11.5v.1m0-2.8V4\" })))),\n    errorBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 16 16\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"#FF0F2D\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"2\", d: \"M4.606 4.606l6.788 6.788m0-6.788l-6.788 6.788\" })))),\n    clear: (React.createElement(\"svg\", { viewBox: \"0 0 14 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(.25 .25)\", fill: \"none\" },\n            React.createElement(\"circle\", { stroke: \"#CDCDCD\", fill: \"#CDCDCD\", cx: \"6.75\", cy: \"6.75\", r: \"6.188\" }),\n            React.createElement(\"path\", { d: \"M4.84 4.84l3.82 3.82m0-3.82L4.84 8.66\", stroke: \"#FFF\" })))),\n    trash: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 15 14\" },\n        React.createElement(\"path\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"#A3A3A3\", strokeLinecap: \"round\", strokeLinejoin: \"round\", d: \"M11.167 13h-7a1 1 0 01-1-1V3h9v9a1 1 0 01-1 1zm-5-3V6m3 4V6m-8-3h13m-5-2h-3a1 1 0 00-1 1v1h5V2a1 1 0 00-1-1z\" }))),\n    brevetDown: (React.createElement(\"svg\", { viewBox: \"0 0 10 6\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M.756 1l4.245 4.245 4.243-4.242\", stroke: \"#CDCDCD\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    // TODO check if is used and delete if not\n    x: (React.createElement(\"svg\", { viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"#A3A3A3\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M.757.757l8.486 8.486M9.243.757L.757 9.243\" })))),\n    transfer: (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"rect\", { fill: \"currentColor\", width: \"24\", height: \"24\", rx: \"3\" }),\n            React.createElement(\"path\", { d: \"M8.8 8h8.8M14.4 4.8L17.6 8l-3.2 3.2M15.2 16H6.4M9.6 19.2L6.4 16l3.2-3.2\", stroke: \"#FDFDFD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })))),\n    dataUnion: (React.createElement(\"svg\", { viewBox: \"0 0 16 13\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1)\", stroke: \"currentColor\", strokeWidth: \"1.125\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M2.489 8.93C1.71 7.05 2.33 4.9 4.003 3.676a4.805 4.805 0 0 1 5.655.011c1.668 1.23 2.278 3.382 1.492 5.26\" }),\n            React.createElement(\"path\", { d: \"M1.314 10.81C-.656 8.111-.216 4.416 2.34 2.22c2.555-2.197 6.413-2.197 8.968 0 2.556 2.197 2.997 5.892 1.026 8.591\" }),\n            React.createElement(\"ellipse\", { cx: \"6.824\", cy: \"6.978\", rx: \"2.042\", ry: \"1.969\" }),\n            React.createElement(\"path\", { d: \"M10.111 11.76c-.487-1.348-1.805-2.251-3.286-2.251-1.48 0-2.798.903-3.285 2.25h6.571z\" })))),\n    DATA: (React.createElement(\"svg\", { width: \"24\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { d: \"M12 24C5.372 24 0 18.628 0 12S5.372 0 12 0s12 5.372 12 12-5.372 12-12 12z\", fill: \"#CDCDCD\", fillRule: \"nonzero\" }),\n            React.createElement(\"path\", { d: \"M13.878 5.193v-.432a.26.26 0 00-.271-.26 5.63 5.63 0 00-5.355 5.393c.006.182.154.23.241.23h.44a.26.26 0 00.26-.248 4.693 4.693 0 014.444-4.438c.183-.023.241-.123.241-.245m-3.953 4.931h.42a.26.26 0 00.258-.242 3.285 3.285 0 013.055-3.035.235.235 0 00.22-.248V6.17a.261.261 0 00-.279-.26 4.224 4.224 0 00-3.935 3.934c-.01.15.11.279.26.279m3.954-2.541v.43c0 .176-.152.239-.227.248a1.878 1.878 0 00-1.635 1.63.262.262 0 01-.26.233h-.42a.26.26 0 01-.259-.284 2.816 2.816 0 012.518-2.517.26.26 0 01.283.26zm4.929 6.282c-.122 0-.222-.058-.245-.241a4.693 4.693 0 00-4.439-4.444.26.26 0 01-.248-.26v-.44c0-.086.048-.234.23-.24a5.631 5.631 0 015.395 5.353.26.26 0 01-.26.272h-.433zm-4.932-3.953c0-.151.128-.27.28-.26a4.224 4.224 0 013.934 3.934c.01.15-.109.28-.26.28h-.428a.235.235 0 01-.248-.221 3.285 3.285 0 00-3.035-3.055.26.26 0 01-.243-.258v-.42zm2.542 3.953h-.43c-.176 0-.24-.153-.248-.227a1.878 1.878 0 00-1.632-1.635.262.262 0 01-.232-.26v-.42a.26.26 0 01.284-.259 2.816 2.816 0 012.518 2.517.26.26 0 01-.26.284zM5.193 10.123c.122 0 .222.059.245.241a4.693 4.693 0 004.439 4.444.26.26 0 01.248.26v.44c0 .086-.048.234-.23.24A5.631 5.631 0 014.5 10.395a.26.26 0 01.26-.272h.433zm4.932 3.953c0 .151-.128.27-.28.26a4.224 4.224 0 01-3.934-3.934.261.261 0 01.26-.28h.428c.189 0 .244.149.248.222a3.285 3.285 0 003.035 3.054.26.26 0 01.243.258v.42zm-2.542-3.953h.43c.176 0 .24.153.248.227.103.853.779 1.53 1.632 1.635a.262.262 0 01.232.26v.42a.26.26 0 01-.284.259 2.816 2.816 0 01-2.518-2.517.26.26 0 01.26-.284zm2.543 8.684c0-.122.059-.222.241-.245a4.693 4.693 0 004.445-4.438.26.26 0 01.26-.248h.44c.086 0 .234.048.24.23a5.631 5.631 0 01-5.354 5.394.26.26 0 01-.272-.26v-.433zm3.954-4.931c.151 0 .27.128.26.28a4.224 4.224 0 01-3.935 3.934.261.261 0 01-.28-.26V17.4c0-.189.149-.243.222-.248a3.285 3.285 0 003.055-3.035.26.26 0 01.257-.242h.42zm-3.954 2.541v-.43c0-.176.153-.239.227-.248a1.878 1.878 0 001.636-1.63.262.262 0 01.259-.233h.42a.26.26 0 01.26.284 2.816 2.816 0 01-2.518 2.517.26.26 0 01-.284-.26z\", fill: \"#FFF\" })))),\n    DATAColor: (React.createElement(\"svg\", { fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n        React.createElement(\"circle\", { cx: \"12\", cy: \"12\", r: \"12\", fill: \"#F7600A\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M14.104 4.377v-.485c0-.166-.138-.3-.304-.292a6.307 6.307 0 0 0-5.998 6.041c.007.204.173.258.27.258h.492a.292.292 0 0 0 .292-.278 5.256 5.256 0 0 1 4.978-4.97c.204-.026.27-.138.27-.274ZM9.676 9.899h.47a.29.29 0 0 0 .289-.272 3.68 3.68 0 0 1 3.422-3.398.263.263 0 0 0 .247-.278v-.48a.293.293 0 0 0-.313-.291 4.73 4.73 0 0 0-4.407 4.406.293.293 0 0 0 .292.313Zm6.257 4.202c.097 0 .263.054.27.258a6.307 6.307 0 0 1-5.998 6.04.292.292 0 0 1-.304-.291v-.484c0-.137.066-.248.27-.275a5.256 5.256 0 0 0 4.978-4.97.292.292 0 0 1 .292-.278h.492Zm-1.604 0c.17 0 .303.144.292.313a4.73 4.73 0 0 1-4.407 4.406.293.293 0 0 1-.313-.291v-.48c0-.211.165-.272.247-.278a3.68 3.68 0 0 0 3.422-3.398.29.29 0 0 1 .289-.272h.47Zm-1.581 0c.171 0 .308.147.29.318a3.154 3.154 0 0 1-2.82 2.82.291.291 0 0 1-.317-.292v-.481c0-.197.171-.268.255-.278a2.103 2.103 0 0 0 1.831-1.827.294.294 0 0 1 .29-.26h.47ZM4.377 9.898c.136 0 .248.065.274.27a5.256 5.256 0 0 0 4.971 4.977.292.292 0 0 1 .278.292v.492c0 .097-.054.262-.258.27A6.307 6.307 0 0 1 3.6 10.201a.292.292 0 0 1 .292-.304h.485Zm1.574 0c.212 0 .273.165.278.247a3.68 3.68 0 0 0 3.4 3.421.29.29 0 0 1 .27.289v.47c0 .17-.143.303-.312.292A4.73 4.73 0 0 1 5.18 10.21a.293.293 0 0 1 .291-.312h.48Zm8.407-2.11a6.307 6.307 0 0 1 6.042 5.997.292.292 0 0 1-.292.304h-.485c-.136 0-.248-.066-.274-.27a5.256 5.256 0 0 0-4.971-4.978.292.292 0 0 1-.278-.29v-.493c0-.097.054-.263.258-.27Zm.055 1.582a4.73 4.73 0 0 1 4.407 4.406.293.293 0 0 1-.291.313h-.48a.263.263 0 0 1-.278-.247 3.68 3.68 0 0 0-3.4-3.421.29.29 0 0 1-.27-.289v-.47c0-.17.143-.303.312-.292Zm.005 1.582a3.154 3.154 0 0 1 2.82 2.82.291.291 0 0 1-.291.317h-.482c-.197 0-.268-.171-.278-.254a2.103 2.103 0 0 0-1.827-1.832.293.293 0 0 1-.26-.29v-.47c0-.172.148-.308.318-.291ZM7.535 9.898c.197 0 .268.17.278.254a2.103 2.103 0 0 0 1.827 1.832c.148.018.26.14.26.29v.47a.291.291 0 0 1-.318.29 3.154 3.154 0 0 1-2.82-2.819.291.291 0 0 1 .291-.317h.482Zm6.569-2.845v.481c0 .197-.171.268-.254.278a2.103 2.103 0 0 0-1.832 1.827.294.294 0 0 1-.29.26h-.47a.29.29 0 0 1-.291-.318 3.154 3.154 0 0 1 2.82-2.82c.17-.016.317.12.317.292Z\", fill: \"#fff\" }))),\n    ETH: (React.createElement(\"svg\", { width: \"24\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fillRule: \"nonzero\", fill: \"none\" },\n            React.createElement(\"path\", { d: \"M12 24C5.372 24 0 18.628 0 12S5.372 0 12 0s12 5.372 12 12-5.372 12-12 12zm5.995-11.836L12.373 3 6.75 12.165l5.623 3.265 5.623-3.266zM18 13.212l-5.627 3.263-5.623-3.262 5.623 7.783L18 13.212z\", fill: \"#CDCDCD\" }),\n            React.createElement(\"g\", { opacity: \".497\" },\n                React.createElement(\"path\", { d: \"M12.373 3v6.652l5.623 2.513L12.374 3zm0 13.476v4.52L18 13.212l-5.627 3.264z\", fillOpacity: \".298\", fill: \"#000\" }),\n                React.createElement(\"path\", { fill: \"#525252\", d: \"M12.373 15.43l5.623-3.265-5.622-2.511z\" }),\n                React.createElement(\"path\", { fill: \"#ADADAD\", d: \"M6.75 12.165l5.623 3.265V9.654z\" }))))),\n    DAI: (React.createElement(\"svg\", { width: \"24\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fillRule: \"nonzero\", fill: \"none\" },\n            React.createElement(\"path\", { d: \"M12 0C5.371 0 0 5.371 0 12s5.371 12 12 12 12-5.371 12-12S18.629 0 12 0z\", fill: \"#CDCDCD\" }),\n            React.createElement(\"path\", { d: \"M18 10.245h-1.29C16.002 8.323 14.094 7 11.577 7H7.438v3.245H6v1.164h1.438v1.22H6v1.165h1.438V17h4.138c2.488 0 4.382-1.31 5.11-3.206H18V12.63h-1.025c.026-.205.036-.418.036-.63v-.028c0-.191-.01-.379-.029-.563H18v-1.164zM8.596 8.04h2.98c1.847 0 3.22.889 3.853 2.205H8.596V8.04zm2.98 7.916h-2.98v-2.162h6.826c-.641 1.295-2.006 2.162-3.846 2.162zm4.24-3.928c0 .206-.014.407-.043.602H8.596v-1.22h7.18c.026.19.04.388.04.59v.028z\", fill: \"#FFF\" })))),\n    unknownToken: (React.createElement(\"svg\", { width: \"24\", height: \"24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M11.942 23.885c6.596 0 11.943-5.347 11.943-11.943C23.885 5.347 18.538 0 11.942 0 5.347 0 0 5.347 0 11.942c0 6.596 5.347 11.943 11.942 11.943Z\", fill: \"#CDCDCD\" }),\n        React.createElement(\"path\", { d: \"M15.833 8.167a.572.572 0 0 0-.585-.138 10.257 10.257 0 0 1-6.496 0 .571.571 0 0 0-.723.723 10.256 10.256 0 0 1 0 6.496.571.571 0 0 0 .723.723 10.337 10.337 0 0 1 6.496 0 .571.571 0 0 0 .723-.723 10.257 10.257 0 0 1 0-6.496.572.572 0 0 0-.138-.585ZM12 14.305c-.874 0-1.749.099-2.601.297a11.393 11.393 0 0 0 0-5.203 11.391 11.391 0 0 0 5.202 0 11.394 11.394 0 0 0 0 5.203A11.498 11.498 0 0 0 12 14.305Z\", fill: \"#fff\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12 2.7c-5.042 0-9.3 4.222-9.3 9.3 0 5.042 4.222 9.3 9.3 9.3 5.042 0 9.3-4.222 9.3-9.3 0-5.042-4.222-9.3-9.3-9.3Zm0 17.113c-4.232 0-7.813-3.58-7.813-7.813 0-4.232 3.581-7.813 7.813-7.813 4.232 0 7.814 3.58 7.814 7.813 0 4.232-3.582 7.813-7.814 7.813ZM9.882 3.261A8.717 8.717 0 0 1 12 3c4.912 0 9 4.123 9 9 0 4.17-2.973 7.747-6.855 8.732C18.028 19.748 21 16.171 21 12c0-4.877-4.088-9-9-9-.726 0-1.436.09-2.118.261ZM12 20.113c-4.398 0-8.113-3.715-8.113-8.113 0-3.747 2.697-6.999 6.216-7.88-3.519.881-6.216 4.133-6.216 7.88 0 4.398 3.715 8.113 8.113 8.113Z\", fill: \"#fff\" }))),\n    console: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 23 20\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"#A3A3A3\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"path\", { d: \"M2.525 18.775a1.35 1.35 0 01-1.35-1.35V2.678a1.458 1.458 0 011.453-1.453h17.35a1.45 1.45 0 011.447 1.446v14.65a1.458 1.458 0 01-1.454 1.454H2.525zm18.9-13.5H1.175m10.8 6.75h4.05\" }),\n            React.createElement(\"path\", { d: \"M6.575 9.325l2.7 2.7-2.7 2.7\" })))),\n    copy: (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M23 5H13C11.6193 5 10.5 6.11929 10.5 7.5V8.5H9.5C8.11929 8.5 7 9.61929 7 11V24C7 25.3807 8.11929 26.5 9.5 26.5H19.5C20.8807 26.5 22 25.3807 22 24V23H23C24.3807 23 25.5 21.8807 25.5 20.5V7.5C25.5 6.11929 24.3807 5 23 5ZM20.5 23H13C11.6193 23 10.5 21.8807 10.5 20.5V10H9.5C8.94772 10 8.5 10.4477 8.5 11V24C8.5 24.5523 8.94772 25 9.5 25H19.5C20.0523 25 20.5 24.5523 20.5 24V23ZM12 7.5C12 6.94772 12.4477 6.5 13 6.5H23C23.5523 6.5 24 6.94772 24 7.5V20.5C24 21.0523 23.5523 21.5 23 21.5H13C12.4477 21.5 12 21.0523 12 20.5V7.5Z\", fill: \"currentColor\" }))),\n    alarmBell: (React.createElement(\"svg\", { viewBox: \"0 0 16 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { strokeWidth: \"1.5\", stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M6.444 17.917a1.623 1.623 0 003.115 0M8 3.333v-1.75M8 3.333a5.833 5.833 0 015.833 5.834c0 5.48 1.167 6.416 1.167 6.416H1s1.167-1.49 1.167-6.416A5.833 5.833 0 018 3.333z\" })))),\n    product: (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"defs\", null,\n            React.createElement(\"rect\", { id: \"a\", x: \"0\", y: \"0\", width: \"32\", height: \"32\", rx: \"4\" })),\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"mask\", { id: \"b\", fill: \"#fff\" },\n                React.createElement(\"use\", { xlinkHref: \"#a\" })),\n            React.createElement(\"use\", { fill: \"#97BAC0\", xlinkHref: \"#a\" }),\n            React.createElement(\"g\", { mask: \"url(#b)\", stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n                React.createElement(\"g\", { transform: \"translate(6 7)\" },\n                    React.createElement(\"rect\", { x: \".455\", y: \".227\", width: \"19.091\", height: \"17.727\", rx: \"1.5\" }),\n                    React.createElement(\"path\", { d: \"M.455 4.318h19.09\" }),\n                    React.createElement(\"rect\", { x: \"3.182\", y: \"8.045\", width: \"5.455\", height: \"4.545\", rx: \".75\" }),\n                    React.createElement(\"path\", { d: \"M11.818 13.5h5M11.818 8.045h5M11.818 10.773h5\" })))))),\n    stream: (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"defs\", null,\n            React.createElement(\"rect\", { id: \"a\", x: \"0\", y: \"0\", width: \"32\", height: \"32\", rx: \"4\" })),\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"use\", { fill: \"#97BAC0\", xlinkHref: \"#a\" }),\n            React.createElement(\"g\", { transform: \"translate(9 9)\", stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n                React.createElement(\"circle\", { cx: \"2.5\", cy: \"11.497\", r: \"2.25\" }),\n                React.createElement(\"path\", { d: \"M.205 5.126a6.807 6.807 0 018.4 9.36M.359.445a11.279 11.279 0 0113 14.08\" }))))),\n    clipboardPlus: (React.createElement(\"svg\", { viewBox: \"0 0 11 13\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M7.375 2.875H9.25a.75.75 0 01.75.75V11.5a.75.75 0 01-.75.75h-7.5A.75.75 0 011 11.5V3.625a.75.75 0 01.75-.75h1.875a1.875 1.875 0 113.75 0z\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M5.529 2.883a.187.187 0 11-.058.37.187.187 0 01.058-.37\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M3.5 7.5h4M5.5 5.5v4\" })))),\n    clipboardCheck: (React.createElement(\"svg\", { viewBox: \"0 0 11 13\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M7.375 2.875H9.25a.75.75 0 01.75.75V11.5a.75.75 0 01-.75.75h-7.5A.75.75 0 011 11.5V3.625a.75.75 0 01.75-.75h1.875a1.875 1.875 0 113.75 0z\" }),\n            React.createElement(\"path\", { d: \"M5.529 2.883a.187.187 0 11-.058.37.187.187 0 01.058-.37M7.612 6L4.816 8.796a.409.409 0 01-.579 0L3.3 7.858\" })))),\n    expand: (React.createElement(\"svg\", { width: \"25\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1)\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M5.25 17.998L0 23.248M22.5 6.748v-6h-6M0 17.248v6h6M22.5.748l-5.25 5.25M17.25 17.998l5.25 5.25M0 6.748v-6h6M22.5 17.248v6h-6M0 .748l5.25 5.25\" }),\n            React.createElement(\"rect\", { x: \"7.5\", y: \"8.248\", width: \"7.5\", height: \"7.5\", rx: \".75\" })))),\n    list: (React.createElement(\"svg\", { viewBox: \"0 0 20 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"rect\", { fill: \"none\", x: \".75\", y: \".75\", width: \"18.5\", height: \"18.5\", rx: \"1.25\", stroke: \"currentColor\", strokeWidth: \"1.5\" }),\n        React.createElement(\"path\", { stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", d: \"M5.75 4.979h8.5M5.75 7.479h5.167M5.75 9.979h8.5M5.75 12.479h5.167M5.75 14.979h8.5\" }))),\n    listInspect: (React.createElement(\"svg\", { viewBox: \"0 0 20 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M10.02 5.06h-4.5M7.77 8.04H5.52M5.52 11.02h2.632M5.52 13.998h2.563\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.59 6.923V3.474a2 2 0 00-2-2H3.38a2 2 0 00-2 2v12a2 2 0 002 2h4.866\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.072 16.9a3.451 3.451 0 100-6.903 3.451 3.451 0 000 6.902zM16.502 15.899L18.621 18\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    listSettings: (React.createElement(\"svg\", { viewBox: \"0 0 20 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { fill: \"none\", d: \"M10.02 5.06h-4.5M7.77 8.04H5.52M5.52 11.02h2.632M5.52 13.998h2.563\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.59 6.923V3.474a2 2 0 00-2-2H3.38a2 2 0 00-2 2v12a2 2 0 002 2h4.866\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.59 15.505a1 1 0 100-2.001 1 1 0 000 2.001z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M15.44 10.635l.294.969a.663.663 0 00.784.454l.982-.227a.894.894 0 01.85 1.48l-.688.74a.667.667 0 000 .91l.688.74a.893.893 0 01-.85 1.48l-.982-.227a.663.663 0 00-.784.454l-.294.966a.887.887 0 01-1.7 0l-.295-.97a.663.663 0 00-.784-.454l-.982.228a.893.893 0 01-.85-1.48l.687-.741a.667.667 0 000-.91l-.687-.74a.894.894 0 01.85-1.48l.982.227a.663.663 0 00.784-.454l.294-.97a.887.887 0 011.7.005z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    page: (React.createElement(\"svg\", { width: \"15\", height: \"18\", viewBox: \"0 0 15 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { id: \"page\", fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12.5 0H2.5C1.11929 0 0 1.11929 0 2.5V15.5C0 16.8807 1.11929 18 2.5 18H12.5C13.8807 18 15 16.8807 15 15.5V2.5C15 1.11929 13.8807 0 12.5 0ZM1.5 2.5C1.5 1.94772 1.94772 1.5 2.5 1.5H12.5C13.0523 1.5 13.5 1.94772 13.5 2.5V15.5C13.5 16.0523 13.0523 16.5 12.5 16.5H2.5C1.94772 16.5 1.5 16.0523 1.5 15.5V2.5ZM8.85748 4.56053C8.85748 4.97475 8.5217 5.31053 8.10748 5.31053H5.02067C4.60646 5.31053 4.27067 4.97474 4.27067 4.56053C4.27067 4.14632 4.60646 3.81053 5.02067 3.81053L8.10748 3.81053C8.5217 3.81053 8.85748 4.14632 8.85748 4.56053ZM8.02069 7.53983C8.02069 7.95404 7.6849 8.28983 7.27069 8.28983H5.02069C4.60648 8.28983 4.27069 7.95404 4.27069 7.53983C4.27069 7.12561 4.60648 6.78983 5.02069 6.78983H7.27069C7.6849 6.78983 8.02069 7.12561 8.02069 7.53983ZM5.02069 9.76912C4.60648 9.76912 4.27069 10.1049 4.27069 10.5191C4.27069 10.9333 4.60648 11.2691 5.02069 11.2691H8.78803C9.20225 11.2691 9.53803 10.9333 9.53803 10.5191C9.53803 10.1049 9.20225 9.76912 8.78803 9.76912H5.02069ZM8.33316 13.4984C8.33316 13.9126 7.99737 14.2484 7.58316 14.2484H5.02068C4.60647 14.2484 4.27068 13.9126 4.27068 13.4984C4.27068 13.0842 4.60647 12.7484 5.02068 12.7484H7.58316C7.99737 12.7484 8.33316 13.0842 8.33316 13.4984Z\", fill: \"currentColor\" }))),\n    fullScreen: (React.createElement(\"svg\", { width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { id: \"mingcute:fullscreen-line\", clipPath: \"url(#clip0_4518_586)\" },\n            React.createElement(\"g\", { id: \"Group\" },\n                React.createElement(\"path\", { id: \"Vector\", d: \"M4 15C4.26522 15 4.51957 15.1054 4.70711 15.2929C4.89464 15.4804 5 15.7348 5 16V19H8C8.26522 19 8.51957 19.1054 8.70711 19.2929C8.89464 19.4804 9 19.7348 9 20C9 20.2652 8.89464 20.5196 8.70711 20.7071C8.51957 20.8946 8.26522 21 8 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V16C3 15.7348 3.10536 15.4804 3.29289 15.2929C3.48043 15.1054 3.73478 15 4 15ZM20 15C20.2449 15 20.4813 15.09 20.6644 15.2527C20.8474 15.4155 20.9643 15.6397 20.993 15.883L21 16V19C21.0002 19.5046 20.8096 19.9906 20.4665 20.3605C20.1234 20.7305 19.6532 20.9572 19.15 20.995L19 21H16C15.7451 20.9997 15.5 20.9021 15.3146 20.7272C15.1293 20.5522 15.0178 20.313 15.0028 20.0586C14.9879 19.8042 15.0707 19.5536 15.2343 19.3582C15.3979 19.1627 15.6299 19.0371 15.883 19.007L16 19H19V16C19 15.7348 19.1054 15.4804 19.2929 15.2929C19.4804 15.1054 19.7348 15 20 15ZM19 3C19.5046 2.99984 19.9906 3.19041 20.3605 3.5335C20.7305 3.87659 20.9572 4.34684 20.995 4.85L21 5V8C20.9997 8.25488 20.9021 8.50003 20.7272 8.68537C20.5522 8.8707 20.313 8.98224 20.0586 8.99717C19.8042 9.01211 19.5536 8.92933 19.3582 8.76574C19.1627 8.60215 19.0371 8.3701 19.007 8.117L19 8V5H16C15.7451 4.99972 15.5 4.90212 15.3146 4.72715C15.1293 4.55218 15.0178 4.31305 15.0028 4.05861C14.9879 3.80416 15.0707 3.55362 15.2343 3.35817C15.3979 3.16271 15.6299 3.0371 15.883 3.007L16 3H19ZM8 3C8.25488 3.00028 8.50003 3.09788 8.68537 3.27285C8.8707 3.44782 8.98224 3.68695 8.99717 3.94139C9.01211 4.19584 8.92933 4.44638 8.76574 4.64183C8.60215 4.83729 8.3701 4.9629 8.117 4.993L8 5H5V8C4.99972 8.25488 4.90212 8.50003 4.72715 8.68537C4.55218 8.8707 4.31305 8.98224 4.05861 8.99717C3.80416 9.01211 3.55362 8.92933 3.35817 8.76574C3.16271 8.60215 3.0371 8.3701 3.007 8.117L3 8V5C2.99984 4.49542 3.19041 4.00943 3.5335 3.63945C3.87659 3.26947 4.34684 3.04284 4.85 3.005L5 3H8Z\", fill: \"currentColor\" }))),\n        React.createElement(\"defs\", null,\n            React.createElement(\"clipPath\", { id: \"clip0_4518_586\" },\n                React.createElement(\"rect\", { width: \"24\", height: \"24\", fill: \"white\" }))))),\n    externalLink: (React.createElement(\"svg\", { width: \"32\", height: \"32\", viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M22.0008 13.4286V10H18.5723\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M21.9994 10L14.2852 17.7143\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M15.5 12.5713H10.7857C10.3518 12.5713 10 12.9231 10 13.357V21.2141C10 21.6481 10.3518 21.9999 10.7857 21.9999H18.6429C19.0768 21.9999 19.4286 21.6481 19.4286 21.2141V16.4999\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    pencil: (React.createElement(\"svg\", { width: \"32\", height: \"32\", viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M22.3402 9.65976C22.1283 9.44871 21.8766 9.28175 21.5998 9.16852C21.3229 9.05528 21.0264 8.99803 20.7273 9.00005C20.4282 9.00208 20.1324 9.06334 19.8571 9.18031C19.5819 9.29728 19.3325 9.46764 19.1234 9.68154L10.1013 18.7036L9 23L13.2964 21.8981L22.3185 12.876C22.5324 12.667 22.7028 12.4177 22.8198 12.1424C22.9368 11.8672 22.9981 11.5715 23.0002 11.2724C23.0022 10.9733 22.9449 10.6768 22.8316 10.4C22.7184 10.1232 22.5513 9.87162 22.3402 9.65976V9.65976Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M18.8652 9.93994L22.0597 13.1344\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M10.1016 18.7031L13.2991 21.8951\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    pencilFull: (React.createElement(\"svg\", { width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M14.0833 5.43734L10.5417 1.93734L11.7083 0.770671C12.0278 0.451226 12.4203 0.291504 12.8858 0.291504C13.3508 0.291504 13.7431 0.451226 14.0625 0.770671L15.2292 1.93734C15.5486 2.25678 15.7153 2.64234 15.7292 3.094C15.7431 3.54511 15.5903 3.93039 15.2708 4.24984L14.0833 5.43734ZM1.33333 15.4998C1.09722 15.4998 0.899445 15.4198 0.74 15.2598C0.58 15.1004 0.5 14.9026 0.5 14.6665V12.3123C0.5 12.2012 0.520833 12.0937 0.5625 11.9898C0.604167 11.8854 0.666667 11.7915 0.75 11.7082L9.33333 3.12484L12.875 6.6665L4.29167 15.2498C4.20833 15.3332 4.11472 15.3957 4.01083 15.4373C3.90639 15.479 3.79861 15.4998 3.6875 15.4998H1.33333Z\", fill: \"currentColor\" }))),\n    eye: (React.createElement(\"svg\", { width: \"32\", height: \"32\", viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M15.9988 10.501C12.774 10.4466 9.43872 12.7002 7.34189 15.0082C7.1218 15.2526 7 15.5698 7 15.8986C7 16.2275 7.1218 16.5447 7.34189 16.789C9.39312 19.0483 12.7188 21.3539 15.9988 21.2987C19.2788 21.3539 22.6053 19.0483 24.6581 16.789C24.8782 16.5447 25 16.2275 25 15.8986C25 15.5698 24.8782 15.2526 24.6581 15.0082C22.5589 12.7002 19.2236 10.4466 15.9988 10.501Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M18.9981 15.9003C18.998 16.4936 18.8219 17.0735 18.4921 17.5668C18.1624 18.06 17.6938 18.4444 17.1456 18.6714C16.5974 18.8983 15.9942 18.9576 15.4123 18.8417C14.8304 18.7259 14.2959 18.4401 13.8765 18.0205C13.457 17.6009 13.1713 17.0664 13.0556 16.4844C12.9399 15.9025 12.9994 15.2993 13.2265 14.7512C13.4536 14.2031 13.8381 13.7346 14.3314 13.405C14.8248 13.0753 15.4048 12.8994 15.9981 12.8994C16.3922 12.8993 16.7824 12.9769 17.1465 13.1276C17.5105 13.2784 17.8413 13.4995 18.1199 13.7782C18.3986 14.0568 18.6195 14.3877 18.7702 14.7518C18.9209 15.1159 18.9983 15.5062 18.9981 15.9003Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    ellipse: (React.createElement(\"svg\", { width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"7\", stroke: \"currentColor\", strokeWidth: \"2\" }))),\n    email: (React.createElement(\"svg\", { width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { clipPath: \"url(#clip0_1889_4457)\" },\n            React.createElement(\"g\", { clipPath: \"url(#clip1_1889_4457)\" },\n                React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"currentColor\" }),\n                React.createElement(\"path\", { d: \"M3.33203 5.5013C3.33203 5.28029 3.43036 5.06833 3.6054 4.91205C3.78043 4.75577 4.01783 4.66797 4.26536 4.66797H11.732C11.9796 4.66797 12.217 4.75577 12.392 4.91205C12.567 5.06833 12.6654 5.28029 12.6654 5.5013V10.5013C12.6654 10.7223 12.567 10.9343 12.392 11.0906C12.217 11.2468 11.9796 11.3346 11.732 11.3346H4.26536C4.01783 11.3346 3.78043 11.2468 3.6054 11.0906C3.43036 10.9343 3.33203 10.7223 3.33203 10.5013V5.5013ZM4.97423 5.5013L7.9987 7.86422L11.0232 5.5013H4.9747H4.97423ZM11.732 6.05505L8.30623 8.73172C8.22113 8.79829 8.11184 8.83499 7.9987 8.83499C7.88555 8.83499 7.77626 8.79829 7.69116 8.73172L4.26536 6.05505V10.5013H11.732V6.05505Z\", fill: \"white\" }))),\n        React.createElement(\"defs\", null,\n            React.createElement(\"clipPath\", { id: \"clip0_1889_4457\" },\n                React.createElement(\"rect\", { width: \"16\", height: \"16\", fill: \"white\" })),\n            React.createElement(\"clipPath\", { id: \"clip1_1889_4457\" },\n                React.createElement(\"rect\", { width: \"16\", height: \"16\", fill: \"white\" }))))),\n    zoomOut: (React.createElement(\"svg\", { width: \"17\", height: \"16\", viewBox: \"0 0 17 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { id: \"iconamoon:zoom-out\" },\n            React.createElement(\"path\", { id: \"Vector\", d: \"M14.5 13.9999L11.6047 11.1046M11.6047 11.1046C12.0999 10.6093 12.4928 10.0213 12.7608 9.37426C13.0289 8.72717 13.1668 8.03363 13.1668 7.33323C13.1668 6.63283 13.0289 5.93928 12.7608 5.2922C12.4928 4.64511 12.0999 4.05715 11.6047 3.56189C11.1094 3.06663 10.5215 2.67377 9.87438 2.40574C9.22729 2.13771 8.53375 1.99976 7.83335 1.99976C7.13295 1.99976 6.4394 2.13771 5.79232 2.40574C5.14523 2.67377 4.55727 3.06663 4.06202 3.56189C3.0618 4.56211 2.49988 5.9187 2.49988 7.33323C2.49988 8.74775 3.0618 10.1043 4.06202 11.1046C5.06224 12.1048 6.41882 12.6667 7.83335 12.6667C9.24787 12.6667 10.6045 12.1048 11.6047 11.1046ZM5.83335 7.33323H9.83335\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })))),\n    zoomIn: (React.createElement(\"svg\", { width: \"17\", height: \"16\", viewBox: \"0 0 17 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { id: \"lucide:zoom-in\" },\n            React.createElement(\"g\", { id: \"Group\" },\n                React.createElement(\"path\", { id: \"Vector\", d: \"M7.83333 12.6667C10.7789 12.6667 13.1667 10.2789 13.1667 7.33333C13.1667 4.38781 10.7789 2 7.83333 2C4.88781 2 2.5 4.38781 2.5 7.33333C2.5 10.2789 4.88781 12.6667 7.83333 12.6667Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                React.createElement(\"path\", { id: \"Vector_2\", d: \"M14.5 13.9999L11.6 11.0999M7.83331 5.33325V9.33325M5.83331 7.33325H9.83331\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))))),\n    faders: (React.createElement(\"svg\", { width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M10 9.375v7.5M10 3.125v3.75M15.625 15.625v1.25M15.625 3.125v10M17.5 13.125h-3.75M4.375 13.125v3.75M4.375 3.125v7.5M2.5 10.625h3.75M11.875 6.875h-3.75\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    github: React.createElement(SocialIcons.GitHub, null),\n    medium: React.createElement(SocialIcons.Medium, null),\n    peepeth: React.createElement(SocialIcons.Peepeth, null),\n    reddit: React.createElement(SocialIcons.Reddit, null),\n    telegram: React.createElement(SocialIcons.Telegram, null),\n    trello: React.createElement(SocialIcons.Trello, null),\n    twitter: React.createElement(SocialIcons.Twitter, null),\n    youtube: React.createElement(SocialIcons.Youtube, null),\n    linkedin: React.createElement(SocialIcons.LinkedIn, null),\n    instagram: React.createElement(SocialIcons.Instagram, null),\n    facebook: React.createElement(SocialIcons.Facebook, null),\n    web: React.createElement(SocialIcons.Web, null),\n    xCom: React.createElement(SocialIcons.X, null),\n};\nconst SvgIcon = React.forwardRef(({ name, ...props }, ref) => React.cloneElement(sources[name], { ...props, ref }));\nSvgIcon.displayName = 'SvgIcon';\nexport default SvgIcon;\nexport const SvgIconNames = Object.keys(sources).sort();\n","import { z } from 'zod';\nexport const RejectionReason = {\n    CloseButton: Symbol('close button'),\n    Backdrop: Symbol('backdrop'),\n    EscapeKey: Symbol('escape key'),\n    CancelButton: Symbol('cancel'),\n    BackButton: Symbol('back button'),\n};\nexport function isRejectionReason(value) {\n    return (value === RejectionReason.CloseButton ||\n        value === RejectionReason.Backdrop ||\n        value === RejectionReason.EscapeKey ||\n        value === RejectionReason.CancelButton ||\n        value === RejectionReason.BackButton);\n}\nconst CodedError = z.object({\n    code: z.number(),\n});\nexport function isCodedError(e) {\n    return CodedError.safeParse(e).success;\n}\nconst ObjectWithMessage = z.object({\n    message: z.string(),\n});\nexport function isMessagedObject(e) {\n    return ObjectWithMessage.safeParse(e).success;\n}\nexport function isTransactionRejection(e) {\n    return ((isCodedError(e) && e.code === 4001) ||\n        (isMessagedObject(e) && /action_rejected/i.test(e.message)));\n}\n","import React, { useEffect, useReducer, useRef } from 'react';\nimport styled, { createGlobalStyle, css, keyframes } from 'styled-components';\nimport { useDiscardableEffect } from 'toasterhea';\nimport gsap from 'gsap';\nimport { TABLET } from '~/shared/utils/styled';\nimport { RejectionReason } from '~/utils/exceptions';\nconst bringIn = keyframes `\n    from {\n        opacity: 0;\n        transform: translateY(1%) translateZ(0) scale(0.98);\n    }\n    to {\n        opacity: 1;\n        transform: translateZ(0) scale(1) translateY(0);\n    }\n`;\nconst bringOut = keyframes `\n    from {\n        transform: translateZ(0) scale(1) translateY(0);\n    }\n    to {\n        transform: translateY(1%) translateZ(0) scale(0.98);\n    }\n`;\nconst fadeAway = keyframes `\n    from {\n        opacity: 1;\n    }\n    to {\n        opacity: 0;\n    }\n`;\nexport default function BaseModal({ children, darkBackdrop, onBeforeAbort, onReject, onResolve: _, ...props }) {\n    const [dismissed, dismiss] = useReducer(() => true, false);\n    const rootRef = useRef(null);\n    useDiscardableEffect((discard) => {\n        const { current: root } = rootRef;\n        root?.addEventListener('animationend', ({ animationName }) => {\n            if (animationName === fadeAway.getName()) {\n                discard();\n            }\n        });\n        dismiss();\n    });\n    const wigglyRef = useRef(null);\n    const tweenRef = useRef();\n    function wiggle() {\n        tweenRef.current?.kill();\n        tweenRef.current = gsap.to({}, {\n            duration: 0.75,\n            onUpdate() {\n                const { current: wiggly } = wigglyRef;\n                if (!wiggly) {\n                    return;\n                }\n                const p = this.progress();\n                const intensity = (1 + Math.sin((p * 2 - 0.5) * Math.PI)) * 0.5;\n                const wave = 5 * Math.sin(6 * p * Math.PI);\n                wiggly.style.transform = `rotate(${intensity * wave}deg)`;\n            },\n        });\n    }\n    function close(reason) {\n        const beforeAbort = onBeforeAbort?.(reason);\n        if (beforeAbort === false) {\n            wiggle();\n        }\n        if (beforeAbort === null || beforeAbort === false) {\n            return;\n        }\n        onReject?.(reason);\n    }\n    const closeRef = useRef(close);\n    closeRef.current = close;\n    useEffect(() => {\n        function onKeyDown({ key }) {\n            if (key === 'Escape') {\n                closeRef.current(RejectionReason.EscapeKey);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, []);\n    return (React.createElement(Root, { ref: rootRef, \"$dismissed\": dismissed, \"$dark\": darkBackdrop, ...props },\n        React.createElement(NoScrollStyles, null),\n        React.createElement(Backdrop, { onMouseDown: () => void close(RejectionReason.Backdrop) }),\n        React.createElement(OuterWrap, null,\n            React.createElement(InnerWrap, null,\n                React.createElement(Pad, null,\n                    React.createElement(Interactive, null,\n                        React.createElement(AnimatedWrap, { \"$dismissed\": dismissed },\n                            React.createElement(Wigglable, { ref: wigglyRef }, typeof children === 'function'\n                                ? children(close)\n                                : children))))))));\n}\nconst NoScrollStyles = createGlobalStyle `\n    body {\n        overflow: hidden !important;\n        overflow-y: hidden !important;\n        overflow-x: hidden !important;\n    }\n`;\nconst AnimatedWrap = styled.div.withConfig({ displayName: \"AnimatedWrap\", componentId: \"sc-1we8sni\" }) `\n    animation: 300ms ${({ $dismissed = false }) => ($dismissed ? bringOut : bringIn)}\n        ease-in-out 1;\n    animation-fill-mode: both;\n    backface-visibility: hidden;\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-q8xzs3\" }) `\n    backdrop-filter: blur(8px);\n    background-color: rgba(255, 255, 255, 0.9);\n    height: 100%;\n    left: 0;\n    line-height: 24px;\n    overflow: auto;\n    position: fixed;\n    top: 0;\n    transform: translate3d(0, 0, 0);\n    width: 100%;\n    z-index: 1;\n\n    ${({ $dismissed = false }) => $dismissed &&\n    css `\n            animation: 300ms ${fadeAway} ease-in-out 1;\n            animation-fill-mode: both;\n        `}\n\n    ${({ $dark = false }) => $dark &&\n    css `\n            background-color: rgba(50, 50, 50, 0.5);\n        `}\n`;\nconst Backdrop = styled.div.withConfig({ displayName: \"Backdrop\", componentId: \"sc-5mc9iw\" }) `\n    position: fixed;\n    width: 100%;\n    height: 100%;\n`;\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-1p8mcx5\" }) `\n    align-items: center;\n    color: #323232;\n    display: flex;\n    height: 100%;\n    justify-content: center;\n    pointer-events: none;\n    position: relative;\n`;\nconst InnerWrap = styled.div.withConfig({ displayName: \"InnerWrap\", componentId: \"sc-1qr84ko\" }) `\n    max-height: 100%;\n    overflow: visible;\n`;\nconst Pad = styled.div.withConfig({ displayName: \"Pad\", componentId: \"sc-197oo3a\" }) `\n    padding-top: 40px;\n    padding-bottom: 40px;\n    padding-top: 64px;\n    padding-bottom: 64px;\n`;\nconst Interactive = styled.div.withConfig({ displayName: \"Interactive\", componentId: \"sc-100g7sv\" }) `\n    max-width: 90vw;\n    min-width: 12rem;\n    pointer-events: auto;\n    width: max-content;\n`;\nconst Wigglable = styled.div.withConfig({ displayName: \"Wigglable\", componentId: \"sc-wq793j\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    min-height: 160px;\n`;\nexport const Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-o56xd4\" }) `\n    align-items: center;\n    display: flex;\n    height: 80px;\n    padding: 0 40px;\n    width: 100%;\n\n    ${({ $borderless = false }) => !$borderless &&\n    css `\n            border-top: 1px solid #f3f3f3;\n        `}\n\n    ${({ $spacious = false }) => $spacious &&\n    css `\n            @media ${TABLET} {\n                height: 120px;\n            }\n        `}\n\n    ${({ $autoHeight = false }) => $autoHeight &&\n    css `\n            height: auto !important;\n        `}\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS, SANS } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { RejectionReason } from '~/utils/exceptions';\nimport BaseModal from './BaseModal';\n/**\n * `BaseModal` with left-aligned title bar and a close button.\n */\nexport default function LightModal({ children, title = 'Untitled modal', ...props }) {\n    return (React.createElement(BaseModal, { ...props }, (close) => (React.createElement(Root, null,\n        React.createElement(Head, null,\n            React.createElement(Title, null, title),\n            React.createElement(CloseButton, { type: \"button\", onClick: () => void close(RejectionReason.CloseButton) },\n                React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n        React.createElement(Content, null, typeof children === 'function' ? children(close) : children)))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1xqz3vu\" }) `\n    max-width: 560px;\n    width: 90vw;\n    padding: 40px;\n    display: grid;\n    grid-template-rows: auto auto;\n    gap: 24px;\n`;\nconst Head = styled.div.withConfig({ displayName: \"Head\", componentId: \"sc-16xfdfh\" }) `\n    display: flex;\n    font-family: ${SANS};\n    font-size: 20px;\n    font-weight: normal;\n    line-height: 32px;\n    margin: 0;\n    position: relative;\n    text-align: left;\n    width: 100%;\n    align-items: center;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-1f9439v\" }) `\n    flex-grow: 1;\n    color: ${COLORS.primary};\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-1cojb88\" }) `\n    font-size: 16px;\n    font-weight: 400;\n    line-height: 24px;\n    color: ${COLORS.primaryLight};\n`;\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-6okpin\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 0.5rem;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n\n    &:disabled {\n        opacity: 0.2;\n        cursor: not-allowed;\n    }\n\n    & > svg {\n        width: 14px;\n        height: 14px;\n    }\n`;\n","export const Layer = {\n    Modal: 'modals',\n    Toast: 'toasts',\n};\n","export const MaxSearchPhraseLength = 250;\nexport const address0 = '0x0000000000000000000000000000000000000000';\nexport const StreamGptApiUrl = process.env.STREAM_GPT_API_URL;\n/**\n * A minute in milliseconds.\n */\nexport const Minute = 60000;\nexport const DayInSeconds = 86400;\nexport const defaultChainKey = 'polygon';\n","export default function formatConfigUrl(url, options = {}) {\n    const { protocol = 'http' } = options;\n    const dockerHost = process.env.STREAMR_DOCKER_DEV_HOST || options.dockerHost;\n    // Config contains references to local docker environment (10.200.10.1).\n    // Make sure we are compatible with other docker hosts as well.\n    if (url.includes('10.200.10.1') && dockerHost != null) {\n        url = url.replace('10.200.10.1', dockerHost);\n    }\n    return url && !/^[:/]/.test(url) ? url : `${protocol}://${dockerHost}${url}`;\n}\n","import { produce } from 'immer';\nimport { isAddress } from 'web3-validator';\nimport { z } from 'zod';\nimport config from '~/config/chains.toml';\nimport formatConfigUrl from '~/utils/formatConfigUrl';\nconst ChainConfigExtension = z.object({\n    coingeckoNetworkId: z.string().optional(),\n    dataUnionJoinServerUrl: z.string().optional(),\n    dataunionGraphNames: z\n        .array(z.object({\n        chainId: z.number(),\n        name: z.string(),\n    }))\n        .optional()\n        .default([]),\n    displayName: z.string().optional(),\n    dockerHost: z.string().optional(),\n    marketplaceChains: z.array(z.string()).optional().default([]),\n    networkSubgraphUrl: z.string().optional(),\n    slug: z.string().optional(),\n    sponsorshipPaymentToken: z.string().optional().default('DATA'),\n    storageNodes: z\n        .array(z.object({\n        name: z.string(),\n        address: z.string().refine(isAddress, 'Invalid storage node address'),\n        thirdPartyUrl: z.string().optional(),\n    }))\n        .optional()\n        .default([]),\n    streamIndexerUrl: z.string().optional(),\n});\nexport const fallbackChainConfigExtension = ChainConfigExtension.parse({});\nexport const parsedChainConfigExtension = z\n    .record(z.string(), z.union([ChainConfigExtension, z.undefined()]))\n    .transform((value) => produce(value, (draft) => {\n    Object.values(draft).forEach(function dockerizeUrls(extension) {\n        if (!extension) {\n            return;\n        }\n        const { dataUnionJoinServerUrl, dockerHost, networkSubgraphUrl, streamIndexerUrl, } = extension;\n        if (networkSubgraphUrl) {\n            extension.networkSubgraphUrl = formatConfigUrl(networkSubgraphUrl, {\n                dockerHost,\n            });\n        }\n        if (typeof dataUnionJoinServerUrl === 'string') {\n            extension.dataUnionJoinServerUrl = formatConfigUrl(dataUnionJoinServerUrl, {\n                dockerHost,\n            });\n        }\n        if (typeof streamIndexerUrl === 'string') {\n            extension.streamIndexerUrl = formatConfigUrl(streamIndexerUrl, {\n                dockerHost,\n            });\n        }\n    });\n}))\n    .parse(config);\n","import { config as configs } from '@streamr/config';\nimport { produce } from 'immer';\nimport { useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { defaultChainKey } from '~/consts';\nimport { fallbackChainConfigExtension, parsedChainConfigExtension, } from '~/utils/chainConfigExtension';\nimport formatConfigUrl from './formatConfigUrl';\nconst lowerCasedChainKeyToChainKeyMap = {};\n/**\n * @param candidate Chain key or chain slug (from config extension) or chain number. Defaults\n * to the default chain key (currently 'polygon').\n */\nexport function getChainKey(candidate) {\n    const key = typeof candidate === 'number' ? candidate : candidate.toLowerCase();\n    if (lowerCasedChainKeyToChainKeyMap[key] === null) {\n        return defaultChainKey;\n    }\n    if (lowerCasedChainKeyToChainKeyMap[key]) {\n        return lowerCasedChainKeyToChainKeyMap[key];\n    }\n    for (const chainKey in configs) {\n        if (!isChainKey(chainKey)) {\n            continue;\n        }\n        if (typeof key === 'number') {\n            if (configs[chainKey].id === key) {\n                lowerCasedChainKeyToChainKeyMap[key] = chainKey;\n                return chainKey;\n            }\n            continue;\n        }\n        if (chainKey.toLowerCase() === key) {\n            lowerCasedChainKeyToChainKeyMap[key] = chainKey;\n            return chainKey;\n        }\n        const slug = parsedChainConfigExtension[chainKey]?.slug?.toLowerCase();\n        if (key === slug) {\n            lowerCasedChainKeyToChainKeyMap[key] = chainKey;\n            return chainKey;\n        }\n    }\n    console.warn(`Could not find a proper chain key for \"${candidate}\". Using default key (${defaultChainKey}).`);\n    lowerCasedChainKeyToChainKeyMap[key] = null;\n    return defaultChainKey;\n}\nexport function getCurrentChain() {\n    return getChainConfig(new URLSearchParams(window.location.search).get('chain') || defaultChainKey);\n}\nexport function getCurrentChainId() {\n    return getCurrentChain().id;\n}\nexport function useCurrentChain() {\n    const chainName = useSearchParams()[0].get('chain') || defaultChainKey;\n    return useMemo(() => getChainConfig(chainName), [chainName]);\n}\nexport function useCurrentChainId() {\n    return useCurrentChain().id;\n}\nexport function useCurrentChainKey() {\n    return getChainKey(useCurrentChainId());\n}\n/**\n * @todo rename to `useCurrentFullChainName`.\n */\nexport function useCurrentChainFullName() {\n    return getChainDisplayName(useCurrentChainId());\n}\nconst chainKeyToChainEntryMap = {};\nfunction getChainEntry(chainKey) {\n    if (chainKeyToChainEntryMap[chainKey]) {\n        return chainKeyToChainEntryMap[chainKey];\n    }\n    const config = configs[chainKey];\n    const configExtension = parsedChainConfigExtension[chainKey] || fallbackChainConfigExtension;\n    const { dockerHost } = configExtension;\n    const sanitizedConfig = produce(config, (draft) => {\n        for (const rpc of draft.rpcEndpoints) {\n            rpc.url = formatConfigUrl(rpc.url, {\n                dockerHost,\n            });\n        }\n        if (draft.entryPoints) {\n            for (const entrypoint of draft.entryPoints) {\n                entrypoint.websocket.host = formatConfigUrl(entrypoint.websocket.host, {\n                    dockerHost,\n                });\n            }\n        }\n        if (draft.theGraphUrl) {\n            draft.theGraphUrl = formatConfigUrl(draft.theGraphUrl, { dockerHost });\n        }\n    });\n    const entry = {\n        chainKey,\n        config: sanitizedConfig,\n        configExtension,\n    };\n    chainKeyToChainEntryMap[chainKey] = entry;\n    return entry;\n}\nexport function getChainConfig(chainIdOrChainKey) {\n    return getChainEntry(getChainKey(chainIdOrChainKey)).config;\n}\nexport function getChainConfigExtension(chainId) {\n    return getChainEntry(getChainKey(chainId)).configExtension;\n}\nexport function getChainSlug(chainIdOrChainKey) {\n    const chainEntry = getChainEntry(getChainKey(chainIdOrChainKey));\n    return chainEntry.configExtension.slug || chainEntry.chainKey;\n}\n/**\n * Checks if a given string is a `ChainKey`.\n * @param candidate Any string.\n * @returns `true` if the given string is config's own key.\n */\nexport function isChainKey(candidate) {\n    return Object.prototype.hasOwnProperty.call(configs, candidate);\n}\nexport function isKnownChainId(candidate) {\n    return Object.entries(configs).some(([, { id }]) => id === candidate);\n}\nexport function getChainDisplayName(chainIdOrChainKey) {\n    const { config, configExtension } = getChainEntry(getChainKey(chainIdOrChainKey));\n    return configExtension.displayName || config.name;\n}\nexport function getMarketplaceChainConfigs(chainIdOrChainKey) {\n    const marketplaceChainKeys = getChainEntry(getChainKey(chainIdOrChainKey))\n        .configExtension.marketplaceChains;\n    const result = [];\n    for (const key of marketplaceChainKeys) {\n        if (isChainKey(key)) {\n            result.push(getChainConfig(key));\n        }\n    }\n    return result;\n}\nexport function getCoingeckoNetworkId(chainIdOrChainKey) {\n    const { config, configExtension } = getChainEntry(getChainKey(chainIdOrChainKey));\n    return configExtension.coingeckoNetworkId || config.name;\n}\n","import queryString from 'query-string';\nimport { defaultChainKey } from '~/consts';\nimport { getChainSlug } from './chains';\nexport function routeOptions(chainIdOrChainKey, search = {}, hash = '') {\n    return {\n        search: {\n            ...search,\n            chain: getChainSlug(chainIdOrChainKey),\n        },\n        hash,\n    };\n}\nfunction withSuffix(pathname, options = {}) {\n    const { hash = '' } = options;\n    const { chain, ...search } = options.search || {};\n    const qs = options.search\n        ? queryString.stringify(chain === defaultChainKey\n            ? search\n            : {\n                ...search,\n                chain,\n            })\n        : '';\n    return `${pathname}${qs && `?${qs}`}${hash && `#${hash}`}`;\n}\nfunction encode(uriComponent) {\n    if (/:\\w+/.test(uriComponent)) {\n        return uriComponent;\n    }\n    return encodeURIComponent(uriComponent);\n}\nexport const Route = {\n    allowanceInfo() {\n        return 'https://tokenallowance.io';\n    },\n    blog() {\n        return 'https://blog.streamr.network/';\n    },\n    contactGeneral() {\n        return 'mailto:contact@streamr.com';\n    },\n    contactJobs() {\n        return 'mailto:jobs@streamr.com';\n    },\n    contactLabs() {\n        return 'mailto:labs@streamr.com';\n    },\n    contactMedia() {\n        return 'mailto:media@streamr.com';\n    },\n    createOperator(options) {\n        return withSuffix('/hub/network/operators/new', options);\n    },\n    docs(pathname) {\n        return `https://docs.streamr.network${(pathname ?? '/')}`;\n    },\n    error(options) {\n        return withSuffix('/error', options);\n    },\n    giveFeedback() {\n        return 'https://github.com/streamr-dev/streamr-platform/issues';\n    },\n    hub(options) {\n        return withSuffix('/hub', options);\n    },\n    network(options) {\n        return withSuffix('/hub/network', options);\n    },\n    networkExplorer() {\n        return 'https://streamr.network/network-explorer';\n    },\n    networkOverview(options) {\n        return withSuffix('/hub/network/overview', options);\n    },\n    operator(id, options) {\n        return withSuffix(`/hub/network/operators/${encode(id)}`, options);\n    },\n    operators(options) {\n        return withSuffix('/hub/network/operators', options);\n    },\n    privacyPolicy() {\n        return 'https://s3.amazonaws.com/streamr-public/streamr-privacy-policy.pdf';\n    },\n    project(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}`, options);\n    },\n    projectConnect(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/connect`, options);\n    },\n    projectEdit(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/edit`, options);\n    },\n    projectLiveData(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/live-data`, options);\n    },\n    projectOverview(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/overview`, options);\n    },\n    projects(options) {\n        return withSuffix('/hub/projects', options);\n    },\n    publisherTerms() {\n        return 'https://s3.amazonaws.com/streamr-public/streamr-data-provider-agreement.pdf';\n    },\n    resetAllowanceInfo() {\n        return 'https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729';\n    },\n    root() {\n        return '/';\n    },\n    siteAbout() {\n        return '/about';\n    },\n    siteDataToken() {\n        return '/discover/data-token';\n    },\n    siteDataUnions() {\n        return '/discover/data-unions';\n    },\n    siteDesign() {\n        return '/design';\n    },\n    siteEcosystem() {\n        return '/ecosystem';\n    },\n    siteFund() {\n        return '/fund';\n    },\n    siteMarketplace() {\n        return '/discover/marketplace';\n    },\n    siteNetwork() {\n        return '/discover/network';\n    },\n    sitePapers() {\n        return '/papers';\n    },\n    siteRoadmap() {\n        return '/roadmap';\n    },\n    siteTokenMigration() {\n        return '/token-migration';\n    },\n    stream(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}`, options);\n    },\n    streamConnect(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}/connect`, options);\n    },\n    streamLiveData(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}/live-data`, options);\n    },\n    streamOverview(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}/overview`, options);\n    },\n    streams(options) {\n        return withSuffix(`/hub/streams`, options);\n    },\n    sponsorship(id, options) {\n        return withSuffix(`/hub/network/sponsorships/${encode(id)}`, options);\n    },\n    sponsorships(options) {\n        return withSuffix('/hub/network/sponsorships', options);\n    },\n    tos() {\n        return 'https://s3.amazonaws.com/streamr-public/streamr-terms-of-use.pdf';\n    },\n};\n","import React from 'react';\nimport { useLocation } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport LightModal from '~/modals/LightModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { Layer } from '~/utils/Layer';\nimport { Route as R } from '~/utils/routes';\nexport const DisclaimerBar = () => {\n    const { pathname } = useLocation();\n    // Show disclaimer only for Overview, Sponsorships, Sponsorship, Operators, Operator pages\n    if (!pathname.includes(R.network())) {\n        return null;\n    }\n    return (React.createElement(Root, null,\n        React.createElement(SvgIcon, { name: \"infoBadge\" }),\n        React.createElement(\"div\", null,\n            \"Smart contracts enable sponsorship, staking, and delegation \\u2014 your capital is at risk.\",\n            ' ',\n            React.createElement(\"a\", { href: R.docs('/guides/how-to-stake-and-earn'), target: \"_blank\", rel: \"noopener noreferrer\", onClick: async (e) => {\n                    e.preventDefault();\n                    try {\n                        await toaster(LightModal, Layer.Modal).pop({\n                            title: 'Disclaimer',\n                            children: (React.createElement(\"p\", null,\n                                \"Streamr\\u2019s operator, sponsorship, staking, and delegation smart contracts carry inherent risks. Do your own research and participate at your own risk \\u2014 funds may be irreversibly lost. Always stay cautious and never share your private key. There is no support desk, so beware of scammers pretending to offer help or asking you to use apps that could drain your wallet.\",\n                                ' ',\n                                React.createElement(\"a\", { href: R.docs('/guides/how-to-stake-and-earn'), target: \"_blank\", rel: \"noopener noreferrer\" }, \"Learn more\"),\n                                \".\")),\n                        });\n                    }\n                    catch (_) { }\n                } }, \"Learn more\"),\n            \".\")));\n};\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-xkkmn2\" }) `\n    display: grid;\n    grid-template-columns: auto auto;\n    width: 100%;\n    padding: 12px 72px 12px 40px;\n    align-items: center;\n    justify-content: left;\n    color: white;\n    background: #323232;\n    font-size: 14px;\n    font-weight: 400;\n    line-height: normal;\n\n    padding: 12px 72px 12px 24px;\n\n    @media (${TABLET}) {\n        padding: 12px 72px 12px 24px;\n    }\n\n    @media (${DESKTOP}) {\n        padding: 12px 72px 12px 40px;\n    }\n\n    // Make it stick to top\n    position: sticky;\n    top: 0;\n    z-index: 1000;\n\n    & > svg {\n        width: 16px;\n        height: 16px;\n        margin-right: 8px;\n        & circle {\n            fill: #525252;\n        }\n    }\n\n    & a {\n        color: inherit !important;\n        text-decoration: underline !important;\n    }\n`;\n","import { FooterColumn, SocialChannels, FooterColumns as UnstyledFooterColumns, Footer as UnstyledLayoutFooter, MadeBy as UnstyledMadeBy, } from '@streamr/streamr-layout';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst MadeBy = styled(UnstyledMadeBy).withConfig({ displayName: \"MadeBy\", componentId: \"sc-1i53sas\" }) `\n    padding: 0 0 32px;\n    text-align: center;\n\n    @media (min-width: 1200px) {\n        padding: 32px 0;\n        text-align: left;\n    }\n`;\nconst LayoutFooter = styled(UnstyledLayoutFooter).withConfig({ displayName: \"LayoutFooter\", componentId: \"sc-1vn5rs0\" }) `\n    background-color: ${COLORS.secondary};\n`;\nconst FooterColumns = styled(UnstyledFooterColumns).withConfig({ displayName: \"FooterColumns\", componentId: \"sc-16fbn9y\" }) `\n    border-top: ${({ separate = false }) => (separate ? '1px' : '0')} solid #d8d8d8;\n`;\nconst Footer = ({ topBorder = false }) => {\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(LayoutFooter, null,\n        React.createElement(FooterColumns, { separate: topBorder },\n            React.createElement(FooterColumn, { title: \"Discover\" },\n                React.createElement(\"a\", { href: R.root() }, \"Top\"),\n                React.createElement(\"a\", { href: R.siteDataToken() }, \"DATA Token\"),\n                React.createElement(\"a\", { href: R.siteDataUnions() }, \"Data Unions\"),\n                React.createElement(\"a\", { href: R.siteMarketplace() }, \"Marketplace\"),\n                React.createElement(\"a\", { href: R.siteNetwork() }, \"Network\")),\n            React.createElement(FooterColumn, { title: \"Project\" },\n                React.createElement(\"a\", { href: R.siteAbout() }, \"About\"),\n                React.createElement(\"a\", { href: R.siteRoadmap() }, \"Roadmap\"),\n                React.createElement(\"a\", { href: R.siteEcosystem() }, \"Ecosystem\"),\n                React.createElement(\"a\", { href: R.sitePapers() }, \"Papers\"),\n                React.createElement(\"a\", { href: R.blog() }, \"Blog\")),\n            React.createElement(FooterColumn, { title: \"Developers\" },\n                React.createElement(\"a\", { href: R.docs() }, \"Docs\"),\n                React.createElement(\"a\", { href: R.siteFund() }, \"Data Fund\"),\n                React.createElement(\"a\", { href: R.siteDesign() }, \"Design Assets\")),\n            React.createElement(FooterColumn, { title: \"Apps\" },\n                React.createElement(\"a\", { href: R.networkExplorer() }, \"Network Explorer\"),\n                React.createElement(\"a\", { href: R.hub(routeOptions(chainKey)) }, \"Hub\")),\n            React.createElement(FooterColumn, { title: \"Contact\" },\n                React.createElement(\"a\", { href: R.contactGeneral() }, \"General\"),\n                React.createElement(\"a\", { href: R.contactMedia() }, \"Media\"),\n                React.createElement(\"a\", { href: R.contactJobs() }, \"Jobs\"),\n                React.createElement(\"a\", { href: R.contactLabs() }, \"Business\")),\n            React.createElement(FooterColumn, { title: \"Legal\" },\n                React.createElement(\"a\", { href: R.tos() }, \"Terms & Conditions\"),\n                React.createElement(\"a\", { href: R.privacyPolicy() }, \"Privacy\"))),\n        React.createElement(SocialChannels, null),\n        React.createElement(MadeBy, null)));\n};\nexport default Footer;\n","import React from 'react';\nimport { Helmet as ReactHelmet } from 'react-helmet';\nconst PosterUrl = 'https://streamr.network/resources/social/marketplace.png';\nexport default function Helmet({ description = 'Discover, create and consume data streams on the Streamr Hub', title, otherTags, ...props }) {\n    return (React.createElement(ReactHelmet, { ...props, title: [title, 'Streamr Hub'].filter(Boolean).join(' | ') },\n        React.createElement(\"meta\", { name: \"description\", content: description }),\n        React.createElement(\"meta\", { property: \"og:title\", content: title }),\n        React.createElement(\"meta\", { property: \"og:description\", content: description }),\n        React.createElement(\"meta\", { property: \"og:image\", content: PosterUrl }),\n        React.createElement(\"meta\", { name: \"twitter:card\", content: \"summary_large_image\" }),\n        React.createElement(\"meta\", { name: \"twitter:title\", content: title }),\n        React.createElement(\"meta\", { name: \"twitter:description\", content: description }),\n        React.createElement(\"meta\", { name: \"twitter:image\", content: PosterUrl }),\n        otherTags));\n}\nexport function NetworkHelmet({ description = 'Operate your Streamr nodes. Create, join and delegate to stream Sponsorships.', otherTags = React.createElement(\"meta\", { name: \"robots\", content: \"noindex\" }), ...props }) {\n    return React.createElement(Helmet, { ...props, description: description, otherTags: otherTags });\n}\n","import React, { useRef, useSyncExternalStore } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled from 'styled-components';\n/**\n * Mounts given function component inside `#hub-anchors` (see `index.html`) and passes\n * wrapped element's coordinates to it.\n */\nexport function Anchor({ indicateOrigin = false, translate, component: Component, componentProps, children, display, ...props }) {\n    const ref = useRef(null);\n    const [x, y] = useBoundingClientRect(ref, (rect) => translate?.(rect) || [0, 0]);\n    return (React.createElement(Root, { ...props, ref: ref, \"$display\": display },\n        children,\n        createPortal(React.createElement(Component, { x: x, y: y, ...componentProps }), document.getElementById('hub-anchors')),\n        indicateOrigin &&\n            createPortal(React.createElement(OriginIndicator, { x: x, y: y }), document.getElementById('hub-anchors'))));\n}\nfunction resizeSubscribe(cb) {\n    window.addEventListener('resize', cb);\n    window.addEventListener('scroll', cb);\n    return () => {\n        window.removeEventListener('resize', cb);\n        window.removeEventListener('scroll', cb);\n    };\n}\nfunction OriginIndicator({ x, y }) {\n    return (React.createElement(Point, { style: {\n            transform: `translate(-50%, -50%) translate(${x}px, ${y}px)`,\n        } }));\n}\nconst Point = styled.div.withConfig({ displayName: \"Point\", componentId: \"sc-192pfex\" }) `\n    background: red;\n    border-radius: 50%;\n    height: 10px;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 10px;\n    z-index: 19999;\n`;\nexport function useBoundingClientRect(ref, translate) {\n    return JSON.parse(useSyncExternalStore(resizeSubscribe, () => JSON.stringify(translate(ref.current?.getBoundingClientRect()))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1y9ehtf\" }) `\n    display: ${({ $display }) => $display};\n`;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { css } from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useBoundingClientRect } from './Anchor';\nexport function SimpleDropdown({ children, detached = false, disabled = false, menu, menuWrapComponent: MenuWrap = SimpleDropdownMenu, onToggle, align = 'left', ...props }) {\n    const [isOpen, setIsOpen] = useState(false);\n    const toggle = useCallback((value) => {\n        if (disabled) {\n            return;\n        }\n        setIsOpen(value);\n    }, [disabled]);\n    const rootRef = useRef(null);\n    const menuRef = useRef(null);\n    useEffect(() => {\n        function onMouseDown({ target }) {\n            if (!(target instanceof HTMLElement)) {\n                return;\n            }\n            if (rootRef.current?.contains(target) || menuRef.current?.contains(target)) {\n                return;\n            }\n            setIsOpen(false);\n        }\n        document.addEventListener('mousedown', onMouseDown);\n        return () => {\n            document.removeEventListener('mousedown', onMouseDown);\n        };\n    }, []);\n    const onToggleRef = useRef(onToggle);\n    if (onToggleRef.current !== onToggle) {\n        onToggleRef.current = onToggle;\n    }\n    useEffect(() => {\n        onToggleRef.current?.(isOpen);\n    }, [isOpen]);\n    useEffect(() => {\n        if (!isOpen) {\n            return;\n        }\n        function onKeyDown(e) {\n            if (e.key === 'Escape') {\n                e.stopPropagation();\n                e.preventDefault();\n                setIsOpen(false);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [isOpen]);\n    useEffect(() => {\n        if (disabled) {\n            setIsOpen(false);\n        }\n    }, [disabled]);\n    useEffect(() => {\n        if (!isOpen) {\n            return;\n        }\n        function onFocus(e) {\n            if (!rootRef.current?.contains(e.target) &&\n                !menuRef.current?.contains(e.target)) {\n                setIsOpen(false);\n            }\n        }\n        document.body.addEventListener('focus', onFocus, true);\n        return () => {\n            document.body.removeEventListener('focus', onFocus, true);\n        };\n    }, [isOpen]);\n    const posRef = useRef(null);\n    const [x, y] = useBoundingClientRect(posRef, (r) => [\n        r?.x || 0,\n        (r?.y || 0) + window.scrollY,\n    ]);\n    const [dx, maxWidth] = useBoundingClientRect(menuRef, (rect) => {\n        const { clientWidth } = document.documentElement;\n        const maxWidth = clientWidth - 8;\n        if (!rect) {\n            return [0, maxWidth];\n        }\n        if (align === 'left') {\n            return [Math.min(0, clientWidth - x - Math.round(rect.width) - 4), maxWidth];\n        }\n        const myWidth = rootRef.current?.clientWidth ?? 0;\n        return [-Math.round(rect.width) + myWidth - 4, maxWidth];\n    });\n    return (React.createElement(SimpleDropdownRoot, { ref: rootRef, \"$disabled\": disabled, ...props },\n        typeof children === 'function' ? children(toggle, isOpen) : children,\n        React.createElement(\"div\", { ref: posRef }),\n        detached ? (createPortal(React.createElement(MenuWrap, { \"$visible\": isOpen, ref: menuRef, style: {\n                transform: `translateX(${dx}px)`,\n                maxWidth,\n                top: `${y}px`,\n                left: `${x}px`,\n            } }, typeof menu === 'function' ? menu(setIsOpen, isOpen) : menu), document.getElementById('hub-anchors'))) : (React.createElement(MenuWrap, { \"$visible\": isOpen, ref: menuRef, style: {\n                transform: `translateX(${dx}px)`,\n                maxWidth,\n            } }, typeof menu === 'function' ? menu(setIsOpen, isOpen) : menu))));\n}\nconst SimpleDropdownRoot = styled.div.withConfig({ displayName: \"SimpleDropdownRoot\", componentId: \"sc-1adbh4g\" }) `\n    position: relative;\n\n    ${({ $disabled = false }) => $disabled &&\n    css `\n            opacity: 0.5;\n        `}\n`;\nexport const SimpleDropdownMenu = styled.div.withConfig({ displayName: \"SimpleDropdownMenu\", componentId: \"sc-1lgrp07\" }) `\n    min-height: 16px;\n    min-width: 16px;\n    opacity: 0;\n    pointer-events: none;\n    position: absolute;\n    transition: 250ms;\n    transition-delay: 250ms, 0s;\n    transition-property: visibility, opacity;\n    visibility: hidden;\n    z-index: 1000;\n\n    ${({ $visible = false }) => $visible &&\n    css `\n            opacity: 1;\n            pointer-events: auto;\n            visibility: visible;\n            transition-delay: 0s;\n        `}\n`;\nexport const SimpleListDropdownMenu = styled.div.withConfig({ displayName: \"SimpleListDropdownMenu\", componentId: \"sc-1c82mdd\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    color: ${COLORS.primary};\n    margin-top: 8px;\n    min-height: 16px;\n    padding: 8px 0;\n\n    p {\n        font-size: 14px;\n        line-height: 20px;\n        margin: 0;\n    }\n\n    p + p {\n        margin-top: 8px;\n    }\n\n    ul {\n        list-style: none;\n        padding: 0;\n        margin: 0;\n    }\n`;\nexport const DefaultSimpleDropdownMenu = styled(SimpleListDropdownMenu).withConfig({ displayName: \"DefaultSimpleDropdownMenu\", componentId: \"sc-rfv0n8\" }) `\n    padding: 20px 16px;\n    max-width: 100%;\n    width: 460px;\n`;\n","import { z } from 'zod';\nimport config from '~/config/environments.toml';\nimport { defaultChainKey } from '~/consts';\nimport { getChainConfig } from '~/utils/chains';\nconst EnvironmentConfig = z\n    .object({\n    availableChains: z.array(z.string()).min(1),\n    defaultChain: z.string().optional(),\n    platformOriginUrl: z.string().optional().default('https://streamr.network'),\n    streamrUrl: z.string().optional().default('https://streamr.network'),\n})\n    .refine(({ defaultChain, availableChains }) => !defaultChain || availableChains.includes(defaultChain), 'Default chain is not listed in the collection of available chains')\n    .transform(({ availableChains, defaultChain, ...rest }) => {\n    const availableChainConfigs = availableChains.map(getChainConfig);\n    const defaultChainConfig = defaultChain\n        ? getChainConfig(defaultChain)\n        : availableChainConfigs[0];\n    return {\n        ...rest,\n        availableChains: availableChainConfigs,\n        defaultChain: defaultChainConfig,\n    };\n});\nconst fallbackEnvironmentConfig = EnvironmentConfig.parse({\n    availableChains: [defaultChainKey],\n});\nconst parsedConfig = z\n    .record(z.string(), z.union([EnvironmentConfig, z.undefined()]))\n    .parse(config);\nconst { NODE_ENV: actualEnvironment = 'production' } = process.env;\nexport function getEnvironmentConfig() {\n    const env = process.env.HUB_CONFIG_ENV ||\n        (actualEnvironment === 'test' ? 'development' : actualEnvironment);\n    const environmentConfig = parsedConfig[env];\n    if (!environmentConfig) {\n        return fallbackEnvironmentConfig;\n    }\n    return environmentConfig;\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport ethereumIcon from './assets/ethereum.svg';\nimport xDaiIcon from './assets/xdai.svg';\nimport polygonIcon from './assets/polygon.svg';\nimport bscIcon from './assets/bsc.svg';\nimport unknownIcon from './assets/unknown.svg';\nconst icons = {\n    '1': ethereumIcon,\n    '100': xDaiIcon,\n    '137': polygonIcon,\n    '56': bscIcon,\n    '8995': ethereumIcon,\n    '8997': xDaiIcon,\n    '80002': polygonIcon,\n};\nconst UnstyledNetworkIcon = ({ chainId, className, emptyIcon, alt = '', }) => (React.createElement(\"div\", { className: className },\n    React.createElement(\"img\", { src: icons[String(chainId)] || emptyIcon || unknownIcon, alt: alt })));\nconst NetworkIcon = styled(UnstyledNetworkIcon).withConfig({ displayName: \"NetworkIcon\", componentId: \"sc-n5z9vr\" }) `\n    img {\n        width: 100%;\n        display: flex;\n        align-items: center;\n    }\n`;\nexport default NetworkIcon;\n","export class DraftValidationError extends Error {\n    constructor(key, message) {\n        super(message);\n        this.key = key;\n        this.message = message;\n        this.name = 'DraftValidationError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, DraftValidationError);\n        }\n        Object.setPrototypeOf(this, DraftValidationError.prototype);\n    }\n}\nexport class ValidationError extends Error {\n    constructor(messages) {\n        super(messages.join(', '));\n        this.messages = messages;\n        this.name = 'ValidationError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, ValidationError);\n        }\n        Object.setPrototypeOf(this, ValidationError.prototype);\n    }\n}\nexport class ParseError extends Error {\n    constructor(entity, error) {\n        super('Failed to parse');\n        this.entity = entity;\n        this.error = error;\n        this.name = 'ParseError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, ParseError);\n        }\n        Object.setPrototypeOf(this, ParseError.prototype);\n    }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [],\n        name: \"Halted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"previousOwner\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"OwnershipTransferred\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"ProjectPurchased\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [],\n        name: \"Resumed\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"uint256\",\n                name: \"newTxFee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"TxFeeChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"mailboxAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"addMailbox\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"remoteChainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"remoteMarketplaceAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"addRemoteMarketplace\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buy\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"buyFor\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"chainId\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"claimOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"originDomainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"getPurchaseInfo\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"getSubscriptionInfo\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"halt\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"halted\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"_origin\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"bytes32\",\n                name: \"_sender\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"_message\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"handle\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"_projectRegistry\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"_chainId\",\n                type: \"uint32\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"forwarder\",\n                type: \"address\",\n            },\n        ],\n        name: \"isTrustedForwarder\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"mailbox\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"onTokenTransfer\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"owner\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"pendingOwner\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"projectRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IProjectRegistryV1\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        name: \"remoteMarketplaces\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"renounceOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"resume\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"newTxFee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"setTxFee\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"transferOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"txFee\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60a06040523060805234801561001457600080fd5b5060805161263661004c60003960008181610873015281816108b3015281816109d601528181610a160152610aa501526126366000f3fe60806040526004361061019c5760003560e01c80635ed7ca5b116100ec578063b9b8af0b1161008a578063d5438eae11610064578063d5438eae146104f3578063e30c397814610513578063f05d16f714610533578063f2fde38b1461055357600080fd5b8063b9b8af0b1461049c578063c5e4c9f9146104bd578063cf820461146104dd57600080fd5b80638da5cb5b116100c65780638da5cb5b146103e8578063940083f6146104065780639a8a059214610443578063a4c0ed361461047c57600080fd5b80635ed7ca5b1461038857806360d68d4e1461039d578063715018a6146103d357600080fd5b80634e71e0c81161015957806356d5d4751161013357806356d5d475146102a8578063572b6c05146102c85780635a33d8dc146102f85780635b1a21061461033057600080fd5b80634e71e0c8146102585780634f1ef2861461026d57806352d1902d1461028057600080fd5b806303987512146101a1578063046f7da2146101c35780630676d52f146101d85780630ddeb632146101f85780632eb62c8a146102185780633659cfe614610238575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611f5c565b610573565b005b3480156101cf57600080fd5b506101c1610733565b3480156101e457600080fd5b506101c16101f3366004611fae565b610773565b34801561020457600080fd5b506101c1610213366004611fe5565b6107b1565b34801561022457600080fd5b506101c1610233366004612007565b61083f565b34801561024457600080fd5b506101c1610253366004612007565b610869565b34801561026457600080fd5b506101c1610948565b6101c161027b36600461203a565b6109cc565b34801561028c57600080fd5b50610295610a98565b6040519081526020015b60405180910390f35b3480156102b457600080fd5b506101c16102c3366004612147565b610b4b565b3480156102d457600080fd5b506102e86102e3366004612007565b610cab565b604051901515815260200161029f565b34801561030457600080fd5b5060cb54610318906001600160a01b031681565b6040516001600160a01b03909116815260200161029f565b34801561033c57600080fd5b5061035061034b3660046121a1565b610d3a565b604080516001600160a01b039788168152969095166020870152938501929092526060840152608083015260a082015260c00161029f565b34801561039457600080fd5b506101c1610e24565b3480156103a957600080fd5b506103186103b83660046121de565b60cd602052600090815260409020546001600160a01b031681565b3480156103df57600080fd5b506101c1610e6a565b3480156103f457600080fd5b506033546001600160a01b0316610318565b34801561041257600080fd5b506104266104213660046121f9565b610e74565b60408051931515845260208401929092529082015260600161029f565b34801561044f57600080fd5b5060cb5461046790600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161029f565b34801561048857600080fd5b506101c1610497366004612231565b610f01565b3480156104a857600080fd5b5060ca546102e890600160a01b900460ff1681565b3480156104c957600080fd5b506101c16104d8366004612252565b6110d1565b3480156104e957600080fd5b5061029560c95481565b3480156104ff57600080fd5b5060cc54610318906001600160a01b031681565b34801561051f57600080fd5b5060ca54610318906001600160a01b031681565b34801561053f57600080fd5b506101c161054e366004612287565b611223565b34801561055f57600080fd5b506101c161056e366004612007565b6112ab565b60ca54600160a01b900460ff1615806105b5575061058f61133a565b6001600160a01b03166105aa6033546001600160a01b031690565b6001600160a01b0316145b6105f55760405162461bcd60e51b815260206004820152600c60248201526b195c9c9bdc97da185b1d195960a21b60448201526064015b60405180910390fd5b60cb54604051630e14293760e01b8152600481018590526001600160a01b03838116602483015290911690630e14293790604401602060405180830381865afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a91906122b0565b6106b65760405162461bcd60e51b815260206004820152601860248201527f6572726f725f756e61626c65546f42757950726f6a656374000000000000000060448201526064016105ec565b60cb54604051631f4e09af60e01b815260048101859052602481018490526001600160a01b03838116604483015290911690631f4e09af90606401600060405180830381600087803b15801561070b57600080fd5b505af115801561071f573d6000803e3d6000fd5b5050505061072e83838361135c565b505050565b61073b611959565b60ca805460ff60a01b191690556040517f62451d457bc659158be6e6247f56ec1df424a5c7597f71c20c2bc44e0965c8f990600090a1565b61077b611959565b63ffffffff91909116600090815260cd6020526040902080546001600160a01b0319166001600160a01b03909216919091179055565b60ca54600160a01b900460ff1615806107f357506107cd61133a565b6001600160a01b03166107e86033546001600160a01b031690565b6001600160a01b0316145b61082e5760405162461bcd60e51b815260206004820152600c60248201526b195c9c9bdc97da185b1d195960a21b60448201526064016105ec565b61083b82826101bc61133a565b5050565b610847611959565b60cc80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036108b15760405162461bcd60e51b81526004016105ec906122cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fa6000805160206125ba833981519152546001600160a01b031690565b6001600160a01b0316146109205760405162461bcd60e51b81526004016105ec90612317565b610929816119d2565b60408051600080825260208201909252610945918391906119da565b50565b60ca546001600160a01b031661095c61133a565b6001600160a01b0316146109a55760405162461bcd60e51b815260206004820152601060248201526f37b7363ca832b73234b733a7bbb732b960811b60448201526064016105ec565b60ca546109ba906001600160a01b0316611b45565b60ca80546001600160a01b0319169055565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610a145760405162461bcd60e51b81526004016105ec906122cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a5d6000805160206125ba833981519152546001600160a01b031690565b6001600160a01b031614610a835760405162461bcd60e51b81526004016105ec90612317565b610a8c826119d2565b61083b828260016119da565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b385760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016105ec565b506000805160206125ba83398151915290565b60cc54849084906001600160a01b03163314610ba95760405162461bcd60e51b815260206004820152601960248201527f6572726f725f6e6f7448797065726c616e654d61696c626f780000000000000060448201526064016105ec565b63ffffffff8216600090815260cd60205260409020546001600160a01b03808316911614610c195760405162461bcd60e51b815260206004820152601a60248201527f6572726f725f6e6f7452656d6f74654d61726b6574706c61636500000000000060448201526064016105ec565b60008080610c29868801886121f9565b60cb54604051631f4e09af60e01b815260048101859052602481018390526001600160a01b0380851660448301529497509295509093509190911690631f4e09af90606401600060405180830381600087803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b50505050505050505050505050565b60cb546000906001600160a01b0316610cc657506000919050565b60cb5460405163572b6c0560e01b81526001600160a01b0384811660048301529091169063572b6c0590602401602060405180830381865afa158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3491906122b0565b92915050565b60cb54604051630abfe91960e21b81526004810186905263ffffffff841660248201526000918291829182918291829182918291829182916001600160a01b0390911690632affa46490604401608060405180830381865afa158015610da4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc89190612363565b93509350935093506000828e610dde91906123c1565b9050848482670de0b6b3a76400008460c954610dfa91906123c1565b610e0491906123e0565b8f869a509a509a509a509a509a5050505050509499939850945094509450565b610e2c611959565b60ca805460ff60a01b1916600160a01b1790556040517f1ee9080f6b55ca44ce58681c8162e6c1ac1c47e1da791a4a1c1ec6186d8af1f390600090a1565b610e72611959565b565b60cb546040516317ca32dd60e21b8152600481018590526001600160a01b0384811660248301526000928392839283928392911690635f28cb74906044016040805180830381865afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190612402565b90999098509596505050505050565b60208114610f465760405162461bcd60e51b8152602060048201526012602482015271195c9c9bdc97d89859141c9bda9958dd125960721b60448201526064016105ec565b60cb54604051630abfe91960e21b8152833560048201819052600160a01b830463ffffffff1660248301529160009182916001600160a01b031690632affa46490604401608060405180830381865afa158015610fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fcb9190612363565b509250925050816001600160a01b0316610fe361133a565b6001600160a01b0316146110395760405162461bcd60e51b815260206004820152601760248201527f6572726f725f77726f6e6750726963696e67546f6b656e00000000000000000060448201526064016105ec565b6000670de0b6b3a764000061104e83896123e0565b61105891906123e0565b60cb54604051631f4e09af60e01b815260048101879052602481018390526001600160a01b038b81166044830152929350911690631f4e09af90606401600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b505050505050505050505050565b600054610100900460ff16158080156110f15750600054600160ff909116105b8061110b5750303b15801561110b575060005460ff166001145b61116e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105ec565b6000805460ff191660011790558015611191576000805461ff0019166101001790555b611199611b97565b6111a1611bc6565b60ca805460ff60a01b1916905560cb805463ffffffff8416600160a01b026001600160c01b03199091166001600160a01b03861617179055801561072e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b61122b611959565b670de0b6b3a76400008111156112785760405162461bcd60e51b81526020600482015260126024820152716572726f725f696e76616c6964547846656560701b60448201526064016105ec565b60c981905560405181907f3115e922830fe4bd99b46316ef2a8939b665b45d008bc585fb784f754abf038b90600090a250565b6112b3611959565b6001600160a01b0381166113185760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ec565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b600061134533610cab565b15611357575060131936013560601c90565b503390565b60cb54604051630abfe91960e21b815260048101859052600160a01b820463ffffffff166024820152600091829182916001600160a01b031690632affa46490604401608060405180830381865afa1580156113bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e09190612363565b509250925092506000811161144b5760405162461bcd60e51b815260206004820152602b60248201527f6572726f725f6672656550726f6a656374734e6f74537570706f727465644f6e60448201526a4d61726b6574706c61636560a81b60648201526084016105ec565b600061145782876123c1565b90506000670de0b6b3a76400008260c95461147291906123c1565b61147c91906123e0565b9050836001600160a01b0381166323b872dd61149661133a565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064016020604051808303816000875af11580156114e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150d91906122b0565b6115295760405162461bcd60e51b81526004016105ec9061242e565b60cb546040516317ca32dd60e21b8152600481018b90526001600160a01b0389811660248301526000921690635f28cb74906044016040805180830381865afa15801561157a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159e9190612402565b9150506001600160a01b038216634000aea0886115bb868861245b565b8d8c868a8a6040516020016115d4959493929190612472565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611601939291906124ff565b6020604051808303816000875af192505050801561163c575060408051601f3d908101601f19168201909252611639918101906122b0565b60015b6116ea576001600160a01b03821663a9059cbb8861165a868861245b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156116a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c991906122b0565b6116e55760405162461bcd60e51b81526004016105ec9061242e565b611739565b806117375760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f7472616e73666572416e6443616c6c50726f6a6563740000000060448201526064016105ec565b505b82156118e857816001600160a01b0316634000aea06117606033546001600160a01b031690565b858d8c868a8a60405160200161177a959493929190612472565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016117a7939291906124ff565b6020604051808303816000875af19250505080156117e2575060408051601f3d908101601f191682019092526117df918101906122b0565b60015b61189957816001600160a01b031663a9059cbb6118076033546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303816000875af1158015611854573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187891906122b0565b6118945760405162461bcd60e51b81526004016105ec9061242e565b6118e8565b806118e65760405162461bcd60e51b815260206004820152601860248201527f6572726f725f7472616e73666572416e6443616c6c466565000000000000000060448201526064016105ec565b505b6118f6878b8a848888611bed565b604080518b81526001600160a01b038a1660208201529081018a905260608101859052608081018490527fa7be1aeb0b9a4d9bea919fec8883707f0d3d2cb1d3dce9f54d98ab22fbddc7c59060a00160405180910390a150505050505050505050565b61196161133a565b6001600160a01b031661197c6033546001600160a01b031690565b6001600160a01b031614610e725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ec565b610945611959565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611a0d5761072e83611ccb565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a67575060408051601f3d908101601f19168201909252611a6491810190612526565b60015b611aca5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016105ec565b6000805160206125ba8339815191528114611b395760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016105ec565b5061072e838383611d67565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611bbe5760405162461bcd60e51b81526004016105ec9061253f565b610e72611d92565b600054610100900460ff16610e725760405162461bcd60e51b81526004016105ec9061253f565b853b8015611cc2576040516301290e7360e61b8152600481018790526001600160a01b038681166024830152604482018690526064820185905260848201849052881690634a439cc09060a4016020604051808303816000875af1925050508015611c75575060408051601f3d908101601f19168201909252611c72918101906122b0565b60015b15611cc25780611cc05760405162461bcd60e51b815260206004820152601660248201527532b93937b92fb932b532b1ba32b2213ca9b2b63632b960511b60448201526064016105ec565b505b50505050505050565b6001600160a01b0381163b611d385760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016105ec565b6000805160206125ba83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611d7083611dc9565b600082511180611d7d5750805b1561072e57611d8c8383611e09565b50505050565b600054610100900460ff16611db95760405162461bcd60e51b81526004016105ec9061253f565b610e72611dc461133a565b611b45565b611dd281611ccb565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b611e715760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016105ec565b600080846001600160a01b031684604051611e8c919061258a565b600060405180830381855af49150503d8060008114611ec7576040519150601f19603f3d011682016040523d82523d6000602084013e611ecc565b606091505b5091509150611ef482826040518060600160405280602781526020016125da60279139611efd565b95945050505050565b60608315611f0c575081611f16565b611f168383611f1d565b9392505050565b815115611f2d5781518083602001fd5b8060405162461bcd60e51b81526004016105ec91906125a6565b6001600160a01b038116811461094557600080fd5b600080600060608486031215611f7157600080fd5b83359250602084013591506040840135611f8a81611f47565b809150509250925092565b803563ffffffff81168114611fa957600080fd5b919050565b60008060408385031215611fc157600080fd5b611fca83611f95565b91506020830135611fda81611f47565b809150509250929050565b60008060408385031215611ff857600080fd5b50508035926020909101359150565b60006020828403121561201957600080fd5b8135611f1681611f47565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561204d57600080fd5b823561205881611f47565b9150602083013567ffffffffffffffff8082111561207557600080fd5b818501915085601f83011261208957600080fd5b81358181111561209b5761209b612024565b604051601f8201601f19908116603f011681019083821181831017156120c3576120c3612024565b816040528281528860208487010111156120dc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008083601f84011261211057600080fd5b50813567ffffffffffffffff81111561212857600080fd5b60208301915083602082850101111561214057600080fd5b9250929050565b6000806000806060858703121561215d57600080fd5b61216685611f95565b935060208501359250604085013567ffffffffffffffff81111561218957600080fd5b612195878288016120fe565b95989497509550505050565b600080600080608085870312156121b757600080fd5b84359350602085013592506121ce60408601611f95565b9396929550929360600135925050565b6000602082840312156121f057600080fd5b611f1682611f95565b60008060006060848603121561220e57600080fd5b83359250602084013561222081611f47565b929592945050506040919091013590565b6000806000806060858703121561224757600080fd5b843561216681611f47565b6000806040838503121561226557600080fd5b823561227081611f47565b915061227e60208401611f95565b90509250929050565b60006020828403121561229957600080fd5b5035919050565b80518015158114611fa957600080fd5b6000602082840312156122c257600080fd5b611f16826122a0565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000806000806080858703121561237957600080fd5b845161238481611f47565b602086015190945061239581611f47565b6040860151606090960151949790965092505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156123db576123db6123ab565b500290565b6000826123fd57634e487b7160e01b600052601260045260246000fd5b500490565b6000806040838503121561241557600080fd5b61241e836122a0565b9150602083015190509250929050565b602080825260139082015272195c9c9bdc97dc185e5b595b9d11985a5b1959606a1b604082015260600190565b60008282101561246d5761246d6123ab565b500390565b94855260609390931b6bffffffffffffffffffffffff1916602085015260348401919091526054830152607482015260940190565b60005b838110156124c25781810151838201526020016124aa565b83811115611d8c5750506000910152565b600081518084526124eb8160208601602086016124a7565b601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201526000611ef460608301846124d3565b60006020828403121561253857600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000825161259c8184602087016124a7565b9190910192915050565b602081526000611f1660208301846124d356fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203aab32c78b799d512b138c18986919e4f1acd4bd9332de70c3b265d451dee18664736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class MarketplaceV4__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nMarketplaceV4__factory.bytecode = _bytecode;\nMarketplaceV4__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"previousOwner\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"OwnershipTransferred\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"ProjectPurchasedFromRemote\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"_destinationDomainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_recipientContractAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"addRecipient\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buy\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"buyFor\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"destinationDomainId\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"gasPaymaster\",\n        outputs: [\n            {\n                internalType: \"contract IInterchainGasPaymaster\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"streamsCount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"handlePurchaseInfo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subEndTimestamp\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"handleSubscriptionState\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"_originDomainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_queryRouter\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_mailboxAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_gasPaymaster\",\n                type: \"address\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"mailbox\",\n        outputs: [\n            {\n                internalType: \"contract IMailbox\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"originDomainId\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"owner\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"purchaseCount\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"purchases\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"buyer\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"requestTimestamp\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"queryRouter\",\n        outputs: [\n            {\n                internalType: \"contract IInterchainQueryRouter\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"recipientAddress\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"renounceOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"transferOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"withdraw\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        stateMutability: \"payable\",\n        type: \"receive\",\n    },\n];\nconst _bytecode = \"0x60a06040523060805234801561001457600080fd5b5060805161257c61004c6000396000818161064501528181610685015281816107240152818161076401526107f3015261257c6000f3fe60806040526004361061012e5760003560e01c80638392fe31116100ab578063d5438eae1161006f578063d5438eae146103e1578063e1489d5314610401578063ebda2bd814610421578063f2fde38b14610441578063f8f60eec14610461578063fb6bf74c1461048157600080fd5b80638392fe31146102815780638d1014fd1461034d5780638da5cb5b1461036d578063be0d61ed1461038b578063c1c16a6d146103c457600080fd5b80634f1ef286116100f25780634f1ef286146101e557806352d1902d146101f85780635aff59991461020d578063715018a61461024c578063805ef6e81461026157600080fd5b8063039875121461013a5780630ddeb6321461015c5780632b85ed9c1461017c5780632e1a7d4d146101a55780633659cfe6146101c557600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611f65565b6104a1565b005b34801561016857600080fd5b5061015a610177366004611f9a565b6105a2565b34801561018857600080fd5b5061019260c95481565b6040519081526020015b60405180910390f35b3480156101b157600080fd5b5061015a6101c0366004611fbc565b6105b1565b3480156101d157600080fd5b5061015a6101e0366004611fd5565b61063b565b61015a6101f3366004612006565b61071a565b34801561020457600080fd5b506101926107e6565b34801561021957600080fd5b5060cb5461023490600160401b90046001600160a01b031681565b6040516001600160a01b03909116815260200161019c565b34801561025857600080fd5b5061015a610899565b34801561026d57600080fd5b5060ce54610234906001600160a01b031681565b34801561028d57600080fd5b506102f761029c366004611fbc565b60ca6020526000908152604090208054600182015460028301546003840154600485015460058601546006870154600788015460089098015496976001600160a01b0396871697958716969485169594909316939192909189565b60408051998a526001600160a01b0398891660208b015296881696890196909652938616606088015294909116608086015260a085015260c084019290925260e08301919091526101008201526101200161019c565b34801561035957600080fd5b5061015a6103683660046120c8565b6108ad565b34801561037957600080fd5b506033546001600160a01b0316610234565b34801561039757600080fd5b5060cb546103af90600160201b900463ffffffff1681565b60405163ffffffff909116815260200161019c565b3480156103d057600080fd5b5060cb546103af9063ffffffff1681565b3480156103ed57600080fd5b5060cc54610234906001600160a01b031681565b34801561040d57600080fd5b5061015a61041c36600461212b565b610c70565b34801561042d57600080fd5b5060cd54610234906001600160a01b031681565b34801561044d57600080fd5b5061015a61045c366004611fd5565b611289565b34801561046d57600080fd5b5061015a61047c366004612174565b6112ff565b34801561048d57600080fd5b5061015a61049c3660046121a7565b61135b565b600060c9600081546104b290612211565b918290555060408051610120810182528681523360208083019182526001600160a01b038781168486019081526000606086018181526080870182815260a088018d81524260c08a0190815260e08a018581526101008b018681528d875260ca9099529a9094209851895596516001890180546001600160a01b031990811692881692909217905593516002890180548616918716919091179055905160038801805485169186169190911790555160048701805490931693169290921790559151600584015590516006830155915160078201559051600890910155905061059c8484836114cb565b50505050565b6105ad8282336104a1565b5050565b6105b96115fe565b4781111561060e5760405162461bcd60e51b815260206004820152601960248201527f6572726f725f696e73756666696369656e7442616c616e63650000000000000060448201526064015b60405180910390fd5b604051339082156108fc029083906000818181858888f193505050501580156105ad573d6000803e3d6000fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036106835760405162461bcd60e51b81526004016106059061222a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106cc600080516020612500833981519152546001600160a01b031690565b6001600160a01b0316146106f25760405162461bcd60e51b815260040161060590612276565b6106fb81611658565b6040805160008082526020820190925261071791839190611660565b50565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036107625760405162461bcd60e51b81526004016106059061222a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107ab600080516020612500833981519152546001600160a01b031690565b6001600160a01b0316146107d15760405162461bcd60e51b815260040161060590612276565b6107da82611658565b6105ad82826001611660565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108865760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610605565b5060008051602061250083398151915290565b6108a16115fe565b6108ab60006117d0565b565b60cd546001600160a01b031633146108ff5760405162461bcd60e51b815260206004820152601560248201527432b93937b92fb7b7363ca8bab2b93ca937baba32b960591b6044820152606401610605565b600060ca600084815260200190815260200160002060405180610120016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016004820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090508681606001906001600160a01b031690816001600160a01b0316815250508581608001906001600160a01b031690816001600160a01b031681525050848160e001818152505083816101000181815250508060ca60008581526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155905050600086905085816001600160a01b031663dd62ed3e8460200151306040518363ffffffff1660e01b8152600401610bac9291906001600160a01b0392831681529116602082015260400190565b602060405180830381865afa158015610bc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bed91906122c2565b1015610c3b5760405162461bcd60e51b815260206004820152601b60248201527f6572726f725f696e73756666696369656e74416c6c6f77616e636500000000006044820152606401610605565b610c53826000015183604001518460a0015186611822565b610c6682600001518360400151866118fe565b5050505050505050565b60cd546001600160a01b03163314610cc25760405162461bcd60e51b815260206004820152601560248201527432b93937b92fb7b7363ca8bab2b93ca937baba32b960591b6044820152606401610605565b600081815260ca60209081526040918290208251610120810184528154815260018201546001600160a01b03908116938201939093526002820154831693810193909352600381015482166060840152600481015490911660808301819052600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152848015610d6b57508160a001518260c00151610d6791906122db565b8410155b1561122557602082015160e08301516040516323b872dd60e01b81526001600160a01b0392831660048201523060248201526044810191909152908216906323b872dd906064016020604051808303816000875af1158015610dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df591906122f3565b610e115760405162461bcd60e51b815260040161060590612310565b806001600160a01b0316634000aea083606001518461010001518560e00151610e3a919061233d565b855160408088015160e08901516101008a01519251610e5f94938d9291602001612354565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401610e8c939291906123e1565b6020604051808303816000875af1925050508015610ec7575060408051601f3d908101601f19168201909252610ec4918101906122f3565b60015b610f8457806001600160a01b031663a9059cbb83606001518461010001518560e00151610ef4919061233d565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6391906122f3565b610f7f5760405162461bcd60e51b815260040161060590612310565b610fd3565b80610fd15760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f7472616e73666572416e6443616c6c50726f6a656374000000006044820152606401610605565b505b6101008201511561119757806001600160a01b0316634000aea0610fff6033546001600160a01b031690565b610100850151855160408088015160e0890151915161102593928c918690602001612354565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611052939291906123e1565b6020604051808303816000875af192505050801561108d575060408051601f3d908101601f1916820190925261108a918101906122f3565b60015b61114857806001600160a01b031663a9059cbb6110b26033546001600160a01b031690565b6101008501516040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611103573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112791906122f3565b6111435760405162461bcd60e51b815260040161060590612310565b611197565b806111955760405162461bcd60e51b815260206004820152601860248201527f6572726f725f7472616e73666572416e6443616c6c46656500000000000000006044820152606401610605565b505b6111ba826060015183600001518460400151878660e00151876101000151611a1d565b815160408084015160a08086015160e087015161010088015185519687526001600160a01b03909416602087015293850152606084019290925260808301527f2d62582880564814e5c47b0e01616a4bc40d2c2be3cdd331ad10ce1655c0d399910160405180910390a15b5050600090815260ca602052604081208181556001810180546001600160a01b031990811690915560028201805482169055600382018054821690556004820180549091169055600581018290556006810182905560078101829055600801555050565b6112916115fe565b6001600160a01b0381166112f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610605565b610717816117d0565b6113076115fe565b60cb80546001600160a01b03909216600160401b0268010000000000000000600160e01b031963ffffffff909416600160201b0293909316640100000000600160e01b031990921691909117919091179055565b600054610100900460ff161580801561137b5750600054600160ff909116105b806113955750303b158015611395575060005460ff166001145b6113f85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610605565b6000805460ff19166001179055801561141b576000805461ff0019166101001790555b611423611af9565b61142b611b28565b60cb805463ffffffff191663ffffffff871617905560cd80546001600160a01b03199081166001600160a01b038781169190911790925560cc8054821686841617905560ce805490911691841691909117905580156114c4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60cd5460cb546040805180820182526001600160a01b03600160401b8404811682529151602481018890526044810187905263ffffffff80851660648301526084820187905260009593909316936395b1f3b393600160201b909104169190602082019060a40160408051601f19818403018152918152602080830180516001600160e01b0316632d8d108360e11b179052919092529051638d1014fd60e01b918101919091526024016040516020818303038152906040526040518463ffffffff1660e01b81526004016115a293929190612408565b6020604051808303816000875af11580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e591906122c2565b905060006115f1611b4f565b90506114c4828230611b67565b6033546001600160a01b031633146108ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610605565b6107176115fe565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156116985761169383611c78565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156116f2575060408051601f3d908101601f191682019092526116ef918101906122c2565b60015b6117555760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610605565b60008051602061250083398151915281146117c45760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610605565b50611693838383611d14565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60cc5460cb5460408051602081018890526001600160a01b0387811682840152606080830188905283518084039091018152608083019384905263fa31de0160e01b90935260009481169363fa31de01936118999363ffffffff600160201b84041693600160401b90930490921691608401612460565b6020604051808303816000875af11580156118b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118dc91906122c2565b905060006118e983611d39565b90506118f6828230611b67565b505050505050565b60cd5460cb546040805180820182526001600160a01b03600160401b84048116825291516024810188905286831660448201526064810186905260009492909216926395b1f3b392600160201b90910463ffffffff169190602082019060840160408051601f19818403018152918152602080830180516001600160e01b0316634a0041fb60e11b17905291909252905163e1489d5360e01b918101919091526024016040516020818303038152906040526040518463ffffffff1660e01b81526004016119ce93929190612408565b6020604051808303816000875af11580156119ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1191906122c2565b905060006115f1611d89565b853b8015611af0576040516301290e7360e61b8152600481018790526001600160a01b038681166024830152604482018690526064820185905260848201849052881690634a439cc09060a4016020604051808303816000875af1925050508015611aa5575060408051601f3d908101601f19168201909252611aa2918101906122f3565b60015b15611af05780610c665760405162461bcd60e51b815260206004820152601660248201527532b93937b92fb932b532b1ba32b2213ca9b2b63632b960511b6044820152606401610605565b50505050505050565b600054610100900460ff16611b205760405162461bcd60e51b815260040161060590612485565b6108ab611d9b565b600054610100900460ff166108ab5760405162461bcd60e51b815260040161060590612485565b600061806d611b6162013880826122db565b92915050565b60ce5460cb5460405163a692979360e01b8152600160201b90910463ffffffff166004820152602481018490526000916001600160a01b03169063a692979390604401602060405180830381865afa158015611bc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611beb91906122c2565b60ce5460cb54604051630237e58360e31b815260048101889052600160201b90910463ffffffff166024820152604481018690526001600160a01b0385811660648301529293509116906311bf2c189083906084016000604051808303818588803b158015611c5957600080fd5b505af1158015611c6d573d6000803e3d6000fd5b505050505050505050565b6001600160a01b0381163b611ce55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610605565b60008051602061250083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611d1d83611dcb565b600082511180611d2a5750805b156116935761059c8383611e0b565b600062010fcd6001839003611d5757611d5461dd61826122db565b90505b60015b83811015611d8257611d6e61aa82836122db565b915080611d7a81612211565b915050611d5a565b5092915050565b60006164a8611b6162013880826122db565b600054610100900460ff16611dc25760405162461bcd60e51b815260040161060590612485565b6108ab336117d0565b611dd481611c78565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b611e735760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610605565b600080846001600160a01b031684604051611e8e91906124d0565b600060405180830381855af49150503d8060008114611ec9576040519150601f19603f3d011682016040523d82523d6000602084013e611ece565b606091505b5091509150611ef6828260405180606001604052806027815260200161252060279139611eff565b95945050505050565b60608315611f0e575081611f18565b611f188383611f1f565b9392505050565b815115611f2f5781518083602001fd5b8060405162461bcd60e51b815260040161060591906124ec565b80356001600160a01b0381168114611f6057600080fd5b919050565b600080600060608486031215611f7a57600080fd5b8335925060208401359150611f9160408501611f49565b90509250925092565b60008060408385031215611fad57600080fd5b50508035926020909101359150565b600060208284031215611fce57600080fd5b5035919050565b600060208284031215611fe757600080fd5b611f1882611f49565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561201957600080fd5b61202283611f49565b9150602083013567ffffffffffffffff8082111561203f57600080fd5b818501915085601f83011261205357600080fd5b81358181111561206557612065611ff0565b604051601f8201601f19908116603f0116810190838211818310171561208d5761208d611ff0565b816040528281528860208487010111156120a657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060008060008060c087890312156120e157600080fd5b6120ea87611f49565b95506120f860208801611f49565b95989597505050506040840135936060810135936080820135935060a0909101359150565b801515811461071757600080fd5b60008060006060848603121561214057600080fd5b833561214b8161211d565b95602085013595506040909401359392505050565b803563ffffffff81168114611f6057600080fd5b6000806040838503121561218757600080fd5b61219083612160565b915061219e60208401611f49565b90509250929050565b600080600080608085870312156121bd57600080fd5b6121c685612160565b93506121d460208601611f49565b92506121e260408601611f49565b91506121f060608601611f49565b905092959194509250565b634e487b7160e01b600052601160045260246000fd5b600060018201612223576122236121fb565b5060010190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602082840312156122d457600080fd5b5051919050565b600082198211156122ee576122ee6121fb565b500190565b60006020828403121561230557600080fd5b8151611f188161211d565b602080825260139082015272195c9c9bdc97dc185e5b595b9d11985a5b1959606a1b604082015260600190565b60008282101561234f5761234f6121fb565b500390565b94855260609390931b6bffffffffffffffffffffffff1916602085015260348401919091526054830152607482015260940190565b60005b838110156123a457818101518382015260200161238c565b8381111561059c5750506000910152565b600081518084526123cd816020860160208601612389565b601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201526000611ef660608301846123b5565b63ffffffff841681526060602082015260018060a01b038351166060820152600060208401516040608084015261244260a08401826123b5565b9050828103604084015261245681856123b5565b9695505050505050565b63ffffffff84168152826020820152606060408201526000611ef660608301846123b5565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516124e2818460208701612389565b9190910192915050565b602081526000611f1860208301846123b556fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122098c81cf791959d30c2bff569f1d3fd5b9e253b020c1172d777b5fc9b7a3998f064736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class RemoteMarketplaceV1__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nRemoteMarketplaceV1__factory.bytecode = _bytecode;\nRemoteMarketplaceV1__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"_marketplace\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_projectRegistry\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_uniswapRouter\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"_deployedOnDomainId\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"nonpayable\",\n        type: \"constructor\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"timeWindow\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"erc20Address\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buyWithERC20\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"timeWindow\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buyWithETH\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"domainIds\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"forwarder\",\n                type: \"address\",\n            },\n        ],\n        name: \"isTrustedForwarder\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"liquidityToken\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"marketplace\",\n        outputs: [\n            {\n                internalType: \"contract IMarketplaceV4\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"onTokenTransfer\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"projectRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IProjectRegistryV1\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"uniswapRouter\",\n        outputs: [\n            {\n                internalType: \"contract IUniswapV2Router02\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60806040523480156200001157600080fd5b5060405162001afb38038062001afb8339810160408190526200003491620000f5565b600080546001600160a01b031990811682556001805482166001600160a01b039788161781556002805483169688169690961790955560038054909116939095169290921790935560058054928301815590527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06008820401805460079092166004026101000a63ffffffff8181021990931692909316929092021790556200015c565b80516001600160a01b0381168114620000f057600080fd5b919050565b600080600080608085870312156200010c57600080fd5b6200011785620000d8565b93506200012760208601620000d8565b92506200013760408601620000d8565b9150606085015163ffffffff811681146200015157600080fd5b939692955090935050565b61198f806200016c6000396000f3fe6080604052600436106100865760003560e01c80635a33d8dc116100595780635a33d8dc14610142578063735de9f7146101625780639030d0f714610182578063a4c0ed36146101a2578063abc8c7af146101c257600080fd5b80631b04c9571461008b57806343cd8f7e146100a057806356a5dd3c146100dd578063572b6c0514610112575b600080fd5b61009e610099366004611175565b6101e2565b005b3480156100ac57600080fd5b506004546100c0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e957600080fd5b506100fd6100f83660046111a1565b610346565b60405163ffffffff90911681526020016100d4565b34801561011e57600080fd5b5061013261012d3660046111d2565b610380565b60405190151581526020016100d4565b34801561014e57600080fd5b506002546100c0906001600160a01b031681565b34801561016e57600080fd5b506003546100c0906001600160a01b031681565b34801561018e57600080fd5b5061009e61019d3660046111f6565b6103f5565b3480156101ae57600080fd5b5061009e6101bd36600461123f565b6106ec565b3480156101ce57600080fd5b506001546100c0906001600160a01b031681565b6000806101ee85610af1565b9150915060006101fc610c75565b9050826000036102b8573415610243576040516001600160a01b038216903480156108fc02916000818181858888f19350505050158015610241573d6000803e3d6000fd5b505b6001546040516301cc3a8960e11b815260048101889052602481018790526001600160a01b03838116604483015290911690630398751290606401600060405180830381600087803b15801561029857600080fd5b505af11580156102ac573d6000803e3d6000fd5b50505050505050505050565b61033e818787878734600360009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610314573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033891906112c8565b89610c84565b505050505050565b6005818154811061035657600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b60025460405163572b6c0560e01b81526001600160a01b038381166004830152600092169063572b6c0590602401602060405180830381865afa1580156103cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ef91906112e5565b92915050565b6001600160a01b0382166104495760405162461bcd60e51b81526020600482015260166024820152751d5cd948189d5e55da5d1a115512081a5b9cdd19585960521b60448201526064015b60405180910390fd5b60008061045587610af1565b915091506000610463610c75565b9050826000036104e2576001546040516301cc3a8960e11b8152600481018a9052602481018990526001600160a01b03838116604483015290911690630398751290606401600060405180830381600087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050505050506106e5565b6040516323b872dd60e01b81526001600160a01b038281166004830152306024830152604482018690528691908216906323b872dd906064016020604051808303816000875af115801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e91906112e5565b6105aa5760405162461bcd60e51b815260206004820152601f60248201527f6d7573742070726520617070726f766520746f6b656e207472616e73666572006044820152606401610440565b60035460405163095ea7b360e01b81526001600160a01b039182166004820152600060248201529082169063095ea7b3906044016020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062191906112e5565b61063d5760405162461bcd60e51b815260040161044090611307565b60035460405163095ea7b360e01b81526001600160a01b039182166004820152602481018790529082169063095ea7b3906044016020604051808303816000875af1158015610690573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b491906112e5565b6106d05760405162461bcd60e51b815260040161044090611307565b6106e0828a8a8a888a8c8a610c84565b505050505b5050505050565b602081146107315760405162461bcd60e51b8152602060048201526012602482015271195c9c9bdc97d89859141c9bda9958dd125960721b6044820152606401610440565b8135600061073d610c75565b60035460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291925082169063095ea7b3906044016020604051808303816000875af1158015610792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b691906112e5565b6107d25760405162461bcd60e51b815260040161044090611307565b60035460405163095ea7b360e01b81526001600160a01b039182166004820152602481018790529082169063095ea7b3906044016020604051808303816000875af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084991906112e5565b6108655760405162461bcd60e51b815260040161044090611307565b60008061087184610af1565b915091506000610888610882610c75565b83610ff3565b6003549091506000906001600160a01b03166338ed17398a600185306108b14262015180611346565b6040518663ffffffff1660e01b81526004016108d19594939291906113a2565b6000604051808303816000875af11580156108f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109189190810190611472565b600183516109269190611508565b815181106109365761093661151f565b602090810291909101015160015460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291925084169063095ea7b3906044016020604051808303816000875af1158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba91906112e5565b6109d65760405162461bcd60e51b815260040161044090611307565b60015460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529084169063095ea7b3906044016020604051808303816000875af1158015610a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4d91906112e5565b610a695760405162461bcd60e51b815260040161044090611307565b6000610a758583611535565b6001546040516301cc3a8960e11b8152600481018a9052602481018390526001600160a01b038e81166044830152929350911690630398751290606401600060405180830381600087803b158015610acc57600080fd5b505af1158015610ae0573d6000803e3d6000fd5b505050505050505050505050505050565b600254604051630e29a66960e21b81526004810183905260009182916001600160a01b03909116906338a699a490602401602060405180830381865afa158015610b3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6391906112e5565b610baf5760405162461bcd60e51b815260206004820152601960248201527f6572726f725f70726f6a656374446f65734e6f744578697374000000000000006044820152606401610440565b6002546040516351ec389f60e11b81526000916001600160a01b03169063a3d8713e90610be3908790600590600401611557565b600060405180830381865afa158015610c00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c2891908101906117fb565b505050905080600081518110610c4057610c4061151f565b602002602001015160400151925080600081518110610c6157610c6161151f565b602002602001015160200151915050915091565b6000610c7f611153565b905090565b6000610c908383610ff3565b90506000610c9e8742611346565b90506000600360009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1991906112c8565b6001600160a01b0316856001600160a01b031603610dde57600354604051637ff36ab560e01b81526001600160a01b0390911690637ff36ab5908890610d6a90600190889030908990600401611924565b60006040518083038185885af1158015610d88573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610db19190810190611472565b60018451610dbf9190611508565b81518110610dcf57610dcf61151f565b60200260200101519050610e87565b6003546040516338ed173960e01b81526001600160a01b03909116906338ed173990610e179089906001908890309089906004016113a2565b6000604051808303816000875af1158015610e36573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e5e9190810190611472565b60018451610e6c9190611508565b81518110610e7c57610e7c61151f565b602002602001015190505b6000610e938883611535565b905089811015610ee55760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f6d696e537562736372697074696f6e5365636f6e6473000000006044820152606401610440565b60015460405163095ea7b360e01b81526001600160a01b039182166004820152602481018490529086169063095ea7b3906044016020604051808303816000875af1158015610f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5c91906112e5565b610f785760405162461bcd60e51b815260040161044090611307565b6001546040516301cc3a8960e11b8152600481018d9052602481018390526001600160a01b038e8116604483015290911690630398751290606401600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050505050505050505050505050565b6004546060906001600160a01b0316611093576040805160028082526060820183529091602083019080368337019050509050828160008151811061103a5761103a61151f565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061106e5761106e61151f565b60200260200101906001600160a01b031690816001600160a01b0316815250506103ef565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106110c8576110c861151f565b6001600160a01b0392831660209182029290920101526004548251911690829060019081106110f9576110f961151f565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061112d5761112d61151f565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b600061115e33610380565b15611170575060131936013560601c90565b503390565b60008060006060848603121561118a57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156111b357600080fd5b5035919050565b6001600160a01b03811681146111cf57600080fd5b50565b6000602082840312156111e457600080fd5b81356111ef816111ba565b9392505050565b600080600080600060a0868803121561120e57600080fd5b853594506020860135935060408601359250606086013561122e816111ba565b949793965091946080013592915050565b6000806000806060858703121561125557600080fd5b8435611260816111ba565b935060208501359250604085013567ffffffffffffffff8082111561128457600080fd5b818701915087601f83011261129857600080fd5b8135818111156112a757600080fd5b8860208285010111156112b957600080fd5b95989497505060200194505050565b6000602082840312156112da57600080fd5b81516111ef816111ba565b6000602082840312156112f757600080fd5b815180151581146111ef57600080fd5b6020808252600f908201526e185c1c1c9bdd985b0819985a5b1959608a1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561135957611359611330565b500190565b600081518084526020808501945080840160005b838110156113975781516001600160a01b031687529582019590820190600101611372565b509495945050505050565b85815284602082015260a0604082015260006113c160a083018661135e565b6001600160a01b0394909416606083015250608001529392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611417576114176113de565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611446576114466113de565b604052919050565b600067ffffffffffffffff821115611468576114686113de565b5060051b60200190565b6000602080838503121561148557600080fd5b825167ffffffffffffffff81111561149c57600080fd5b8301601f810185136114ad57600080fd5b80516114c06114bb8261144e565b61141d565b81815260059190911b820183019083810190878311156114df57600080fd5b928401925b828410156114fd578351825292840192908401906114e4565b979650505050505050565b60008282101561151a5761151a611330565b500390565b634e487b7160e01b600052603260045260246000fd5b60008261155257634e487b7160e01b600052601260045260246000fd5b500490565b6000604080830185845260208281860152818654611579818590815260200190565b60008981526020812095509092505b816007820110156115fc57845463ffffffff808216855281861c81168686015281881c811688860152606082811c821690860152608082811c82169086015260a082811c82169086015260c082811c9091169085015260e090811c9084015260019094019361010090920191600801611588565b935493818110156116185763ffffffff85168352918301916001015b818110156116335784841c63ffffffff168352918301916001015b8181101561164e5784861c63ffffffff168352918301916001015b8181101561166b57606085901c63ffffffff168352918301916001015b8181101561168857608085901c63ffffffff168352918301916001015b818110156116a55760a085901c63ffffffff168352918301916001015b818110156116c25760c085901c63ffffffff168352918301916001015b818110156116d65760e085901c8352918301915b509098975050505050505050565b600082601f8301126116f557600080fd5b815167ffffffffffffffff81111561170f5761170f6113de565b6020611723601f8301601f1916820161141d565b828152858284870101111561173757600080fd5b60005b8381101561175557858101830151828201840152820161173a565b838111156117665760008385840101525b5095945050505050565b600082601f83011261178157600080fd5b815160206117916114bb8361144e565b82815260059290921b840181019181810190868411156117b057600080fd5b8286015b848110156117f057805167ffffffffffffffff8111156117d45760008081fd5b6117e28986838b01016116e4565b8452509183019183016117b4565b509695505050505050565b6000806000806080858703121561181157600080fd5b845167ffffffffffffffff8082111561182957600080fd5b818701915087601f83011261183d57600080fd5b8151602061184d6114bb8361144e565b8281526060928302850182019282820191908c85111561186c57600080fd5b958301955b848710156118c85780878e0312156118895760008081fd5b6118916113f4565b875161189c816111ba565b8152878501516118ab816111ba565b818601526040888101519082015283529586019591830191611871565b819a50838c0151995060408c01519650858711156118e557600080fd5b6118f18d888e016116e4565b9850808c0151965050505050508082111561190b57600080fd5b5061191887828801611770565b91505092959194509250565b84815260806020820152600061193d608083018661135e565b6001600160a01b0394909416604083015250606001529291505056fea2646970667358221220f68b23c3192b90f3d4a69a290e5fd70bf970ba2fc679637f0757ee815b5566b164736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class Uniswap2AdapterV4__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides) {\n        return super.getDeployTransaction(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides || {});\n    }\n    deploy(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides) {\n        return super.deploy(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nUniswap2AdapterV4__factory.bytecode = _bytecode;\nUniswap2AdapterV4__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        inputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"constructor\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"NewSubscription\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint32\",\n                name: \"domainId\",\n                type: \"uint32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"pricePerSecond\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"PaymentDetailsByChainUpdated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canBuy\",\n                type: \"bool\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canDelete\",\n                type: \"bool\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canEdit\",\n                type: \"bool\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canGrant\",\n                type: \"bool\",\n            },\n        ],\n        name: \"PermissionUpdated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                indexed: false,\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n        ],\n        name: \"ProjectCreated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"ProjectDeleted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                indexed: false,\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n        ],\n        name: \"ProjectUpdated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"previousAdminRole\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"newAdminRole\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"RoleAdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleGranted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleRevoked\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"StreamAdded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"StreamRemoved\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Subscribed\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"SubscriptionExtended\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [],\n        name: \"DEFAULT_ADMIN_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"TRUSTED_FORWARDER_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"TRUSTED_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"addStream\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streamIds\",\n                type: \"string[]\",\n            },\n        ],\n        name: \"addStreams\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"buyer\",\n                type: \"address\",\n            },\n        ],\n        name: \"canBuyProject\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isPurchable\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"isPublicPurchable\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadataJsonString\",\n                type: \"string\",\n            },\n        ],\n        name: \"createProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"deleteProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"enablePermissionType\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"exists\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n        ],\n        name: \"getAddressKey\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getOwnSubscription\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"domainId\",\n                type: \"uint32\",\n            },\n        ],\n        name: \"getPaymentDetailsByChain\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"pricePerSecond\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"streamsCount\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n        ],\n        name: \"getPermission\",\n        outputs: [\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission\",\n                name: \"permission\",\n                type: \"tuple\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n        ],\n        name: \"getProject\",\n        outputs: [\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetails\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getRoleAdmin\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"getSubscription\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"getTrustedRole\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"pure\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"grantRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"grantSubscription\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"hasPermissionType\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"userHasPermissionType\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"hasRole\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"hasValidSubscription\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"_streamRegistry\",\n                type: \"address\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"isDeleted\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"isStreamAdded\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"forwarder\",\n                type: \"address\",\n            },\n        ],\n        name: \"isTrustedForwarder\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"projects\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"state\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"removeStream\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"renounceRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n        ],\n        name: \"revokeAllPermissionsForUser\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"revokePermissionType\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"revokeRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canBuy\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"deletePerm\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canEdit\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canGrant\",\n                type: \"bool\",\n            },\n        ],\n        name: \"setPermissionBooleans\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32[]\",\n                name: \"projectIds\",\n                type: \"bytes32[]\",\n            },\n            {\n                internalType: \"address[][]\",\n                name: \"users\",\n                type: \"address[][]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission[][]\",\n                name: \"permissions\",\n                type: \"tuple[][]\",\n            },\n        ],\n        name: \"setPermissionsForMultipleProjects\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address[]\",\n                name: \"users\",\n                type: \"address[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission[]\",\n                name: \"permissions\",\n                type: \"tuple[]\",\n            },\n        ],\n        name: \"setPermissionsForMultipleUsers\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"newStreams\",\n                type: \"string[]\",\n            },\n        ],\n        name: \"setStreams\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"streamRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IStreamRegistry\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes4\",\n                name: \"interfaceId\",\n                type: \"bytes4\",\n            },\n        ],\n        name: \"supportsInterface\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"recipient\",\n                type: \"address\",\n            },\n        ],\n        name: \"transferAllPermissionsToUser\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"recipient\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"transferPermissionType\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"isPublicPurchable\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadataJsonString\",\n                type: \"string\",\n            },\n        ],\n        name: \"trustedCreateProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canBuy\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"deletePerm\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canEdit\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canGrant\",\n                type: \"bool\",\n            },\n        ],\n        name: \"trustedSetPermissions\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32[]\",\n                name: \"projectIds\",\n                type: \"bytes32[]\",\n            },\n            {\n                internalType: \"address[]\",\n                name: \"users\",\n                type: \"address[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission[]\",\n                name: \"permissions\",\n                type: \"tuple[]\",\n            },\n        ],\n        name: \"trustedSetPermissionsForMultipleProjects\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"domainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingToken\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"pricePerSecond\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"updatePaymentDetailsByChain\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadataJsonString\",\n                type: \"string\",\n            },\n        ],\n        name: \"updateProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60c06040523060805234801561001457600080fd5b50600060a05260805160a0516157f8620000596000396000505060008181611166015281816111a601528181611585015281816115c501526117cc01526157f86000f3fe6080604052600436106102ac5760003560e01c806357c6c5041161017557806391d14854116100dc578063d0a1895811610095578063ec5379c81161006f578063ec5379c814610964578063ef8514b314610984578063f5e0e0fb146109a4578063ff00bef6146109c457600080fd5b8063d0a18958146108eb578063d547741f1461090b578063e36421531461092b57600080fd5b806391d1485414610816578063a217fddf14610836578063a3d8713e1461084b578063b14f84321461087b578063b96ea12d1461089b578063c4d66de8146108cb57600080fd5b80636b4918b51161012e5780636b4918b5146107565780636ed84c141461077657806378d34a4e146107965780638459c68d146107b65780638fb8855d146107d65780639018998d146107f657600080fd5b806357c6c5041461062857806358006646146106485780635901692e146106685780635f28cb741461068a57806360d6c7cf146106c1578063678233251461071c57600080fd5b80632f2ff15d1161021957806349993c4b116101d257806349993c4b146105805780634f1ef286146105a0578063501b6bde146105b357806351cfeb9d146105d357806352d1902d146105f3578063572b6c051461060857600080fd5b80632f2ff15d146104a5578063353f8500146104c557806336568abe146104e65780633659cfe61461050657806338a699a41461052657806343e198b81461056057600080fd5b806318b0edf61161026b57806318b0edf6146103aa5780631aa198ee146103ca5780631f4e09af146103ea578063248a9ca31461040a5780632a3d99101461043a5780632affa4641461045a57600080fd5b8062cba943146102b1578062cf76a5146102f857806301ffc9a71461031a5780630e1429371461034a57806312f465611461036a57806317e770021461038a575b600080fd5b3480156102bd57600080fd5b506102e57fd3df22cd6a774f62b0ae21ffd602cc92e7f3390518eee8b33307fc70380da7d281565b6040519081526020015b60405180910390f35b34801561030457600080fd5b506103186103133660046141ac565b6109e4565b005b34801561032657600080fd5b5061033a610335366004614225565b610a75565b60405190151581526020016102ef565b34801561035657600080fd5b5061033a61036536600461424f565b610aac565b34801561037657600080fd5b506102e561038536600461424f565b610ad3565b34801561039657600080fd5b506103186103a536600461430e565b610b21565b3480156103b657600080fd5b506103186103c5366004614387565b610c80565b3480156103d657600080fd5b506103186103e5366004614452565b610cfd565b3480156103f657600080fd5b50610318610405366004614540565b610d4a565b34801561041657600080fd5b506102e561042536600461456e565b600090815260fb602052604090206001015490565b34801561044657600080fd5b5061033a610455366004614387565b610e24565b34801561046657600080fd5b5061047a61047536600461459b565b61100c565b604080516001600160a01b0395861681529490931660208501529183015260608201526080016102ef565b3480156104b157600080fd5b506103186104c036600461424f565b6110a4565b3480156104d157600080fd5b5060008051602061577c8339815191526102e5565b3480156104f257600080fd5b5061031861050136600461424f565b6110ce565b34801561051257600080fd5b506103186105213660046145c7565b61115c565b34801561053257600080fd5b5061033a61054136600461456e565b600090815261012e602052604090206005015463ffffffff1660011490565b34801561056c57600080fd5b5061031861057b3660046145e4565b61123b565b34801561058c57600080fd5b5061031861059b3660046146f5565b6112b8565b6103186105ae3660046147dd565b61157b565b3480156105bf57600080fd5b506103186105ce36600461424f565b611647565b3480156105df57600080fd5b506103186105ee366004614387565b611740565b3480156105ff57600080fd5b506102e56117bf565b34801561061457600080fd5b5061033a6106233660046145c7565b611872565b34801561063457600080fd5b50610318610643366004614840565b61189e565b34801561065457600080fd5b50610318610663366004614387565b611ae5565b34801561067457600080fd5b506102e560008051602061577c83398151915281565b34801561069657600080fd5b506106aa6106a536600461424f565b611b5b565b6040805192151583526020830191909152016102ef565b3480156106cd57600080fd5b506106e16106dc36600461424f565b611bd2565b6040516102ef919081511515815260208083015115159082015260408083015115159082015260609182015115159181019190915260800190565b34801561072857600080fd5b5061033a61073736600461456e565b600090815261012e602052604090206005015463ffffffff1660021490565b34801561076257600080fd5b50610318610771366004614919565b611cb4565b34801561078257600080fd5b506103186107913660046149b2565b611da7565b3480156107a257600080fd5b506103186107b136600461424f565b611ed6565b3480156107c257600080fd5b506103186107d1366004614a0b565b611fc0565b3480156107e257600080fd5b506103186107f1366004614a3b565b61225e565b34801561080257600080fd5b506103186108113660046146f5565b612363565b34801561082257600080fd5b5061033a61083136600461424f565b612439565b34801561084257600080fd5b506102e5600081565b34801561085757600080fd5b5061086b610866366004614ac2565b612464565b6040516102ef9493929190614c27565b34801561088757600080fd5b5061033a61089636600461424f565b612747565b3480156108a757600080fd5b506108bb6108b636600461456e565b612753565b6040516102ef9493929190614cbc565b3480156108d757600080fd5b506103186108e63660046145c7565b61280b565b3480156108f757600080fd5b5061031861090636600461456e565b612943565b34801561091757600080fd5b5061031861092636600461424f565b612a2f565b34801561093757600080fd5b5061012d5461094c906001600160a01b031681565b6040516001600160a01b0390911681526020016102ef565b34801561097057600080fd5b5061031861097f3660046141ac565b612a54565b34801561099057600080fd5b506106aa61099f36600461456e565b612a98565b3480156109b057600080fd5b506103186109bf366004614cf2565b612af1565b3480156109d057600080fd5b5061033a6109df366004614cf2565b612bbd565b85610a0881600090815261012e602052604090206005015463ffffffff1660011490565b610a2d5760405162461bcd60e51b8152600401610a2490614d30565b60405180910390fd5b86610a4181610a3a612c3e565b6003610e24565b610a5d5760405162461bcd60e51b8152600401610a2490614d67565b610a6b888888888888612c4d565b5050505050505050565b60006001600160e01b03198216637965db0b60e01b1480610aa657506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000610aba83600080610e24565b80610acc5750610acc83836000610e24565b9392505050565b600091825261012e602090815260409283902060050154835163ffffffff909116818301526001600160a01b0392909216828401528251808303840181526060909201909252805191012090565b84610b4581600090815261012e602052604090206005015463ffffffff1660011490565b610b615760405162461bcd60e51b8152600401610a2490614d30565b85610b6e81610a3a612c3e565b610b8a5760405162461bcd60e51b8152600401610a2490614d67565b848314610be95760405162461bcd60e51b815260206004820152602760248201527f6572726f725f696e76616c6964557365725065726d697373696f6e41727261796044820152664c656e6774687360c81b6064820152608401610a24565b8460005b81811015610c75576000868683818110610c0957610c09614d9e565b905060800201803603810190610c1f9190614db4565b9050610c628a8a8a85818110610c3757610c37614d9e565b9050602002016020810190610c4c91906145c7565b8351602085015160408601516060870151612c4d565b5080610c6d81614e4e565b915050610bed565b505050505050505050565b82610ca481600090815261012e602052604090206005015463ffffffff1660011490565b610cc05760405162461bcd60e51b8152600401610a2490614d30565b83610ccd81610a3a612c3e565b610ce95760405162461bcd60e51b8152600401610a2490614d67565b610cf68585856001612d47565b5050505050565b610d0f8b8b8b8b8b8b8b8b8a8a612f3c565b610d268b610d1b612c3e565b600180600180612c4d565b8215610d3d57610d3d8b6000600180600180612c4d565b5050505050505050505050565b82610d6e81600090815261012e602052604090206005015463ffffffff1660011490565b610d8a5760405162461bcd60e51b8152600401610a2490614d30565b83610d9781610a3a612c3e565b80610db75750610db760008051602061577c833981519152610831612c3e565b610e0f5760405162461bcd60e51b815260206004820152602360248201527f6572726f725f6e6f4772616e745065726d697373696f6e4f724e6f74547275736044820152621d195960ea1b6064820152608401610a24565b610e1a8585856132a9565b610cf68584613488565b600083610e4a81600090815261012e602052604090206005015463ffffffff1660011490565b610e665760405162461bcd60e51b8152600401610a2490614d30565b6000836003811115610e7a57610e7a614e67565b03610eb757600085815261012e6020526040812060070190610e9c8787610ad3565b815260208101919091526040016000205460ff169150611004565b6001836003811115610ecb57610ecb614e67565b03610f0d57600085815261012e6020526040812060070190610eed8787610ad3565b8152602081019190915260400160002054610100900460ff169150611004565b6002836003811115610f2157610f21614e67565b03610f6457600085815261012e6020526040812060070190610f438787610ad3565b815260208101919091526040016000205462010000900460ff169150611004565b6003836003811115610f7857610f78614e67565b03610fbc57600085815261012e6020526040812060070190610f9a8787610ad3565b81526020810191909152604001600020546301000000900460ff169150611004565b60405162461bcd60e51b815260206004820152601b60248201527f6572726f725f696e76616c69645065726d697373696f6e5479706500000000006044820152606401610a24565b509392505050565b6000806000808561103681600090815261012e602052604090206005015463ffffffff1660011490565b6110525760405162461bcd60e51b8152600401610a2490614d30565b5050506000938452505061012e6020908152604080842063ffffffff93909316845260028084019092529092208054600182015491909301546006909201546001600160a01b03938416949390911692565b600082815260fb60205260409020600101546110bf816135ab565b6110c983836135bc565b505050565b6110d6612c3e565b6001600160a01b0316816001600160a01b03161461114e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a24565b6111588282613643565b5050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036111a45760405162461bcd60e51b8152600401610a2490614e7d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111ed60008051602061575c833981519152546001600160a01b031690565b6001600160a01b0316146112135760405162461bcd60e51b8152600401610a2490614ec9565b61121c816136c8565b60408051600080825260208201909252611238918391906136fe565b50565b61125560008051602061577c833981519152610831612c3e565b6112715760405162461bcd60e51b8152600401610a2490614f15565b6112838c8c8c8c8c8c8c8c8a8a612f3c565b6112938c85600180600180612c4d565b82156112aa576112aa8c6000600180600180612c4d565b505050505050505050505050565b826112dc81600090815261012e602052604090206005015463ffffffff1660011490565b6112f85760405162461bcd60e51b8152600401610a2490614d30565b8361130c81611305612c3e565b6002610e24565b6113285760405162461bcd60e51b8152600401610a2490614f4c565b600085815261012e60205260408120600681018054919290919060088401905b878110156113e3573660008a8a8481811061136557611365614d9e565b90506020028101906113779190614f7c565b91509150600084838360405161138e929190614fc2565b90815260200160405180910390205411156113ce57670de0b6b3a76400008483836040516113bd929190614fc2565b908152604051908190036020019020555b505080806113db90614e4e565b915050611348565b506000805b8381101561151a57600085828154811061140457611404614d9e565b906000526020600020019050838160405161141f919061500c565b908152602001604051809103902054670de0b6b3a7640000036114ac578282111561147a578086848154811061145757611457614d9e565b9060005260206000200190805461146d90614fd2565b611478929190613fac565b505b8261148481614e4e565b935050828482604051611497919061500c565b90815260405190819003602001902055611507565b83816040516114bb919061500c565b9081526020016040518091039020600090557f57371a8f367da21930d86f4c1df1dd17ad2a3cc972538f07ee7b81bc4e3929358c826040516114fe92919061507e565b60405180910390a15b508061151281614e4e565b9150506113e8565b505b8281101561156457838054806115345761153461510b565b6001900381819060005260206000200160006115509190614037565b90558061155c81614e4e565b91505061151c565b61156f8a8a8a612363565b50505050505050505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036115c35760405162461bcd60e51b8152600401610a2490614e7d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661160c60008051602061575c833981519152546001600160a01b031690565b6001600160a01b0316146116325760405162461bcd60e51b8152600401610a2490614ec9565b61163b826136c8565b611158828260016136fe565b6000611655836106dc612c3e565b805190915080611666575080602001515b80611672575080604001515b8061167e575080606001515b6116ca5760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f6e6f5065726d697373696f6e546f5472616e73666572000000006044820152606401610a24565b60006116d68484611bd2565b905061172384848460000151806116eb575083515b8560200151806116fc575084602001515b86604001518061170d575085604001515b87606001518061171e575086606001515b612c4d565b61173a8461172f612c3e565b600080600080612c4d565b50505050565b6117528361174c612c3e565b83610e24565b61179e5760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f6e6f5065726d697373696f6e546f5472616e73666572000000006044820152606401610a24565b6117b2836117aa612c3e565b836000612d47565b6110c98383836001612d47565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461185f5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610a24565b5060008051602061575c83398151915290565b6000610aa67fd3df22cd6a774f62b0ae21ffd602cc92e7f3390518eee8b33307fc70380da7d283612439565b896118c281600090815261012e602052604090206005015463ffffffff1660011490565b6118de5760405162461bcd60e51b8152600401610a2490614d30565b8a6118eb81611305612c3e565b6119075760405162461bcd60e51b8152600401610a2490614f4c565b60008c815261012e602052604090206001810186905561192b600482018686614071565b5080546119399089896112b8565b8c7f51c034fd819648c77e0ca81612e46789853c82fdb09810a790590a6a706f46b88d8d8d8d8d8d8d8d8d604051611979999897969594939291906151cd565b60405180910390a260005b8b811015611ad5578a8a8281811061199e5761199e614d9e565b9050606002018260020160008f8f858181106119bc576119bc614d9e565b90506020020160208101906119d191906152b4565b63ffffffff16815260208101919091526040016000206119f182826152ef565b9050508d7f53b13732e3009cbbdd98bd95648df424951030e4fc01a624bbc49ef53e5670048e8e84818110611a2857611a28614d9e565b9050602002016020810190611a3d91906152b4565b8d8d85818110611a4f57611a4f614d9e565b611a6592602060609092020190810191506145c7565b8e8e86818110611a7757611a77614d9e565b9050606002016020016020810190611a8f91906145c7565b8f8f87818110611aa157611aa1614d9e565b90506060020160400135604051611abb949392919061532f565b60405180910390a280611acd81614e4e565b915050611984565b5050505050505050505050505050565b82611b0981600090815261012e602052604090206005015463ffffffff1660011490565b611b255760405162461bcd60e51b8152600401610a2490614d30565b83611b3281610a3a612c3e565b611b4e5760405162461bcd60e51b8152600401610a2490614d67565b610cf68585856000612d47565b60008083611b8281600090815261012e602052604090206005015463ffffffff1660011490565b611b9e5760405162461bcd60e51b8152600401610a2490614d30565b505050600091825261012e602090815260408084206001600160a01b03939093168452600390920190529020544281101591565b60408051608081018252600080825260208201819052918101829052606081019190915282611c1a81600090815261012e602052604090206005015463ffffffff1660011490565b611c365760405162461bcd60e51b8152600401610a2490614d30565b600084815261012e6020526040812060070190611c538686610ad3565b815260208082019290925260409081016000208151608081018352905460ff80821615158352610100820481161515948301949094526201000081048416151592820192909252630100000090910490911615156060820152949350505050565b8281148015611cc257508085145b611d255760405162461bcd60e51b815260206004820152602e60248201527f6572726f725f696e76616c696450726f6a656374557365725065726d6973736960448201526d6f6e41727261794c656e6774687360901b6064820152608401610a24565b8460005b81811015610a6b57611d95888883818110611d4657611d46614d9e565b90506020020135878784818110611d5f57611d5f614d9e565b9050602002810190611d71919061535c565b878786818110611d8357611d83614d9e565b90506020028101906103a591906153a5565b80611d9f81614e4e565b915050611d29565b84611dcb81600090815261012e602052604090206005015463ffffffff1660011490565b611de75760405162461bcd60e51b8152600401610a2490614d30565b85611df481611305612c3e565b611e105760405162461bcd60e51b8152600401610a2490614f4c565b604080516060810182526001600160a01b038088168252868116602080840191825283850188815260008d815261012e835286812063ffffffff8e168252600280820190945290879020865181549087166001600160a01b031991821617825594516001820180549190971695169490941790945551910155915190919089907f53b13732e3009cbbdd98bd95648df424951030e4fc01a624bbc49ef53e56700490611ec3908b908b908b908b9061532f565b60405180910390a2505050505050505050565b81611efa81600090815261012e602052604090206005015463ffffffff1660011490565b611f165760405162461bcd60e51b8152600401610a2490614d30565b82611f2381610a3a612c3e565b611f3f5760405162461bcd60e51b8152600401610a2490614d67565b600084815261012e6020526040812060070190611f5c8686610ad3565b8152602081019190915260409081016000908120805463ffffffff1916905590517f9aceeb9d8b751f2606e1109c003817477a669e7426397c1d22f1b9362e3e4ccd91611fb291879187918190819081906153ee565b60405180910390a150505050565b81611fe481600090815261012e602052604090206005015463ffffffff1660011490565b6120005760405162461bcd60e51b8152600401610a2490614d30565b8261200d81611305612c3e565b6120295760405162461bcd60e51b8152600401610a2490614f4c565b600084815261012e602052604080822090516006820192600890920191908290612054908890615425565b9081526020016040518091039020549050600081116120ac5760405162461bcd60e51b8152602060048201526014602482015273195c9c9bdc97dcdd1c99585b539bdd119bdd5b9960621b6044820152606401610a24565b8254600110156121cd57825460009084906120c990600190615441565b815481106120d9576120d9614d9e565b9060005260206000200180546120ee90614fd2565b80601f016020809104026020016040519081016040528092919081815260200182805461211a90614fd2565b80156121675780601f1061213c57610100808354040283529160200191612167565b820191906000526020600020905b81548152906001019060200180831161214a57829003601f168201915b50505050509050808460018461217d9190615441565b8154811061218d5761218d614d9e565b9060005260206000200190805190602001906121aa9291906140e5565b508183826040516121bb9190615425565b90815260405190819003602001902055505b828054806121dd576121dd61510b565b6001900381819060005260206000200160006121f99190614037565b9055818660405161220a9190615425565b9081526020016040518091039020600090557f57371a8f367da21930d86f4c1df1dd17ad2a3cc972538f07ee7b81bc4e392935878760405161224d929190615458565b60405180910390a150505050505050565b61227860008051602061577c833981519152610831612c3e565b6122945760405162461bcd60e51b8152600401610a2490614f15565b8281146122e35760405162461bcd60e51b815260206004820152601e60248201527f6572726f725f696e76616c6964496e70757441727261794c656e6774687300006044820152606401610a24565b8460005b81811015610a6b57600088888381811061230357612303614d9e565b905060200201359050600085858481811061232057612320614d9e565b9050608002018036038101906123369190614db4565b905061234e82898986818110610c3757610c37614d9e565b5050808061235b90614e4e565b9150506122e7565b8261238781600090815261012e602052604090206005015463ffffffff1660011490565b6123a35760405162461bcd60e51b8152600401610a2490614d30565b836123b081611305612c3e565b6123cc5760405162461bcd60e51b8152600401610a2490614f4c565b60005b83811015612431573660008686848181106123ec576123ec614d9e565b90506020028101906123fe9190614f7c565b9150915061240d888383612bbd565b61241c5761241c888383613869565b5050808061242990614e4e565b9150506123cf565b505050505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060006060808561248f81600090815261012e602052604090206005015463ffffffff1660011490565b6124ab5760405162461bcd60e51b8152600401610a2490614d30565b600087815261012e6020526040902086516001600160401b038111156124d3576124d3614740565b60405190808252806020026020018201604052801561251e57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816124f15790505b50955060005b87518110156125c65781600201600089838151811061254557612545614d9e565b60209081029190910181015163ffffffff168252818101929092526040908101600020815160608101835281546001600160a01b03908116825260018301541693810193909352600201549082015287518890839081106125a8576125a8614d9e565b602002602001018190525080806125be90614e4e565b915050612524565b5085816001015482600401836006018180546125e190614fd2565b80601f016020809104026020016040519081016040528092919081815260200182805461260d90614fd2565b801561265a5780601f1061262f5761010080835404028352916020019161265a565b820191906000526020600020905b81548152906001019060200180831161263d57829003601f168201915b5050505050915080805480602002602001604051908101604052809291908181526020016000905b8282101561272e5783829060005260206000200180546126a190614fd2565b80601f01602080910402602001604051908101604052809291908181526020018280546126cd90614fd2565b801561271a5780601f106126ef5761010080835404028352916020019161271a565b820191906000526020600020905b8154815290600101906020018083116126fd57829003601f168201915b505050505081526020019060010190612682565b5050505090509550955095509550505092959194509250565b60006110048383611b5b565b61012e602052600090815260409020805460018201546004830180549293919261277c90614fd2565b80601f01602080910402602001604051908101604052809291908181526020018280546127a890614fd2565b80156127f55780601f106127ca576101008083540402835291602001916127f5565b820191906000526020600020905b8154815290600101906020018083116127d857829003601f168201915b5050506005909301549192505063ffffffff1684565b600054610100900460ff161580801561282b5750600054600160ff909116105b806128455750303b158015612845575060005460ff166001145b6128a85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a24565b6000805460ff1916600117905580156128cb576000805461ff0019166101001790555b6128d36139de565b6128de600033613a4b565b61012d80546001600160a01b0319166001600160a01b0384161790558015611158576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b8061296781600090815261012e602052604090206005015463ffffffff1660011490565b6129835760405162461bcd60e51b8152600401610a2490614d30565b8161299781612990612c3e565b6001610e24565b6129e35760405162461bcd60e51b815260206004820152601860248201527f6572726f725f6e6f44656c6574655065726d697373696f6e00000000000000006044820152606401610a24565b600083815261012e6020526040808220600501805463ffffffff191660021790555184917f9ab5c00c5b6d37ab8d5d4557762bab6573be95818d4d9122abc6f9d8f71cd51c91a2505050565b600082815260fb6020526040902060010154612a4a816135ab565b6110c98383613643565b612a6e60008051602061577c833981519152610831612c3e565b612a8a5760405162461bcd60e51b8152600401610a2490614f15565b612431868686868686612c4d565b60008082612abf81600090815261012e602052604090206005015463ffffffff1660011490565b612adb5760405162461bcd60e51b8152600401610a2490614d30565b612ae7846106a5612c3e565b9250925050915091565b82612b1581600090815261012e602052604090206005015463ffffffff1660011490565b612b315760405162461bcd60e51b8152600401610a2490614d30565b83612b3e81611305612c3e565b612b5a5760405162461bcd60e51b8152600401610a2490614f4c565b612b65858585612bbd565b15612bb25760405162461bcd60e51b815260206004820152601860248201527f6572726f725f73747265616d416c7265616479416464656400000000000000006044820152606401610a24565b610cf6858585613869565b600083612be381600090815261012e602052604090206005015463ffffffff1660011490565b612bff5760405162461bcd60e51b8152600401610a2490614d30565b600085815261012e60205260408082209051600890910190612c249087908790614fc2565b908152602001604051809103902054119150509392505050565b6000612c48613a55565b905090565b6000604051806080016040528086151581526020018515158152602001841515815260200183151581525090508061012e60008981526020019081526020016000206007016000612c9e8a8a610ad3565b81526020808201929092526040908101600020835181549385015185840151606090960151151563010000000263ff0000001996151562010000029690961663ffff0000199115156101000261ff00199315159390931661ffff1990961695909517919091171692909217929092179055517f9aceeb9d8b751f2606e1109c003817477a669e7426397c1d22f1b9362e3e4ccd9061224d908990899089908990899089906153ee565b6000826003811115612d5b57612d5b614e67565b03612da557600084815261012e602052604081208291600790910190612d818787610ad3565b81526020810191909152604001600020805460ff1916911515919091179055612ed6565b6001826003811115612db957612db9614e67565b03612e0a57600084815261012e602052604081208291600790910190612ddf8787610ad3565b8152602081019190915260400160002080549115156101000261ff0019909216919091179055612ed6565b6002826003811115612e1e57612e1e614e67565b03612e7157600084815261012e602052604081208291600790910190612e448787610ad3565b815260208101919091526040016000208054911515620100000262ff000019909216919091179055612ed6565b6003826003811115612e8557612e85614e67565b03610fbc57600084815261012e602052604081208291600790910190612eab8787610ad3565b81526020810191909152604001600020805491151563010000000263ff000000199092169190911790555b6000612ee28585611bd2565b90507f9aceeb9d8b751f2606e1109c003817477a669e7426397c1d22f1b9362e3e4ccd85858360000151846020015185604001518660600151604051612f2d969594939291906153ee565b60405180910390a15050505050565b60008a9003612f835760405162461bcd60e51b8152602060048201526013602482015272195c9c9bdc97db9d5b1b141c9bda9958dd1259606a1b6044820152606401610a24565b60008a815261012e602052604090206005015463ffffffff16600203612fe15760405162461bcd60e51b8152602060048201526013602482015272195c9c9bdc97dd5cd959141c9bda9958dd1259606a1b6044820152606401610a24565b6130048a600090815261012e602052604090206005015463ffffffff1660011490565b156130475760405162461bcd60e51b81526020600482015260136024820152726572726f725f616c726561647945786973747360681b6044820152606401610a24565b8786146130a15760405162461bcd60e51b815260206004820152602260248201527f6572726f725f696e76616c69645061796d656e7444657461696c73427943686160448201526134b760f11b6064820152608401610a24565b60008a815261012e602052604081208b8155905b858110156130fc576130ea8c8888848181106130d3576130d3614d9e565b90506020028101906130e59190614f7c565b613869565b806130f481614e4e565b9150506130b5565b5060018101849055613112600482018484614071565b5060058101805463ffffffff191660011790556040518b907f122f53e958319de8a721dfd51145febb3aa3ad7561f1439c0c9e9aa26212ef1690613167908d908d908d908d908d908d908d908d908d906151cd565b60405180910390a260005b898110156112aa57600089898381811061318e5761318e614d9e565b9050606002018036038101906131a49190615479565b9050808360020160008e8e868181106131bf576131bf614d9e565b90506020020160208101906131d491906152b4565b63ffffffff1681526020808201929092526040908101600020835181546001600160a01b03199081166001600160a01b039283161783559385015160018301805490951691161790925591909101516002909101558c7f53b13732e3009cbbdd98bd95648df424951030e4fc01a624bbc49ef53e5670048d8d8581811061325d5761325d614d9e565b905060200201602081019061327291906152b4565b83516020850151604080870151905161328e949392919061532f565b60405180910390a250806132a181614e4e565b915050613172565b600083815261012e602090815260408083206001600160a01b038516845260038101909252822080549192909142101561337b57600085116133235760405162461bcd60e51b8152602060048201526013602482015272195c9c9bdc97dd1bdc155c151bdbd4db585b1b606a1b6044820152606401610a24565b81546133309086906154e3565b80835583546040518281529192506001600160a01b038616917f602ca7f17c81aa5e62b3381000dd445f5af7c333574da85f4b246288afc073229060200160405180910390a361343f565b82600101548510156133cf5760405162461bcd60e51b815260206004820152601d60248201527f6572726f725f6e6577537562736372697074696f6e546f6f536d616c6c0000006044820152606401610a24565b6133d985426154e3565b60408051602080820183528382526001600160a01b0388166000818152600389018352849020835190558754935185815294955091939192917f9c3ab7e86c11d820cc311335294ebdf7299d8637d47253b930c4120b775d7cca910160405180910390a3505b82546040518281526001600160a01b03861691907fe22e8c2d8a284063fec10f270bc3c776ffb40bcf816b73eef36354d5f3d7b3d49060200160405180910390a3505050505050565b600082815261012e6020908152604080832060060180548251818502810185019093528083529192909190849084015b828210156135645783829060005260206000200180546134d790614fd2565b80601f016020809104026020016040519081016040528092919081815260200182805461350390614fd2565b80156135505780601f1061352557610100808354040283529160200191613550565b820191906000526020600020905b81548152906001019060200180831161353357829003601f168201915b5050505050815260200190600101906134b8565b50505050905060005b815181101561173a5761359982828151811061358b5761358b614d9e565b602002602001015184613a77565b806135a381614e4e565b91505061356d565b611238816135b7612c3e565b613b73565b6135c68282612439565b61115857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135ff612c3e565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61364d8282612439565b1561115857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19169055613684612c3e565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6136e260008051602061577c833981519152610831612c3e565b6112385760405162461bcd60e51b8152600401610a2490614f15565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613731576110c983613bcc565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561378b575060408051601f3d908101601f19168201909252613788918101906154fb565b60015b6137ee5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610a24565b60008051602061575c833981519152811461385d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610a24565b506110c9838383613c68565b61012d546001600160a01b03166388b210388383613885612c3e565b60046040518563ffffffff1660e01b81526004016138a69493929190615514565b602060405180830381865afa1580156138c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138e79190615566565b6139335760405162461bcd60e51b815260206004820181905260248201527f6572726f725f6e6f4772616e745065726d697373696f6e466f7253747265616d6044820152606401610a24565b600083815261012e6020908152604082206006018054600181018255908352912061396091018383614071565b50600083815261012e6020526040908190206006810154915160089091019061398c9085908590614fc2565b9081526020016040518091039020819055507f369d82649fc61d1d3254d152682f60119e0889b51886e817df5a3021ee301f9f8383836040516139d193929190615583565b60405180910390a1505050565b600054610100900460ff16613a495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610a24565b565b61115882826135bc565b6000613a6033611872565b15613a72575060131936013560601c90565b503390565b61012d54604051637479c14760e11b81526000916001600160a01b03169063e8f3828e90613aab908690869060040161559d565b60a060405180830381865afa158015613ac8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aec91906155c7565b61012d54815160208301516040808501516080860151915163b6a9159760e01b81529596506001600160a01b039094169463b6a9159794613b3c948a948a9491939092916000199160040161564e565b600060405180830381600087803b158015613b5657600080fd5b505af1158015613b6a573d6000803e3d6000fd5b50505050505050565b613b7d8282612439565b61115857613b8a81613c8d565b613b95836020613c9f565b604051602001613ba692919061569d565b60408051601f198184030181529082905262461bcd60e51b8252610a2491600401615712565b6001600160a01b0381163b613c395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610a24565b60008051602061575c83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613c7183613e3a565b600082511180613c7e5750805b156110c95761173a8383613e7a565b6060610aa66001600160a01b03831660145b60606000613cae836002615725565b613cb99060026154e3565b6001600160401b03811115613cd057613cd0614740565b6040519080825280601f01601f191660200182016040528015613cfa576020820181803683370190505b509050600360fc1b81600081518110613d1557613d15614d9e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613d4457613d44614d9e565b60200101906001600160f81b031916908160001a9053506000613d68846002615725565b613d739060016154e3565b90505b6001811115613deb576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613da757613da7614d9e565b1a60f81b828281518110613dbd57613dbd614d9e565b60200101906001600160f81b031916908160001a90535060049490941c93613de481615744565b9050613d76565b508315610acc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a24565b613e4381613bcc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b613ee25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610a24565b600080846001600160a01b031684604051613efd9190615425565b600060405180830381855af49150503d8060008114613f38576040519150601f19603f3d011682016040523d82523d6000602084013e613f3d565b606091505b5091509150613f65828260405180606001604052806027815260200161579c60279139613f6e565b95945050505050565b60608315613f7d575081610acc565b610acc8383815115613f925781518083602001fd5b8060405162461bcd60e51b8152600401610a249190615712565b828054613fb890614fd2565b90600052602060002090601f016020900481019282613fda5760008555614027565b82601f10613feb5780548555614027565b8280016001018555821561402757600052602060002091601f016020900482015b8281111561402757825482559160010191906001019061400c565b50614033929150614159565b5090565b50805461404390614fd2565b6000825580601f10614053575050565b601f0160209004906000526020600020908101906112389190614159565b82805461407d90614fd2565b90600052602060002090601f01602090048101928261409f5760008555614027565b82601f106140b85782800160ff19823516178555614027565b82800160010185558215614027579182015b828111156140275782358255916020019190600101906140ca565b8280546140f190614fd2565b90600052602060002090601f0160209004810192826141135760008555614027565b82601f1061412c57805160ff1916838001178555614027565b82800160010185558215614027579182015b8281111561402757825182559160200191906001019061413e565b5b80821115614033576000815560010161415a565b6001600160a01b038116811461123857600080fd5b803561418e8161416e565b919050565b801515811461123857600080fd5b803561418e81614193565b60008060008060008060c087890312156141c557600080fd5b8635955060208701356141d78161416e565b945060408701356141e781614193565b935060608701356141f781614193565b9250608087013561420781614193565b915060a087013561421781614193565b809150509295509295509295565b60006020828403121561423757600080fd5b81356001600160e01b031981168114610acc57600080fd5b6000806040838503121561426257600080fd5b8235915060208301356142748161416e565b809150509250929050565b60008083601f84011261429157600080fd5b5081356001600160401b038111156142a857600080fd5b6020830191508360208260051b85010111156142c357600080fd5b9250929050565b60008083601f8401126142dc57600080fd5b5081356001600160401b038111156142f357600080fd5b6020830191508360208260071b85010111156142c357600080fd5b60008060008060006060868803121561432657600080fd5b8535945060208601356001600160401b038082111561434457600080fd5b61435089838a0161427f565b9096509450604088013591508082111561436957600080fd5b50614376888289016142ca565b969995985093965092949392505050565b60008060006060848603121561439c57600080fd5b8335925060208401356143ae8161416e565b91506040840135600481106143c257600080fd5b809150509250925092565b60008083601f8401126143df57600080fd5b5081356001600160401b038111156143f657600080fd5b6020830191508360206060830285010111156142c357600080fd5b60008083601f84011261442357600080fd5b5081356001600160401b0381111561443a57600080fd5b6020830191508360208285010111156142c357600080fd5b600080600080600080600080600080600060e08c8e03121561447357600080fd5b8b359a506001600160401b038060208e0135111561449057600080fd5b6144a08e60208f01358f0161427f565b909b50995060408d01358110156144b657600080fd5b6144c68e60408f01358f016143cd565b909950975060608d01358110156144dc57600080fd5b6144ec8e60608f01358f0161427f565b909750955060808d0135945061450460a08e016141a1565b93508060c08e0135111561451757600080fd5b506145288d60c08e01358e01614411565b81935080925050509295989b509295989b9093969950565b60008060006060848603121561455557600080fd5b833592506020840135915060408401356143c28161416e565b60006020828403121561458057600080fd5b5035919050565b803563ffffffff8116811461418e57600080fd5b600080604083850312156145ae57600080fd5b823591506145be60208401614587565b90509250929050565b6000602082840312156145d957600080fd5b8135610acc8161416e565b6000806000806000806000806000806000806101008d8f03121561460757600080fd5b8c359b506001600160401b0360208e0135111561462357600080fd5b6146338e60208f01358f0161427f565b909b5099506001600160401b0360408e0135111561465057600080fd5b6146608e60408f01358f016143cd565b90995097506001600160401b0360608e0135111561467d57600080fd5b61468d8e60608f01358f0161427f565b909750955060808d013594506146a560a08e01614183565b93506146b360c08e016141a1565b92506001600160401b0360e08e013511156146cd57600080fd5b6146dd8e60e08f01358f01614411565b81935080925050509295989b509295989b509295989b565b60008060006040848603121561470a57600080fd5b8335925060208401356001600160401b0381111561472757600080fd5b6147338682870161427f565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561477e5761477e614740565b604052919050565b60006001600160401b0383111561479f5761479f614740565b6147b2601f8401601f1916602001614756565b90508281528383830111156147c657600080fd5b828260208301376000602084830101529392505050565b600080604083850312156147f057600080fd5b82356147fb8161416e565b915060208301356001600160401b0381111561481657600080fd5b8301601f8101851361482757600080fd5b61483685823560208401614786565b9150509250929050565b60008060008060008060008060008060c08b8d03121561485f57600080fd5b8a35995060208b01356001600160401b038082111561487d57600080fd5b6148898e838f0161427f565b909b50995060408d01359150808211156148a257600080fd5b6148ae8e838f016143cd565b909950975060608d01359150808211156148c757600080fd5b6148d38e838f0161427f565b909750955060808d0135945060a08d01359150808211156148f357600080fd5b506149008d828e01614411565b915080935050809150509295989b9194979a5092959850565b6000806000806000806060878903121561493257600080fd5b86356001600160401b038082111561494957600080fd5b6149558a838b0161427f565b9098509650602089013591508082111561496e57600080fd5b61497a8a838b0161427f565b9096509450604089013591508082111561499357600080fd5b506149a089828a0161427f565b979a9699509497509295939492505050565b600080600080600060a086880312156149ca57600080fd5b853594506149da60208701614587565b935060408601356149ea8161416e565b925060608601356149fa8161416e565b949793965091946080013592915050565b60008060408385031215614a1e57600080fd5b8235915060208301356001600160401b0381111561481657600080fd5b60008060008060008060608789031215614a5457600080fd5b86356001600160401b0380821115614a6b57600080fd5b614a778a838b0161427f565b90985096506020890135915080821115614a9057600080fd5b614a9c8a838b0161427f565b90965094506040890135915080821115614ab557600080fd5b506149a089828a016142ca565b60008060408385031215614ad557600080fd5b823591506020808401356001600160401b0380821115614af457600080fd5b818601915086601f830112614b0857600080fd5b813581811115614b1a57614b1a614740565b8060051b9150614b2b848301614756565b8181529183018401918481019089841115614b4557600080fd5b938501935b83851015614b6a57614b5b85614587565b82529385019390850190614b4a565b8096505050505050509250929050565b60005b83811015614b95578181015183820152602001614b7d565b8381111561173a5750506000910152565b60008151808452614bbe816020860160208601614b7a565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015614c1a578284038952614c08848351614ba6565b98850198935090840190600101614bf0565b5091979650505050505050565b6080808252855190820181905260009060209060a0840190828901845b82811015614c8257815180516001600160a01b0390811686528682015116868601526040908101519085015260609093019290840190600101614c44565b50505086828501528381036040850152614c9c8187614ba6565b9150508281036060840152614cb18185614bd2565b979650505050505050565b848152836020820152608060408201526000614cdb6080830185614ba6565b905063ffffffff8316606083015295945050505050565b600080600060408486031215614d0757600080fd5b8335925060208401356001600160401b03811115614d2457600080fd5b61473386828701614411565b60208082526019908201527f6572726f725f70726f6a656374446f65734e6f74457869737400000000000000604082015260600190565b60208082526017908201527f6572726f725f6e6f4772616e745065726d697373696f6e000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060808284031215614dc657600080fd5b604051608081018181106001600160401b0382111715614de857614de8614740565b6040528235614df681614193565b81526020830135614e0681614193565b60208201526040830135614e1981614193565b60408201526060830135614e2c81614193565b60608201529392505050565b634e487b7160e01b600052601160045260246000fd5b600060018201614e6057614e60614e38565b5060010190565b634e487b7160e01b600052602160045260246000fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60208082526017908201527f6572726f725f6d757374426554727573746564526f6c65000000000000000000604082015260600190565b60208082526016908201527532b93937b92fb737a2b234ba2832b936b4b9b9b4b7b760511b604082015260600190565b6000808335601e19843603018112614f9357600080fd5b8301803591506001600160401b03821115614fad57600080fd5b6020019150368190038213156142c357600080fd5b8183823760009101908152919050565b600181811c90821680614fe657607f821691505b60208210810361500657634e487b7160e01b600052602260045260246000fd5b50919050565b600080835461501a81614fd2565b60018281168015615032576001811461504357615072565b60ff19841687528287019450615072565b8760005260208060002060005b858110156150695781548a820152908401908201615050565b50505082870194505b50929695505050505050565b828152600060206040818401526000845461509881614fd2565b80604087015260606001808416600081146150ba57600181146150ce576150fc565b60ff198516898401526080890195506150fc565b896000528660002060005b858110156150f45781548b82018601529083019088016150d9565b8a0184019650505b50939998505050505050505050565b634e487b7160e01b600052603160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b81835260006020808501808196508560051b810191508460005b87811015614c1a5782840389528135601e1988360301811261518557600080fd5b870180356001600160401b0381111561519d57600080fd5b8036038913156151ac57600080fd5b6151b98682898501615121565b9a87019a9550505090840190600101615164565b60a0808252810189905260008a60c08301825b8c81101561520b5763ffffffff6151f684614587565b168252602092830192909101906001016151e0565b508381036020858101919091528a825291508a90820160005b8b8110156152735782356152378161416e565b6001600160a01b03908116835283850135906152528261416e565b16828501526040838101359083015260609283019290910190600101615224565b508481036040860152615287818a8c61514a565b9250505085606084015282810360808401526152a4818587615121565b9c9b505050505050505050505050565b6000602082840312156152c657600080fd5b610acc82614587565b80546001600160a01b0319166001600160a01b0392909216919091179055565b81356152fa8161416e565b61530481836152cf565b5060208201356153138161416e565b61532081600184016152cf565b50604082013560028201555050565b63ffffffff9490941684526001600160a01b03928316602085015291166040830152606082015260800190565b6000808335601e1984360301811261537357600080fd5b8301803591506001600160401b0382111561538d57600080fd5b6020019150600581901b36038213156142c357600080fd5b6000808335601e198436030181126153bc57600080fd5b8301803591506001600160401b038211156153d657600080fd5b6020019150600781901b36038213156142c357600080fd5b9586526001600160a01b0394909416602086015291151560408501521515606084015215156080830152151560a082015260c00190565b60008251615437818460208701614b7a565b9190910192915050565b60008282101561545357615453614e38565b500390565b8281526040602082015260006154716040830184614ba6565b949350505050565b60006060828403121561548b57600080fd5b604051606081018181106001600160401b03821117156154ad576154ad614740565b60405282356154bb8161416e565b815260208301356154cb8161416e565b60208201526040928301359281019290925250919050565b600082198211156154f6576154f6614e38565b500190565b60006020828403121561550d57600080fd5b5051919050565b606081526000615528606083018688615121565b6001600160a01b038516602084015290506005831061555757634e487b7160e01b600052602160045260246000fd5b82604083015295945050505050565b60006020828403121561557857600080fd5b8151610acc81614193565b838152604060208201526000613f65604083018486615121565b6040815260006155b06040830185614ba6565b905060018060a01b03831660208301529392505050565b600060a082840312156155d957600080fd5b60405160a081018181106001600160401b03821117156155fb576155fb614740565b604052825161560981614193565b8152602083015161561981614193565b806020830152506040830151604082015260608301516060820152608083015161564281614193565b60808201529392505050565b60e08152600061566160e083018a614ba6565b6001600160a01b039890981660208301525094151560408601529215156060850152608084019190915260a0830152151560c090910152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516156d5816017850160208801614b7a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615706816028840160208801614b7a565b01602801949350505050565b602081526000610acc6020830184614ba6565b600081600019048311821515161561573f5761573f614e38565b500290565b60008161575357615753614e38565b50600019019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc2de84d9fbdf6d06e2cc584295043dbd76046423b9f8bae9426d4fa5e7c03f4a7416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220367c630a8745ae5041bcceac9225522efb9510e5e8377954d7dd8344c5141f2c64736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class ProjectRegistryV1__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nProjectRegistryV1__factory.bytecode = _bytecode;\nProjectRegistryV1__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        inputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"constructor\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"previousAdminRole\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"newAdminRole\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"RoleAdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleGranted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleRevoked\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Stake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"projectStake\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Stake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Unstake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"projectStake\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Unstake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [],\n        name: \"DEFAULT_ADMIN_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"UPGRADER_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getProjectStake\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"projectStake\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getRoleAdmin\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"getTotalStake\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"totalStake\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"userAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"getUserStake\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"userStake\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"grantRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"hasRole\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"projectRegistryAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"tokenAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"onTokenTransfer\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"projectRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IProjectRegistryV1\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"renounceRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"revokeRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"stake\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"stakingTokenAddress\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes4\",\n                name: \"interfaceId\",\n                type: \"bytes4\",\n            },\n        ],\n        name: \"supportsInterface\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"unstake\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60a06040523060805234801561001457600080fd5b50608051611ae661004c6000396000818161055f0152818161059f015281816107bd015281816107fd015261088c0152611ae66000f3fe60806040526004361061011f5760003560e01c80635a33d8dc116100a0578063a217fddf11610064578063a217fddf1461033c578063a4c0ed3614610351578063bbadc93a14610371578063d547741f146103a7578063f72c0d8b146103c757600080fd5b80635a33d8dc146102995780637bc74225146102b95780637e591001146102cf5780638caa5230146102fc57806391d148541461031c57600080fd5b80633659cfe6116100e75780633659cfe6146101f9578063485cc955146102195780634f1ef286146102395780635298b8691461024c57806352d1902d1461028457600080fd5b806301ffc9a71461012457806316ae261d14610159578063248a9ca31461017b5780632f2ff15d146101b957806336568abe146101d9575b600080fd5b34801561013057600080fd5b5061014461013f3660046115c4565b6103fb565b60405190151581526020015b60405180910390f35b34801561016557600080fd5b506101796101743660046115ee565b610432565b005b34801561018757600080fd5b506101ab610196366004611610565b60009081526065602052604090206001015490565b604051908152602001610150565b3480156101c557600080fd5b506101796101d4366004611645565b6104b2565b3480156101e557600080fd5b506101796101f4366004611645565b6104d7565b34801561020557600080fd5b50610179610214366004611671565b610555565b34801561022557600080fd5b5061017961023436600461168c565b610634565b6101796102473660046116cc565b6107b3565b34801561025857600080fd5b5060fc5461026c906001600160a01b031681565b6040516001600160a01b039091168152602001610150565b34801561029057600080fd5b506101ab61087f565b3480156102a557600080fd5b5060fb5461026c906001600160a01b031681565b3480156102c557600080fd5b50610100546101ab565b3480156102db57600080fd5b506101ab6102ea366004611610565b600090815260fe602052604090205490565b34801561030857600080fd5b506101796103173660046115ee565b610932565b34801561032857600080fd5b50610144610337366004611645565b610a6a565b34801561034857600080fd5b506101ab600081565b34801561035d57600080fd5b5061017961036c36600461178e565b610a95565b34801561037d57600080fd5b506101ab61038c366004611671565b6001600160a01b0316600090815260ff602052604090205490565b3480156103b357600080fd5b506101796103c2366004611645565b610bf8565b3480156103d357600080fd5b506101ab7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b148061042c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b33600090815260fd60209081526040808320858452909152902054818110156104a25760405162461bcd60e51b815260206004820152601b60248201527f6572726f725f6e6f74456e6f756768546f6b656e735374616b6564000000000060448201526064015b60405180910390fd5b6104ad838333610c1d565b505050565b6000828152606560205260409020600101546104cd81610d91565b6104ad8383610d9b565b6001600160a01b03811633146105475760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610499565b6105518282610e21565b5050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361059d5760405162461bcd60e51b815260040161049990611815565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105e6600080516020611a6a833981519152546001600160a01b031690565b6001600160a01b03161461060c5760405162461bcd60e51b815260040161049990611861565b61061581610e88565b6040805160008082526020820190925261063191839190610eb2565b50565b600054610100900460ff16158080156106545750600054600160ff909116105b8061066e5750303b15801561066e575060005460ff166001145b6106d15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610499565b6000805460ff1916600117905580156106f4576000805461ff0019166101001790555b6106fc61101d565b61070461101d565b61070f600033610d9b565b6107397f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333610d9b565b60fb80546001600160a01b038086166001600160a01b03199283161790925560fc80549285169290911691909117905580156104ad576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036107fb5760405162461bcd60e51b815260040161049990611815565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610844600080516020611a6a833981519152546001600160a01b031690565b6001600160a01b03161461086a5760405162461bcd60e51b815260040161049990611861565b61087382610e88565b61055182826001610eb2565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461091f5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610499565b50600080516020611a6a83398151915290565b60fb54604051630e29a66960e21b81526004810184905283916001600160a01b0316906338a699a490602401602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f91906118ad565b6109e35760405162461bcd60e51b8152602060048201526015602482015274195c9c9bdc97dc1c9bda9958dd139bdd119bdd5b99605a1b6044820152606401610499565b60fc546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610a3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5e91906118ad565b506104ad83833361108a565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60208114610ada5760405162461bcd60e51b8152602060048201526012602482015271195c9c9bdc97d89859141c9bda9958dd125960721b6044820152606401610499565b60fc546001600160a01b03163314610b345760405162461bcd60e51b815260206004820152601760248201527f6572726f725f77726f6e675374616b696e67546f6b656e0000000000000000006044820152606401610499565b60fb54604051630e29a66960e21b8152833560048201819052916001600160a01b0316906338a699a490602401602060405180830381865afa158015610b7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba291906118ad565b610be65760405162461bcd60e51b8152602060048201526015602482015274195c9c9bdc97dc1c9bda9958dd139bdd119bdd5b99605a1b6044820152606401610499565b610bf181858761108a565b5050505050565b600082815260656020526040902060010154610c1381610d91565b6104ad8383610e21565b6001600160a01b038116600090815260fd6020908152604080832086845290915281208054849290610c509084906118e5565b9091555050600083815260fe602052604081208054849290610c739084906118e5565b90915550506001600160a01b038116600090815260ff602052604081208054849290610ca09084906118e5565b92505081905550816101006000828254610cba91906118e5565b909155505060fc5460405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015610d12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3691906118ad565b50600083815260fe6020908152604091829020548251858152918201526001600160a01b0383169185917f246e3b2e1792018ed0c6d518ad1fe01f2c7f445f1a459ab6dcf929089582892f91015b60405180910390a3505050565b610631813361117d565b610da58282610a6a565b6105515760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610ddd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610e2b8282610a6a565b156105515760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361055181610d91565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610ee5576104ad836111d6565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610f3f575060408051601f3d908101601f19168201909252610f3c918101906118fc565b60015b610fa25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610499565b600080516020611a6a83398151915281146110115760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610499565b506104ad838383611272565b600054610100900460ff166110885760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610499565b565b6001600160a01b038116600090815260fd60209081526040808320868452909152812080548492906110bd908490611915565b9091555050600083815260fe6020526040812080548492906110e0908490611915565b90915550506001600160a01b038116600090815260ff60205260408120805484929061110d908490611915565b925050819055508161010060008282546111279190611915565b9091555050600083815260fe6020908152604091829020548251858152918201526001600160a01b0383169185917f2bdde1c9d1017e533748fb83ed29c7cc39586ea82c3be3a2ffa08b7f048b214d9101610d84565b6111878282610a6a565b610551576111948161129d565b61119f8360206112af565b6040516020016111b0929190611959565b60408051601f198184030181529082905262461bcd60e51b8252610499916004016119ce565b6001600160a01b0381163b6112435760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610499565b600080516020611a6a83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61127b83611452565b6000825111806112885750805b156104ad576112978383611492565b50505050565b606061042c6001600160a01b03831660145b606060006112be836002611a01565b6112c9906002611915565b67ffffffffffffffff8111156112e1576112e16116b6565b6040519080825280601f01601f19166020018201604052801561130b576020820181803683370190505b509050600360fc1b8160008151811061132657611326611a20565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061135557611355611a20565b60200101906001600160f81b031916908160001a9053506000611379846002611a01565b611384906001611915565b90505b60018111156113fc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113b8576113b8611a20565b1a60f81b8282815181106113ce576113ce611a20565b60200101906001600160f81b031916908160001a90535060049490941c936113f581611a36565b9050611387565b50831561144b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610499565b9392505050565b61145b816111d6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6114fa5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610499565b600080846001600160a01b0316846040516115159190611a4d565b600060405180830381855af49150503d8060008114611550576040519150601f19603f3d011682016040523d82523d6000602084013e611555565b606091505b509150915061157d8282604051806060016040528060278152602001611a8a60279139611586565b95945050505050565b6060831561159557508161144b565b61144b83838151156115aa5781518083602001fd5b8060405162461bcd60e51b815260040161049991906119ce565b6000602082840312156115d657600080fd5b81356001600160e01b03198116811461144b57600080fd5b6000806040838503121561160157600080fd5b50508035926020909101359150565b60006020828403121561162257600080fd5b5035919050565b80356001600160a01b038116811461164057600080fd5b919050565b6000806040838503121561165857600080fd5b8235915061166860208401611629565b90509250929050565b60006020828403121561168357600080fd5b61144b82611629565b6000806040838503121561169f57600080fd5b6116a883611629565b915061166860208401611629565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156116df57600080fd5b6116e883611629565b9150602083013567ffffffffffffffff8082111561170557600080fd5b818501915085601f83011261171957600080fd5b81358181111561172b5761172b6116b6565b604051601f8201601f19908116603f01168101908382118183101715611753576117536116b6565b8160405282815288602084870101111561176c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080606085870312156117a457600080fd5b6117ad85611629565b935060208501359250604085013567ffffffffffffffff808211156117d157600080fd5b818701915087601f8301126117e557600080fd5b8135818111156117f457600080fd5b88602082850101111561180657600080fd5b95989497505060200194505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602082840312156118bf57600080fd5b8151801515811461144b57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000828210156118f7576118f76118cf565b500390565b60006020828403121561190e57600080fd5b5051919050565b60008219821115611928576119286118cf565b500190565b60005b83811015611948578181015183820152602001611930565b838111156112975750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161199181601785016020880161192d565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516119c281602884016020880161192d565b01602801949350505050565b60208152600082518060208401526119ed81604085016020870161192d565b601f01601f19169190910160400192915050565b6000816000190483118215151615611a1b57611a1b6118cf565b500290565b634e487b7160e01b600052603260045260246000fd5b600081611a4557611a456118cf565b506000190190565b60008251611a5f81846020870161192d565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ac120d1bb5b25050b642540f502d3ae5701bcd4626260f27fa5ed072a127318964736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class ProjectStakingV1__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nProjectStakingV1__factory.bytecode = _bytecode;\nProjectStakingV1__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, Interface } from \"ethers\";\nconst _abi = [\n    {\n        constant: true,\n        inputs: [],\n        name: \"name\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"string\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"spender\",\n                type: \"address\",\n            },\n            {\n                name: \"tokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"approve\",\n        outputs: [\n            {\n                name: \"success\",\n                type: \"bool\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [],\n        name: \"totalSupply\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"from\",\n                type: \"address\",\n            },\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                name: \"value\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"transferFrom\",\n        outputs: [\n            {\n                name: \"success\",\n                type: \"bool\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [],\n        name: \"decimals\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"uint8\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                name: \"value\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"mint\",\n        outputs: [],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [\n            {\n                name: \"owner\",\n                type: \"address\",\n            },\n        ],\n        name: \"balanceOf\",\n        outputs: [\n            {\n                name: \"balance\",\n                type: \"uint256\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [],\n        name: \"symbol\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"string\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                name: \"value\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"transfer\",\n        outputs: [\n            {\n                name: \"success\",\n                type: \"bool\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [\n            {\n                name: \"from\",\n                type: \"address\",\n            },\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n        ],\n        name: \"allowance\",\n        outputs: [\n            {\n                name: \"remaining\",\n                type: \"uint256\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: \"from\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                name: \"tokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Transfer\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: \"tokenOwner\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                name: \"spender\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                name: \"tokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Approval\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                name: \"newTokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Minted\",\n        type: \"event\",\n    },\n];\nexport class Token__factory {\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nToken__factory.abi = _abi;\n","import { ERC677ABI as erc677ABI, operatorABI, operatorFactoryABI, sponsorshipABI, streamrConfigABI, } from 'network-contracts-ethers6';\nimport { MarketplaceV4__factory, ProjectRegistryV1__factory } from '~/generated/types/hub';\nimport { Token__factory } from '~/generated/types/local';\nimport { getChainConfig, getChainConfigExtension } from '~/utils/chains';\nexport function getContractAbi(contractKey) {\n    switch (contractKey) {\n        case 'config':\n            return streamrConfigABI;\n        case 'projectRegistry':\n            return ProjectRegistryV1__factory.abi;\n        case 'erc20':\n            return Token__factory.abi;\n        case 'marketplace':\n            return MarketplaceV4__factory.abi;\n        case 'sponsorship':\n            return sponsorshipABI;\n        case 'operatorFactory':\n            return operatorFactoryABI;\n        case 'operator':\n            return operatorABI;\n        case 'erc677':\n            return erc677ABI;\n    }\n}\nexport function getContractAddress(addressKey, chainId) {\n    const { contracts } = getChainConfig(chainId);\n    const address = (() => {\n        switch (addressKey) {\n            case 'config':\n                return contracts.StreamrConfig;\n            case 'marketplace':\n                return (contracts.MarketplaceV4 ||\n                    contracts.RemoteMarketplaceV1 ||\n                    contracts.MarketplaceV3);\n            case 'operatorFactory':\n                return contracts.OperatorFactory;\n            case 'projectRegistry':\n                return contracts.ProjectRegistryV1;\n            case 'data':\n                return contracts.DATA;\n            case 'operatorDefaultDelegationPolicy':\n                return contracts.OperatorDefaultDelegationPolicy;\n            case 'operatorDefaultExchangeRatePolicy':\n                return contracts.OperatorDefaultExchangeRatePolicy;\n            case 'operatorDefaultUndelegationPolicy':\n                return contracts.OperatorDefaultUndelegationPolicy;\n            case 'sponsorshipPaymentToken':\n                return contracts[getChainConfigExtension(chainId).sponsorshipPaymentToken];\n            case 'sponsorshipDefaultLeavePolicy':\n                return contracts.SponsorshipDefaultLeavePolicy;\n            case 'sponsorshipFactory':\n                return contracts.SponsorshipFactory;\n            case 'sponsorshipMaxOperatorsJoinPolicy':\n                return contracts.SponsorshipMaxOperatorsJoinPolicy;\n            case 'sponsorshipStakeWeightedAllocationPolicy':\n                return contracts.SponsorshipStakeWeightedAllocationPolicy;\n            case 'sponsorshipVoteKickPolicy':\n                return contracts.SponsorshipVoteKickPolicy;\n            case 'streamRegistry':\n                return contracts.StreamRegistry;\n            case 'streamStorage':\n                return contracts.StreamStorageRegistry;\n            case 'dataUnionFactory':\n                return contracts.DataUnionFactory;\n        }\n    })();\n    if (!address) {\n        throw new Error(`No \"${addressKey}\" contract address found for chain ${chainId}`);\n    }\n    return address;\n}\n","import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { getChainConfig, getChainConfigExtension } from '~/utils/chains';\nconst graphClients = {};\nexport function getGraphClient(chainId) {\n    const graphClient = graphClients[chainId] ||\n        new ApolloClient({\n            uri: getGraphUrl(chainId),\n            cache: new InMemoryCache(),\n        });\n    if (!graphClients[chainId]) {\n        graphClients[chainId] = graphClient;\n    }\n    return graphClient;\n}\nexport function getGraphUrl(chainId) {\n    const { theGraphUrl: defaultUrl } = getChainConfig(chainId);\n    const { networkSubgraphUrl: customUrl } = getChainConfigExtension(chainId);\n    const url = customUrl || defaultUrl;\n    if (!url) {\n        throw new Error(`Missing network subgraph url for chain ${chainId}`);\n    }\n    return url;\n}\nconst dataUnionGraphClients = {};\nexport function getDataUnionGraphClient(chainId) {\n    const { dataunionGraphNames } = getChainConfigExtension(chainId);\n    const item = dataunionGraphNames.find((i) => i.chainId === chainId);\n    if (typeof item?.name !== 'string') {\n        throw new Error(`No dataunionGraphNames defined in config for chain ${chainId}!`);\n    }\n    const networkSubgraphUrl = getGraphUrl(chainId);\n    const { origin } = new URL(networkSubgraphUrl);\n    const client = dataUnionGraphClients[chainId] ||\n        new ApolloClient({\n            uri: `${origin}/subgraphs/name/${item.name}`,\n            cache: new InMemoryCache(),\n        });\n    if (!dataUnionGraphClients[chainId]) {\n        dataUnionGraphClients[chainId] = client;\n    }\n    return client;\n}\nconst indexerGraphClients = {};\nexport function getIndexerClient(chainId) {\n    const uri = getChainConfigExtension(chainId).streamIndexerUrl;\n    if (!uri) {\n        return null;\n    }\n    const client = indexerGraphClients[chainId] ||\n        new ApolloClient({\n            uri,\n            cache: new InMemoryCache(),\n        });\n    if (!indexerGraphClients[chainId]) {\n        indexerGraphClients[chainId] = client;\n    }\n    return client;\n}\n","import { getChainConfig } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { getGraphUrl } from './getGraphClient';\nexport default function getClientConfig(chainId, mods = {}) {\n    const chainConfig = getChainConfig(chainId);\n    const config = {\n        metrics: false,\n    };\n    // Set network entrypoints if provided\n    if (chainConfig.entryPoints && chainConfig.entryPoints.length > 0) {\n        config.network = {\n            controlLayer: {\n                entryPoints: [...chainConfig.entryPoints],\n            },\n        };\n    }\n    config.contracts = {\n        ethereumNetwork: {\n            chainId,\n        },\n        rpcs: chainConfig.rpcEndpoints.map(rpc => ({ url: rpc.url })),\n        streamRegistryChainAddress: getContractAddress('streamRegistry', chainId),\n        streamStorageRegistryChainAddress: getContractAddress('streamStorage', chainId),\n        theGraphUrl: getGraphUrl(chainId),\n    };\n    return {\n        ...config,\n        ...mods,\n    };\n}\n","import { isMessagedObject } from '~/utils/exceptions';\nexport class BehindIndexError {\n    constructor(expectedBlockNumber, actualBlockNumber) {\n        this.expectedBlockNumber = expectedBlockNumber;\n        this.actualBlockNumber = actualBlockNumber;\n    }\n}\nexport function prehandleBehindBlockError(e, expectedBlockNumber) {\n    /**\n     * api.thegraph.com responds with the following error response for future blocks:\n     * \"indexed up to block number <X> and data for block number <Y> is therefore not yet available\"\n     */\n    const blockRegexp0 = /indexed up to block number (\\d+)/i;\n    /**\n     * gateway-arbitrum.network.thegraph.com responds with the following error response for future blocks:\n     * \"block not found: <Z>\"\n     */\n    const blockRegexp1 = /block not found: (\\d+)/i;\n    if (!isMessagedObject(e)) {\n        return;\n    }\n    if (blockRegexp0.test(e.message)) {\n        throw new BehindIndexError(expectedBlockNumber, Number(e.message.match(blockRegexp0)[1]));\n    }\n    if (blockRegexp1.test(e.message)) {\n        /**\n         * Block number in the error message (see `blockRegexp1`) could not be found thus the latest\n         * ingested one is the one prior.\n         */\n        throw new BehindIndexError(expectedBlockNumber, Number(e.message.match(blockRegexp1)[1]) - 1);\n    }\n}\n","import { gql } from '@apollo/client';\nexport var AbiChanged_OrderBy;\n(function (AbiChanged_OrderBy) {\n    AbiChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    AbiChanged_OrderBy[\"ContentType\"] = \"contentType\";\n    AbiChanged_OrderBy[\"Id\"] = \"id\";\n    AbiChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    AbiChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    AbiChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    AbiChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    AbiChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(AbiChanged_OrderBy || (AbiChanged_OrderBy = {}));\nexport var Account_OrderBy;\n(function (Account_OrderBy) {\n    Account_OrderBy[\"Domains\"] = \"domains\";\n    Account_OrderBy[\"Id\"] = \"id\";\n    Account_OrderBy[\"Registrations\"] = \"registrations\";\n    Account_OrderBy[\"WrappedDomains\"] = \"wrappedDomains\";\n})(Account_OrderBy || (Account_OrderBy = {}));\nexport var AddrChanged_OrderBy;\n(function (AddrChanged_OrderBy) {\n    AddrChanged_OrderBy[\"Addr\"] = \"addr\";\n    AddrChanged_OrderBy[\"AddrId\"] = \"addr__id\";\n    AddrChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    AddrChanged_OrderBy[\"Id\"] = \"id\";\n    AddrChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    AddrChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    AddrChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    AddrChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    AddrChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(AddrChanged_OrderBy || (AddrChanged_OrderBy = {}));\nexport var Aggregation_Interval;\n(function (Aggregation_Interval) {\n    Aggregation_Interval[\"Day\"] = \"day\";\n    Aggregation_Interval[\"Hour\"] = \"hour\";\n})(Aggregation_Interval || (Aggregation_Interval = {}));\nexport var AuthorisationChanged_OrderBy;\n(function (AuthorisationChanged_OrderBy) {\n    AuthorisationChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    AuthorisationChanged_OrderBy[\"Id\"] = \"id\";\n    AuthorisationChanged_OrderBy[\"IsAuthorized\"] = \"isAuthorized\";\n    AuthorisationChanged_OrderBy[\"Owner\"] = \"owner\";\n    AuthorisationChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    AuthorisationChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    AuthorisationChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    AuthorisationChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    AuthorisationChanged_OrderBy[\"Target\"] = \"target\";\n    AuthorisationChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(AuthorisationChanged_OrderBy || (AuthorisationChanged_OrderBy = {}));\nexport var ContenthashChanged_OrderBy;\n(function (ContenthashChanged_OrderBy) {\n    ContenthashChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    ContenthashChanged_OrderBy[\"Hash\"] = \"hash\";\n    ContenthashChanged_OrderBy[\"Id\"] = \"id\";\n    ContenthashChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    ContenthashChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    ContenthashChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    ContenthashChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    ContenthashChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(ContenthashChanged_OrderBy || (ContenthashChanged_OrderBy = {}));\nexport var DomainEvent_OrderBy;\n(function (DomainEvent_OrderBy) {\n    DomainEvent_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    DomainEvent_OrderBy[\"Domain\"] = \"domain\";\n    DomainEvent_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    DomainEvent_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    DomainEvent_OrderBy[\"DomainId\"] = \"domain__id\";\n    DomainEvent_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    DomainEvent_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    DomainEvent_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    DomainEvent_OrderBy[\"DomainName\"] = \"domain__name\";\n    DomainEvent_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    DomainEvent_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    DomainEvent_OrderBy[\"Id\"] = \"id\";\n    DomainEvent_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(DomainEvent_OrderBy || (DomainEvent_OrderBy = {}));\nexport var Domain_OrderBy;\n(function (Domain_OrderBy) {\n    Domain_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Domain_OrderBy[\"Events\"] = \"events\";\n    Domain_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    Domain_OrderBy[\"Id\"] = \"id\";\n    Domain_OrderBy[\"IsMigrated\"] = \"isMigrated\";\n    Domain_OrderBy[\"LabelName\"] = \"labelName\";\n    Domain_OrderBy[\"Labelhash\"] = \"labelhash\";\n    Domain_OrderBy[\"Name\"] = \"name\";\n    Domain_OrderBy[\"Owner\"] = \"owner\";\n    Domain_OrderBy[\"OwnerId\"] = \"owner__id\";\n    Domain_OrderBy[\"Parent\"] = \"parent\";\n    Domain_OrderBy[\"ParentCreatedAt\"] = \"parent__createdAt\";\n    Domain_OrderBy[\"ParentExpiryDate\"] = \"parent__expiryDate\";\n    Domain_OrderBy[\"ParentId\"] = \"parent__id\";\n    Domain_OrderBy[\"ParentIsMigrated\"] = \"parent__isMigrated\";\n    Domain_OrderBy[\"ParentLabelName\"] = \"parent__labelName\";\n    Domain_OrderBy[\"ParentLabelhash\"] = \"parent__labelhash\";\n    Domain_OrderBy[\"ParentName\"] = \"parent__name\";\n    Domain_OrderBy[\"ParentSubdomainCount\"] = \"parent__subdomainCount\";\n    Domain_OrderBy[\"ParentTtl\"] = \"parent__ttl\";\n    Domain_OrderBy[\"Registrant\"] = \"registrant\";\n    Domain_OrderBy[\"RegistrantId\"] = \"registrant__id\";\n    Domain_OrderBy[\"Registration\"] = \"registration\";\n    Domain_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    Domain_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    Domain_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    Domain_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    Domain_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    Domain_OrderBy[\"ResolvedAddress\"] = \"resolvedAddress\";\n    Domain_OrderBy[\"ResolvedAddressId\"] = \"resolvedAddress__id\";\n    Domain_OrderBy[\"Resolver\"] = \"resolver\";\n    Domain_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    Domain_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    Domain_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    Domain_OrderBy[\"SubdomainCount\"] = \"subdomainCount\";\n    Domain_OrderBy[\"Subdomains\"] = \"subdomains\";\n    Domain_OrderBy[\"Ttl\"] = \"ttl\";\n    Domain_OrderBy[\"WrappedDomain\"] = \"wrappedDomain\";\n    Domain_OrderBy[\"WrappedDomainExpiryDate\"] = \"wrappedDomain__expiryDate\";\n    Domain_OrderBy[\"WrappedDomainFuses\"] = \"wrappedDomain__fuses\";\n    Domain_OrderBy[\"WrappedDomainId\"] = \"wrappedDomain__id\";\n    Domain_OrderBy[\"WrappedDomainName\"] = \"wrappedDomain__name\";\n    Domain_OrderBy[\"WrappedOwner\"] = \"wrappedOwner\";\n    Domain_OrderBy[\"WrappedOwnerId\"] = \"wrappedOwner__id\";\n})(Domain_OrderBy || (Domain_OrderBy = {}));\nexport var ExpiryExtended_OrderBy;\n(function (ExpiryExtended_OrderBy) {\n    ExpiryExtended_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    ExpiryExtended_OrderBy[\"Domain\"] = \"domain\";\n    ExpiryExtended_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    ExpiryExtended_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    ExpiryExtended_OrderBy[\"DomainId\"] = \"domain__id\";\n    ExpiryExtended_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    ExpiryExtended_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    ExpiryExtended_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    ExpiryExtended_OrderBy[\"DomainName\"] = \"domain__name\";\n    ExpiryExtended_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    ExpiryExtended_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    ExpiryExtended_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    ExpiryExtended_OrderBy[\"Id\"] = \"id\";\n    ExpiryExtended_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(ExpiryExtended_OrderBy || (ExpiryExtended_OrderBy = {}));\nexport var FusesSet_OrderBy;\n(function (FusesSet_OrderBy) {\n    FusesSet_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    FusesSet_OrderBy[\"Domain\"] = \"domain\";\n    FusesSet_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    FusesSet_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    FusesSet_OrderBy[\"DomainId\"] = \"domain__id\";\n    FusesSet_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    FusesSet_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    FusesSet_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    FusesSet_OrderBy[\"DomainName\"] = \"domain__name\";\n    FusesSet_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    FusesSet_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    FusesSet_OrderBy[\"Fuses\"] = \"fuses\";\n    FusesSet_OrderBy[\"Id\"] = \"id\";\n    FusesSet_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(FusesSet_OrderBy || (FusesSet_OrderBy = {}));\nexport var InterfaceChanged_OrderBy;\n(function (InterfaceChanged_OrderBy) {\n    InterfaceChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    InterfaceChanged_OrderBy[\"Id\"] = \"id\";\n    InterfaceChanged_OrderBy[\"Implementer\"] = \"implementer\";\n    InterfaceChanged_OrderBy[\"InterfaceId\"] = \"interfaceID\";\n    InterfaceChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    InterfaceChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    InterfaceChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    InterfaceChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    InterfaceChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(InterfaceChanged_OrderBy || (InterfaceChanged_OrderBy = {}));\nexport var MulticoinAddrChanged_OrderBy;\n(function (MulticoinAddrChanged_OrderBy) {\n    MulticoinAddrChanged_OrderBy[\"Addr\"] = \"addr\";\n    MulticoinAddrChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    MulticoinAddrChanged_OrderBy[\"CoinType\"] = \"coinType\";\n    MulticoinAddrChanged_OrderBy[\"Id\"] = \"id\";\n    MulticoinAddrChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    MulticoinAddrChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    MulticoinAddrChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    MulticoinAddrChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    MulticoinAddrChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(MulticoinAddrChanged_OrderBy || (MulticoinAddrChanged_OrderBy = {}));\nexport var NameChanged_OrderBy;\n(function (NameChanged_OrderBy) {\n    NameChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameChanged_OrderBy[\"Id\"] = \"id\";\n    NameChanged_OrderBy[\"Name\"] = \"name\";\n    NameChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    NameChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    NameChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    NameChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    NameChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameChanged_OrderBy || (NameChanged_OrderBy = {}));\nexport var NameRegistered_OrderBy;\n(function (NameRegistered_OrderBy) {\n    NameRegistered_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameRegistered_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    NameRegistered_OrderBy[\"Id\"] = \"id\";\n    NameRegistered_OrderBy[\"Registrant\"] = \"registrant\";\n    NameRegistered_OrderBy[\"RegistrantId\"] = \"registrant__id\";\n    NameRegistered_OrderBy[\"Registration\"] = \"registration\";\n    NameRegistered_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    NameRegistered_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    NameRegistered_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    NameRegistered_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    NameRegistered_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    NameRegistered_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameRegistered_OrderBy || (NameRegistered_OrderBy = {}));\nexport var NameRenewed_OrderBy;\n(function (NameRenewed_OrderBy) {\n    NameRenewed_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameRenewed_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    NameRenewed_OrderBy[\"Id\"] = \"id\";\n    NameRenewed_OrderBy[\"Registration\"] = \"registration\";\n    NameRenewed_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    NameRenewed_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    NameRenewed_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    NameRenewed_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    NameRenewed_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    NameRenewed_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameRenewed_OrderBy || (NameRenewed_OrderBy = {}));\nexport var NameTransferred_OrderBy;\n(function (NameTransferred_OrderBy) {\n    NameTransferred_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameTransferred_OrderBy[\"Id\"] = \"id\";\n    NameTransferred_OrderBy[\"NewOwner\"] = \"newOwner\";\n    NameTransferred_OrderBy[\"NewOwnerId\"] = \"newOwner__id\";\n    NameTransferred_OrderBy[\"Registration\"] = \"registration\";\n    NameTransferred_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    NameTransferred_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    NameTransferred_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    NameTransferred_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    NameTransferred_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    NameTransferred_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameTransferred_OrderBy || (NameTransferred_OrderBy = {}));\nexport var NameUnwrapped_OrderBy;\n(function (NameUnwrapped_OrderBy) {\n    NameUnwrapped_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameUnwrapped_OrderBy[\"Domain\"] = \"domain\";\n    NameUnwrapped_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NameUnwrapped_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NameUnwrapped_OrderBy[\"DomainId\"] = \"domain__id\";\n    NameUnwrapped_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NameUnwrapped_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NameUnwrapped_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NameUnwrapped_OrderBy[\"DomainName\"] = \"domain__name\";\n    NameUnwrapped_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NameUnwrapped_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NameUnwrapped_OrderBy[\"Id\"] = \"id\";\n    NameUnwrapped_OrderBy[\"Owner\"] = \"owner\";\n    NameUnwrapped_OrderBy[\"OwnerId\"] = \"owner__id\";\n    NameUnwrapped_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameUnwrapped_OrderBy || (NameUnwrapped_OrderBy = {}));\nexport var NameWrapped_OrderBy;\n(function (NameWrapped_OrderBy) {\n    NameWrapped_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameWrapped_OrderBy[\"Domain\"] = \"domain\";\n    NameWrapped_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NameWrapped_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NameWrapped_OrderBy[\"DomainId\"] = \"domain__id\";\n    NameWrapped_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NameWrapped_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NameWrapped_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NameWrapped_OrderBy[\"DomainName\"] = \"domain__name\";\n    NameWrapped_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NameWrapped_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NameWrapped_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    NameWrapped_OrderBy[\"Fuses\"] = \"fuses\";\n    NameWrapped_OrderBy[\"Id\"] = \"id\";\n    NameWrapped_OrderBy[\"Name\"] = \"name\";\n    NameWrapped_OrderBy[\"Owner\"] = \"owner\";\n    NameWrapped_OrderBy[\"OwnerId\"] = \"owner__id\";\n    NameWrapped_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameWrapped_OrderBy || (NameWrapped_OrderBy = {}));\nexport var NewOwner_OrderBy;\n(function (NewOwner_OrderBy) {\n    NewOwner_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NewOwner_OrderBy[\"Domain\"] = \"domain\";\n    NewOwner_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NewOwner_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NewOwner_OrderBy[\"DomainId\"] = \"domain__id\";\n    NewOwner_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NewOwner_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NewOwner_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NewOwner_OrderBy[\"DomainName\"] = \"domain__name\";\n    NewOwner_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NewOwner_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NewOwner_OrderBy[\"Id\"] = \"id\";\n    NewOwner_OrderBy[\"Owner\"] = \"owner\";\n    NewOwner_OrderBy[\"OwnerId\"] = \"owner__id\";\n    NewOwner_OrderBy[\"ParentDomain\"] = \"parentDomain\";\n    NewOwner_OrderBy[\"ParentDomainCreatedAt\"] = \"parentDomain__createdAt\";\n    NewOwner_OrderBy[\"ParentDomainExpiryDate\"] = \"parentDomain__expiryDate\";\n    NewOwner_OrderBy[\"ParentDomainId\"] = \"parentDomain__id\";\n    NewOwner_OrderBy[\"ParentDomainIsMigrated\"] = \"parentDomain__isMigrated\";\n    NewOwner_OrderBy[\"ParentDomainLabelName\"] = \"parentDomain__labelName\";\n    NewOwner_OrderBy[\"ParentDomainLabelhash\"] = \"parentDomain__labelhash\";\n    NewOwner_OrderBy[\"ParentDomainName\"] = \"parentDomain__name\";\n    NewOwner_OrderBy[\"ParentDomainSubdomainCount\"] = \"parentDomain__subdomainCount\";\n    NewOwner_OrderBy[\"ParentDomainTtl\"] = \"parentDomain__ttl\";\n    NewOwner_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NewOwner_OrderBy || (NewOwner_OrderBy = {}));\nexport var NewResolver_OrderBy;\n(function (NewResolver_OrderBy) {\n    NewResolver_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NewResolver_OrderBy[\"Domain\"] = \"domain\";\n    NewResolver_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NewResolver_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NewResolver_OrderBy[\"DomainId\"] = \"domain__id\";\n    NewResolver_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NewResolver_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NewResolver_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NewResolver_OrderBy[\"DomainName\"] = \"domain__name\";\n    NewResolver_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NewResolver_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NewResolver_OrderBy[\"Id\"] = \"id\";\n    NewResolver_OrderBy[\"Resolver\"] = \"resolver\";\n    NewResolver_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    NewResolver_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    NewResolver_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    NewResolver_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NewResolver_OrderBy || (NewResolver_OrderBy = {}));\nexport var NewTtl_OrderBy;\n(function (NewTtl_OrderBy) {\n    NewTtl_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NewTtl_OrderBy[\"Domain\"] = \"domain\";\n    NewTtl_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NewTtl_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NewTtl_OrderBy[\"DomainId\"] = \"domain__id\";\n    NewTtl_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NewTtl_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NewTtl_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NewTtl_OrderBy[\"DomainName\"] = \"domain__name\";\n    NewTtl_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NewTtl_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NewTtl_OrderBy[\"Id\"] = \"id\";\n    NewTtl_OrderBy[\"TransactionId\"] = \"transactionID\";\n    NewTtl_OrderBy[\"Ttl\"] = \"ttl\";\n})(NewTtl_OrderBy || (NewTtl_OrderBy = {}));\n/** Defines the order direction, either ascending or descending */\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"asc\";\n    OrderDirection[\"Desc\"] = \"desc\";\n})(OrderDirection || (OrderDirection = {}));\nexport var PubkeyChanged_OrderBy;\n(function (PubkeyChanged_OrderBy) {\n    PubkeyChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    PubkeyChanged_OrderBy[\"Id\"] = \"id\";\n    PubkeyChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    PubkeyChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    PubkeyChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    PubkeyChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    PubkeyChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n    PubkeyChanged_OrderBy[\"X\"] = \"x\";\n    PubkeyChanged_OrderBy[\"Y\"] = \"y\";\n})(PubkeyChanged_OrderBy || (PubkeyChanged_OrderBy = {}));\nexport var RegistrationEvent_OrderBy;\n(function (RegistrationEvent_OrderBy) {\n    RegistrationEvent_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    RegistrationEvent_OrderBy[\"Id\"] = \"id\";\n    RegistrationEvent_OrderBy[\"Registration\"] = \"registration\";\n    RegistrationEvent_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    RegistrationEvent_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    RegistrationEvent_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    RegistrationEvent_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    RegistrationEvent_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    RegistrationEvent_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(RegistrationEvent_OrderBy || (RegistrationEvent_OrderBy = {}));\nexport var Registration_OrderBy;\n(function (Registration_OrderBy) {\n    Registration_OrderBy[\"Cost\"] = \"cost\";\n    Registration_OrderBy[\"Domain\"] = \"domain\";\n    Registration_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    Registration_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    Registration_OrderBy[\"DomainId\"] = \"domain__id\";\n    Registration_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    Registration_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    Registration_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    Registration_OrderBy[\"DomainName\"] = \"domain__name\";\n    Registration_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    Registration_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    Registration_OrderBy[\"Events\"] = \"events\";\n    Registration_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    Registration_OrderBy[\"Id\"] = \"id\";\n    Registration_OrderBy[\"LabelName\"] = \"labelName\";\n    Registration_OrderBy[\"Registrant\"] = \"registrant\";\n    Registration_OrderBy[\"RegistrantId\"] = \"registrant__id\";\n    Registration_OrderBy[\"RegistrationDate\"] = \"registrationDate\";\n})(Registration_OrderBy || (Registration_OrderBy = {}));\nexport var ResolverEvent_OrderBy;\n(function (ResolverEvent_OrderBy) {\n    ResolverEvent_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    ResolverEvent_OrderBy[\"Id\"] = \"id\";\n    ResolverEvent_OrderBy[\"Resolver\"] = \"resolver\";\n    ResolverEvent_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    ResolverEvent_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    ResolverEvent_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    ResolverEvent_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(ResolverEvent_OrderBy || (ResolverEvent_OrderBy = {}));\nexport var Resolver_OrderBy;\n(function (Resolver_OrderBy) {\n    Resolver_OrderBy[\"Addr\"] = \"addr\";\n    Resolver_OrderBy[\"AddrId\"] = \"addr__id\";\n    Resolver_OrderBy[\"Address\"] = \"address\";\n    Resolver_OrderBy[\"CoinTypes\"] = \"coinTypes\";\n    Resolver_OrderBy[\"ContentHash\"] = \"contentHash\";\n    Resolver_OrderBy[\"Domain\"] = \"domain\";\n    Resolver_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    Resolver_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    Resolver_OrderBy[\"DomainId\"] = \"domain__id\";\n    Resolver_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    Resolver_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    Resolver_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    Resolver_OrderBy[\"DomainName\"] = \"domain__name\";\n    Resolver_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    Resolver_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    Resolver_OrderBy[\"Events\"] = \"events\";\n    Resolver_OrderBy[\"Id\"] = \"id\";\n    Resolver_OrderBy[\"Texts\"] = \"texts\";\n})(Resolver_OrderBy || (Resolver_OrderBy = {}));\nexport var TextChanged_OrderBy;\n(function (TextChanged_OrderBy) {\n    TextChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    TextChanged_OrderBy[\"Id\"] = \"id\";\n    TextChanged_OrderBy[\"Key\"] = \"key\";\n    TextChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    TextChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    TextChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    TextChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    TextChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n    TextChanged_OrderBy[\"Value\"] = \"value\";\n})(TextChanged_OrderBy || (TextChanged_OrderBy = {}));\nexport var Transfer_OrderBy;\n(function (Transfer_OrderBy) {\n    Transfer_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    Transfer_OrderBy[\"Domain\"] = \"domain\";\n    Transfer_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    Transfer_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    Transfer_OrderBy[\"DomainId\"] = \"domain__id\";\n    Transfer_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    Transfer_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    Transfer_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    Transfer_OrderBy[\"DomainName\"] = \"domain__name\";\n    Transfer_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    Transfer_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    Transfer_OrderBy[\"Id\"] = \"id\";\n    Transfer_OrderBy[\"Owner\"] = \"owner\";\n    Transfer_OrderBy[\"OwnerId\"] = \"owner__id\";\n    Transfer_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(Transfer_OrderBy || (Transfer_OrderBy = {}));\nexport var VersionChanged_OrderBy;\n(function (VersionChanged_OrderBy) {\n    VersionChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    VersionChanged_OrderBy[\"Id\"] = \"id\";\n    VersionChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    VersionChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    VersionChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    VersionChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    VersionChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n    VersionChanged_OrderBy[\"Version\"] = \"version\";\n})(VersionChanged_OrderBy || (VersionChanged_OrderBy = {}));\nexport var WrappedDomain_OrderBy;\n(function (WrappedDomain_OrderBy) {\n    WrappedDomain_OrderBy[\"Domain\"] = \"domain\";\n    WrappedDomain_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    WrappedDomain_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    WrappedDomain_OrderBy[\"DomainId\"] = \"domain__id\";\n    WrappedDomain_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    WrappedDomain_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    WrappedDomain_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    WrappedDomain_OrderBy[\"DomainName\"] = \"domain__name\";\n    WrappedDomain_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    WrappedDomain_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    WrappedDomain_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    WrappedDomain_OrderBy[\"Fuses\"] = \"fuses\";\n    WrappedDomain_OrderBy[\"Id\"] = \"id\";\n    WrappedDomain_OrderBy[\"Name\"] = \"name\";\n    WrappedDomain_OrderBy[\"Owner\"] = \"owner\";\n    WrappedDomain_OrderBy[\"OwnerId\"] = \"owner__id\";\n})(WrappedDomain_OrderBy || (WrappedDomain_OrderBy = {}));\nexport var WrappedTransfer_OrderBy;\n(function (WrappedTransfer_OrderBy) {\n    WrappedTransfer_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    WrappedTransfer_OrderBy[\"Domain\"] = \"domain\";\n    WrappedTransfer_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    WrappedTransfer_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    WrappedTransfer_OrderBy[\"DomainId\"] = \"domain__id\";\n    WrappedTransfer_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    WrappedTransfer_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    WrappedTransfer_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    WrappedTransfer_OrderBy[\"DomainName\"] = \"domain__name\";\n    WrappedTransfer_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    WrappedTransfer_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    WrappedTransfer_OrderBy[\"Id\"] = \"id\";\n    WrappedTransfer_OrderBy[\"Owner\"] = \"owner\";\n    WrappedTransfer_OrderBy[\"OwnerId\"] = \"owner__id\";\n    WrappedTransfer_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(WrappedTransfer_OrderBy || (WrappedTransfer_OrderBy = {}));\nexport var _SubgraphErrorPolicy_;\n(function (_SubgraphErrorPolicy_) {\n    /** Data will be returned even if the subgraph has indexing errors */\n    _SubgraphErrorPolicy_[\"Allow\"] = \"allow\";\n    /** If the subgraph has indexing errors, data will be omitted. The default. */\n    _SubgraphErrorPolicy_[\"Deny\"] = \"deny\";\n})(_SubgraphErrorPolicy_ || (_SubgraphErrorPolicy_ = {}));\nexport const GetEnsDomainsForAccountDocument = gql `\n    query getEnsDomainsForAccount($account: String!) {\n  domains(where: {owner_in: [$account]}, orderBy: name) {\n    name\n  }\n  wrappedDomains(where: {owner_in: [$account]}, orderBy: name) {\n    name\n  }\n}\n    `;\n","import { gql } from '@apollo/client';\nexport var Aggregation_Interval;\n(function (Aggregation_Interval) {\n    Aggregation_Interval[\"Day\"] = \"day\";\n    Aggregation_Interval[\"Hour\"] = \"hour\";\n})(Aggregation_Interval || (Aggregation_Interval = {}));\nexport var Delegation_OrderBy;\n(function (Delegation_OrderBy) {\n    Delegation_OrderBy[\"ValueDataWei\"] = \"_valueDataWei\";\n    Delegation_OrderBy[\"Delegator\"] = \"delegator\";\n    Delegation_OrderBy[\"DelegatorCumulativeEarningsWei\"] = \"delegator__cumulativeEarningsWei\";\n    Delegation_OrderBy[\"DelegatorId\"] = \"delegator__id\";\n    Delegation_OrderBy[\"DelegatorNumberOfDelegations\"] = \"delegator__numberOfDelegations\";\n    Delegation_OrderBy[\"DelegatorTotalValueDataWei\"] = \"delegator__totalValueDataWei\";\n    Delegation_OrderBy[\"EarliestUndelegationTimestamp\"] = \"earliestUndelegationTimestamp\";\n    Delegation_OrderBy[\"Id\"] = \"id\";\n    Delegation_OrderBy[\"IsSelfDelegation\"] = \"isSelfDelegation\";\n    Delegation_OrderBy[\"LatestDelegationTimestamp\"] = \"latestDelegationTimestamp\";\n    Delegation_OrderBy[\"Operator\"] = \"operator\";\n    Delegation_OrderBy[\"OperatorTokenBalanceWei\"] = \"operatorTokenBalanceWei\";\n    Delegation_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    Delegation_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    Delegation_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    Delegation_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    Delegation_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    Delegation_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    Delegation_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    Delegation_OrderBy[\"OperatorId\"] = \"operator__id\";\n    Delegation_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    Delegation_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    Delegation_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    Delegation_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    Delegation_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    Delegation_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    Delegation_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    Delegation_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    Delegation_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    Delegation_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    Delegation_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    Delegation_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    Delegation_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n})(Delegation_OrderBy || (Delegation_OrderBy = {}));\nexport var DelegatorDailyBucket_OrderBy;\n(function (DelegatorDailyBucket_OrderBy) {\n    DelegatorDailyBucket_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    DelegatorDailyBucket_OrderBy[\"Date\"] = \"date\";\n    DelegatorDailyBucket_OrderBy[\"Delegator\"] = \"delegator\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorCumulativeEarningsWei\"] = \"delegator__cumulativeEarningsWei\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorId\"] = \"delegator__id\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorNumberOfDelegations\"] = \"delegator__numberOfDelegations\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorTotalValueDataWei\"] = \"delegator__totalValueDataWei\";\n    DelegatorDailyBucket_OrderBy[\"Id\"] = \"id\";\n    DelegatorDailyBucket_OrderBy[\"OperatorCount\"] = \"operatorCount\";\n    DelegatorDailyBucket_OrderBy[\"TotalValueDataWei\"] = \"totalValueDataWei\";\n})(DelegatorDailyBucket_OrderBy || (DelegatorDailyBucket_OrderBy = {}));\nexport var Delegator_OrderBy;\n(function (Delegator_OrderBy) {\n    Delegator_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    Delegator_OrderBy[\"Delegations\"] = \"delegations\";\n    Delegator_OrderBy[\"Id\"] = \"id\";\n    Delegator_OrderBy[\"NumberOfDelegations\"] = \"numberOfDelegations\";\n    Delegator_OrderBy[\"QueueEntries\"] = \"queueEntries\";\n    Delegator_OrderBy[\"TotalValueDataWei\"] = \"totalValueDataWei\";\n})(Delegator_OrderBy || (Delegator_OrderBy = {}));\nexport var Flag_OrderBy;\n(function (Flag_OrderBy) {\n    Flag_OrderBy[\"FlagResolutionTimestamp\"] = \"flagResolutionTimestamp\";\n    Flag_OrderBy[\"Flagger\"] = \"flagger\";\n    Flag_OrderBy[\"FlaggerContractVersion\"] = \"flagger__contractVersion\";\n    Flag_OrderBy[\"FlaggerCumulativeEarningsWei\"] = \"flagger__cumulativeEarningsWei\";\n    Flag_OrderBy[\"FlaggerCumulativeOperatorsCutWei\"] = \"flagger__cumulativeOperatorsCutWei\";\n    Flag_OrderBy[\"FlaggerCumulativeProfitsWei\"] = \"flagger__cumulativeProfitsWei\";\n    Flag_OrderBy[\"FlaggerDataTokenBalanceWei\"] = \"flagger__dataTokenBalanceWei\";\n    Flag_OrderBy[\"FlaggerDelegatorCount\"] = \"flagger__delegatorCount\";\n    Flag_OrderBy[\"FlaggerExchangeRate\"] = \"flagger__exchangeRate\";\n    Flag_OrderBy[\"FlaggerId\"] = \"flagger__id\";\n    Flag_OrderBy[\"FlaggerIsEligibleToVote\"] = \"flagger__isEligibleToVote\";\n    Flag_OrderBy[\"FlaggerLatestHeartbeatMetadata\"] = \"flagger__latestHeartbeatMetadata\";\n    Flag_OrderBy[\"FlaggerLatestHeartbeatTimestamp\"] = \"flagger__latestHeartbeatTimestamp\";\n    Flag_OrderBy[\"FlaggerMetadataJsonString\"] = \"flagger__metadataJsonString\";\n    Flag_OrderBy[\"FlaggerOperatorTokenTotalSupplyWei\"] = \"flagger__operatorTokenTotalSupplyWei\";\n    Flag_OrderBy[\"FlaggerOperatorsCutFraction\"] = \"flagger__operatorsCutFraction\";\n    Flag_OrderBy[\"FlaggerOwner\"] = \"flagger__owner\";\n    Flag_OrderBy[\"FlaggerProtectionEndTimestamp\"] = \"flagger__protectionEndTimestamp\";\n    Flag_OrderBy[\"FlaggerSlashingsCount\"] = \"flagger__slashingsCount\";\n    Flag_OrderBy[\"FlaggerTotalStakeInSponsorshipsWei\"] = \"flagger__totalStakeInSponsorshipsWei\";\n    Flag_OrderBy[\"FlaggerValueUpdateBlockNumber\"] = \"flagger__valueUpdateBlockNumber\";\n    Flag_OrderBy[\"FlaggerValueUpdateTimestamp\"] = \"flagger__valueUpdateTimestamp\";\n    Flag_OrderBy[\"FlaggerValueWithoutEarnings\"] = \"flagger__valueWithoutEarnings\";\n    Flag_OrderBy[\"FlaggingTimestamp\"] = \"flaggingTimestamp\";\n    Flag_OrderBy[\"Id\"] = \"id\";\n    Flag_OrderBy[\"LastFlagIndex\"] = \"lastFlagIndex\";\n    Flag_OrderBy[\"Metadata\"] = \"metadata\";\n    Flag_OrderBy[\"ProtectionEndTimestamp\"] = \"protectionEndTimestamp\";\n    Flag_OrderBy[\"Result\"] = \"result\";\n    Flag_OrderBy[\"ReviewerCount\"] = \"reviewerCount\";\n    Flag_OrderBy[\"Reviewers\"] = \"reviewers\";\n    Flag_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    Flag_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    Flag_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    Flag_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    Flag_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    Flag_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    Flag_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    Flag_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    Flag_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    Flag_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    Flag_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    Flag_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    Flag_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    Flag_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    Flag_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    Flag_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n    Flag_OrderBy[\"Target\"] = \"target\";\n    Flag_OrderBy[\"TargetStakeAtRiskWei\"] = \"targetStakeAtRiskWei\";\n    Flag_OrderBy[\"TargetContractVersion\"] = \"target__contractVersion\";\n    Flag_OrderBy[\"TargetCumulativeEarningsWei\"] = \"target__cumulativeEarningsWei\";\n    Flag_OrderBy[\"TargetCumulativeOperatorsCutWei\"] = \"target__cumulativeOperatorsCutWei\";\n    Flag_OrderBy[\"TargetCumulativeProfitsWei\"] = \"target__cumulativeProfitsWei\";\n    Flag_OrderBy[\"TargetDataTokenBalanceWei\"] = \"target__dataTokenBalanceWei\";\n    Flag_OrderBy[\"TargetDelegatorCount\"] = \"target__delegatorCount\";\n    Flag_OrderBy[\"TargetExchangeRate\"] = \"target__exchangeRate\";\n    Flag_OrderBy[\"TargetId\"] = \"target__id\";\n    Flag_OrderBy[\"TargetIsEligibleToVote\"] = \"target__isEligibleToVote\";\n    Flag_OrderBy[\"TargetLatestHeartbeatMetadata\"] = \"target__latestHeartbeatMetadata\";\n    Flag_OrderBy[\"TargetLatestHeartbeatTimestamp\"] = \"target__latestHeartbeatTimestamp\";\n    Flag_OrderBy[\"TargetMetadataJsonString\"] = \"target__metadataJsonString\";\n    Flag_OrderBy[\"TargetOperatorTokenTotalSupplyWei\"] = \"target__operatorTokenTotalSupplyWei\";\n    Flag_OrderBy[\"TargetOperatorsCutFraction\"] = \"target__operatorsCutFraction\";\n    Flag_OrderBy[\"TargetOwner\"] = \"target__owner\";\n    Flag_OrderBy[\"TargetProtectionEndTimestamp\"] = \"target__protectionEndTimestamp\";\n    Flag_OrderBy[\"TargetSlashingsCount\"] = \"target__slashingsCount\";\n    Flag_OrderBy[\"TargetTotalStakeInSponsorshipsWei\"] = \"target__totalStakeInSponsorshipsWei\";\n    Flag_OrderBy[\"TargetValueUpdateBlockNumber\"] = \"target__valueUpdateBlockNumber\";\n    Flag_OrderBy[\"TargetValueUpdateTimestamp\"] = \"target__valueUpdateTimestamp\";\n    Flag_OrderBy[\"TargetValueWithoutEarnings\"] = \"target__valueWithoutEarnings\";\n    Flag_OrderBy[\"VoteEndTimestamp\"] = \"voteEndTimestamp\";\n    Flag_OrderBy[\"VoteStartTimestamp\"] = \"voteStartTimestamp\";\n    Flag_OrderBy[\"Votes\"] = \"votes\";\n    Flag_OrderBy[\"VotesAgainstKick\"] = \"votesAgainstKick\";\n    Flag_OrderBy[\"VotesForKick\"] = \"votesForKick\";\n})(Flag_OrderBy || (Flag_OrderBy = {}));\nexport var Network_OrderBy;\n(function (Network_OrderBy) {\n    Network_OrderBy[\"EarlyLeaverPenaltyWei\"] = \"earlyLeaverPenaltyWei\";\n    Network_OrderBy[\"EligibleVotersCount\"] = \"eligibleVotersCount\";\n    Network_OrderBy[\"FishermanRewardFraction\"] = \"fishermanRewardFraction\";\n    Network_OrderBy[\"FlagProtectionSeconds\"] = \"flagProtectionSeconds\";\n    Network_OrderBy[\"FlagReviewerCount\"] = \"flagReviewerCount\";\n    Network_OrderBy[\"FlagReviewerRewardWei\"] = \"flagReviewerRewardWei\";\n    Network_OrderBy[\"FlagReviewerSelectionIterations\"] = \"flagReviewerSelectionIterations\";\n    Network_OrderBy[\"FlagStakeWei\"] = \"flagStakeWei\";\n    Network_OrderBy[\"FlaggerRewardWei\"] = \"flaggerRewardWei\";\n    Network_OrderBy[\"FundedSponsorshipsCount\"] = \"fundedSponsorshipsCount\";\n    Network_OrderBy[\"Id\"] = \"id\";\n    Network_OrderBy[\"MaxAllowedEarningsFraction\"] = \"maxAllowedEarningsFraction\";\n    Network_OrderBy[\"MaxPenaltyPeriodSeconds\"] = \"maxPenaltyPeriodSeconds\";\n    Network_OrderBy[\"MaxQueueSeconds\"] = \"maxQueueSeconds\";\n    Network_OrderBy[\"MinEligibleVoterAge\"] = \"minEligibleVoterAge\";\n    Network_OrderBy[\"MinEligibleVoterFractionOfAllStake\"] = \"minEligibleVoterFractionOfAllStake\";\n    Network_OrderBy[\"MinimumDelegationSeconds\"] = \"minimumDelegationSeconds\";\n    Network_OrderBy[\"MinimumDelegationWei\"] = \"minimumDelegationWei\";\n    Network_OrderBy[\"MinimumSelfDelegationFraction\"] = \"minimumSelfDelegationFraction\";\n    Network_OrderBy[\"MinimumStakeWei\"] = \"minimumStakeWei\";\n    Network_OrderBy[\"OperatorContractOnlyJoinPolicy\"] = \"operatorContractOnlyJoinPolicy\";\n    Network_OrderBy[\"OperatorFactory\"] = \"operatorFactory\";\n    Network_OrderBy[\"OperatorsCount\"] = \"operatorsCount\";\n    Network_OrderBy[\"ProtocolFeeBeneficiary\"] = \"protocolFeeBeneficiary\";\n    Network_OrderBy[\"ProtocolFeeFraction\"] = \"protocolFeeFraction\";\n    Network_OrderBy[\"RandomOracle\"] = \"randomOracle\";\n    Network_OrderBy[\"ReviewPeriodSeconds\"] = \"reviewPeriodSeconds\";\n    Network_OrderBy[\"SlashingFraction\"] = \"slashingFraction\";\n    Network_OrderBy[\"SponsorshipFactory\"] = \"sponsorshipFactory\";\n    Network_OrderBy[\"SponsorshipsCount\"] = \"sponsorshipsCount\";\n    Network_OrderBy[\"StreamRegistryAddress\"] = \"streamRegistryAddress\";\n    Network_OrderBy[\"TotalDelegated\"] = \"totalDelegated\";\n    Network_OrderBy[\"TotalStake\"] = \"totalStake\";\n    Network_OrderBy[\"TotalUndelegated\"] = \"totalUndelegated\";\n    Network_OrderBy[\"TrustedForwarder\"] = \"trustedForwarder\";\n    Network_OrderBy[\"VoterRegistry\"] = \"voterRegistry\";\n    Network_OrderBy[\"VotingPeriodSeconds\"] = \"votingPeriodSeconds\";\n})(Network_OrderBy || (Network_OrderBy = {}));\nexport var Node_OrderBy;\n(function (Node_OrderBy) {\n    Node_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Node_OrderBy[\"Id\"] = \"id\";\n    Node_OrderBy[\"LastSeen\"] = \"lastSeen\";\n    Node_OrderBy[\"Metadata\"] = \"metadata\";\n    Node_OrderBy[\"StoredStreams\"] = \"storedStreams\";\n})(Node_OrderBy || (Node_OrderBy = {}));\nexport var OperatorDailyBucket_OrderBy;\n(function (OperatorDailyBucket_OrderBy) {\n    OperatorDailyBucket_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    OperatorDailyBucket_OrderBy[\"DataTokenBalanceWei\"] = \"dataTokenBalanceWei\";\n    OperatorDailyBucket_OrderBy[\"Date\"] = \"date\";\n    OperatorDailyBucket_OrderBy[\"DelegatorCountAtStart\"] = \"delegatorCountAtStart\";\n    OperatorDailyBucket_OrderBy[\"DelegatorCountChange\"] = \"delegatorCountChange\";\n    OperatorDailyBucket_OrderBy[\"Id\"] = \"id\";\n    OperatorDailyBucket_OrderBy[\"LossesWei\"] = \"lossesWei\";\n    OperatorDailyBucket_OrderBy[\"Operator\"] = \"operator\";\n    OperatorDailyBucket_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    OperatorDailyBucket_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    OperatorDailyBucket_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    OperatorDailyBucket_OrderBy[\"OperatorId\"] = \"operator__id\";\n    OperatorDailyBucket_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    OperatorDailyBucket_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    OperatorDailyBucket_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    OperatorDailyBucket_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    OperatorDailyBucket_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    OperatorDailyBucket_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    OperatorDailyBucket_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    OperatorDailyBucket_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    OperatorDailyBucket_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    OperatorDailyBucket_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    OperatorDailyBucket_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    OperatorDailyBucket_OrderBy[\"OperatorsCutWei\"] = \"operatorsCutWei\";\n    OperatorDailyBucket_OrderBy[\"ProfitsWei\"] = \"profitsWei\";\n    OperatorDailyBucket_OrderBy[\"TotalDelegatedWei\"] = \"totalDelegatedWei\";\n    OperatorDailyBucket_OrderBy[\"TotalStakeInSponsorshipsWei\"] = \"totalStakeInSponsorshipsWei\";\n    OperatorDailyBucket_OrderBy[\"TotalUndelegatedWei\"] = \"totalUndelegatedWei\";\n    OperatorDailyBucket_OrderBy[\"ValueWithoutEarnings\"] = \"valueWithoutEarnings\";\n})(OperatorDailyBucket_OrderBy || (OperatorDailyBucket_OrderBy = {}));\nexport var Operator_OrderBy;\n(function (Operator_OrderBy) {\n    Operator_OrderBy[\"ContractVersion\"] = \"contractVersion\";\n    Operator_OrderBy[\"Controllers\"] = \"controllers\";\n    Operator_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    Operator_OrderBy[\"CumulativeOperatorsCutWei\"] = \"cumulativeOperatorsCutWei\";\n    Operator_OrderBy[\"CumulativeProfitsWei\"] = \"cumulativeProfitsWei\";\n    Operator_OrderBy[\"DataTokenBalanceWei\"] = \"dataTokenBalanceWei\";\n    Operator_OrderBy[\"Delegations\"] = \"delegations\";\n    Operator_OrderBy[\"DelegatorCount\"] = \"delegatorCount\";\n    Operator_OrderBy[\"ExchangeRate\"] = \"exchangeRate\";\n    Operator_OrderBy[\"FlagsOpened\"] = \"flagsOpened\";\n    Operator_OrderBy[\"FlagsTargeted\"] = \"flagsTargeted\";\n    Operator_OrderBy[\"Id\"] = \"id\";\n    Operator_OrderBy[\"IsEligibleToVote\"] = \"isEligibleToVote\";\n    Operator_OrderBy[\"LatestHeartbeatMetadata\"] = \"latestHeartbeatMetadata\";\n    Operator_OrderBy[\"LatestHeartbeatTimestamp\"] = \"latestHeartbeatTimestamp\";\n    Operator_OrderBy[\"MetadataJsonString\"] = \"metadataJsonString\";\n    Operator_OrderBy[\"Nodes\"] = \"nodes\";\n    Operator_OrderBy[\"OperatorTokenTotalSupplyWei\"] = \"operatorTokenTotalSupplyWei\";\n    Operator_OrderBy[\"OperatorsCutFraction\"] = \"operatorsCutFraction\";\n    Operator_OrderBy[\"Owner\"] = \"owner\";\n    Operator_OrderBy[\"ProtectionEndTimestamp\"] = \"protectionEndTimestamp\";\n    Operator_OrderBy[\"QueueEntries\"] = \"queueEntries\";\n    Operator_OrderBy[\"RaisedFlags\"] = \"raisedFlags\";\n    Operator_OrderBy[\"ReceivedFlags\"] = \"receivedFlags\";\n    Operator_OrderBy[\"SlashingEvents\"] = \"slashingEvents\";\n    Operator_OrderBy[\"SlashingsCount\"] = \"slashingsCount\";\n    Operator_OrderBy[\"Stakes\"] = \"stakes\";\n    Operator_OrderBy[\"StakingEvents\"] = \"stakingEvents\";\n    Operator_OrderBy[\"TotalStakeInSponsorshipsWei\"] = \"totalStakeInSponsorshipsWei\";\n    Operator_OrderBy[\"ValueUpdateBlockNumber\"] = \"valueUpdateBlockNumber\";\n    Operator_OrderBy[\"ValueUpdateTimestamp\"] = \"valueUpdateTimestamp\";\n    Operator_OrderBy[\"ValueWithoutEarnings\"] = \"valueWithoutEarnings\";\n    Operator_OrderBy[\"VotesOnFlags\"] = \"votesOnFlags\";\n})(Operator_OrderBy || (Operator_OrderBy = {}));\n/** Defines the order direction, either ascending or descending */\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"asc\";\n    OrderDirection[\"Desc\"] = \"desc\";\n})(OrderDirection || (OrderDirection = {}));\nexport var ProjectPaymentDetails_OrderBy;\n(function (ProjectPaymentDetails_OrderBy) {\n    ProjectPaymentDetails_OrderBy[\"Beneficiary\"] = \"beneficiary\";\n    ProjectPaymentDetails_OrderBy[\"DomainId\"] = \"domainId\";\n    ProjectPaymentDetails_OrderBy[\"Id\"] = \"id\";\n    ProjectPaymentDetails_OrderBy[\"PricePerSecond\"] = \"pricePerSecond\";\n    ProjectPaymentDetails_OrderBy[\"PricingTokenAddress\"] = \"pricingTokenAddress\";\n    ProjectPaymentDetails_OrderBy[\"Project\"] = \"project\";\n    ProjectPaymentDetails_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectPaymentDetails_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectPaymentDetails_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectPaymentDetails_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectPaymentDetails_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectPaymentDetails_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectPaymentDetails_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectPaymentDetails_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectPaymentDetails_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n})(ProjectPaymentDetails_OrderBy || (ProjectPaymentDetails_OrderBy = {}));\nexport var ProjectPermission_OrderBy;\n(function (ProjectPermission_OrderBy) {\n    ProjectPermission_OrderBy[\"CanBuy\"] = \"canBuy\";\n    ProjectPermission_OrderBy[\"CanDelete\"] = \"canDelete\";\n    ProjectPermission_OrderBy[\"CanEdit\"] = \"canEdit\";\n    ProjectPermission_OrderBy[\"CanGrant\"] = \"canGrant\";\n    ProjectPermission_OrderBy[\"Id\"] = \"id\";\n    ProjectPermission_OrderBy[\"Project\"] = \"project\";\n    ProjectPermission_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectPermission_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectPermission_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectPermission_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectPermission_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectPermission_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectPermission_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectPermission_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectPermission_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectPermission_OrderBy[\"UserAddress\"] = \"userAddress\";\n})(ProjectPermission_OrderBy || (ProjectPermission_OrderBy = {}));\nexport var ProjectPurchase_OrderBy;\n(function (ProjectPurchase_OrderBy) {\n    ProjectPurchase_OrderBy[\"Fee\"] = \"fee\";\n    ProjectPurchase_OrderBy[\"Id\"] = \"id\";\n    ProjectPurchase_OrderBy[\"Price\"] = \"price\";\n    ProjectPurchase_OrderBy[\"Project\"] = \"project\";\n    ProjectPurchase_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectPurchase_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectPurchase_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectPurchase_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectPurchase_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectPurchase_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectPurchase_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectPurchase_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectPurchase_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectPurchase_OrderBy[\"PurchasedAt\"] = \"purchasedAt\";\n    ProjectPurchase_OrderBy[\"Subscriber\"] = \"subscriber\";\n    ProjectPurchase_OrderBy[\"SubscriptionSeconds\"] = \"subscriptionSeconds\";\n})(ProjectPurchase_OrderBy || (ProjectPurchase_OrderBy = {}));\nexport var ProjectStakeByUser_OrderBy;\n(function (ProjectStakeByUser_OrderBy) {\n    ProjectStakeByUser_OrderBy[\"Id\"] = \"id\";\n    ProjectStakeByUser_OrderBy[\"Project\"] = \"project\";\n    ProjectStakeByUser_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectStakeByUser_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectStakeByUser_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectStakeByUser_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectStakeByUser_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectStakeByUser_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectStakeByUser_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectStakeByUser_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectStakeByUser_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectStakeByUser_OrderBy[\"User\"] = \"user\";\n    ProjectStakeByUser_OrderBy[\"UserStake\"] = \"userStake\";\n})(ProjectStakeByUser_OrderBy || (ProjectStakeByUser_OrderBy = {}));\nexport var ProjectStakingDayBucket_OrderBy;\n(function (ProjectStakingDayBucket_OrderBy) {\n    ProjectStakingDayBucket_OrderBy[\"Date\"] = \"date\";\n    ProjectStakingDayBucket_OrderBy[\"Id\"] = \"id\";\n    ProjectStakingDayBucket_OrderBy[\"Project\"] = \"project\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectStakingDayBucket_OrderBy[\"StakeAtStart\"] = \"stakeAtStart\";\n    ProjectStakingDayBucket_OrderBy[\"StakeChange\"] = \"stakeChange\";\n    ProjectStakingDayBucket_OrderBy[\"StakingsWei\"] = \"stakingsWei\";\n    ProjectStakingDayBucket_OrderBy[\"UnstakingsWei\"] = \"unstakingsWei\";\n})(ProjectStakingDayBucket_OrderBy || (ProjectStakingDayBucket_OrderBy = {}));\nexport var ProjectSubscription_OrderBy;\n(function (ProjectSubscription_OrderBy) {\n    ProjectSubscription_OrderBy[\"EndTimestamp\"] = \"endTimestamp\";\n    ProjectSubscription_OrderBy[\"Id\"] = \"id\";\n    ProjectSubscription_OrderBy[\"Project\"] = \"project\";\n    ProjectSubscription_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectSubscription_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectSubscription_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectSubscription_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectSubscription_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectSubscription_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectSubscription_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectSubscription_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectSubscription_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectSubscription_OrderBy[\"UserAddress\"] = \"userAddress\";\n})(ProjectSubscription_OrderBy || (ProjectSubscription_OrderBy = {}));\nexport var Project_OrderBy;\n(function (Project_OrderBy) {\n    Project_OrderBy[\"Counter\"] = \"counter\";\n    Project_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Project_OrderBy[\"DomainIds\"] = \"domainIds\";\n    Project_OrderBy[\"Id\"] = \"id\";\n    Project_OrderBy[\"IsDataUnion\"] = \"isDataUnion\";\n    Project_OrderBy[\"Metadata\"] = \"metadata\";\n    Project_OrderBy[\"MinimumSubscriptionSeconds\"] = \"minimumSubscriptionSeconds\";\n    Project_OrderBy[\"PaymentDetails\"] = \"paymentDetails\";\n    Project_OrderBy[\"Permissions\"] = \"permissions\";\n    Project_OrderBy[\"Purchases\"] = \"purchases\";\n    Project_OrderBy[\"Score\"] = \"score\";\n    Project_OrderBy[\"StakedWei\"] = \"stakedWei\";\n    Project_OrderBy[\"Streams\"] = \"streams\";\n    Project_OrderBy[\"Subscriptions\"] = \"subscriptions\";\n    Project_OrderBy[\"UpdatedAt\"] = \"updatedAt\";\n})(Project_OrderBy || (Project_OrderBy = {}));\nexport var QueueEntry_OrderBy;\n(function (QueueEntry_OrderBy) {\n    QueueEntry_OrderBy[\"Amount\"] = \"amount\";\n    QueueEntry_OrderBy[\"Date\"] = \"date\";\n    QueueEntry_OrderBy[\"Delegator\"] = \"delegator\";\n    QueueEntry_OrderBy[\"DelegatorCumulativeEarningsWei\"] = \"delegator__cumulativeEarningsWei\";\n    QueueEntry_OrderBy[\"DelegatorId\"] = \"delegator__id\";\n    QueueEntry_OrderBy[\"DelegatorNumberOfDelegations\"] = \"delegator__numberOfDelegations\";\n    QueueEntry_OrderBy[\"DelegatorTotalValueDataWei\"] = \"delegator__totalValueDataWei\";\n    QueueEntry_OrderBy[\"Id\"] = \"id\";\n    QueueEntry_OrderBy[\"Operator\"] = \"operator\";\n    QueueEntry_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    QueueEntry_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    QueueEntry_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    QueueEntry_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    QueueEntry_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    QueueEntry_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    QueueEntry_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    QueueEntry_OrderBy[\"OperatorId\"] = \"operator__id\";\n    QueueEntry_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    QueueEntry_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    QueueEntry_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    QueueEntry_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    QueueEntry_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    QueueEntry_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    QueueEntry_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    QueueEntry_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    QueueEntry_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    QueueEntry_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    QueueEntry_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    QueueEntry_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    QueueEntry_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n})(QueueEntry_OrderBy || (QueueEntry_OrderBy = {}));\nexport var SlashingEvent_OrderBy;\n(function (SlashingEvent_OrderBy) {\n    SlashingEvent_OrderBy[\"Amount\"] = \"amount\";\n    SlashingEvent_OrderBy[\"Date\"] = \"date\";\n    SlashingEvent_OrderBy[\"Id\"] = \"id\";\n    SlashingEvent_OrderBy[\"Operator\"] = \"operator\";\n    SlashingEvent_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    SlashingEvent_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    SlashingEvent_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    SlashingEvent_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    SlashingEvent_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    SlashingEvent_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    SlashingEvent_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    SlashingEvent_OrderBy[\"OperatorId\"] = \"operator__id\";\n    SlashingEvent_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    SlashingEvent_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    SlashingEvent_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    SlashingEvent_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    SlashingEvent_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    SlashingEvent_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    SlashingEvent_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    SlashingEvent_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    SlashingEvent_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    SlashingEvent_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    SlashingEvent_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    SlashingEvent_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    SlashingEvent_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    SlashingEvent_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    SlashingEvent_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    SlashingEvent_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    SlashingEvent_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    SlashingEvent_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    SlashingEvent_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    SlashingEvent_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    SlashingEvent_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    SlashingEvent_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    SlashingEvent_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    SlashingEvent_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    SlashingEvent_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    SlashingEvent_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    SlashingEvent_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    SlashingEvent_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    SlashingEvent_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n})(SlashingEvent_OrderBy || (SlashingEvent_OrderBy = {}));\nexport var SponsoringEvent_OrderBy;\n(function (SponsoringEvent_OrderBy) {\n    SponsoringEvent_OrderBy[\"Amount\"] = \"amount\";\n    SponsoringEvent_OrderBy[\"Date\"] = \"date\";\n    SponsoringEvent_OrderBy[\"Id\"] = \"id\";\n    SponsoringEvent_OrderBy[\"Sponsor\"] = \"sponsor\";\n    SponsoringEvent_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    SponsoringEvent_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    SponsoringEvent_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    SponsoringEvent_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    SponsoringEvent_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    SponsoringEvent_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    SponsoringEvent_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    SponsoringEvent_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    SponsoringEvent_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    SponsoringEvent_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    SponsoringEvent_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    SponsoringEvent_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    SponsoringEvent_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    SponsoringEvent_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    SponsoringEvent_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    SponsoringEvent_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n})(SponsoringEvent_OrderBy || (SponsoringEvent_OrderBy = {}));\nexport var SponsorshipDailyBucket_OrderBy;\n(function (SponsorshipDailyBucket_OrderBy) {\n    SponsorshipDailyBucket_OrderBy[\"Date\"] = \"date\";\n    SponsorshipDailyBucket_OrderBy[\"Id\"] = \"id\";\n    SponsorshipDailyBucket_OrderBy[\"OperatorCount\"] = \"operatorCount\";\n    SponsorshipDailyBucket_OrderBy[\"ProjectedInsolvency\"] = \"projectedInsolvency\";\n    SponsorshipDailyBucket_OrderBy[\"RemainingWei\"] = \"remainingWei\";\n    SponsorshipDailyBucket_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n    SponsorshipDailyBucket_OrderBy[\"SpotApy\"] = \"spotAPY\";\n    SponsorshipDailyBucket_OrderBy[\"TotalStakedWei\"] = \"totalStakedWei\";\n})(SponsorshipDailyBucket_OrderBy || (SponsorshipDailyBucket_OrderBy = {}));\nexport var Sponsorship_OrderBy;\n(function (Sponsorship_OrderBy) {\n    Sponsorship_OrderBy[\"Creator\"] = \"creator\";\n    Sponsorship_OrderBy[\"CumulativeSponsoring\"] = \"cumulativeSponsoring\";\n    Sponsorship_OrderBy[\"Flags\"] = \"flags\";\n    Sponsorship_OrderBy[\"Id\"] = \"id\";\n    Sponsorship_OrderBy[\"IsRunning\"] = \"isRunning\";\n    Sponsorship_OrderBy[\"MaxOperators\"] = \"maxOperators\";\n    Sponsorship_OrderBy[\"Metadata\"] = \"metadata\";\n    Sponsorship_OrderBy[\"MinOperators\"] = \"minOperators\";\n    Sponsorship_OrderBy[\"MinimumStakingPeriodSeconds\"] = \"minimumStakingPeriodSeconds\";\n    Sponsorship_OrderBy[\"OperatorCount\"] = \"operatorCount\";\n    Sponsorship_OrderBy[\"ProjectedInsolvency\"] = \"projectedInsolvency\";\n    Sponsorship_OrderBy[\"RemainingWei\"] = \"remainingWei\";\n    Sponsorship_OrderBy[\"RemainingWeiUpdateTimestamp\"] = \"remainingWeiUpdateTimestamp\";\n    Sponsorship_OrderBy[\"SlashingEvents\"] = \"slashingEvents\";\n    Sponsorship_OrderBy[\"SponsoringEvents\"] = \"sponsoringEvents\";\n    Sponsorship_OrderBy[\"SpotApy\"] = \"spotAPY\";\n    Sponsorship_OrderBy[\"Stakes\"] = \"stakes\";\n    Sponsorship_OrderBy[\"StakingEvents\"] = \"stakingEvents\";\n    Sponsorship_OrderBy[\"Stream\"] = \"stream\";\n    Sponsorship_OrderBy[\"StreamCreatedAt\"] = \"stream__createdAt\";\n    Sponsorship_OrderBy[\"StreamId\"] = \"stream__id\";\n    Sponsorship_OrderBy[\"StreamMetadata\"] = \"stream__metadata\";\n    Sponsorship_OrderBy[\"StreamUpdatedAt\"] = \"stream__updatedAt\";\n    Sponsorship_OrderBy[\"TotalPayoutWeiPerSec\"] = \"totalPayoutWeiPerSec\";\n    Sponsorship_OrderBy[\"TotalStakedWei\"] = \"totalStakedWei\";\n})(Sponsorship_OrderBy || (Sponsorship_OrderBy = {}));\nexport var Stake_OrderBy;\n(function (Stake_OrderBy) {\n    Stake_OrderBy[\"AmountWei\"] = \"amountWei\";\n    Stake_OrderBy[\"EarningsWei\"] = \"earningsWei\";\n    Stake_OrderBy[\"Id\"] = \"id\";\n    Stake_OrderBy[\"JoinTimestamp\"] = \"joinTimestamp\";\n    Stake_OrderBy[\"LockedWei\"] = \"lockedWei\";\n    Stake_OrderBy[\"MinimumStakeWei\"] = \"minimumStakeWei\";\n    Stake_OrderBy[\"Operator\"] = \"operator\";\n    Stake_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    Stake_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    Stake_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    Stake_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    Stake_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    Stake_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    Stake_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    Stake_OrderBy[\"OperatorId\"] = \"operator__id\";\n    Stake_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    Stake_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    Stake_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    Stake_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    Stake_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    Stake_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    Stake_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    Stake_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    Stake_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    Stake_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    Stake_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    Stake_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    Stake_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    Stake_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    Stake_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    Stake_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    Stake_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    Stake_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    Stake_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    Stake_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    Stake_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    Stake_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    Stake_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    Stake_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    Stake_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    Stake_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    Stake_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    Stake_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    Stake_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n    Stake_OrderBy[\"UpdateTimestamp\"] = \"updateTimestamp\";\n})(Stake_OrderBy || (Stake_OrderBy = {}));\nexport var StakingEvent_OrderBy;\n(function (StakingEvent_OrderBy) {\n    StakingEvent_OrderBy[\"Amount\"] = \"amount\";\n    StakingEvent_OrderBy[\"Date\"] = \"date\";\n    StakingEvent_OrderBy[\"Id\"] = \"id\";\n    StakingEvent_OrderBy[\"Operator\"] = \"operator\";\n    StakingEvent_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    StakingEvent_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    StakingEvent_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    StakingEvent_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    StakingEvent_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    StakingEvent_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    StakingEvent_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    StakingEvent_OrderBy[\"OperatorId\"] = \"operator__id\";\n    StakingEvent_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    StakingEvent_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    StakingEvent_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    StakingEvent_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    StakingEvent_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    StakingEvent_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    StakingEvent_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    StakingEvent_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    StakingEvent_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    StakingEvent_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    StakingEvent_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    StakingEvent_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    StakingEvent_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    StakingEvent_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    StakingEvent_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    StakingEvent_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    StakingEvent_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    StakingEvent_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    StakingEvent_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    StakingEvent_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    StakingEvent_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    StakingEvent_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    StakingEvent_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    StakingEvent_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    StakingEvent_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    StakingEvent_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    StakingEvent_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    StakingEvent_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    StakingEvent_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n})(StakingEvent_OrderBy || (StakingEvent_OrderBy = {}));\nexport var StreamPermission_OrderBy;\n(function (StreamPermission_OrderBy) {\n    StreamPermission_OrderBy[\"CanDelete\"] = \"canDelete\";\n    StreamPermission_OrderBy[\"CanEdit\"] = \"canEdit\";\n    StreamPermission_OrderBy[\"CanGrant\"] = \"canGrant\";\n    StreamPermission_OrderBy[\"Id\"] = \"id\";\n    StreamPermission_OrderBy[\"PublishExpiration\"] = \"publishExpiration\";\n    StreamPermission_OrderBy[\"Stream\"] = \"stream\";\n    StreamPermission_OrderBy[\"StreamCreatedAt\"] = \"stream__createdAt\";\n    StreamPermission_OrderBy[\"StreamId\"] = \"stream__id\";\n    StreamPermission_OrderBy[\"StreamMetadata\"] = \"stream__metadata\";\n    StreamPermission_OrderBy[\"StreamUpdatedAt\"] = \"stream__updatedAt\";\n    StreamPermission_OrderBy[\"SubscribeExpiration\"] = \"subscribeExpiration\";\n    StreamPermission_OrderBy[\"UserAddress\"] = \"userAddress\";\n    StreamPermission_OrderBy[\"UserId\"] = \"userId\";\n})(StreamPermission_OrderBy || (StreamPermission_OrderBy = {}));\nexport var Stream_OrderBy;\n(function (Stream_OrderBy) {\n    Stream_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Stream_OrderBy[\"Id\"] = \"id\";\n    Stream_OrderBy[\"Metadata\"] = \"metadata\";\n    Stream_OrderBy[\"Permissions\"] = \"permissions\";\n    Stream_OrderBy[\"Sponsorships\"] = \"sponsorships\";\n    Stream_OrderBy[\"StorageNodes\"] = \"storageNodes\";\n    Stream_OrderBy[\"UpdatedAt\"] = \"updatedAt\";\n})(Stream_OrderBy || (Stream_OrderBy = {}));\nexport var Vote_OrderBy;\n(function (Vote_OrderBy) {\n    Vote_OrderBy[\"Flag\"] = \"flag\";\n    Vote_OrderBy[\"FlagFlagResolutionTimestamp\"] = \"flag__flagResolutionTimestamp\";\n    Vote_OrderBy[\"FlagFlaggingTimestamp\"] = \"flag__flaggingTimestamp\";\n    Vote_OrderBy[\"FlagId\"] = \"flag__id\";\n    Vote_OrderBy[\"FlagLastFlagIndex\"] = \"flag__lastFlagIndex\";\n    Vote_OrderBy[\"FlagMetadata\"] = \"flag__metadata\";\n    Vote_OrderBy[\"FlagProtectionEndTimestamp\"] = \"flag__protectionEndTimestamp\";\n    Vote_OrderBy[\"FlagResult\"] = \"flag__result\";\n    Vote_OrderBy[\"FlagReviewerCount\"] = \"flag__reviewerCount\";\n    Vote_OrderBy[\"FlagTargetStakeAtRiskWei\"] = \"flag__targetStakeAtRiskWei\";\n    Vote_OrderBy[\"FlagVoteEndTimestamp\"] = \"flag__voteEndTimestamp\";\n    Vote_OrderBy[\"FlagVoteStartTimestamp\"] = \"flag__voteStartTimestamp\";\n    Vote_OrderBy[\"FlagVotesAgainstKick\"] = \"flag__votesAgainstKick\";\n    Vote_OrderBy[\"FlagVotesForKick\"] = \"flag__votesForKick\";\n    Vote_OrderBy[\"Id\"] = \"id\";\n    Vote_OrderBy[\"Timestamp\"] = \"timestamp\";\n    Vote_OrderBy[\"VotedKick\"] = \"votedKick\";\n    Vote_OrderBy[\"Voter\"] = \"voter\";\n    Vote_OrderBy[\"VoterWeight\"] = \"voterWeight\";\n    Vote_OrderBy[\"VoterContractVersion\"] = \"voter__contractVersion\";\n    Vote_OrderBy[\"VoterCumulativeEarningsWei\"] = \"voter__cumulativeEarningsWei\";\n    Vote_OrderBy[\"VoterCumulativeOperatorsCutWei\"] = \"voter__cumulativeOperatorsCutWei\";\n    Vote_OrderBy[\"VoterCumulativeProfitsWei\"] = \"voter__cumulativeProfitsWei\";\n    Vote_OrderBy[\"VoterDataTokenBalanceWei\"] = \"voter__dataTokenBalanceWei\";\n    Vote_OrderBy[\"VoterDelegatorCount\"] = \"voter__delegatorCount\";\n    Vote_OrderBy[\"VoterExchangeRate\"] = \"voter__exchangeRate\";\n    Vote_OrderBy[\"VoterId\"] = \"voter__id\";\n    Vote_OrderBy[\"VoterIsEligibleToVote\"] = \"voter__isEligibleToVote\";\n    Vote_OrderBy[\"VoterLatestHeartbeatMetadata\"] = \"voter__latestHeartbeatMetadata\";\n    Vote_OrderBy[\"VoterLatestHeartbeatTimestamp\"] = \"voter__latestHeartbeatTimestamp\";\n    Vote_OrderBy[\"VoterMetadataJsonString\"] = \"voter__metadataJsonString\";\n    Vote_OrderBy[\"VoterOperatorTokenTotalSupplyWei\"] = \"voter__operatorTokenTotalSupplyWei\";\n    Vote_OrderBy[\"VoterOperatorsCutFraction\"] = \"voter__operatorsCutFraction\";\n    Vote_OrderBy[\"VoterOwner\"] = \"voter__owner\";\n    Vote_OrderBy[\"VoterProtectionEndTimestamp\"] = \"voter__protectionEndTimestamp\";\n    Vote_OrderBy[\"VoterSlashingsCount\"] = \"voter__slashingsCount\";\n    Vote_OrderBy[\"VoterTotalStakeInSponsorshipsWei\"] = \"voter__totalStakeInSponsorshipsWei\";\n    Vote_OrderBy[\"VoterValueUpdateBlockNumber\"] = \"voter__valueUpdateBlockNumber\";\n    Vote_OrderBy[\"VoterValueUpdateTimestamp\"] = \"voter__valueUpdateTimestamp\";\n    Vote_OrderBy[\"VoterValueWithoutEarnings\"] = \"voter__valueWithoutEarnings\";\n})(Vote_OrderBy || (Vote_OrderBy = {}));\nexport var _SubgraphErrorPolicy_;\n(function (_SubgraphErrorPolicy_) {\n    /** Data will be returned even if the subgraph has indexing errors */\n    _SubgraphErrorPolicy_[\"Allow\"] = \"allow\";\n    /** If the subgraph has indexing errors, data will be omitted. The default. */\n    _SubgraphErrorPolicy_[\"Deny\"] = \"deny\";\n})(_SubgraphErrorPolicy_ || (_SubgraphErrorPolicy_ = {}));\nexport const StakeFieldsFragmentDoc = gql `\n    fragment StakeFields on Stake {\n  operator {\n    id\n    metadataJsonString\n  }\n  amountWei\n  earningsWei\n  lockedWei\n  joinTimestamp\n}\n    `;\nexport const SponsorshipFieldsFragmentDoc = gql `\n    fragment SponsorshipFields on Sponsorship {\n  id\n  stream {\n    id\n    metadata\n  }\n  metadata\n  isRunning\n  totalPayoutWeiPerSec\n  stakes(first: 1000, orderBy: amountWei, orderDirection: desc) {\n    ...StakeFields\n  }\n  operatorCount\n  minOperators\n  maxOperators\n  totalStakedWei\n  remainingWei\n  remainingWeiUpdateTimestamp\n  projectedInsolvency\n  cumulativeSponsoring\n  minimumStakingPeriodSeconds\n  creator\n  spotAPY\n}\n    ${StakeFieldsFragmentDoc}`;\nexport const OperatorFieldsFragmentDoc = gql `\n    fragment OperatorFields on Operator {\n  id\n  stakes(first: 1000) {\n    ...StakeFields\n    sponsorship {\n      ...SponsorshipFields\n    }\n  }\n  delegations(first: 1000) {\n    delegator {\n      id\n    }\n    operatorTokenBalanceWei\n    latestDelegationTimestamp\n    earliestUndelegationTimestamp\n    id\n  }\n  slashingEvents(first: 1000) {\n    amount\n    date\n    sponsorship {\n      id\n      stream {\n        id\n      }\n    }\n  }\n  queueEntries(first: 1000) {\n    amount\n    date\n    delegator {\n      id\n    }\n    id\n  }\n  delegatorCount\n  valueWithoutEarnings\n  totalStakeInSponsorshipsWei\n  dataTokenBalanceWei\n  operatorTokenTotalSupplyWei\n  metadataJsonString\n  owner\n  nodes\n  cumulativeProfitsWei\n  cumulativeOperatorsCutWei\n  operatorsCutFraction\n  contractVersion\n  exchangeRate\n  controllers\n}\n    ${StakeFieldsFragmentDoc}\n${SponsorshipFieldsFragmentDoc}`;\nexport const ProjectFieldsFragmentDoc = gql `\n    fragment ProjectFields on Project {\n  id\n  domainIds\n  score\n  metadata\n  streams\n  minimumSubscriptionSeconds\n  createdAt\n  updatedAt\n  isDataUnion\n  paymentDetails {\n    domainId\n    beneficiary\n    pricingTokenAddress\n    pricePerSecond\n  }\n  subscriptions {\n    userAddress\n    endTimestamp\n  }\n  permissions {\n    userAddress\n    canBuy\n    canDelete\n    canEdit\n    canGrant\n  }\n  purchases {\n    subscriber\n    subscriptionSeconds\n    price\n    fee\n    purchasedAt\n  }\n}\n    `;\nexport const StreamFieldsFragmentDoc = gql `\n    fragment StreamFields on Stream {\n  id\n  metadata\n  permissions {\n    id\n    canGrant\n    canEdit\n    canDelete\n    userId\n    subscribeExpiration\n    publishExpiration\n  }\n}\n    `;\nexport const SponsorshipDailyBucketFieldsFragmentDoc = gql `\n    fragment SponsorshipDailyBucketFields on SponsorshipDailyBucket {\n  id\n  operatorCount\n  projectedInsolvency\n  spotAPY\n  totalStakedWei\n  remainingWei\n  date\n  sponsorship {\n    id\n  }\n}\n    `;\nexport const SponsoringEventFieldsFragmentDoc = gql `\n    fragment SponsoringEventFields on SponsoringEvent {\n  id\n  amount\n  date\n  sponsor\n}\n    `;\nexport const OperatorDailyBucketFieldsFragmentDoc = gql `\n    fragment OperatorDailyBucketFields on OperatorDailyBucket {\n  date\n  id\n  dataTokenBalanceWei\n  delegatorCountChange\n  delegatorCountAtStart\n  lossesWei\n  operatorsCutWei\n  valueWithoutEarnings\n  profitsWei\n  cumulativeEarningsWei\n  totalDelegatedWei\n  totalUndelegatedWei\n  totalStakeInSponsorshipsWei\n}\n    `;\nexport const DelegatorDailyBucketFieldsFragmentDoc = gql `\n    fragment DelegatorDailyBucketFields on DelegatorDailyBucket {\n  id\n  totalValueDataWei\n  date\n  cumulativeEarningsWei\n  operatorCount\n}\n    `;\nexport const GetAllOperatorsDocument = gql `\n    query getAllOperators($first: Int, $skip: Int, $searchQuery: ID, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const SearchOperatorsByMetadataDocument = gql `\n    query searchOperatorsByMetadata($first: Int, $skip: Int, $searchQuery: String, $id: ID!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {or: [{id: $id}, {metadataJsonString_contains_nocase: $searchQuery}, {stakes_: {sponsorship_contains_nocase: $searchQuery}}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorByIdDocument = gql `\n    query getOperatorById($operatorId: ID!, $minBlockNumber: Int = 0) {\n  operator(id: $operatorId, block: {number_gte: $minBlockNumber}) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByDelegationDocument = gql `\n    query getOperatorsByDelegation($first: Int, $skip: Int, $delegator: String!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {delegations_: {delegator: $delegator}}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByDelegationAndIdDocument = gql `\n    query getOperatorsByDelegationAndId($first: Int, $skip: Int, $delegator: String!, $operatorId: ID!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {delegations_: {delegator: $delegator}, id: $operatorId}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByDelegationAndMetadataDocument = gql `\n    query getOperatorsByDelegationAndMetadata($first: Int, $skip: Int, $delegator: String!, $searchQuery: String!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {delegations_: {delegator: $delegator}, metadataJsonString_contains_nocase: $searchQuery}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorByOwnerAddressDocument = gql `\n    query getOperatorByOwnerAddress($owner: String!, $minBlockNumber: Int = 0) {\n  operators(\n    first: 1\n    block: {number_gte: $minBlockNumber}\n    where: {owner: $owner}\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByOwnerOrControllerAddressDocument = gql `\n    query getOperatorsByOwnerOrControllerAddress($owner: String!, $minBlockNumber: Int = 0) {\n  operators(\n    block: {number_gte: $minBlockNumber}\n    where: {or: [{owner: $owner}, {controllers_contains_nocase: [$owner]}]}\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetAllSponsorshipsDocument = gql `\n    query getAllSponsorships($first: Int, $skip: Int, $searchQuery: String!, $id: ID!, $orderBy: Sponsorship_orderBy, $orderDirection: OrderDirection, $whereFilters: Sponsorship_filter) {\n  sponsorships(\n    first: $first\n    skip: $skip\n    where: {and: [$whereFilters, {or: [{stream_contains_nocase: $searchQuery}, {id: $id}, {stakes_: {operator_contains_nocase: $searchQuery}}]}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetSponsorshipsByCreatorDocument = gql `\n    query getSponsorshipsByCreator($first: Int, $skip: Int, $searchQuery: String!, $id: ID!, $creator: String!, $orderBy: Sponsorship_orderBy, $orderDirection: OrderDirection, $whereFilters: Sponsorship_filter) {\n  sponsorships(\n    first: $first\n    skip: $skip\n    where: {and: [$whereFilters, {creator: $creator}, {or: [{stream_contains_nocase: $searchQuery}, {id: $id}, {stakes_: {operator_contains_nocase: $searchQuery}}]}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetSponsorshipByIdDocument = gql `\n    query getSponsorshipById($sponsorshipId: ID!, $minBlockNumber: Int = 0) {\n  sponsorship(id: $sponsorshipId, block: {number_gte: $minBlockNumber}) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetSponsorshipByStreamIdDocument = gql `\n    query getSponsorshipByStreamId($first: Int, $skip: Int, $orderBy: Sponsorship_orderBy, $orderDirection: OrderDirection, $streamId: String!, $whereFilters: Sponsorship_filter) {\n  sponsorships(\n    first: $first\n    skip: $skip\n    where: {and: [$whereFilters, {stream_contains_nocase: $streamId}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetProjectDocument = gql `\n    query getProject($id: ID!, $minBlockNumber: Int = 0) {\n  project(id: $id, block: {number_gte: $minBlockNumber}) {\n    ...ProjectFields\n  }\n}\n    ${ProjectFieldsFragmentDoc}`;\nexport const GetProjectsDocument = gql `\n    query getProjects($first: Int, $skip: Int, $where: Project_filter) {\n  projects(\n    first: $first\n    skip: $skip\n    orderBy: score\n    orderDirection: desc\n    where: $where\n  ) {\n    ...ProjectFields\n  }\n}\n    ${ProjectFieldsFragmentDoc}`;\nexport const GetProjectsByTextDocument = gql `\n    query getProjectsByText($first: Int, $skip: Int, $text: String!, $where: Project_filter) {\n  projectSearch(first: $first, skip: $skip, text: $text, where: $where) {\n    ...ProjectFields\n  }\n}\n    ${ProjectFieldsFragmentDoc}`;\nexport const GetProjectSubscriptionsDocument = gql `\n    query getProjectSubscriptions($id: ID!) {\n  project(id: $id) {\n    subscriptions {\n      userAddress\n      endTimestamp\n    }\n  }\n}\n    `;\nexport const GetStreamByIdDocument = gql `\n    query getStreamById($streamId: ID!) {\n  stream(id: $streamId) {\n    ...StreamFields\n  }\n}\n    ${StreamFieldsFragmentDoc}`;\nexport const GetPagedStreamsDocument = gql `\n    query getPagedStreams($first: Int, $orderBy: Stream_orderBy, $orderDirection: OrderDirection, $where: Stream_filter) {\n  streams(\n    first: $first\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n    where: $where\n  ) {\n    ...StreamFields\n  }\n}\n    ${StreamFieldsFragmentDoc}`;\nexport const GetSponsorshipDailyBucketsDocument = gql `\n    query getSponsorshipDailyBuckets($where: SponsorshipDailyBucket_filter!, $first: Int, $skip: Int) {\n  sponsorshipDailyBuckets(first: $first, skip: $skip, where: $where) {\n    ...SponsorshipDailyBucketFields\n  }\n}\n    ${SponsorshipDailyBucketFieldsFragmentDoc}`;\nexport const GetSponsoringEventsDocument = gql `\n    query getSponsoringEvents($sponsorshipId: ID!, $first: Int, $skip: Int) {\n  sponsoringEvents(\n    where: {sponsorship_: {id: $sponsorshipId}}\n    first: $first\n    skip: $skip\n    orderBy: date\n    orderDirection: desc\n  ) {\n    ...SponsoringEventFields\n  }\n}\n    ${SponsoringEventFieldsFragmentDoc}`;\nexport const GetOperatorDailyBucketsDocument = gql `\n    query getOperatorDailyBuckets($where: OperatorDailyBucket_filter!, $first: Int, $skip: Int) {\n  operatorDailyBuckets(first: $first, skip: $skip, where: $where) {\n    ...OperatorDailyBucketFields\n  }\n}\n    ${OperatorDailyBucketFieldsFragmentDoc}`;\nexport const GetDelegatorDailyBucketsDocument = gql `\n    query getDelegatorDailyBuckets($where: DelegatorDailyBucket_filter!, $first: Int, $skip: Int) {\n  delegatorDailyBuckets(first: $first, skip: $skip, where: $where) {\n    ...DelegatorDailyBucketFields\n  }\n}\n    ${DelegatorDailyBucketFieldsFragmentDoc}`;\nexport const GetMetadataDocument = gql `\n    query getMetadata {\n  _meta {\n    block {\n      hash\n      number\n      timestamp\n    }\n  }\n}\n    `;\nexport const GetNetworkStatsDocument = gql `\n    query getNetworkStats {\n  networks(first: 1) {\n    totalStake\n    operatorsCount\n    sponsorshipsCount\n  }\n}\n    `;\n","export class Parsable {\n    constructor(raw, chainId) {\n        this.raw = raw;\n        this.chainId = chainId;\n        this.cache = {};\n        this.preparsed = {};\n        this.preparsed = this.preparse();\n    }\n    preparse() {\n        throw new Error('Not implemented');\n    }\n    getValue(key, parser) {\n        const cachedValue = this.cache[key];\n        if (key in this.cache) {\n            return cachedValue;\n        }\n        const value = parser ? parser(this.preparsed[key]) : this.preparsed[key];\n        this.cache[key] = value;\n        return value;\n    }\n}\n","/**\n * IPFS is served through Pinata (https://pinata.cloud).\n *\n * - `PINATA_GATEWAY_URL` – base URL of the dedicated gateway, e.g.\n *   `https://example-gateway.mypinata.cloud/ipfs/`. Falls back to Pinata's\n *   public (rate-limited) gateway when unset.\n * - `PINATA_JWT` – API key JWT used for uploads (see `~/services/images`).\n *\n * The dedicated gateway is expected to be protected with a Host Origin access\n * control. That check relies on the `Origin` request header, which browsers\n * only send for CORS requests, so every `<img>` that loads from the gateway\n * must carry `crossOrigin=\"anonymous\"` – see `getImageCrossOrigin`.\n */\nconst DEFAULT_PINATA_GATEWAY_URL = 'https://gateway.pinata.cloud/ipfs/';\nexport const PINATA_UPLOAD_ENDPOINT = 'https://uploads.pinata.cloud/v3/files';\nexport function getPinataJwt() {\n    return process.env.PINATA_JWT || '';\n}\nfunction getIpfsGatewayBaseUrl() {\n    const url = process.env.PINATA_GATEWAY_URL || DEFAULT_PINATA_GATEWAY_URL;\n    return url.endsWith('/') ? url : `${url}/`;\n}\n/**\n * Builds a gateway URL for the given IPFS CID.\n */\nexport function getIpfsGatewayUrl(cid) {\n    return `${getIpfsGatewayBaseUrl()}${cid}`;\n}\n/**\n * Tells if the given URL points at our IPFS gateway.\n */\nexport function isIpfsGatewayUrl(url) {\n    return !!url && url.startsWith(getIpfsGatewayBaseUrl());\n}\n/**\n * Returns the `crossOrigin` attribute value an `<img>` should use for the\n * given `src`. Gateway images are loaded as CORS requests (so the Host Origin\n * access control sees the `Origin` header); anything else (blob URLs, third\n * party hosts that may not send CORS headers) is left alone.\n */\nexport function getImageCrossOrigin(src) {\n    return isIpfsGatewayUrl(src) ? 'anonymous' : undefined;\n}\n/**\n * Extracts the CID from an `ipfs://<cid>` or `https://<gateway>/ipfs/<cid>` URL.\n * Returns `undefined` for anything else.\n */\nexport function getIpfsCidFromUrl(url) {\n    const match = /^(?:ipfs:\\/\\/|https?:\\/\\/[^/]+\\/ipfs\\/)([^/?#]+)/.exec(url);\n    return match?.[1];\n}\n","import { z } from 'zod';\nimport { ParseError } from '~/errors';\nimport { Parsable } from '~/parsers/Parsable';\nimport { getIpfsGatewayUrl } from '~/utils/ipfs';\nconst RawOperatorMetadata = z\n    .union([\n    z.string().transform((value) => {\n        try {\n            return JSON.parse(value);\n        }\n        catch (e) {\n            if (e instanceof SyntaxError) {\n                return {};\n            }\n            throw e;\n        }\n    }),\n    z.record(z.string(), z.unknown()),\n])\n    .default({})\n    .catch({})\n    .pipe(z.object({\n    name: z.unknown(),\n    description: z.unknown(),\n    imageIpfsCid: z.unknown(),\n    redundancyFactor: z.unknown(),\n    url: z.unknown(),\n    email: z.unknown(),\n    twitter: z.unknown(),\n    x: z.unknown(),\n    telegram: z.unknown(),\n    reddit: z.unknown(),\n    linkedIn: z.unknown(),\n}));\nconst UrlParser = z\n    .string()\n    .url()\n    .optional()\n    .catch(() => '')\n    .default('');\nexport class OperatorMetadata extends Parsable {\n    static parse(raw, chainId) {\n        try {\n            return new OperatorMetadata(raw, chainId);\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                throw new ParseError(raw, e);\n            }\n            throw e;\n        }\n    }\n    preparse() {\n        return RawOperatorMetadata.parse(this.raw);\n    }\n    get name() {\n        return this.getValue('name', (raw) => {\n            return z\n                .string()\n                .catch(() => '')\n                .parse(raw);\n        });\n    }\n    get description() {\n        return this.getValue('description', (raw) => {\n            return z\n                .string()\n                .catch(() => '')\n                .parse(raw);\n        });\n    }\n    get imageIpfsCid() {\n        return this.getValue('imageIpfsCid', (raw) => {\n            return z\n                .string()\n                .trim()\n                .optional()\n                .catch(() => undefined)\n                .transform((v) => v || undefined)\n                .parse(raw);\n        });\n    }\n    get imageUrl() {\n        const { imageIpfsCid } = this;\n        return imageIpfsCid && getIpfsGatewayUrl(imageIpfsCid);\n    }\n    get redundancyFactor() {\n        return this.getValue('redundancyFactor', (raw) => {\n            return z.coerce\n                .number()\n                .int()\n                .min(1)\n                .optional()\n                .catch(() => undefined)\n                .parse(raw);\n        });\n    }\n    get url() {\n        return this.getValue('url', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get email() {\n        return this.getValue('email', (raw) => {\n            return z\n                .string()\n                .email()\n                .optional()\n                .catch(() => '')\n                .default('')\n                .parse(raw);\n        });\n    }\n    get twitter() {\n        return this.getValue('twitter', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get x() {\n        return this.getValue('x', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get telegram() {\n        return this.getValue('telegram', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get reddit() {\n        return this.getValue('reddit', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get linkedIn() {\n        return this.getValue('linkedIn', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n}\n","import { ZeroAddress } from 'ethers';\nimport { z } from 'zod';\nimport { ParseError } from '~/errors';\nimport { getDelegatedAmountForWallet, getSpotApy } from '~/getters';\nimport { OperatorMetadata } from '~/parsers/OperatorMetadata';\nimport { Parsable } from '~/parsers/Parsable';\nimport { toBigInt, toBN, toFloat } from '~/utils/bn';\nconst RawOperator = z.object({\n    contractVersion: z.unknown(),\n    controllers: z.unknown(),\n    cumulativeOperatorsCutWei: z.unknown(),\n    cumulativeProfitsWei: z.unknown(),\n    dataTokenBalanceWei: z.unknown(),\n    delegations: z.unknown(),\n    delegatorCount: z.unknown(),\n    exchangeRate: z.unknown(),\n    id: z.string(),\n    metadataJsonString: z.unknown(),\n    nodes: z.unknown(),\n    operatorsCutFraction: z.unknown(),\n    operatorTokenTotalSupplyWei: z.unknown(),\n    owner: z.unknown(),\n    queueEntries: z.unknown(),\n    slashingEvents: z.unknown(),\n    stakes: z.unknown(),\n    totalStakeInSponsorshipsWei: z.unknown(),\n    valueUpdateBlockNumber: z.unknown(),\n    valueUpdateTimestamp: z.unknown(),\n    valueWithoutEarnings: z.unknown(),\n});\nexport class Operator extends Parsable {\n    constructor() {\n        super(...arguments);\n        this._shares = {};\n    }\n    static parse(raw, chainId) {\n        try {\n            return new Operator(raw, chainId);\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                throw new ParseError(raw, e);\n            }\n            throw e;\n        }\n    }\n    preparse() {\n        return RawOperator.parse(this.raw);\n    }\n    get contractVersion() {\n        return this.getValue('contractVersion', (raw) => {\n            return z\n                .union([z.number(), z.string().transform(Number).pipe(z.number())])\n                .catch(-1)\n                .parse(raw);\n        });\n    }\n    get controllers() {\n        return this.getValue('controllers', (raw) => {\n            return z\n                .array(z.string().catch(''))\n                .catch([])\n                .transform((value) => {\n                const result = [];\n                for (const addr of value) {\n                    if (!addr) {\n                        continue;\n                    }\n                    result.push({\n                        address: addr.toLowerCase(),\n                        enabled: true,\n                        persisted: true,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get cumulativeOperatorsCutWei() {\n        return this.getValue('cumulativeOperatorsCutWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get cumulativeProfitsWei() {\n        return this.getValue('cumulativeProfitsWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get dataTokenBalanceWei() {\n        return this.getValue('dataTokenBalanceWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get delegations() {\n        return this.getValue('delegations', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    id: z.string(),\n                    delegator: z.object({\n                        id: z.string(),\n                    }),\n                    operatorTokenBalanceWei: z\n                        .string()\n                        .transform((v) => toBigInt(v || 0)),\n                    latestDelegationTimestamp: z.coerce.number(),\n                    earliestUndelegationTimestamp: z.coerce.number(),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((delegations) => {\n                const result = [];\n                for (const d of delegations) {\n                    if (d) {\n                        result.push({\n                            ...d,\n                            delegator: d.delegator.id,\n                            amount: toBigInt(toBN(d.operatorTokenBalanceWei).multipliedBy(this.exchangeRate)),\n                        });\n                    }\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get delegatorCount() {\n        return this.getValue('delegatorCount', (raw) => {\n            return z.number().catch(0).parse(raw);\n        });\n    }\n    get exchangeRate() {\n        return this.getValue('exchangeRate', (raw) => {\n            return z\n                .union([z.string(), z.number().min(0)])\n                .transform((v) => toBN(v || 0))\n                .catch(toBN(0))\n                .parse(raw);\n        });\n    }\n    get id() {\n        return this.getValue('id');\n    }\n    get metadata() {\n        return this.getValue('metadataJsonString', (raw) => {\n            return new OperatorMetadata(raw, this.chainId);\n        });\n    }\n    get nodes() {\n        return this.getValue('nodes', (raw) => {\n            return z\n                .array(z.string().catch(''))\n                .catch([])\n                .transform((value) => {\n                const result = [];\n                for (const addr of value) {\n                    if (!addr) {\n                        continue;\n                    }\n                    result.push({\n                        address: addr.toLowerCase(),\n                        enabled: true,\n                        persisted: true,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get operatorsCut() {\n        return this.getValue('operatorsCutFraction', (raw) => {\n            return z\n                .string()\n                .transform((v) => toFloat(toBigInt(v || 0), 18n)\n                .multipliedBy(100)\n                .toNumber())\n                .catch(0)\n                .parse(raw);\n        });\n    }\n    get operatorTokenTotalSupplyWei() {\n        return this.getValue('operatorTokenTotalSupplyWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get owner() {\n        return this.getValue('owner', (raw) => {\n            return z.string().catch(ZeroAddress).parse(raw);\n        });\n    }\n    get queueEntries() {\n        return this.getValue('queueEntries', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    amount: z.string().transform((v) => toBigInt(v || 0)),\n                    date: z.coerce.number(),\n                    delegator: z.object({ id: z.string() }),\n                    id: z.string(),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((entries) => {\n                const result = [];\n                for (const e of entries) {\n                    if (e) {\n                        const { date, ...rest } = e;\n                        result.push({\n                            ...rest,\n                            queuedAt: new Date(date * 1000),\n                            delegator: rest.delegator.id,\n                        });\n                    }\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get slashingEvents() {\n        return this.getValue('slashingEvents', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    amount: z.string().transform((v) => toBigInt(v || 0)),\n                    date: z.coerce.number(),\n                    sponsorship: z.object({\n                        id: z.string(),\n                        stream: z.object({\n                            id: z.string(),\n                        }),\n                    }),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((events) => {\n                const result = [];\n                for (const e of events) {\n                    if (e) {\n                        const { id: sponsorshipId, stream } = e.sponsorship;\n                        result.push({\n                            ...e,\n                            sponsorshipId,\n                            streamId: stream.id,\n                        });\n                    }\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get stakes() {\n        return this.getValue('stakes', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    amountWei: z.string().transform((v) => toBigInt(v)),\n                    earningsWei: z.string().transform((v) => toBigInt(v)),\n                    joinTimestamp: z.coerce.number(),\n                    operator: z.object({\n                        id: z.string(),\n                    }),\n                    sponsorship: z.object({\n                        id: z.string(),\n                        isRunning: z.boolean(),\n                        remainingWei: z\n                            .string()\n                            .transform((v) => toBigInt(v)),\n                        minimumStakingPeriodSeconds: z.coerce.number(),\n                        spotAPY: z.string().transform(toBN),\n                        projectedInsolvency: z\n                            .union([z.string(), z.null()])\n                            .transform((v) => (v == null ? null : Number(v))),\n                        stream: z.union([\n                            z.object({\n                                id: z.string(),\n                            }),\n                            z.null(),\n                        ]),\n                    }),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((stakes) => {\n                const result = [];\n                for (const s of stakes) {\n                    if (!s) {\n                        continue;\n                    }\n                    const { amountWei, earningsWei, joinTimestamp, operator, sponsorship, } = s;\n                    const { id: sponsorshipId, projectedInsolvency, remainingWei, spotAPY, stream, } = sponsorship;\n                    result.push({\n                        amountWei,\n                        earningsWei,\n                        isSponsorshipPaying: sponsorship.isRunning && sponsorship.remainingWei > 0n,\n                        joinedAt: new Date(joinTimestamp * 1000),\n                        minimumStakingPeriodSeconds: sponsorship.minimumStakingPeriodSeconds,\n                        operatorId: operator.id,\n                        projectedInsolvencyAt: projectedInsolvency != null\n                            ? new Date(projectedInsolvency * 1000)\n                            : null,\n                        remainingWei,\n                        sponsorshipId,\n                        spotAPY,\n                        streamId: stream?.id,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get totalStakeInSponsorshipsWei() {\n        return this.getValue('totalStakeInSponsorshipsWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get valueUpdateBlockNumber() {\n        return this.getValue('valueUpdateBlockNumber', (raw) => {\n            return z.coerce.number().optional().catch(undefined).parse(raw);\n        });\n    }\n    get valueUpdateTimestamp() {\n        return this.getValue('valueUpdateTimestamp', (raw) => {\n            return z.coerce.number().optional().catch(undefined).parse(raw);\n        });\n    }\n    get valueWithoutEarnings() {\n        return this.getValue('valueWithoutEarnings', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get apy() {\n        if (this._apy != null) {\n            return this._apy;\n        }\n        this._apy = getSpotApy(this);\n        return this._apy;\n    }\n    share(wallet) {\n        const addr = wallet.toLowerCase();\n        if (this._shares[addr] != null) {\n            return this._shares[addr];\n        }\n        this._shares[addr] = getDelegatedAmountForWallet(wallet, this);\n        return this._shares[addr];\n    }\n}\n","import { z } from 'zod';\nimport { ParseError } from '~/errors';\nimport { OperatorMetadata } from '~/parsers/OperatorMetadata';\nimport { Parsable } from '~/parsers/Parsable';\nimport { toBigInt } from '~/utils/bn';\nconst RawSponsorship = z.object({\n    cumulativeSponsoring: z.unknown(),\n    id: z.string(),\n    isRunning: z.unknown(),\n    minOperators: z.unknown(),\n    maxOperators: z.unknown(),\n    minimumStakingPeriodSeconds: z.unknown(),\n    operatorCount: z.unknown(),\n    projectedInsolvency: z.unknown(),\n    remainingWei: z.unknown(),\n    remainingWeiUpdateTimestamp: z.unknown(),\n    spotAPY: z.unknown(),\n    stream: z.unknown(),\n    stakes: z.unknown(),\n    totalPayoutWeiPerSec: z.unknown(),\n    totalStakedWei: z.unknown(),\n});\nexport class Sponsorship extends Parsable {\n    static parse(raw, chainId) {\n        try {\n            return new Sponsorship(raw, chainId);\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                throw new ParseError(raw, e);\n            }\n            throw e;\n        }\n    }\n    preparse() {\n        return RawSponsorship.parse(this.raw);\n    }\n    get cumulativeSponsoring() {\n        return this.getValue('cumulativeSponsoring', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get id() {\n        return this.getValue('id');\n    }\n    get isRunning() {\n        return this.getValue('isRunning', (raw) => {\n            return z.boolean().catch(false).parse(raw);\n        });\n    }\n    get minOperators() {\n        return this.getValue('minOperators', (raw) => {\n            return z.coerce.number().int().min(0).catch(0).parse(raw);\n        });\n    }\n    get maxOperators() {\n        return this.getValue('maxOperators', (raw) => {\n            return z.number().int().min(0).default(Infinity).catch(Infinity).parse(raw);\n        });\n    }\n    get minimumStakingPeriodSeconds() {\n        return this.getValue('minimumStakingPeriodSeconds', (raw) => {\n            return z.coerce.number().min(0).catch(0).parse(raw);\n        });\n    }\n    get operatorCount() {\n        return this.getValue('operatorCount', (raw) => {\n            return z.coerce.number().int().min(0).catch(0).parse(raw);\n        });\n    }\n    get projectedInsolvencyAt() {\n        return this.getValue('projectedInsolvency', (raw) => {\n            return z\n                .union([\n                z.string().transform(Number).pipe(z.number()),\n                z.number(),\n                z.null(),\n            ])\n                .catch(null)\n                .transform((v) => (v === null ? null : new Date(Number(v) * 1000)))\n                .parse(raw);\n        });\n    }\n    get remainingBalanceWei() {\n        return this.getValue('remainingWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get remainingBalanceUpdatedAt() {\n        return this.getValue('remainingWeiUpdateTimestamp', (raw) => {\n            return z\n                .union([\n                z.string().transform(Number).pipe(z.number()),\n                z.number(),\n                z.null(),\n            ])\n                .catch(null)\n                .transform((v) => (v === null ? null : new Date(Number(v) * 1000)))\n                .parse(raw);\n        });\n    }\n    get spotApy() {\n        return this.getValue('spotAPY', (raw) => {\n            return z.coerce.number().catch(0).parse(raw);\n        });\n    }\n    get streamId() {\n        return this.getValue('stream', (raw) => {\n            return z\n                .union([\n                z.null(),\n                z.object({\n                    id: z.string(),\n                }),\n            ])\n                .catch(null)\n                .parse(raw)?.id;\n        });\n    }\n    get stakes() {\n        return this.getValue('stakes', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    operator: z.object({\n                        id: z.string(),\n                        metadataJsonString: z.unknown(),\n                    }),\n                    amountWei: z.string().transform((v) => toBigInt(v)),\n                    lockedWei: z.string().transform((v) => toBigInt(v)),\n                    joinTimestamp: z.coerce.number(),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((stakes) => {\n                const result = [];\n                for (const s of stakes) {\n                    if (!s) {\n                        continue;\n                    }\n                    const { operator, joinTimestamp, ...rest } = s;\n                    result.push({\n                        ...rest,\n                        joinedAt: new Date(joinTimestamp * 1000),\n                        metadata: OperatorMetadata.parse(operator.metadataJsonString, this.chainId),\n                        operatorId: operator.id,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get payoutPerSecond() {\n        return this.getValue('totalPayoutWeiPerSec', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get payoutPerDay() {\n        return this.payoutPerSecond * 86400n;\n    }\n    get totalStakedWei() {\n        return this.getValue('totalStakedWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    timeCorrectedRemainingBalanceWeiAt(timestampInMillis) {\n        const time = timestampInMillis - (timestampInMillis % 1000);\n        if (!this.isRunning) {\n            return this.remainingBalanceWei;\n        }\n        const secondsElapsed = Math.max(0, time - (this.remainingBalanceUpdatedAt?.getTime() ?? time)) / 1000;\n        const result = this.remainingBalanceWei - toBigInt(secondsElapsed) * this.payoutPerSecond;\n        return result > 0n ? result : 0n;\n    }\n}\n","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { useDiscardableEffect } from 'toasterhea';\nimport { useLayoutEffect, useReducer, useRef, useState } from 'react';\nconst toastIn = keyframes `\n    from {\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n    to {\n        transform: translateX(0) translateZ(0);\n    }\n`;\nconst toastSqueeze = keyframes `\n    from {\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n    to {\n        height: 0;\n        margin-top: 0;\n        margin-left: 0;\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n`;\nconst toastOut = keyframes `\n    from {\n        transform: translateX(0) translateZ(0);\n    }\n    to {\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n`;\nexport default function AbstractToast({ children, ...props }) {\n    const [hidden, hide] = useReducer(() => true, false);\n    const [squeezed, squeeze] = useReducer(() => true, false);\n    const [height, setHeight] = useState(0);\n    const ref = useRef(null);\n    const innerRef = useRef(null);\n    const mountedAtRef = useRef(performance.now());\n    useDiscardableEffect((discard) => {\n        const { current: root } = ref;\n        root?.addEventListener('animationend', ({ animationName }) => {\n            if (animationName === toastOut.getName()) {\n                squeeze();\n            }\n            if (animationName === toastSqueeze.getName()) {\n                discard();\n            }\n        });\n        /**\n         * Let's make sure each open toast stays visible for at least a second. Otherwise\n         * it's jumpy and a bit confusing.\n         */\n        setTimeout(hide, Math.max(0, 1000 - (performance.now() - mountedAtRef.current)));\n    });\n    useLayoutEffect(() => {\n        const { current: root } = innerRef;\n        if (!root) {\n            return;\n        }\n        const { height } = root.getBoundingClientRect();\n        setHeight(height);\n    }, [children]);\n    return (React.createElement(Root, { ref: ref, style: {\n            height: `${height}px`,\n        }, \"$hidden\": hidden, \"$squeezed\": squeezed },\n        React.createElement(\"div\", { ...props, ref: innerRef }, children)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1p8pheq\" }) `\n    background: white;\n    box-shadow: 0 8px 12px 0 #52525226, 0 0 1px 0 #00000040;\n    border-radius: 8px;\n    color: #323232;\n    margin-top: 12px;\n    margin-left: 24px;\n    transition: 200ms height;\n    width: max-content;\n\n    ${({ $hidden, $squeezed }) => {\n    if (!$hidden) {\n        return css `\n                animation: 0.15s 1 ${toastIn} both ease-in;\n            `;\n    }\n    if ($squeezed) {\n        return css `\n                animation: 0.15s 1 ${toastSqueeze} forwards ease-in;\n            `;\n    }\n    return css `\n            animation: 0.15s 1 ${toastOut} forwards ease-in;\n        `;\n}}\n`;\n","import React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';\nimport InfoIcon from '@atlaskit/icon/glyph/info';\nimport ErrorIcon from '@atlaskit/icon/glyph/error';\nimport CrossIcon from '@atlaskit/icon/glyph/cross';\nimport Spinner from '~/components/Spinner';\nimport { MEDIUM } from '../utils/styled';\nimport AbstractToast from './AbstractToast';\nexport var ToastType;\n(function (ToastType) {\n    ToastType[\"Info\"] = \"info\";\n    ToastType[\"Processing\"] = \"processing\";\n    ToastType[\"Success\"] = \"success\";\n    ToastType[\"Warning\"] = \"warn\";\n})(ToastType || (ToastType = {}));\nconst defaultAutoCloseAfter = 3;\nexport default function Toast({ type = ToastType.Info, title = 'внимание!', desc, okLabel, cancelLabel, onResolve, onReject, canSubmit = true, autoCloseAfter: autoCloseAfterProp = true, }) {\n    const autoCloseAfter = type !== ToastType.Processing && okLabel == null && cancelLabel == null\n        ? autoCloseAfterProp === true\n            ? defaultAutoCloseAfter\n            : autoCloseAfterProp\n        : false;\n    useEffect(() => {\n        if (autoCloseAfter === false) {\n            return () => void 0;\n        }\n        const timeoutId = setTimeout(() => void onReject?.(), autoCloseAfter * 1000);\n        return () => void clearTimeout(timeoutId);\n    }, [autoCloseAfter, onReject]);\n    return (React.createElement(AbstractToast, null,\n        React.createElement(Form, { onSubmit: (e) => {\n                e.preventDefault();\n                if (canSubmit) {\n                    onResolve?.();\n                }\n            } },\n            React.createElement(React.Fragment, null,\n                type === ToastType.Success && (React.createElement(IconWrap, { \"$color\": \"#0EAC1B\" },\n                    React.createElement(CheckCircleIcon, { label: \"Success\" }))),\n                type === ToastType.Info && (React.createElement(IconWrap, { \"$color\": \"#6240AF\" },\n                    React.createElement(InfoIcon, { label: \"Info\" }))),\n                type === ToastType.Warning && (React.createElement(IconWrap, { \"$color\": \"#FF5C00\" },\n                    React.createElement(ErrorIcon, { label: \"Error\" }))),\n                type === ToastType.Processing && (React.createElement(IconWrap, null,\n                    React.createElement(Spinner, { color: \"blue\" })))),\n            React.createElement(Body, null,\n                React.createElement(\"h4\", null, title),\n                typeof desc === 'string' ? React.createElement(\"p\", null, desc) : desc,\n                (okLabel || cancelLabel) != null && (React.createElement(Buttons, null,\n                    okLabel != null && (React.createElement(Button, { type: \"submit\", disabled: !canSubmit }, okLabel)),\n                    okLabel != null && cancelLabel != null && React.createElement(Dot, null),\n                    cancelLabel != null && (React.createElement(Button, { type: \"button\", onClick: () => void onReject?.() }, cancelLabel))))),\n            type !== ToastType.Processing && (React.createElement(CloseButton, { onClick: () => void onReject?.(), type: \"button\" },\n                React.createElement(CrossIcon, { label: \"Dismiss\", size: \"small\" }))))));\n}\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-1lvr7ii\" }) `\n    align-items: center;\n    appearance: none;\n    color: #525252;\n    display: flex;\n    flex-shrink: 0;\n    height: 24px;\n    justify-content: center;\n    margin-left: 16px;\n    width: 24px;\n    padding: 0;\n    outline: 0;\n    border: 0;\n    background: none;\n`;\nconst Dot = styled.div.withConfig({ displayName: \"Dot\", componentId: \"sc-qj1d6o\" }) `\n    background: #525252;\n    height: 3px;\n    margin-left: 8px;\n    margin-right: 8px;\n    width: 3px;\n`;\nconst Form = styled.form.withConfig({ displayName: \"Form\", componentId: \"sc-1cm9afn\" }) `\n    align-items: start;\n    display: flex;\n    max-width: 100%;\n    padding-left: 16px;\n    padding-right: 16px;\n    padding-top: 20px;\n    padding-bottom: 20px;\n    width: 400px;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1vb6m9z\" }) `\n    height: 24px;\n    width: 24px;\n    position: relative;\n    display: flex;\n    items-center;\n    justify-content: center;\n    flex-shrink: 0;\n    margin-right: 16px;\n    color: ${({ $color = 'inherit' }) => $color};\n`;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-jfn3zx\" }) `\n    flex-grow: 1;\n    min-width: 0;\n    padding: 3px 0;\n    font-size: 14px;\n\n    p,\n    h4,\n    ul,\n    ol {\n        font-size: inherit;\n        overflow-wrap: break-word;\n    }\n\n    h4 {\n        margin: 0;\n        line-height: normal;\n    }\n\n    p,\n    ul,\n    ol {\n        margin: 8px 0 0;\n        line-height: 20px;\n        padding: 0;\n    }\n\n    h4 {\n        font-weight: ${MEDIUM};\n    }\n\n    ol {\n        list-style-position: inside;\n    }\n`;\nconst Buttons = styled.div.withConfig({ displayName: \"Buttons\", componentId: \"sc-753gay\" }) `\n    align-items: center;\n    display: flex;\n    line-height: normal;\n    margin-top: 8px;\n`;\nconst Button = styled.button.withConfig({ displayName: \"Button\", componentId: \"sc-1dee5n8\" }) `\n    background: none;\n    border: 0;\n    color: #0324ff;\n    display: block;\n    font-size: 14px;\n    font-weight: ${MEDIUM};\n    outline: 0;\n    padding: 0;\n\n    :hover {\n        color: #000d67;\n    }\n\n    :disabled {\n        color: inherit;\n        opacity: 0.5;\n    }\n`;\n","export var ProjectType;\n(function (ProjectType) {\n    ProjectType[\"OpenData\"] = \"OPEN_DATA\";\n    ProjectType[\"PaidData\"] = \"PAID_DATA\";\n    ProjectType[\"DataUnion\"] = \"DATA_UNION\";\n})(ProjectType || (ProjectType = {}));\nexport var TheGraph;\n(function (TheGraph) {\n    let ProjectType;\n    (function (ProjectType) {\n        ProjectType[\"Open\"] = \"openData\";\n        ProjectType[\"Paid\"] = \"paidData\";\n        ProjectType[\"DataUnion\"] = \"dataUnion\";\n    })(ProjectType = TheGraph.ProjectType || (TheGraph.ProjectType = {}));\n})(TheGraph || (TheGraph = {}));\n","export var ChartPeriod;\n(function (ChartPeriod) {\n    ChartPeriod[\"SevenDays\"] = \"7d\";\n    ChartPeriod[\"OneMonth\"] = \"1m\";\n    ChartPeriod[\"ThreeMonths\"] = \"3m\";\n    ChartPeriod[\"OneYear\"] = \"1y\";\n    ChartPeriod[\"YearToDate\"] = \"ytd\";\n    ChartPeriod[\"All\"] = \"all\";\n})(ChartPeriod || (ChartPeriod = {}));\nexport function isChartPeriod(value) {\n    return Object.values(ChartPeriod).includes(value);\n}\n","import { getStreamrClientInstance } from '~/getters/getStreamrClient';\nconst providers = {};\nexport async function getPublicProvider(chainId) {\n    const provider = providers[chainId];\n    if (provider) {\n        return provider;\n    }\n    const client = await getStreamrClientInstance(chainId);\n    const { provider: newProvider } = await client.getSigner();\n    providers[chainId] = newProvider;\n    return newProvider;\n}\n","import React from 'react';\nimport { toaster } from 'toasterhea';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { Layer } from './Layer';\nexport default function toast(props, t) {\n    setTimeout(async () => {\n        try {\n            await (t || toaster(Toast, Layer.Toast)).pop(props);\n        }\n        catch (_) {\n            // Do nothing\n        }\n    });\n}\nexport function successToast(props, t) {\n    toast({\n        type: ToastType.Success,\n        ...props,\n    }, t);\n}\nexport function errorToast(props, t) {\n    toast({\n        type: ToastType.Warning,\n        ...props,\n    }, t);\n}\nconst vet = toaster(Toast, Layer.Toast);\nexport function validationErrorToast({ title, error }) {\n    toast({\n        title,\n        type: ToastType.Warning,\n        desc: (React.createElement(\"ul\", null, error.messages.map((message, index) => (React.createElement(\"li\", { key: index }, message))))),\n    }, vet);\n}\n","import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { Contract } from 'ethers';\nimport moment from 'moment';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { prehandleBehindBlockError } from '~/errors/BehindIndexError';\nimport { GetEnsDomainsForAccountDocument, } from '~/generated/gql/ens';\nimport { GetAllOperatorsDocument, GetAllSponsorshipsDocument, GetDelegatorDailyBucketsDocument, GetNetworkStatsDocument, GetOperatorByIdDocument, GetOperatorByOwnerAddressDocument, GetOperatorDailyBucketsDocument, GetOperatorsByDelegationAndIdDocument, GetOperatorsByDelegationAndMetadataDocument, GetOperatorsByDelegationDocument, GetOperatorsByOwnerOrControllerAddressDocument, GetSponsorshipByIdDocument, GetSponsorshipByStreamIdDocument, GetSponsorshipDailyBucketsDocument, GetSponsorshipsByCreatorDocument, GetStreamByIdDocument, Operator_OrderBy, OrderDirection, SearchOperatorsByMetadataDocument, Sponsorship_OrderBy, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { Operator } from '~/parsers/Operator';\nimport { Sponsorship } from '~/parsers/Sponsorship';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { ProjectType } from '~/shared/types';\nimport { ChartPeriod } from '~/types';\nimport { Layer } from '~/utils/Layer';\nimport { toBN, toBigInt } from '~/utils/bn';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport { getIpfsCidFromUrl, getIpfsGatewayUrl } from '~/utils/ipfs';\nimport { getPublicProvider } from '~/utils/providers';\nimport { errorToast } from '~/utils/toast';\nconst DEFAULT_OPERATOR_ORDER_BY = Operator_OrderBy.Id;\nconst DEFAULT_SPONSORSHIP_ORDER_BY = Sponsorship_OrderBy.Id;\nconst DEFAULT_ORDER_DIRECTION = OrderDirection.Asc;\nexport function getProjectRegistryContract({ chainId, provider, }) {\n    return new Contract(getContractAddress('projectRegistry', chainId), getContractAbi('projectRegistry'), provider);\n}\nexport function getERC20TokenContract({ tokenAddress, provider, }) {\n    return new Contract(tokenAddress, getContractAbi('erc20'), provider);\n}\nexport function getMarketplaceContract({ chainId, provider, }) {\n    return new Contract(getContractAddress('marketplace', chainId), getContractAbi('marketplace'), provider);\n}\nexport async function getAllowance(chainId, tokenAddress, account, { recover = false } = {}) {\n    while (true) {\n        try {\n            const provider = await getPublicProvider(chainId);\n            return await getERC20TokenContract({\n                tokenAddress,\n                provider,\n            }).allowance(account, getContractAddress('marketplace', chainId));\n        }\n        catch (e) {\n            console.warn('Allowance check failed', e);\n            if (!recover) {\n                throw e;\n            }\n            try {\n                await toaster(Toast, Layer.Toast).pop({\n                    title: 'Allowance check failed',\n                    type: ToastType.Warning,\n                    desc: 'Would you like to try again?',\n                    okLabel: 'Yes',\n                    cancelLabel: 'No',\n                });\n                continue;\n            }\n            catch (_) {\n                throw e;\n            }\n        }\n    }\n}\nexport async function getProjectPermissions(chainId, projectId, account) {\n    if (account === address0) {\n        return {\n            canBuy: false,\n            canDelete: false,\n            canEdit: false,\n            canGrant: false,\n        };\n    }\n    const provider = await getPublicProvider(chainId);\n    const response = await getProjectRegistryContract({\n        chainId,\n        provider,\n    }).getPermission(projectId, account);\n    const [canBuy = false, canDelete = false, canEdit = false, canGrant = false] = z\n        .array(z.boolean())\n        .parse(response);\n    return {\n        canBuy,\n        canDelete,\n        canEdit,\n        canGrant,\n    };\n}\nexport function getProjectTypeName(projectType) {\n    switch (projectType) {\n        case ProjectType.DataUnion:\n            return 'Data Union';\n        case ProjectType.OpenData:\n            return 'open data project';\n        case ProjectType.PaidData:\n            return 'paid data project';\n    }\n}\nexport function getProjectTypeTitle(projectType) {\n    switch (projectType) {\n        case ProjectType.DataUnion:\n            return 'Data Union';\n        case ProjectType.OpenData:\n            return 'Open Data';\n        case ProjectType.PaidData:\n            return 'Paid Data';\n    }\n}\nexport function getProjectImageUrl({ imageUrl, imageIpfsCid, }) {\n    if (imageIpfsCid) {\n        return getIpfsGatewayUrl(imageIpfsCid);\n    }\n    if (!imageUrl) {\n        return;\n    }\n    /**\n     * Legacy projects carry a full IPFS gateway URL instead of a CID. Route\n     * those through our own gateway, too.\n     */\n    const cid = getIpfsCidFromUrl(imageUrl);\n    return cid ? getIpfsGatewayUrl(cid) : imageUrl;\n}\nexport async function getAllSponsorships({ chainId, first, skip, searchQuery = '', orderBy = DEFAULT_SPONSORSHIP_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, includeInactive = true, includeWithoutFunding = true, includeExpiredFunding = true, hasOperatorId = undefined, }) {\n    const whereFilters = {};\n    if (!includeInactive) {\n        whereFilters.isRunning = true;\n    }\n    if (!includeWithoutFunding) {\n        whereFilters.remainingWei_gt = 0;\n    }\n    if (!includeExpiredFunding) {\n        whereFilters.projectedInsolvency_gt = Math.floor(Date.now() / 1000);\n    }\n    if (hasOperatorId != null) {\n        whereFilters.stakes_ = { operator_contains_nocase: hasOperatorId };\n    }\n    const { data: { sponsorships }, } = await getGraphClient(chainId).query({\n        query: GetAllSponsorshipsDocument,\n        variables: {\n            first,\n            skip,\n            searchQuery,\n            id: searchQuery.toLowerCase(),\n            orderBy,\n            orderDirection,\n            whereFilters,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsorships;\n}\nexport async function getSponsorshipsByStreamId({ chainId, first, skip, streamId = '', orderBy = DEFAULT_SPONSORSHIP_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, includeInactive = false, includeWithoutFunding = false, includeExpiredFunding = false, hasOperatorId, }) {\n    const whereFilters = {};\n    if (!includeInactive) {\n        whereFilters.isRunning = true;\n    }\n    if (!includeWithoutFunding) {\n        whereFilters.remainingWei_gt = 0;\n    }\n    if (!includeExpiredFunding) {\n        whereFilters.projectedInsolvency_gt = Math.floor(Date.now() / 1000);\n    }\n    if (hasOperatorId != null) {\n        whereFilters.stakes_ = { operator_contains_nocase: hasOperatorId };\n    }\n    const { data: { sponsorships }, } = await getGraphClient(chainId).query({\n        query: GetSponsorshipByStreamIdDocument,\n        variables: {\n            first,\n            skip,\n            streamId,\n            orderBy,\n            orderDirection,\n            whereFilters,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsorships;\n}\nexport async function getParsedSponsorshipById(chainId, sponsorshipId, { force = false, minBlockNumber = 0 } = {}) {\n    let rawSponsorship;\n    try {\n        const { data } = await getGraphClient(chainId).query({\n            query: GetSponsorshipByIdDocument,\n            variables: {\n                sponsorshipId: sponsorshipId.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        rawSponsorship = (data.sponsorship || null);\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        console.warn('Failed to fetch a Sponsorship', e);\n        errorToast({ title: 'Could not fetch Sponsorship details' });\n    }\n    if (rawSponsorship) {\n        return Sponsorship.parse(rawSponsorship, chainId);\n    }\n    return null;\n}\nexport async function getSponsorshipsByCreator(chainId, creator, { first, skip, searchQuery = '', orderBy = DEFAULT_SPONSORSHIP_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, includeInactive = false, includeWithoutFunding = false, includeExpiredFunding = false, hasOperatorId, } = {}) {\n    const whereFilters = {};\n    if (!includeInactive) {\n        whereFilters.isRunning = true;\n    }\n    if (!includeWithoutFunding) {\n        whereFilters.remainingWei_gt = 0;\n    }\n    if (!includeExpiredFunding) {\n        whereFilters.projectedInsolvency_gt = Math.floor(Date.now() / 1000);\n    }\n    if (hasOperatorId != null) {\n        whereFilters.stakes_ = { operator_contains_nocase: hasOperatorId };\n    }\n    const { data: { sponsorships }, } = await getGraphClient(chainId).query({\n        query: GetSponsorshipsByCreatorDocument,\n        variables: {\n            first,\n            skip,\n            searchQuery,\n            id: searchQuery.toLowerCase(),\n            creator,\n            orderBy,\n            orderDirection,\n            whereFilters,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsorships;\n}\nexport async function getAllOperators({ chainId, first, skip, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetAllOperatorsDocument,\n        variables: {\n            first,\n            skip,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorsByDelegation({ chainId, first, skip, address, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetOperatorsByDelegationDocument,\n        variables: {\n            first,\n            skip,\n            delegator: address,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorsByDelegationAndId({ chainId, first, skip, address, operatorId, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetOperatorsByDelegationAndIdDocument,\n        variables: {\n            first,\n            skip,\n            delegator: address,\n            operatorId,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorsByDelegationAndMetadata({ chainId, first, skip, address, searchQuery, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetOperatorsByDelegationAndMetadataDocument,\n        variables: {\n            first,\n            skip,\n            delegator: address,\n            searchQuery,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function searchOperatorsByMetadata({ chainId, first, skip, searchQuery, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: SearchOperatorsByMetadataDocument,\n        variables: {\n            first,\n            skip,\n            searchQuery,\n            id: searchQuery?.toLowerCase() || '',\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorById(chainId, operatorId, { force = false, minBlockNumber = 0 } = {}) {\n    try {\n        const { data: { operator }, } = await getGraphClient(chainId).query({\n            query: GetOperatorByIdDocument,\n            variables: {\n                operatorId,\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        return operator || null;\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n}\nexport async function getParsedOperatorByOwnerAddress(chainId, address, { force = false, minBlockNumber = 0 } = {}) {\n    let operator = null;\n    try {\n        const { data: { operators }, } = await getGraphClient(chainId).query({\n            query: GetOperatorByOwnerAddressDocument,\n            variables: {\n                owner: address.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        operator = operators?.[0] || null;\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n    if (operator) {\n        return Operator.parse(operator, chainId);\n    }\n    return null;\n}\nexport async function getParsedOperatorsByOwnerOrControllerAddress(chainId, address, { force = false, minBlockNumber = 0 } = {}) {\n    let queryResult = [];\n    try {\n        const { data: { operators }, } = await getGraphClient(chainId).query({\n            query: GetOperatorsByOwnerOrControllerAddressDocument,\n            variables: {\n                owner: address.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        queryResult = operators;\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n    const result = [];\n    for (const operator of queryResult) {\n        result.push(Operator.parse(operator, chainId));\n    }\n    return result;\n}\nexport async function getBase64ForFile(file) {\n    return new Promise((resolve, reject) => {\n        const reader = new FileReader();\n        reader.readAsDataURL(file);\n        reader.onload = () => void resolve(reader.result);\n        reader.onerror = reject;\n    });\n}\n/**\n * Fetches stream descriptions from the Graph.\n * @param streamId Stream ID\n * @returns A string\n */\nexport async function getStreamDescription(chainId, streamId, { force = false } = {}) {\n    const { data: { stream }, } = await getGraphClient(chainId).query({\n        query: GetStreamByIdDocument,\n        variables: {\n            streamId,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return stream ? getDescription(stream) : '';\n}\n/**\n * Gets a collection of parsed Operators.\n * @param getter Callback that \"gets\" raw Operator objects.\n * @param options.mapper A mapping function that translates `Operator` instances into\n * something different.\n */\nexport async function getParsedOperators(getter, options) {\n    const { chainId } = options;\n    const rawOperators = await getter();\n    const operators = [];\n    const mapper = options.mapper || ((x) => x);\n    for (const raw of rawOperators) {\n        operators.push(mapper(Operator.parse(raw, chainId)));\n    }\n    return operators;\n}\n/**\n * Compute projected yearly earnings based on the current yield.\n * @param operator.valueWithoutEarnings Total value of the pool.\n * @param operator.stakes Collection of basic stake information (amount, spot apy, projected insolvency date).\n * @returns Number representing the APY factor (0.01 is 1%).\n */\nexport function getSpotApy(operator) {\n    const { valueWithoutEarnings, stakes } = operator;\n    if (valueWithoutEarnings === 0n) {\n        return 0;\n    }\n    const now = Date.now();\n    const yearlyIncome = stakes.reduce((sum, { spotAPY, projectedInsolvencyAt, amountWei, isSponsorshipPaying }) => {\n        if (projectedInsolvencyAt == null ||\n            projectedInsolvencyAt.getTime() < now ||\n            !isSponsorshipPaying) {\n            /**\n             * Skip expired stakes.\n             */\n            return sum;\n        }\n        return sum.plus(toBN(amountWei).multipliedBy(spotAPY));\n    }, toBN(0));\n    if (yearlyIncome.isEqualTo(0)) {\n        return 0;\n    }\n    return yearlyIncome.dividedBy(toBN(valueWithoutEarnings)).toNumber();\n}\n/**\n * Calculates the amount delegated to given operator by given wallet.\n */\nexport function getDelegatedAmountForWallet(address, { delegations }) {\n    const addr = address.toLowerCase();\n    return (delegations.find(({ delegator }) => delegator.toLowerCase() === addr)?.amount ||\n        0n);\n}\n/**\n * Sums amounts delegated to given operator by its owner.\n */\nexport function getSelfDelegatedAmount(operator) {\n    return getDelegatedAmountForWallet(operator.owner, operator);\n}\n/**\n * Calculates wallet's delegation's ratio out of the total optionally\n * modded with `offset`.\n */\nexport function getDelegationFractionForWallet(address, operator, { offset = 0n } = {}) {\n    const total = operator.valueWithoutEarnings + offset;\n    if (total === 0n) {\n        return toBN(0);\n    }\n    return toBN(getDelegatedAmountForWallet(address, operator)).dividedBy(toBN(total));\n}\n/**\n * Calculates the amount of DATA needed to payout undelegation queue in full.\n */\nexport function calculateUndelegationQueueSize(operator) {\n    const lookup = {};\n    // Sum up queue by addresses\n    for (let i = 0; i < operator.queueEntries.length; i++) {\n        const element = operator.queueEntries[i];\n        if (lookup[element.delegator] == null) {\n            lookup[element.delegator] = 0n;\n        }\n        lookup[element.delegator] = lookup[element.delegator] + element.amount;\n    }\n    // Go through addresses and make sure we cap to max delegation\n    for (const address of Object.keys(lookup)) {\n        lookup[address] = ((a, b) => (a < b ? a : b))(lookup[address], getDelegatedAmountForWallet(address, operator));\n    }\n    // Return total sum of all addresses\n    return Object.values(lookup).reduce((sum, b) => sum + b, 0n);\n}\n/**\n * Calculates owner's own delegation's ratio out of the total optionally\n * modded with `offset`.\n */\nexport function getSelfDelegationFraction(operator, { offset = 0n } = {}) {\n    return getDelegationFractionForWallet(operator.owner, operator, { offset });\n}\n/**\n * Turns `period` into a timestamp relative to `end` moment.\n */\nexport function getTimestampForChartPeriod(period, end) {\n    const result = (() => {\n        switch (period) {\n            case ChartPeriod.SevenDays:\n                return end.clone().subtract(7, 'days');\n            case ChartPeriod.OneMonth:\n                return end.clone().subtract(30, 'days');\n            case ChartPeriod.ThreeMonths:\n                return end.clone().subtract(90, 'days');\n            case ChartPeriod.OneYear:\n                return end.clone().subtract(365, 'days');\n            case ChartPeriod.YearToDate:\n                return end.clone().startOf('year');\n            case ChartPeriod.All:\n            default:\n                return moment(0).utc();\n        }\n    })();\n    return result;\n}\nfunction parseNetworkStats(stats) {\n    try {\n        return z\n            .object({\n            totalStake: z.string().transform((v) => toBigInt(v)),\n            sponsorshipsCount: z.number(),\n            operatorsCount: z.number(),\n        })\n            .parse(stats.networks[0]);\n    }\n    catch (_) {\n        return undefined;\n    }\n}\nexport async function getNetworkStats(chainId) {\n    const { data } = await getGraphClient(chainId).query({\n        query: GetNetworkStatsDocument,\n    });\n    return parseNetworkStats(data);\n}\n/**\n * Fetches a collection of daily Operator buckets.\n * @param operatorId Operator ID\n * @param options.dateLowerThan End unix timestamp\n * @param options.dateGreaterEqualThan Start unix timestamp\n * @param options.batchSize Number of buckets to scout for at once\n * @param options.skip Number of buckets to skip\n * @returns Operator buckets\n */\nexport async function getOperatorDailyBuckets(chainId, operatorId, options) {\n    const { dateLowerThan: date_lt, dateGreaterEqualThan: date_gte, batchSize: first = 999, skip, force = false, } = options;\n    const { data } = await getGraphClient(chainId).query({\n        query: GetOperatorDailyBucketsDocument,\n        variables: {\n            first,\n            skip,\n            where: {\n                operator_: {\n                    id: operatorId,\n                },\n                date_lt,\n                date_gte,\n            },\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return data.operatorDailyBuckets;\n}\n/**\n * Fetches a collection of daily Sponsorship buckets.\n * @param chainId Chain ID\n * @param sponsorshipId Sponsorship ID\n * @param options.dateLowerThan End unix timestamp\n * @param options.dateGreaterEqualThan Start unix timestamp\n * @param options.batchSize Number of buckets to scout for at once\n * @param options.skip Number of buckets to skip\n * @returns Sponsorship buckets\n */\nexport async function getSponsorshipDailyBuckets(chainId, sponsorshipId, options) {\n    const { dateLowerThan: date_lt, dateGreaterEqualThan: date_gte, batchSize: first = 999, skip, force = false, } = options;\n    const { data } = await getGraphClient(chainId).query({\n        query: GetSponsorshipDailyBucketsDocument,\n        variables: {\n            first,\n            skip,\n            where: {\n                sponsorship_: {\n                    id: sponsorshipId,\n                },\n                date_lt,\n                date_gte,\n            },\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return data.sponsorshipDailyBuckets;\n}\n/**\n * Fetches a collection of daily Delegator buckets.\n * @param delegatorId Delegator ID\n * @param options.dateLowerThan End unix timestamp\n * @param options.dateGreaterEqualThan Start unix timestamp\n * @param options.batchSize Number of buckets to scout for at once\n * @param options.skip Number of buckets to skip\n * @returns Delegator buckets\n */\nexport const getDelegatorDailyBuckets = async (chainId, delegatorId, options) => {\n    const { dateLowerThan: date_lt, dateGreaterEqualThan: date_gte, batchSize: first = 999, skip, force = false, } = options;\n    const { data } = await getGraphClient(chainId).query({\n        query: GetDelegatorDailyBucketsDocument,\n        variables: {\n            first,\n            skip,\n            where: {\n                delegator: delegatorId,\n                date_lt,\n                date_gte,\n            },\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return data.delegatorDailyBuckets;\n};\nlet ensApolloClient;\n/**\n * Fetches the ENS subgraph for domains associated with the given `wallet` address.\n */\nexport async function getENSDomainsForWallet(wallet, { force = false } = {}) {\n    if (!wallet) {\n        return [];\n    }\n    if (!ensApolloClient) {\n        ensApolloClient = new ApolloClient({\n            uri: process.env.ENS_GRAPH_SCHEMA_PATH ||\n                'https://api.thegraph.com/subgraphs/name/ensdomains/ens',\n            cache: new InMemoryCache(),\n        });\n    }\n    const { data = { domains: [], wrappedDomains: [] } } = await ensApolloClient.query({\n        query: GetEnsDomainsForAccountDocument,\n        variables: {\n            account: wallet.toLowerCase(),\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return [...data.domains, ...data.wrappedDomains]\n        .map(({ name }) => (!!name && /\\.eth$/.test(name) ? name : null))\n        .sort()\n        .filter(Boolean);\n}\n/**\n * Extracts description from a metadata-having Stream-alike\n */\nexport function getDescription(streamalike) {\n    try {\n        return z\n            .string()\n            .transform((v) => JSON.parse(v))\n            .pipe(z.object({\n            description: z\n                .string()\n                .optional()\n                .transform((v) => v || ''),\n        }))\n            .parse(streamalike.metadata).description;\n    }\n    catch (_) {\n        return '';\n    }\n}\n","export default class TimeoutError extends Error {\n    constructor() {\n        super('Timeout');\n        this.name = 'TimeoutError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, TimeoutError);\n        }\n        Object.setPrototypeOf(this, TimeoutError.prototype);\n    }\n}\n","import { useCallback, useEffect, useRef } from 'react';\n/**\n * @requires Basic knowledge of what you're doing. ;) Checking on being mounted often\n * leads to unexpected behaviour because it may not be the right condition to rely on.\n *\n * Better-control-giving alternatives worth looking into:\n * - in effects: use a local `mounted` flag and unset it on discard (see example),\n * - in callbacks: use `AbortController` and `AbortSignal`.\n * @example\n    // `mounted` flag example\n    useEffect(() => {\n        let mounted = true\n\n        async function fn() {\n            await new Promise((resolve) => void setTimeout(resolve))\n\n            if (mounted) {\n                // Do stuff!\n            }\n        }\n\n        fn()\n\n        return () => {\n            mounted = false\n        }\n    }, [])\n */\nexport default function useIsMounted() {\n    const ref = useRef(false);\n    useEffect(() => {\n        ref.current = true;\n        return () => {\n            ref.current = false;\n        };\n    }, []);\n    return useCallback(() => ref.current, []);\n}\n","import { Auth, LoadingIndicator, Logo, SignInMethod } from '@streamr/streamr-layout';\nimport React, { useEffect, useState } from 'react';\nimport { Link as PrestyledLink } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { defer, toaster, useDiscardableEffect } from 'toasterhea';\nimport { Button } from '~/components/Button';\nimport TimeoutError from '~/shared/errors/TimeoutError';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { getWalletAccount, useWalletAccount } from '~/shared/stores/wallet';\nimport { MEDIUM, TABLET } from '~/shared/utils/styled';\nimport { isCodedError, RejectionReason } from '~/utils/exceptions';\nimport { Layer } from '~/utils/Layer';\nimport { Route as R } from '~/utils/routes';\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1bwwbsp\" }) `\n    background: #f8f8f8;\n    color: #323232;\n    height: 100%;\n    left: 0;\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 1;\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-ye5bl7\" }) `\n    display: flex;\n    flex-direction: column;\n    flex-grow: 0.8;\n    justify-content: center;\n    padding: 0 1em;\n    margin: 48px auto 88px;\n    color: #323232;\n\n    @media ${TABLET} {\n        margin: 152px auto 192px;\n    }\n`;\nconst Panel = styled.div.withConfig({ displayName: \"Panel\", componentId: \"sc-uivs5k\" }) `\n    margin-top: 40px;\n\n    @media ${TABLET} {\n        margin-top: 110px;\n    }\n`;\nconst Link = styled(PrestyledLink).withConfig({ displayName: \"Link\", componentId: \"sc-ut973d\" }) `\n    display: block;\n    margin: 0 auto;\n    user-select: none;\n    width: 32px;\n    outline: 0 !important;\n\n    svg {\n        color: #ff5c00;\n        display: block;\n    }\n`;\nconst TitleBar = styled.div.withConfig({ displayName: \"TitleBar\", componentId: \"sc-1bnios2\" }) `\n    font-size: 18px;\n    font-weight: ${MEDIUM};\n    line-height: 48px;\n    text-align: center;\n\n    @media ${TABLET} {\n        font-size: 24px;\n    }\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-mzbc2p\" }) `\n    color: #adadad;\n    font-size: 12px;\n    margin: 60px auto 0;\n    max-width: 432px;\n    text-align: center;\n\n    @media ${TABLET} {\n        margin-top: 120px;\n\n        br {\n            display: none;\n        }\n    }\n`;\nfunction ConnectModal({ onReject, onResolve }) {\n    const [connectDeferral, setConnectDeferral] = useState();\n    const connecting = !!connectDeferral;\n    const [error, setError] = useState();\n    const isMounted = useIsMounted();\n    function label() {\n        if (error) {\n            if (isCodedError(error) && error.code === -32002) {\n                return 'Already processing. Please wait.';\n            }\n            return \"Couldn't connect to MetaMask\";\n        }\n        if (connecting) {\n            return 'Connecting…';\n        }\n        return 'MetaMask';\n    }\n    useDiscardableEffect();\n    useEffect(() => {\n        function onKeyDown({ key }) {\n            if (key === 'Escape') {\n                onReject?.(RejectionReason.EscapeKey);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [onReject]);\n    useEffect(() => () => {\n        connectDeferral?.reject();\n    }, [connectDeferral]);\n    const account = useWalletAccount();\n    useEffect(() => {\n        if (account) {\n            onResolve?.(account);\n        }\n    }, [onResolve, account]);\n    return (React.createElement(Root, null,\n        React.createElement(Inner, null,\n            React.createElement(\"div\", null,\n                React.createElement(Link, { to: R.root() },\n                    React.createElement(Logo, null))),\n            React.createElement(TitleBar, null, \"Streamr Hub\"),\n            React.createElement(\"form\", { onSubmit: async (e) => {\n                    e.preventDefault();\n                    if (connectDeferral) {\n                        return;\n                    }\n                    try {\n                        const deferral = defer();\n                        setError(undefined);\n                        setConnectDeferral(deferral);\n                        const currentAccount = await Promise.race([\n                            getWalletAccount({\n                                connect: true,\n                            }),\n                            deferral.promise,\n                            new Promise((_resolve, reject) => void setTimeout(() => void reject(new TimeoutError()), 120000)),\n                        ]);\n                        onResolve?.(currentAccount);\n                    }\n                    catch (e) {\n                        console.warn('Wallet connecting failed', e);\n                        if (isMounted()) {\n                            setError(e);\n                        }\n                    }\n                    finally {\n                        if (isMounted()) {\n                            setConnectDeferral(undefined);\n                        }\n                    }\n                } },\n                React.createElement(Panel, null,\n                    React.createElement(Auth, null,\n                        React.createElement(Auth.Panel, null,\n                            React.createElement(LoadingIndicator, { loading: connecting }),\n                            React.createElement(Auth.PanelRow, null,\n                                React.createElement(Auth.Header, null, \"Connect a wallet\")),\n                            React.createElement(Auth.PanelRow, null,\n                                React.createElement(SignInMethod, { disabled: connecting, type: \"submit\", theme: error ? SignInMethod.themes.Error : undefined },\n                                    React.createElement(SignInMethod.Title, null, label()),\n                                    React.createElement(SignInMethod.Icon, null,\n                                        React.createElement(SignInMethod.Icon.Metamask, null)))),\n                            React.createElement(Auth.PanelRow, null,\n                                React.createElement(Auth.Footer, null,\n                                    !error && !connecting && (React.createElement(\"span\", null,\n                                        \"Need an Ethereum wallet?\",\n                                        ' ',\n                                        React.createElement(\"a\", { href: \"https://ethereum.org/en/wallets/\", target: \"_blank\", rel: \"nofollow noopener noreferrer\" }, \"Learn more here\"))),\n                                    !!connecting && (React.createElement(Button, { kind: \"link\", size: \"mini\", onClick: () => void connectDeferral.reject(), type: \"button\" }, \"Cancel\")),\n                                    !!error && !connecting && (React.createElement(Button, { kind: \"secondary\", size: \"mini\", disabled: connecting, waiting: connecting, type: \"submit\" }, \"Try again\")))))))),\n            React.createElement(Footer, null,\n                React.createElement(\"span\", null,\n                    \"By connecting your wallet and using Streamr \",\n                    React.createElement(\"br\", null),\n                    \"you agree to our\",\n                    ' ',\n                    React.createElement(\"a\", { href: R.tos(), target: \"_blank\", rel: \"nofollow noopener noreferrer\" }, \"Terms of Service\"))))));\n}\nexport const connectModal = toaster(ConnectModal, Layer.Modal);\n","/**\n * Been dealt with. Ignore it if you catch it.\n */\nexport const Break = Object.freeze({ break: true });\n/**\n * Flagged flow is already being processed.\n */\nexport const FlagBusy = Object.freeze({});\n","import detectProvider from '@metamask/detect-provider';\nimport { BrowserProvider } from 'ethers';\nimport { produce } from 'immer';\nimport { isAddress } from 'web3-validator';\nimport { z } from 'zod';\nimport { create } from 'zustand';\nimport { getENSDomainsForWallet } from '~/getters';\nimport { connectModal } from '~/modals/ConnectModal';\nimport { Break } from '~/utils/errors';\nimport { isMessagedObject, isRejectionReason } from '~/utils/exceptions';\nfunction isStringArray(value) {\n    return z.array(z.string()).safeParse(value).success;\n}\nlet providerPromise;\n/**\n * Detects current MetaMask provider, and explodes if it's not available.\n * @returns a promise that resolves with a MetaMask provider instance.\n */\nexport function getWalletProvider() {\n    if (providerPromise) {\n        return providerPromise;\n    }\n    providerPromise = new Promise((resolve, reject) => {\n        setTimeout(async () => {\n            let provider = await detectProvider();\n            if (!provider) {\n                return void reject(new Error('No provider'));\n            }\n            if (provider.providers?.length) {\n                // Multiple wallets available? Detect MetaMask.\n                provider =\n                    provider.providers.find((p) => p.isMetaMask) ?? provider.providers[0];\n            }\n            resolve(provider);\n        });\n    });\n    return providerPromise;\n}\nexport async function getWalletWeb3Provider() {\n    return new BrowserProvider((await getWalletProvider()));\n}\nexport async function getSigner() {\n    let retry = true;\n    while (true) {\n        try {\n            const provider = await getWalletWeb3Provider();\n            const signer = await provider.getSigner();\n            await signer.getAddress();\n            return signer;\n        }\n        catch (e) {\n            if (!retry) {\n                throw e;\n            }\n            if (!isMessagedObject(e) || !/unknown account #\\d+/i.test(e.message)) {\n                throw e;\n            }\n            try {\n                await connectModal.pop();\n                /**\n                 * If after this it still fails to get a proper signer (with\n                 * an address and all) ignore further attempts and just\n                 * throw the error (see above).\n                 */\n                retry = false;\n            }\n            catch (f) {\n                if (isRejectionReason(f)) {\n                    /**\n                     * The user kept their wallet locked and there's nothing\n                     * we can do. Let's break.\n                     */\n                    throw Break;\n                }\n                throw f;\n            }\n        }\n    }\n}\nconst promiseMap = new Map();\n/**\n * @param options.connect a flag that instructs the function to either\n * - get the account discreetly using `eth_accounts` (if `false`) - default, or\n * - trigger the unlocking with `eth_requestAccounts`.\n *\n * @returns an account address (a string), or `undefined` if there are\n * no available accounts.\n */\nexport async function getWalletAccount({ connect = false, } = {}) {\n    const provider = await getWalletProvider();\n    if (!connect) {\n        const accounts = await provider.request({\n            method: 'eth_accounts',\n        });\n        return accounts?.[0];\n    }\n    const existingPromise = promiseMap.get(provider);\n    if (existingPromise) {\n        return existingPromise;\n    }\n    const promise = new Promise((resolve, reject) => {\n        setTimeout(async () => {\n            try {\n                const accounts = await provider.request({\n                    method: 'eth_requestAccounts',\n                });\n                resolve(accounts?.[0]);\n            }\n            catch (e) {\n                reject(e);\n            }\n        });\n    });\n    promiseMap.set(provider, promise);\n    setTimeout(async () => {\n        try {\n            await promise;\n        }\n        catch (_) {\n            // Do nothing.\n        }\n        finally {\n            promiseMap.delete(provider);\n        }\n    });\n    return promise;\n}\nconst useWalletStore = create((set, get) => {\n    let lastKnownAccount;\n    const ensLookups = {};\n    function onAccountsChange(accounts) {\n        const [account = undefined] = isStringArray(accounts) ? accounts : [];\n        const addr = isAddress(account || '') ? account : undefined;\n        if (lastKnownAccount === addr) {\n            return;\n        }\n        lastKnownAccount = addr;\n        if (addr && typeof get().ens[addr] === 'undefined' && !ensLookups[addr]) {\n            ensLookups[addr] = true;\n            setTimeout(async () => {\n                try {\n                    const [ensName = undefined] = await getENSDomainsForWallet(addr);\n                    set((current) => produce(current, (next) => {\n                        next.ens[addr.toLowerCase()] = ensName;\n                    }));\n                }\n                catch (e) {\n                    console.warn('Failed to fetch ENS domain name', e);\n                }\n                finally {\n                    delete ensLookups[addr];\n                }\n            });\n        }\n        set((current) => produce(current, (next) => {\n            next.account = addr;\n        }));\n    }\n    setTimeout(async () => {\n        try {\n            const provider = await getWalletProvider();\n            provider.on('accountsChanged', onAccountsChange);\n            const accounts = await provider.request({\n                method: 'eth_accounts',\n            });\n            onAccountsChange(accounts);\n        }\n        catch (e) {\n            console.warn('Provider setup failed', e);\n        }\n        finally {\n            set((current) => produce(current, (next) => {\n                next.isLoading = false;\n            }));\n        }\n    });\n    return {\n        account: undefined,\n        ens: {},\n        isLoading: true,\n    };\n});\n/**\n * A hook that gives you the current MetaMask account address, if available.\n * @returns account address (a string), or `undefined` if the wallet is either\n * locked or has no accounts.\n */\nexport function useWalletAccount() {\n    return useWalletStore().account;\n}\n/**\n * A hook that gives you the loading state of the wallet.\n * @returns a boolean value indicating whether the wallet is loading.\n */\nexport function useIsWalletLoading() {\n    return useWalletStore().isLoading;\n}\n/**\n * A hook that gives you an ENS domain for an account address.\n * @returns either an ENS domain name, or an empty string.\n */\nexport function useEns(account) {\n    const { ens } = useWalletStore();\n    return (account && ens[account]) || '';\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nconst DefaultActions = {};\nexport function Buttons({ actions = DefaultActions, className }) {\n    return (React.createElement(Root, { className: className }, actions &&\n        Object.keys(actions)\n            .filter((key) => actions && actions[key].visible !== false)\n            .map((key) => {\n            const { title, onClick, linkTo, href, kind, disabled, outline, spinner, className: cn, type, } = (actions && actions[key]) || {};\n            const Tag = kind === 'link' ? Button : ButtonWithMinWidth;\n            return (React.createElement(Tag, { key: key, as: linkTo != null ? Link : href != null ? 'a' : 'button', to: linkTo, href: href, onClick: onClick, disabled: disabled, kind: kind, outline: outline, waiting: spinner, type: type, className: cn }, title));\n        })));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-3j85iz\" }) `\n    display: flex;\n    justify-content: flex-end;\n    width: 100%;\n\n    /* prevents border rendering glitches in chrome */\n    transform: translate3d(0, 0, 0);\n\n    :empty {\n        display: none;\n    }\n\n    > * {\n        padding-right: 15px;\n        padding-left: 15px;\n    }\n\n    > * + * {\n        margin-left: 1rem;\n    }\n`;\nconst ButtonWithMinWidth = styled(Button).withConfig({ displayName: \"ButtonWithMinWidth\", componentId: \"sc-q9kyk6\" }) `\n    min-width: 7rem;\n`;\n","import React from 'react';\nimport BrowserNotSupportedPng from '~/shared/assets/images/browser_not_supported.png';\nimport BrowserNotSupportedPng2x from '~/shared/assets/images/browser_not_supported@2x.png';\nimport DiscardChangesPng from '~/shared/assets/images/discard_changes.png';\nimport DiscardChangesPng2x from '~/shared/assets/images/discard_changes@2x.png';\nimport ImageUploadPng from '~/shared/assets/images/imgupload.png';\nimport ImageUploadPng2x from '~/shared/assets/images/imgupload@2x.png';\nimport MetamaskPng from '~/shared/assets/images/metamask.png';\nimport MetamaskPng2x from '~/shared/assets/images/metamask@2x.png';\nimport PublishFailedPng from '~/shared/assets/images/publish_failed.png';\nimport PublishFailedPng2x from '~/shared/assets/images/publish_failed@2x.png';\nimport WalletPng from '~/shared/assets/images/wallet.png';\nimport WalletPng2x from '~/shared/assets/images/wallet@2x.png';\nimport WalletErrorPng from '~/shared/assets/images/wallet_error.png';\nimport WalletErrorPng2x from '~/shared/assets/images/wallet_error@2x.png';\nimport WalletNoDataPng from '~/shared/assets/images/wallet_no_data.png';\nimport WalletNoDataPng2x from '~/shared/assets/images/wallet_no_data@2x.png';\nimport WalletNoEthPng from '~/shared/assets/images/wallet_no_eth.png';\nimport WalletNoEthPng2x from '~/shared/assets/images/wallet_no_eth@2x.png';\nconst sources = {\n    browserNotSupported: (React.createElement(\"img\", { src: BrowserNotSupportedPng, srcSet: `${BrowserNotSupportedPng2x} 2x`, alt: \"\" })),\n    discardChanges: (React.createElement(\"img\", { src: DiscardChangesPng, srcSet: `${DiscardChangesPng2x} 2x`, alt: \"\" })),\n    imageUpload: React.createElement(\"img\", { src: ImageUploadPng, srcSet: `${ImageUploadPng2x} 2x`, alt: \"\" }),\n    metamask: React.createElement(\"img\", { src: MetamaskPng, srcSet: `${MetamaskPng2x} 2x`, alt: \"\" }),\n    publishFailed: (React.createElement(\"img\", { src: PublishFailedPng, srcSet: `${PublishFailedPng2x} 2x`, alt: \"\" })),\n    wallet: React.createElement(\"img\", { src: WalletPng, srcSet: `${WalletPng2x} 2x`, alt: \"\" }),\n    walletNoData: React.createElement(\"img\", { src: WalletNoDataPng, srcSet: `${WalletNoDataPng2x} 2x`, alt: \"\" }),\n    walletNoEth: React.createElement(\"img\", { src: WalletNoEthPng, srcSet: `${WalletNoEthPng2x} 2x`, alt: \"\" }),\n    walletError: React.createElement(\"img\", { src: WalletErrorPng, srcSet: `${WalletErrorPng2x} 2x`, alt: \"\" }),\n    txFailed: React.createElement(\"img\", { src: WalletErrorPng, srcSet: `${WalletErrorPng2x} 2x`, alt: \"\" }),\n};\nconst PngIcon = ({ name, ...props }) => React.cloneElement(sources[name], { ...props });\nPngIcon.names = Object.keys(sources).sort();\nexport default PngIcon;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { SANS } from '~/shared/utils/styled';\nimport BaseModal from './BaseModal';\n/**\n * `BaseModal` with centered title bar with a subtle bottom border.\n */\nexport default function Modal({ children, title = 'Untitled modal', ...props }) {\n    return (React.createElement(BaseModal, { ...props },\n        React.createElement(Root, null,\n            React.createElement(Head, null,\n                React.createElement(Title, null, title)),\n            children)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-sw6bqy\" }) `\n    max-width: 560px;\n    width: 90vw;\n`;\nconst Head = styled.div.withConfig({ displayName: \"Head\", componentId: \"sc-qntoge\" }) `\n    align-items: center;\n    border-bottom: 1px solid #f3f3f3;\n    display: flex;\n    font-family: ${SANS};\n    font-size: 20px;\n    font-weight: normal;\n    height: 80px;\n    line-height: 32px;\n    margin: 0;\n    position: relative;\n    text-align: center;\n    width: 100%;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-116fqdy\" }) `\n    flex-grow: 1;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { getChainDisplayName, getChainKey, isKnownChainId } from '~/utils/chains';\nimport { RejectionReason } from '~/utils/exceptions';\nimport { Footer } from './BaseModal';\nimport Modal from './Modal';\nfunction getChainName(chainId) {\n    return isKnownChainId(chainId)\n        ? getChainDisplayName(getChainKey(chainId))\n        : `#${chainId}`;\n}\nexport default function SwitchNetworkModal({ expectedChainId, actualChainId, onReject, onResolve, ...props }) {\n    return (React.createElement(Modal, { ...props, onReject: onReject, title: \"Switch network\", onBeforeAbort: (reason) => {\n            /**\n             * Clicking on the backdrop should not accidentally discard the modal\n             * in this case. Enforce intentional cancellation via the Cancel button\n             * or the Escape key.\n             */\n            return reason !== RejectionReason.Backdrop;\n        } },\n        React.createElement(Content, null,\n            React.createElement(IconWrap, null,\n                React.createElement(PngIcon, { name: \"wallet\", alt: \"Switch network\" })),\n            React.createElement(P, null,\n                \"Please switch to the \",\n                React.createElement(\"em\", null, getChainName(expectedChainId)),\n                \" network in your Ethereum wallet. It's currently in\",\n                ' ',\n                React.createElement(\"em\", null, getChainName(actualChainId)),\n                \"\\u00A0network.\")),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    cancel: {\n                        title: 'Cancel',\n                        onClick: () => void onReject?.(RejectionReason.CancelButton),\n                        kind: 'link',\n                    },\n                    add: {\n                        title: 'Switch',\n                        kind: 'primary',\n                        onClick: () => void onResolve?.(),\n                    },\n                } }))));\n}\nconst P = styled.p.withConfig({ displayName: \"P\", componentId: \"sc-ia41bk\" }) `\n    margin: 0;\n    text-align: center;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1e6y1p4\" }) `\n    width: 98px;\n    height: 67px;\n    position: relative;\n    margin: 0 auto 24px;\n\n    img {\n        display: block;\n        left: 50%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%) translateY(-6%);\n    }\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-1otejem\" }) `\n    padding: 64px 48px 40px;\n\n    em {\n        font-style: normal;\n        font-weight: 500;\n    }\n`;\n","import { getWalletWeb3Provider } from '~/shared/stores/wallet';\n/**\n * @returns the chainId of whatever network is selected in the user wallet\n */\nexport default async function getChainId() {\n    const chainId = (await (await getWalletWeb3Provider()).getNetwork()).chainId;\n    if (chainId < Number.MIN_SAFE_INTEGER || chainId > Number.MAX_SAFE_INTEGER) {\n        throw new Error('BigInt chainIds are not supported');\n    }\n    return Number(chainId);\n}\n","import { toaster } from 'toasterhea';\nimport SwitchNetworkModal from '~/modals/SwitchNetworkModal';\nimport { getWalletProvider } from '~/shared/stores/wallet';\nimport { Layer } from '~/utils/Layer';\nimport { getChainConfig, getChainDisplayName } from '~/utils/chains';\nimport getChainId from '~/utils/web3/getChainId';\n/**\n *\n * @param expectedChainId Expected network/chain ID, e.g. 137 for Polygon.\n * @returns `true` if the utility changed the network, and `false` if it did nothing (we're already on the correct network).\n */\nexport default async function networkPreflight(expectedChainId) {\n    const provider = await getWalletProvider();\n    try {\n        const actualChainId = await getChainId();\n        if (actualChainId === expectedChainId) {\n            return false;\n        }\n        await toaster(SwitchNetworkModal, Layer.Modal).pop({\n            expectedChainId,\n            actualChainId,\n        });\n        await provider.request({\n            method: 'wallet_switchEthereumChain',\n            params: [\n                {\n                    chainId: `0x${expectedChainId.toString(16)}`,\n                },\n            ],\n        });\n    }\n    catch (e) {\n        if (e?.code !== 4902) {\n            throw e;\n        }\n        const chainConfig = getChainConfig(expectedChainId);\n        await provider.request({\n            method: 'wallet_addEthereumChain',\n            params: [\n                {\n                    chainId: `0x${chainConfig.id.toString(16)}`,\n                    chainName: getChainDisplayName(chainConfig.id),\n                    rpcUrls: chainConfig.rpcEndpoints.map(({ url }) => url),\n                    nativeCurrency: chainConfig.nativeCurrency,\n                    blockExplorerUrls: [chainConfig.blockExplorerUrl].filter(Boolean),\n                },\n            ],\n        });\n    }\n    return true;\n}\n","import getClientConfig from '~/getters/getClientConfig';\nimport { getWalletProvider } from '~/shared/stores/wallet';\nimport networkPreflight from '~/utils/networkPreflight';\nexport async function getStreamrClientInstance(chainId, options = {}) {\n    const StreamrClient = await getStreamrClient();\n    const { transactional = false } = options;\n    if (!transactional) {\n        return new StreamrClient(getClientConfig(chainId));\n    }\n    const ethereum = (await getWalletProvider());\n    await networkPreflight(chainId);\n    return new StreamrClient(getClientConfig(chainId, {\n        auth: {\n            ethereum,\n        },\n    }));\n}\n/**\n * Returns StreamrClient class.\n */\nasync function getStreamrClient() {\n    const { StreamrClient } = await import('@streamr/sdk');\n    return StreamrClient;\n}\n// Load the client library proactively so that we don't have to wait later.\nvoid (async () => {\n    try {\n        await getStreamrClient();\n    }\n    catch (_) {\n        // Do nothing.\n    }\n});\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Link as RouterLink } from 'react-router-dom';\nconst UnstyledRaw = (props) => {\n    const Tag = props.href || !props.to ? 'a' : RouterLink;\n    return React.createElement(Tag, { ...props });\n};\nconst Raw = styled(UnstyledRaw).withConfig({ displayName: \"Raw\", componentId: \"sc-1vq24h0\" }) ``;\nconst Link = styled(Raw).withConfig({ displayName: \"Link\", componentId: \"sc-1obgf1j\" }) `\n    &,\n    :link,\n    :active,\n    :focus,\n    :hover,\n    :visited {\n        outline: 0;\n        text-decoration: ${({ decorated }) => (decorated ? 'underline' : 'none')};\n    }\n`;\nObject.assign(Link, {\n    Raw,\n});\nexport default Link;\n","import React from 'react';\nimport styled from 'styled-components';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { Button } from '~/components/Button';\nimport Link from '~/shared/components/Link';\nimport { Buttons } from '~/components/Buttons';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nexport default function GetCryptoModal({ tokenName, onReject }) {\n    return (React.createElement(Modal, { onReject: onReject, title: `No ${tokenName} balance` },\n        React.createElement(Copy, null,\n            React.createElement(IconWrap, null,\n                React.createElement(PngIcon, { name: \"walletError\", alt: `No ${tokenName} balance` })),\n            React.createElement(\"p\", null,\n                tokenName,\n                \" is needed for gas, but you don't have any.\"),\n            React.createElement(\"p\", null, \"Please get some and try again\")),\n        React.createElement(Exchanges, null,\n            React.createElement(Button, { kind: \"secondary\", as: Link, href: \"https://ramp.network/\", target: \"_blank\" }, \"Ramp\"),\n            React.createElement(Button, { kind: \"secondary\", as: Link, href: \"https://coinbase.com\", target: \"_blank\" }, \"Coinbase\"),\n            React.createElement(Button, { kind: \"secondary\", as: Link, href: \"https://binance.com\", target: \"_blank\" }, \"Binance\")),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    cancel: {\n                        title: 'Dismiss',\n                        onClick: () => void onReject?.(),\n                        kind: 'primary',\n                    },\n                } }))));\n}\nconst Copy = styled.div.withConfig({ displayName: \"Copy\", componentId: \"sc-e2gzij\" }) `\n    padding: 48px 40px 40px;\n\n    p {\n        margin: 0;\n        text-align: center;\n    }\n\n    p + p {\n        margin-top: 0.5em;\n    }\n`;\nconst Exchanges = styled.div.withConfig({ displayName: \"Exchanges\", componentId: \"sc-v1kjgs\" }) `\n    align-items: center;\n    border-top: 1px solid #f2f1f1;\n    display: grid;\n    grid-column-gap: 1rem;\n    grid-row-gap: 1rem;\n    grid-template-columns: 1fr 1fr 1fr;\n    justify-content: center;\n    padding: 1.5rem 40px;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-p7jsss\" }) `\n    width: 98px;\n    height: 67px;\n    position: relative;\n    margin: 0 auto 24px;\n    background: red;\n\n    img {\n        display: block;\n        left: 50%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%) translateY(-5%) translateX(-4%);\n    }\n`;\n","export const truncate = (input, truncateLongerThan = 40, pickFirst = 5, pickLast = 5) => {\n    const regex = new RegExp(`0x[a-f\\\\d]{${truncateLongerThan},}`, 'gi');\n    const shortenedInput = typeof input !== 'string'\n        ? input\n        : input.replace(regex, (match) => `${match.substr(0, pickFirst)}...${match.substring(match.length - pickLast)}`);\n    return shortenedInput;\n};\nexport function truncateNodeId(nodeId) {\n    const hit = nodeId.match(/^([a-f\\d]{5})[a-f\\d]{22}([a-f\\d]{5})$/i);\n    return hit ? `${hit[1]}…${hit[2]}` : nodeId;\n}\nconst MAX_STREAM_NAME_LENGTH = 26;\nexport function parseStreamId(streamId) {\n    try {\n        const [, owner, pathname] = streamId.match(/^([^/]+)(\\/[^\\s]+)$/);\n        return {\n            owner,\n            pathname,\n        };\n    }\n    catch (e) {\n        console.warn('Invalid stream id', e);\n    }\n    throw new Error('Invalid stream id');\n}\nexport const truncateStreamName = (streamName, limit = MAX_STREAM_NAME_LENGTH) => {\n    // adding 3 to the limit because we when truncating we're adding 3 characters of ellipsis when we truncate + 1 for the separator\n    if (streamName.length <= limit + 4) {\n        return streamName;\n    }\n    const separatorIndex = streamName.indexOf('/');\n    const addressPart = streamName.substring(0, separatorIndex);\n    const namePart = streamName.substring(separatorIndex + 1);\n    return addressPart.length >= namePart.length\n        ? truncateStartingWithTheAddressPart(addressPart, namePart, limit)\n        : truncateStartingWithTheNamePart(addressPart, namePart, limit);\n};\nconst truncateStartingWithTheAddressPart = (addressPart, namePart, limit) => {\n    const shortenedAddressPart = truncateAddressPart(addressPart);\n    // adding 3 to the limit because we when truncating we're adding 3 characters of ellipsis when we truncate + 1 for the separator\n    if (`${shortenedAddressPart}/${namePart}`.length <= limit + 4) {\n        return `${shortenedAddressPart}/${namePart}`;\n    }\n    return `${shortenedAddressPart}/${truncateNamePart(namePart)}`;\n};\nconst truncateStartingWithTheNamePart = (addressPart, namePart, limit) => {\n    const shortenedNamePart = truncateNamePart(namePart);\n    // adding 3 to the limit because we when truncating we're adding 3 characters of ellipsis when we truncate + 1 for the separator\n    if (`${addressPart}/${shortenedNamePart}`.length <= limit + 4) {\n        return `${addressPart}/${shortenedNamePart}`;\n    }\n    return `${truncateAddressPart(addressPart)}/${shortenedNamePart}`;\n};\nconst truncateAddressPart = (addressPart) => {\n    const isEnsName = addressPart.match(/0x[a-f\\d]{40,}/gi) === null;\n    return isEnsName\n        ? `${addressPart.substring(0, 5)}...${addressPart.substring(addressPart.length - 9)}`\n        : truncate(addressPart);\n};\nconst truncateNamePart = (namePart) => {\n    return `${namePart.substring(0, 5)}...${namePart.substring(namePart.length - 5)}`;\n};\n","import { StreamPermission } from '@streamr/sdk';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { parseStreamId } from '~/shared/utils/text';\nconst StreamParser = z.object({\n    id: z.string().or(z.undefined()),\n});\nexport function parseStream(value, options) {\n    return StreamParser.transform(({ id }) => {\n        const { owner = '', pathname = '' } = id ? parseStreamId(id) : {};\n        const { storageNodes = [], permissionAssignments = [], metadata, ...rest } = options;\n        const storage = {};\n        storageNodes.forEach((address) => {\n            storage[address.toLowerCase()] = true;\n        });\n        const permissions = {};\n        permissionAssignments.forEach((assignment) => {\n            const user = 'userId' in assignment ? assignment.userId.toLowerCase() : address0;\n            permissions[user] = assignment.permissions.reduce((memo, permission) => memo | Bits[permission], permissions[user] || 0);\n        });\n        return {\n            ...rest,\n            domain: owner,\n            id,\n            metadata: parseStreamMetadata(metadata || { partitions: 1 }),\n            pathname: pathname.replace(/^\\//, ''),\n            permissions,\n            storage,\n        };\n    }).parse(value);\n}\nexport const Bits = {\n    [StreamPermission.DELETE]: /*    */ 1 << 0,\n    [StreamPermission.EDIT]: /*      */ 1 << 1,\n    [StreamPermission.GRANT]: /*     */ 1 << 2,\n    [StreamPermission.PUBLISH]: /*   */ 1 << 3,\n    [StreamPermission.SUBSCRIBE]: /* */ 1 << 4,\n};\nexport function setBits(bitsA, bitsB) {\n    return (bitsA |= bitsB);\n}\nexport function unsetBits(bitsA, bitsB) {\n    return (bitsA &= ~bitsB);\n}\nexport function matchBits(bitsA, bitsB) {\n    return (bitsA & bitsB) === bitsA;\n}\nfunction parseStreamMetadata(metadata) {\n    return {\n        /**\n         * Apart from parsing the predefined fields we also rewrite\n         * any custom fields that the metadata can carry (it's arbitrary).\n         */\n        ...metadata,\n        ...z\n            .object({\n            partitions: z.coerce.string().optional().default('1'),\n            description: z.string().optional().default(''),\n            storageDays: z.coerce.string().optional().default(''),\n            inactivityThresholdHours: z.coerce.string().optional().default(''),\n        })\n            .parse(metadata),\n    };\n}\nexport const PathnameSchema = z.string().superRefine((value, ctx) => {\n    if (!value) {\n        return;\n    }\n    if (/^\\//.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname cannot start with a slash',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n    if (/\\/{2,}/.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname cannot contain consecutive \"/\" characters',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n    if (/[^\\w]$/.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname must end with an alpha-numeric character',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n    if (/[^\\w.\\-/_]/.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname may only contain alpha-numeric characters, underscores, and dashes',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n});\n","export default class InsufficientFundsError extends Error {\n    constructor(address) {\n        super(`\"${address}\" does not have enough funds to cover the cost of gas`);\n        this.name = 'InsufficientFundsError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, InsufficientFundsError);\n        }\n        Object.setPrototypeOf(this, InsufficientFundsError.prototype);\n    }\n}\n","export default class StreamNotFoundError extends Error {\n    constructor(streamId) {\n        super('Stream not found');\n        this.streamId = streamId;\n        this.name = 'StreamNotFoundError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, StreamNotFoundError);\n        }\n        Object.setPrototypeOf(this, StreamNotFoundError.prototype);\n    }\n}\n","const mapping = {\n    137: 'POL',\n    100: 'xDai',\n    8995: 'DEV',\n    8997: 'DEV',\n    31337: 'DEV',\n    80002: 'POL',\n};\nconst getNativeTokenName = (chainId) => {\n    return mapping[chainId] || 'Ether';\n};\nexport default getNativeTokenName;\n","import { getERC20TokenContract } from '~/getters';\nimport { getPublicProvider } from '~/utils/providers';\nexport async function getBalance({ chainId, tokenAddress, walletAddress, }) {\n    const provider = await getPublicProvider(chainId);\n    if (tokenAddress === 'native') {\n        return provider.getBalance(walletAddress);\n    }\n    const contract = getERC20TokenContract({\n        tokenAddress,\n        provider,\n    });\n    return contract.balanceOf(walletAddress);\n}\n","import InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport { getBalance } from '~/utils/balance';\nexport async function requirePositiveBalance(chainId, walletAddress) {\n    const balance = await getBalance({\n        chainId,\n        tokenAddress: 'native',\n        walletAddress,\n    });\n    if (balance <= 0n) {\n        throw new InsufficientFundsError(walletAddress);\n    }\n}\n","import { produce } from 'immer';\nimport isEqual from 'lodash/isEqual';\nimport uniqueId from 'lodash/uniqueId';\nimport { createContext, useCallback, useContext, useEffect, useMemo, useRef } from 'react';\nimport { z } from 'zod';\nimport { create } from 'zustand';\nimport { DraftValidationError, ValidationError } from '~/errors';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nexport function getEmptyDraft(entity) {\n    return {\n        abandoned: false,\n        dirty: false,\n        entity: entity && {\n            cold: entity,\n            hot: entity,\n        },\n        errors: {},\n        fetching: false,\n        initialized: false,\n        persisting: false,\n    };\n}\nexport function createDraftStore(options) {\n    const useDraftStore = create((set, get) => {\n        function isPersisting(draftId) {\n            return get().drafts[draftId]?.persisting === true;\n        }\n        function setDraft(draftId, update, { force = false } = {}) {\n            set((store) => {\n                if (!store.drafts[draftId] && !force) {\n                    return store;\n                }\n                return produce(store, ({ drafts }) => {\n                    Object.assign(drafts, {\n                        [draftId]: produce(store.drafts[draftId] || options.getEmptyDraft(), update),\n                    });\n                });\n            });\n        }\n        const update = (draftId, updater) => {\n            setDraft(draftId, (draft) => {\n                if (!draft.entity) {\n                    return;\n                }\n                updater(draft.entity.hot, draft.entity.cold);\n                draft.dirty = !(options.isEqual || isEqual)(draft.entity.hot, draft.entity.cold);\n            });\n        };\n        return {\n            idMap: {},\n            drafts: {},\n            init(draftId) {\n                /**\n                 * Retrieve or create a draft associated with the given draft id.\n                 */\n                setDraft(draftId, (draft) => {\n                    draft.abandoned = false;\n                    draft.initialized = true;\n                    draft.fetching = true;\n                }, {\n                    force: true,\n                });\n            },\n            assign(draftId, entity) {\n                setDraft(draftId, (draft) => {\n                    if (draft.entity) {\n                        /**\n                         * The rule is: 1 draft = 1 entity, thus the logic does not\n                         * support overwriting existing hot/cold entities by assign.\n                         */\n                        return;\n                    }\n                    draft.entity = entity ? { cold: entity, hot: entity } : undefined;\n                    draft.fetching = typeof entity === 'undefined';\n                });\n            },\n            setErrors(draftId, update) {\n                setDraft(draftId, (draft) => {\n                    update(draft.errors);\n                });\n            },\n            update,\n            teardown(draftId, { onlyAbandoned = false } = {}) {\n                set((store) => produce(store, ({ idMap, drafts }) => {\n                    const draft = drafts[draftId];\n                    if (!draft) {\n                        return;\n                    }\n                    const { id } = draft.entity?.cold || {};\n                    if (!onlyAbandoned || draft.abandoned) {\n                        if (id) {\n                            delete idMap[id];\n                        }\n                        delete drafts[draftId];\n                    }\n                }));\n            },\n            abandon(draftId) {\n                setDraft(draftId, (draft) => {\n                    draft.abandoned = true;\n                });\n                if (!isPersisting(draftId)) {\n                    get().teardown(draftId);\n                }\n            },\n            async persist(draftId, fn, abortSignal) {\n                if (isPersisting(draftId)) {\n                    return;\n                }\n                try {\n                    setDraft(draftId, (draft) => {\n                        draft.persisting = true;\n                    });\n                    set((store) => produce(store, ({ drafts, idMap }) => {\n                        const { id } = drafts[draftId]?.entity?.cold || {};\n                        if (id) {\n                            idMap[id] = draftId;\n                        }\n                    }));\n                    try {\n                        const draft = get().drafts[draftId];\n                        if (!draft) {\n                            throw new Error(`Draft ${draftId} does not exist`);\n                        }\n                        await fn?.(draft, {\n                            abortSignal,\n                            bind: (id) => {\n                                set((store) => produce(store, (d) => {\n                                    d.idMap[id] = draftId;\n                                }));\n                            },\n                            update: (updater) => {\n                                update(draftId, updater);\n                            },\n                        });\n                        await options.persist?.(draft);\n                    }\n                    catch (e) {\n                        if (e instanceof z.ZodError) {\n                            const errors = {};\n                            e.issues.forEach(({ path, message }) => {\n                                errors[path.join('.')] = message;\n                            });\n                            setDraft(draftId, (copy) => {\n                                copy.errors = errors;\n                            });\n                            throw new ValidationError(e.issues.map(({ message }) => message));\n                        }\n                        if (e instanceof DraftValidationError) {\n                            throw new ValidationError([e.message]);\n                        }\n                        throw e;\n                    }\n                }\n                finally {\n                    setDraft(draftId, (draft) => {\n                        draft.persisting = false;\n                    });\n                    get().teardown(draftId, { onlyAbandoned: true });\n                }\n            },\n            validate(draftId, validator) {\n                const entity = get().drafts[draftId]?.entity?.hot;\n                const errors = {};\n                try {\n                    if (entity) {\n                        validator(entity);\n                    }\n                }\n                catch (e) {\n                    if (e instanceof z.ZodError) {\n                        e.issues.forEach(({ path, message }) => {\n                            errors[path.join('.')] = message;\n                        });\n                    }\n                    else {\n                        console.warn('Failed to validate draft', e);\n                    }\n                }\n                return errors;\n            },\n        };\n    });\n    function useBoundDraft(entityId) {\n        const { idMap, drafts } = useDraftStore();\n        const draftId = entityId ? idMap[entityId] : undefined;\n        const draft = draftId ? drafts[draftId] : undefined;\n        return !draft || draft.abandoned ? null : draft;\n    }\n    function useInitDraft(entityId) {\n        const { idMap, init, abandon } = useDraftStore();\n        const recycledDraftId = entityId ? idMap[entityId] : undefined;\n        const draftId = useId(() => recycledDraftId || DefaultIdGenerator(options.prefix), [entityId, recycledDraftId]);\n        useEffect(function initDraft() {\n            init(draftId);\n        }, [init, draftId]);\n        useEffect(function abandonDraftOnUnmount() {\n            return () => {\n                abandon(draftId);\n            };\n        }, [abandon, draftId]);\n        return draftId;\n    }\n    const useStore = useDraftStore;\n    const DraftContext = createContext(undefined);\n    function useDraftId() {\n        const draftId = useContext(DraftContext);\n        if (!draftId) {\n            throw new Error('`useDraftId` used outside of the `DraftContext`');\n        }\n        return draftId;\n    }\n    function useDraft() {\n        return useDraftStore().drafts[useDraftId()];\n    }\n    function useEntity({ hot = false } = {}) {\n        return useDraft()?.entity?.[hot ? 'hot' : 'cold'];\n    }\n    function useIsDraftClean() {\n        return !useDraft()?.dirty;\n    }\n    function useUpdateEntity() {\n        const draftId = useDraftId();\n        const { update } = useDraftStore();\n        return useCallback((updater) => {\n            return update(draftId, updater);\n        }, [draftId, update]);\n    }\n    function useValidateEntity(validator) {\n        const draftId = useDraftId();\n        const { validate } = useDraftStore();\n        const validatorRef = useRef(validator);\n        if (validatorRef.current !== validator) {\n            validatorRef.current = validator;\n        }\n        return useCallback(() => {\n            return validate(draftId, validatorRef.current);\n        }, [draftId, validate]);\n    }\n    function useIsFetchingEntity() {\n        return !!useDraft()?.fetching;\n    }\n    function useIsDraftBusy() {\n        const { fetching = false, persisting = false } = useDraft() || {};\n        return fetching || persisting;\n    }\n    function usePersist(fn) {\n        const { persist } = useDraftStore();\n        const draftId = useDraftId();\n        const abortControllerRef = useRef();\n        useEffect(() => {\n            const abortController = new AbortController();\n            abortControllerRef.current = abortController;\n            return () => {\n                abortController.abort();\n            };\n        }, []);\n        const fnRef = useRef(fn);\n        if (fnRef.current !== fn) {\n            fnRef.current = fn;\n        }\n        return useCallback(async () => {\n            if (!draftId) {\n                return;\n            }\n            return persist(draftId, fnRef.current, abortControllerRef.current?.signal);\n        }, [persist, draftId]);\n    }\n    function usePersistCallback() {\n        const { persist } = useDraftStore();\n        const draftId = useDraftId();\n        const busy = useIsDraftBusy();\n        const clean = useIsDraftClean();\n        const abortControllerRef = useRef();\n        useEffect(() => {\n            const abortController = new AbortController();\n            abortControllerRef.current = abortController;\n            return () => {\n                abortController.abort();\n            };\n        }, []);\n        return useCallback((params = {}) => {\n            if (!draftId || busy || clean) {\n                return;\n            }\n            void (async () => {\n                try {\n                    await persist(draftId);\n                    const { aborted = false } = abortControllerRef.current?.signal || {};\n                    params.onDone?.(!aborted);\n                }\n                catch (e) {\n                    if (isTransactionRejection(e)) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    params.onError?.(e);\n                }\n            })();\n        }, [persist, draftId, busy, clean]);\n    }\n    function useIsAnyDraftBeingPersisted() {\n        return Object.values(useDraftStore().drafts).some((d) => d?.persisting);\n    }\n    function useSetDraftErrors() {\n        const draftId = useDraftId();\n        const { setErrors } = useDraftStore();\n        return useCallback((update) => {\n            if (!draftId) {\n                return;\n            }\n            return setErrors(draftId, update);\n        }, [draftId, setErrors]);\n    }\n    return {\n        DraftContext,\n        useBoundDraft,\n        useDraft,\n        useDraftId,\n        useDraftStore,\n        useEntity,\n        useIsAnyDraftBeingPersisted,\n        useIsDraftBusy,\n        useIsDraftClean,\n        useIsFetchingEntity,\n        usePersist,\n        usePersistCallback,\n        useSetDraftErrors,\n        useStore,\n        useUpdateEntity,\n        useValidateEntity,\n        useInitDraft,\n    };\n}\nfunction DefaultIdGenerator(prefix = 'EntityDraft-') {\n    return uniqueId(prefix);\n}\nfunction useId(generator, deps) {\n    const generatorRef = useRef(generator);\n    if (generatorRef.current !== generator) {\n        generatorRef.current = generator;\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    return useMemo(() => generatorRef.current(), deps);\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Spinner from '~/components/Spinner';\nimport AbstractToast from '~/shared/toasts/AbstractToast';\nexport default function TransactionListToast({ operations = [] }) {\n    return (React.createElement(AbstractToast, null,\n        React.createElement(Container, null,\n            React.createElement(Title, null, \"These transactions are needed to save your changes:\"),\n            React.createElement(\"ul\", null, operations.map(({ id, state, label, action: Action }, index) => (React.createElement(Item, { key: id, \"$complete\": state === 'complete' || state === 'error', \"$ongoing\": state === 'ongoing' },\n                React.createElement(Number, null, index + 1),\n                React.createElement(Name, null, label),\n                Action && (React.createElement(ActionWrap, null,\n                    React.createElement(Action, { state: state }))),\n                React.createElement(IconContainer, null,\n                    state === 'ongoing' && React.createElement(Spinner, { color: \"blue\" }),\n                    state === 'complete' && React.createElement(Icon, { name: \"checkmark\" }),\n                    state === 'error' && React.createElement(Icon, { name: \"errorBadge\" })))))))));\n}\nexport function notify(toast, operations) {\n    setTimeout(async () => {\n        try {\n            if (!toast) {\n                return;\n            }\n            await toast.pop({ operations: [...operations] });\n        }\n        catch (_) {\n            // Do nothing\n        }\n    });\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-qltuev\" }) `\n    width: 464px;\n    padding: 32px 24px;\n\n    ul {\n        list-style: none;\n        margin: 24px 0 0;\n        padding: 0;\n    }\n\n    li + li {\n        margin-top: 8px;\n    }\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-wh87ze\" }) `\n    font-weight: ${MEDIUM};\n    font-size: 16px;\n    line-height: 20px;\n    width: 240px;\n`;\nconst Item = styled.li.withConfig({ displayName: \"Item\", componentId: \"sc-110z2sc\" }) `\n    padding: 20px 16px;\n    border: 1px solid ${COLORS.inputBackground};\n    border-radius: 4px;\n    align-items: center;\n    font-size: 16px;\n    line-height: 20px;\n    display: flex;\n\n    > * + * {\n        margin-left: 16px;\n    }\n\n    ${({ $complete = false }) => $complete &&\n    css `\n            background-color: ${COLORS.secondary};\n        `}\n\n    ${({ $ongoing = false }) => $ongoing &&\n    css `\n            border-color: #b3d4ff;\n        `}\n`;\nconst Number = styled.div.withConfig({ displayName: \"Number\", componentId: \"sc-3lajjx\" }) `\n    font-size: 12px;\n    line-height: normal;\n    border-radius: 50%;\n    background-color: #000000;\n    color: #ffffff;\n    width: 16px;\n    height: 16px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    flex-shrink: 0;\n`;\nconst Name = styled.div.withConfig({ displayName: \"Name\", componentId: \"sc-1mk5loi\" }) `\n    font-size: 16px;\n    line-height: 20px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    flex-grow: 1;\n`;\nconst IconContainer = styled.div.withConfig({ displayName: \"IconContainer\", componentId: \"sc-dkxk9p\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n    height: 18px;\n    width: 18px;\n    flex-shrink: 0;\n`;\nconst Icon = styled(SvgIcon).withConfig({ displayName: \"Icon\", componentId: \"sc-1luxglz\" }) `\n    display: flex;\n    width: 100%;\n    height: 100%;\n`;\nconst ActionWrap = styled.div.withConfig({ displayName: \"ActionWrap\", componentId: \"sc-89zhjj\" }) ``;\n","import { toaster } from 'toasterhea';\nimport uniqueId from 'lodash/uniqueId';\nimport TransactionListToast, { notify, } from '~/shared/toasts/TransactionListToast';\nimport { Layer } from '~/utils/Layer';\nexport async function toastedOperation(label, fn) {\n    await toastedOperations([\n        {\n            id: uniqueId('operation-'),\n            label: label,\n        },\n    ], () => fn?.());\n}\nexport async function toastedOperations(operations, fn) {\n    let toast = toaster(TransactionListToast, Layer.Toast);\n    if (!operations.length) {\n        throw new Error('We toasting or hwhat?!');\n    }\n    operations.forEach((op) => {\n        delete op.state;\n    });\n    let pos = -1;\n    function refresh() {\n        notify(toast, operations);\n    }\n    function next() {\n        if (pos >= 0) {\n            operations[pos].state = 'complete';\n        }\n        if (pos < operations.length - 1) {\n            pos += 1;\n            operations[pos].state = 'ongoing';\n        }\n        refresh();\n    }\n    try {\n        next();\n        await fn?.(next, refresh);\n        next();\n    }\n    catch (e) {\n        operations.forEach((op) => {\n            if (op.state === 'ongoing') {\n                op.state = 'error';\n            }\n        });\n        refresh();\n        throw e;\n    }\n    finally {\n        setTimeout(() => {\n            toast?.discard();\n            toast = undefined;\n        }, 3000);\n    }\n}\n","import { useQuery } from '@tanstack/react-query';\nimport isEqual from 'lodash/isEqual';\nimport uniqueId from 'lodash/uniqueId';\nimport React, { useCallback } from 'react';\nimport { Link, useMatch, useParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { DraftValidationError, ValidationError } from '~/errors';\nimport { getStreamrClientInstance } from '~/getters/getStreamrClient';\nimport GetCryptoModal from '~/modals/GetCryptoModal';\nimport { Bits, matchBits, parseStream } from '~/parsers/StreamParser';\nimport InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport StreamNotFoundError from '~/shared/errors/StreamNotFoundError';\nimport getNativeTokenName from '~/shared/utils/nativeToken';\nimport { requirePositiveBalance } from '~/shared/utils/requirePositiveBalance';\nimport { Layer } from '~/utils/Layer';\nimport { getCurrentChainId, useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { createDraftStore, getEmptyDraft } from '~/utils/draft';\nimport { isMessagedObject, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { validationErrorToast } from '~/utils/toast';\nimport { toastedOperations } from '~/utils/toastedOperation';\nimport getChainId from '~/utils/web3/getChainId';\nexport const StreamDraft = createDraftStore({\n    getEmptyDraft: () => getEmptyDraft(undefined),\n    prefix: 'StreamDraft-',\n});\nexport function getEmptyStreamEntity(options = {}) {\n    const { chainId } = options;\n    return {\n        chainId: chainId ?? getCurrentChainId(),\n        domain: '',\n        id: undefined,\n        pathname: '',\n        permissions: {},\n        storage: {},\n        metadata: {\n            description: '',\n            inactivityThresholdHours: '',\n            partitions: '1',\n            storageDays: '',\n        },\n    };\n}\nexport function useStreamEntityQuery() {\n    const { id: streamId } = useParams();\n    const chainId = useCurrentChainId();\n    const draft = StreamDraft.useBoundDraft(streamId);\n    return useQuery({\n        queryKey: ['useStreamEntityQuery', chainId, streamId],\n        queryFn: async () => {\n            if (draft?.entity) {\n                return draft.entity.cold;\n            }\n            if (!streamId) {\n                return getEmptyStreamEntity();\n            }\n            try {\n                const client = await getStreamrClientInstance(chainId);\n                const stream = await client.getStream(streamId);\n                if (!stream) {\n                    throw new StreamNotFoundError(streamId);\n                }\n                const metadata = await stream.getMetadata();\n                let storageNodes;\n                try {\n                    storageNodes = await client.getStorageNodes(streamId);\n                }\n                catch (e) {\n                    console.warn(`Failed to load storage nodes for stream ${streamId}`, e);\n                }\n                let permissionAssignments;\n                try {\n                    permissionAssignments = await client.getPermissions(streamId);\n                }\n                catch (e) {\n                    console.warn(`Failed to load permissions for stream ${streamId}`, e);\n                }\n                return parseStream(stream, {\n                    chainId,\n                    metadata,\n                    permissionAssignments,\n                    storageNodes,\n                });\n            }\n            catch (e) {\n                if (isMessagedObject(e) && /not.found/i.test(e.message)) {\n                    throw new StreamNotFoundError(streamId);\n                }\n                throw e;\n            }\n        },\n        staleTime: Infinity,\n        gcTime: 0,\n    });\n}\nexport function usePersistStreamDraft(options = {}) {\n    const persist = StreamDraft.usePersist(async (draft, { abortSignal, bind, update }) => {\n        const { entity } = draft;\n        if (!entity) {\n            return;\n        }\n        const { hot, cold } = entity;\n        const { id: streamId, domain, pathname, chainId } = hot;\n        let client;\n        let stream;\n        const updateOperation = {\n            id: uniqueId('operation-'),\n            label: streamId ? 'Update stream' : 'Create stream',\n        };\n        const permissionsOperation = {\n            id: uniqueId('operation-'),\n            label: 'Update access settings',\n        };\n        const storageOperation = {\n            id: uniqueId('operation-'),\n            label: '',\n        };\n        const operations = [];\n        const metadataChanged = !isEqual(hot.metadata, cold.metadata);\n        const shouldUpdateMetadata = !streamId || metadataChanged;\n        if (shouldUpdateMetadata) {\n            operations.push(updateOperation);\n        }\n        const permissionAssignments = [];\n        for (const account in hot.permissions) {\n            const hotBits = hot.permissions[account] || 0;\n            const coldBits = cold.permissions[account] || 0;\n            if (hotBits === coldBits) {\n                continue;\n            }\n            const permissions = !hotBits\n                ? []\n                : Object.keys(Bits).filter((perm) => matchBits(Bits[perm], hotBits));\n            if (account === address0) {\n                permissionAssignments.push({\n                    public: true,\n                    permissions,\n                });\n                continue;\n            }\n            permissionAssignments.push({\n                userId: account,\n                permissions,\n            });\n        }\n        const shouldUpdatePermissions = permissionAssignments.length > 0;\n        if (shouldUpdatePermissions) {\n            operations.push(permissionsOperation);\n        }\n        const storageNodeChanges = [];\n        for (const address in hot.storage) {\n            const hotEnabled = hot.storage[address] || false;\n            const coldEnabled = cold.storage[address] || false;\n            if (hotEnabled !== coldEnabled) {\n                storageNodeChanges.push([address, hotEnabled]);\n            }\n        }\n        storageOperation.label = formatStorageOperationLabel(0, storageNodeChanges.length);\n        const shouldUpdateStorage = storageNodeChanges.length > 0;\n        if (shouldUpdateStorage) {\n            operations.push(storageOperation);\n        }\n        if (!operations.length) {\n            return;\n        }\n        async function checkBalance(c) {\n            await requirePositiveBalance(chainId, await c.getAddress());\n        }\n        await toastedOperations(operations, async (next, refresh) => {\n            let transientStreamId;\n            if (!streamId) {\n                if (!domain) {\n                    throw new DraftValidationError('domain', 'Domain is required');\n                }\n                if (!pathname) {\n                    throw new DraftValidationError('pathname', 'Pathname is required');\n                }\n                transientStreamId = `${domain}/${pathname}`;\n            }\n            if (streamId) {\n                /**\n                 * Assign a draft to a stream id for later re-use. Based\n                 * on this information we can recycle drafts that haven't\n                 * been abandoned.\n                 */\n                bind(streamId);\n            }\n            if (shouldUpdateMetadata && streamId) {\n                updateOperation.action = getOpenStreamLink(streamId);\n                refresh();\n            }\n            if (transientStreamId) {\n                client = await getStreamrClientInstance(chainId);\n                try {\n                    if (await client.getStream(transientStreamId)) {\n                        throw new DraftValidationError('id', 'Your stream id already exists. Please try a different one.');\n                    }\n                }\n                catch (e) {\n                    if (e instanceof DraftValidationError) {\n                        throw e;\n                    }\n                    if (!isMessagedObject(e) ||\n                        !/stream not found/i.test(e.message)) {\n                        throw new DraftValidationError('streamId', 'Failed to verify the uniqueness of your stream id.');\n                    }\n                    /**\n                     * At this point we know that the error thrown above tells us that\n                     * the stream with the given id hasn't been found. Good, onwards!\n                     */\n                }\n            }\n            stream = await (async () => {\n                /**\n                 * Whatever happens in here we end up fetching a stream instance. Conditions\n                 * dictate if it's a new stream or an existing stream (optionally updated).\n                 */\n                const { description, inactivityThresholdHours, partitions, storageDays, ...otherMetadata } = hot.metadata;\n                const metadata = z\n                    .object({\n                    description: z\n                        .string()\n                        .transform((value) => value.trim() || undefined),\n                    partitions: z.union([\n                        z.literal('').transform(() => undefined),\n                        z.coerce\n                            .number()\n                            .min(1)\n                            .max(99)\n                            .refine((value) => Number.isInteger(value), 'is not an integer value'),\n                    ]),\n                    storageDays: z.union([\n                        z.literal('').transform(() => undefined),\n                        z.coerce\n                            .number()\n                            .refine((value) => Number.isInteger(value), 'is not an integer value'),\n                    ]),\n                    inactivityThresholdHours: z.union([\n                        z.literal('').transform(() => undefined),\n                        z.coerce\n                            .number()\n                            .refine((value) => Number.isInteger(value), 'is not an integer value'),\n                    ]),\n                })\n                    .parse({\n                    description,\n                    inactivityThresholdHours,\n                    partitions,\n                    storageDays,\n                });\n                const finalMetadata = {\n                    ...JSON.parse(JSON.stringify(metadata)),\n                    ...otherMetadata,\n                };\n                if (transientStreamId) {\n                    client = await getStreamrClientInstance(chainId, {\n                        transactional: true,\n                    });\n                    await checkBalance(client);\n                    try {\n                        return await client.createStream({\n                            ...finalMetadata,\n                            id: transientStreamId,\n                        });\n                    }\n                    catch (e) {\n                        if (isMessagedObject(e) &&\n                            /not in namespace of authenticated user/.test(e.message)) {\n                            throw new DraftValidationError('domain', 'Domain belongs to someone else');\n                        }\n                        throw e;\n                    }\n                }\n                if (!streamId) {\n                    throw new DraftValidationError('streamId', 'Stream id is invalid');\n                }\n                if (metadataChanged) {\n                    client = await getStreamrClientInstance(chainId, {\n                        transactional: true,\n                    });\n                    await checkBalance(client);\n                    await client.setStreamMetadata(streamId, {\n                        ...finalMetadata,\n                    });\n                    return client.getStream(streamId);\n                }\n                client = await getStreamrClientInstance(chainId);\n                return client.getStream(streamId);\n            })();\n            const currentStreamId = stream.id;\n            const currentMetadata = await stream.getMetadata();\n            const newMetadata = parseStream(stream, {\n                chainId,\n                metadata: currentMetadata,\n            }).metadata;\n            update((hot, cold) => {\n                hot.metadata = newMetadata;\n                cold.metadata = newMetadata;\n            });\n            if (transientStreamId) {\n                /**\n                 * Again, associate the current draft with the (new) stream\n                 * id for later recycling purposes.\n                 */\n                bind(currentStreamId);\n                update((hot, cold) => {\n                    hot.id = currentStreamId;\n                    cold.id = hot.id;\n                    cold.domain = hot.domain;\n                    cold.pathname = hot.pathname;\n                });\n                options.onCreate?.(chainId, currentStreamId, { abortSignal });\n            }\n            if (shouldUpdateMetadata) {\n                updateOperation.action = getOpenStreamLink(currentStreamId);\n                /**\n                 * We've either created a stream or updated one that exists. Onwards!\n                 */\n                next();\n            }\n            if (shouldUpdatePermissions) {\n                client = await getStreamrClientInstance(chainId, {\n                    transactional: true,\n                });\n                await checkBalance(client);\n                await client.setPermissions({\n                    streamId: currentStreamId,\n                    assignments: permissionAssignments,\n                });\n                options.onPermissionsChange?.(currentStreamId, permissionAssignments, {\n                    abortSignal,\n                });\n                update((hot, cold) => {\n                    cold.permissions = hot.permissions;\n                });\n                next();\n            }\n            for (let i = 0; i < storageNodeChanges.length; i++) {\n                const [address, enabled] = storageNodeChanges[i];\n                storageOperation.label = formatStorageOperationLabel(i + 1, storageNodeChanges.length);\n                if (i !== 0) {\n                    // Already notifying above.\n                    refresh();\n                }\n                client = await getStreamrClientInstance(chainId, {\n                    transactional: true,\n                });\n                await checkBalance(client);\n                if (enabled) {\n                    await client.addStreamToStorageNode(stream.id, address);\n                }\n                else {\n                    await client.removeStreamFromStorageNode(stream.id, address);\n                }\n                update((hot, cold) => {\n                    cold.storage[address] = enabled;\n                    hot.storage[address] = enabled;\n                });\n            }\n        });\n    });\n    return useCallback(() => {\n        void (async () => {\n            try {\n                await persist();\n            }\n            catch (e) {\n                if (e instanceof InsufficientFundsError) {\n                    void (async () => {\n                        try {\n                            const chainId = await getChainId();\n                            await getCryptoModal.pop({\n                                tokenName: getNativeTokenName(chainId),\n                            });\n                        }\n                        catch (_) {\n                            // Do nothing.\n                        }\n                    })();\n                    return;\n                }\n                if (e instanceof ValidationError) {\n                    validationErrorToast({ title: 'Failed to save', error: e });\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                throw e;\n            }\n        })();\n    }, [persist]);\n}\nfunction formatStorageOperationLabel(current = 0, total = 0) {\n    if (total <= 1) {\n        return 'Update storage nodes';\n    }\n    return `Update storage nodes (${current} of ${total})`;\n}\nconst NewStreamLink = styled(Link).withConfig({ displayName: \"NewStreamLink\", componentId: \"sc-1tfrg8c\" }) `\n    display: block;\n    font-size: 14px;\n\n    :hover {\n        text-decoration: underline;\n    }\n`;\nfunction getOpenStreamLink(streamId) {\n    return function OpenStreamLink() {\n        const chainKey = useCurrentChainKey();\n        const id = decodeURIComponent(useMatch(R.streamOverview(':id'))?.params['id'] || '');\n        if (!streamId || id === streamId) {\n            return React.createElement(React.Fragment, null);\n        }\n        return (React.createElement(NewStreamLink, { to: R.streamOverview(streamId, routeOptions(chainKey)) }, \"Open\"));\n    };\n}\nconst getCryptoModal = toaster(GetCryptoModal, Layer.Modal);\n","import React from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '~/components/SimpleDropdown';\nimport { defaultChainKey } from '~/consts';\nimport { getEnvironmentConfig } from '~/getters/getEnvironmentConfig';\nimport UnstyledNetworkIcon from '~/shared/components/NetworkIcon';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, LAPTOP } from '~/shared/utils/styled';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { getChainDisplayName, getChainSlug, useCurrentChain } from '~/utils/chains';\nconst MenuItem = ({ chainId, isSelected, onClick }) => (React.createElement(MenuItemContainer, { onClick: onClick },\n    React.createElement(NetworkIcon, { chainId: chainId }),\n    React.createElement(\"div\", null, getChainDisplayName(chainId)),\n    isSelected ? React.createElement(SvgIcon, { name: \"tick\" }) : React.createElement(\"div\", null)));\nconst Menu = ({ chains, selectedChain, toggle }) => {\n    const [, setSearchParams] = useSearchParams();\n    return (React.createElement(MenuContainer, null,\n        React.createElement(ChainGrid, null, chains.map((c) => (React.createElement(MenuItem, { key: c.id, chainId: c.id, isSelected: c.id === selectedChain.id, onClick: () => {\n                toggle(false);\n                const slug = getChainSlug(c.id);\n                setSearchParams((prev) => {\n                    const { chain: _, ...rest } = Object.fromEntries(prev);\n                    return slug === getChainSlug(defaultChainKey)\n                        ? rest\n                        : { ...rest, chain: slug };\n                });\n            } }))))));\n};\nexport const ChainSelector = ({ menuAlignment = 'left', ...props }) => {\n    const { availableChains } = getEnvironmentConfig();\n    const selectedChain = useCurrentChain();\n    const isAnyDraftBeingPersisted = StreamDraft.useIsAnyDraftBeingPersisted();\n    return (React.createElement(SimpleDropdown, { ...props, disabled: isAnyDraftBeingPersisted, menu: (toggle) => (React.createElement(Menu, { chains: availableChains, selectedChain: selectedChain, toggle: toggle })), align: menuAlignment }, (toggle, isOpen) => (React.createElement(Toggle, { \"$isOpen\": isOpen, onClick: () => toggle((v) => !v) },\n        React.createElement(NetworkIcon, { chainId: selectedChain.id }),\n        React.createElement(\"div\", null, getChainDisplayName(selectedChain.id)),\n        React.createElement(Caret, { name: \"caretUp\", \"$isOpen\": isOpen })))));\n};\nconst MenuContainer = styled(SimpleListDropdownMenu).withConfig({ displayName: \"MenuContainer\", componentId: \"sc-uchumb\" }) `\n    color: ${COLORS.primaryLight};\n    max-width: 100%;\n`;\nconst ChainGrid = styled.div.withConfig({ displayName: \"ChainGrid\", componentId: \"sc-ampuev\" }) `\n    display: grid;\n    grid-template-columns: auto auto auto;\n    grid-auto-rows: 52px;\n    gap: 0px 8px;\n`;\nconst MenuItemContainer = styled.div.withConfig({ displayName: \"MenuItemContainer\", componentId: \"sc-1u65gxv\" }) `\n    display: grid;\n    grid-template-columns: subgrid;\n    grid-column: span 3;\n    appearance: none;\n    background: none;\n    border: 0;\n    border-bottom: 1px solid ${COLORS.secondary};\n\n    :last-child {\n        border-bottom: none;\n    }\n\n    transition: 250ms background-color;\n    align-items: center;\n    padding: 8px 24px;\n    cursor: pointer;\n\n    font-size: 16px;\n    line-height: 26px;\n    font-weight: 500;\n    text-align: left;\n    white-space: nowrap;\n    color: ${COLORS.primaryLight};\n\n    :focus,\n    :hover {\n        background: ${COLORS.secondary};\n        transition-duration: 50ms;\n    }\n\n    &[disabled] {\n        background: none;\n    }\n\n    svg {\n        color: ${COLORS.primaryLight};\n        height: 13px;\n        width: 13px;\n    }\n`;\nconst NetworkIcon = styled(UnstyledNetworkIcon).withConfig({ displayName: \"NetworkIcon\", componentId: \"sc-1djytsj\" }) `\n    display: flex;\n    width: 24px;\n    height: 24px;\n`;\nconst Toggle = styled.div.withConfig({ displayName: \"Toggle\", componentId: \"sc-op8rsk\" }) `\n    display: grid;\n    grid-template-columns: 24px auto auto;\n    line-height: 24px;\n    align-items: center;\n    border: 1px solid #f3f3f3;\n    border-radius: 8px;\n    background: ${({ $isOpen }) => ($isOpen ? COLORS.dialogBorder : '#fff')};\n    cursor: pointer;\n    gap: 0px;\n    height: 32px;\n    padding: 4px 8px;\n    align-items: center;\n    width: fit-content;\n    color: ${COLORS.primary};\n    font-size: 14px;\n    font-weight: 500;\n\n    img {\n        width: 20px;\n        height: 20px;\n    }\n\n    div:nth-child(2) {\n        display: none;\n    }\n\n    :focus,\n    :hover {\n        background: ${COLORS.dialogBorder};\n        transition-duration: 50ms;\n    }\n\n    @media ${LAPTOP} {\n        height: 40px;\n        padding: 8px 12px;\n        gap: 8px;\n\n        img {\n            width: 24px;\n            height: 24px;\n        }\n\n        div:nth-child(2) {\n            display: initial;\n        }\n    }\n`;\nconst Caret = styled(SvgIcon).withConfig({ displayName: \"Caret\", componentId: \"sc-sguc5a\" }) `\n    width: 10px !important;\n    transition: transform 200ms ease-in-out;\n    transform: ${({ $isOpen }) => ($isOpen ? 'rotate(0deg)' : 'rotate(180deg)')};\n`;\n","import { Contract } from 'ethers';\nimport { Minute } from '~/consts';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport { getPublicProvider } from '~/utils/providers';\nconst cache = {};\nconst TTL = 60 * Minute;\n/**\n * @todo Refactor to use `fetchQuery` for cache.\n */\nexport async function getConfigValueFromChain(chainId, key) {\n    const { updatedAt = 0, value } = cache[chainId]?.[key] || {};\n    if (value && updatedAt + TTL > Date.now()) {\n        return value;\n    }\n    const provider = await getPublicProvider(chainId);\n    const contract = new Contract(getContractAddress('config', chainId), getContractAbi('config'), provider);\n    const result = (await contract[key]());\n    const obj = cache[chainId] || {};\n    obj[key] = {\n        updatedAt: Date.now(),\n        value: result,\n    };\n    cache[chainId] = obj;\n    return result;\n}\n","import React, { useCallback, useEffect, useRef, useState, useSyncExternalStore, } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { BehindIndexError } from '~/errors/BehindIndexError';\nimport { getConfigValueFromChain } from '~/getters/getConfigValueFromChain';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { Layer } from '~/utils/Layer';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { errorToast } from '~/utils/toast';\nconst infoToast = toaster(Toast, Layer.Toast);\nexport function useInfoToastEffect() {\n    useEffect(() => {\n        let timeoutId;\n        let recentKey;\n        function onKeyUp() {\n            recentKey = undefined;\n            if (timeoutId) {\n                clearTimeout(timeoutId);\n                timeoutId = undefined;\n            }\n        }\n        function onKeyDown(e) {\n            if (e.key === recentKey) {\n                return;\n            }\n            onKeyUp();\n            recentKey = e.key;\n            if (e.key !== 'i') {\n                return;\n            }\n            timeoutId = window.setTimeout(async () => {\n                try {\n                    await infoToast.pop({\n                        type: ToastType.Info,\n                        title: 'Version info',\n                        desc: (React.createElement(\"ul\", null,\n                            React.createElement(\"li\", null,\n                                \"Hub v\",\n                                process.env.HUB_VERSION),\n                            React.createElement(\"li\", null,\n                                \"Commit hash \",\n                                process.env.COMMIT_HASH),\n                            React.createElement(\"li\", null,\n                                \"@streamr/sdk v\",\n                                process.env.STREAMR_SDK_VERSION),\n                            React.createElement(\"li\", null,\n                                \"@streamr/config v\",\n                                process.env.STREAMR_CONFIG_VERSION))),\n                        okLabel: 'Dismiss',\n                    });\n                }\n                catch (_) {\n                    // Ignore.\n                }\n            }, 1500);\n        }\n        document.addEventListener('keydown', onKeyDown);\n        document.addEventListener('keyup', onKeyUp);\n        return () => {\n            document.removeEventListener('keydown', onKeyDown);\n            document.removeEventListener('keyup', onKeyUp);\n            onKeyUp();\n        };\n    }, []);\n}\nexport function useConfigValueFromChain(key, transform) {\n    const [value, setValue] = useState();\n    const chainId = useCurrentChainId();\n    const transformRef = useRef(transform);\n    if (transformRef.current !== transform) {\n        transformRef.current = transform;\n    }\n    useEffect(() => {\n        let mounted = true;\n        void (async () => {\n            try {\n                const newValue = await getConfigValueFromChain(chainId, key);\n                if (!mounted) {\n                    return;\n                }\n                setValue((transformRef.current\n                    ? transformRef.current(newValue)\n                    : newValue));\n            }\n            catch (e) {\n                console.warn(`Could not load ${key} config from chain`, e);\n                errorToast({ title: 'Could not load config from chain' });\n            }\n        })();\n        return () => {\n            mounted = false;\n        };\n    }, [key, chainId]);\n    return value;\n}\nexport function useMaxUndelegationQueueDays() {\n    return (useConfigValueFromChain('maxQueueSeconds', (value) => Number(value) / 86400) || 0);\n}\nexport function useMediaQuery(query) {\n    const subscribe = useCallback((cb) => {\n        if (typeof window.matchMedia !== 'function') {\n            return () => { };\n        }\n        const matchMedia = window.matchMedia(query);\n        matchMedia.addEventListener('change', cb);\n        return () => {\n            matchMedia.removeEventListener('change', cb);\n        };\n    }, [query]);\n    return useSyncExternalStore(subscribe, () => typeof window.matchMedia === 'function' && window.matchMedia(query).matches);\n}\n/**\n * Extracts block number (`?b=…`) from GET params; makes sure it's\n * a number. Defaults to 0.\n */\nexport function useRequestedBlockNumber() {\n    const blockNumber = useSearchParams()[0].get('b');\n    try {\n        return z.coerce.number().min(0).parse(blockNumber);\n    }\n    catch (_) {\n        return 0;\n    }\n}\n/**\n * Tracks and returns a referenace to the latest `BehindIndexError` exception.\n */\nexport function useLatestBehindBlockError(query) {\n    const { error, isSuccess } = query;\n    const behindBlockErrorRef = useRef(null);\n    if (error instanceof BehindIndexError) {\n        behindBlockErrorRef.current = error;\n    }\n    if (isSuccess) {\n        behindBlockErrorRef.current = null;\n    }\n    return behindBlockErrorRef.current;\n}\n/**\n * Keeps a reference of the first encountered `BehindIndexError` within\n * the context of `resetDeps`.\n */\nexport function useInitialBehindIndexError(query, resetDeps) {\n    const { error } = query;\n    const errorRef = useRef(null);\n    const resetKey = JSON.stringify(resetDeps);\n    const resetKeyRef = useRef(resetKey);\n    if (!errorRef.current && error instanceof BehindIndexError) {\n        errorRef.current = error;\n    }\n    if (resetKeyRef.current !== resetKey) {\n        resetKeyRef.current = resetKey;\n        errorRef.current = null;\n    }\n    return errorRef.current;\n}\n/**\n * Refreshes given erroring query after 5s if the reason for its failure\n * is a `BehindIndexError`.\n */\nexport function useRefetchQueryBehindIndexEffect(query) {\n    const isBehindError = query.error instanceof BehindIndexError;\n    useEffect(function refetchQueryOnBehindBlockError() {\n        if (!isBehindError) {\n            return;\n        }\n        const timeoutId = setTimeout(() => {\n            query.refetch();\n        }, 15000);\n        return () => {\n            clearTimeout(timeoutId);\n        };\n    }, [query, isBehindError]);\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport InfoIcon from '@atlaskit/icon/glyph/info';\nimport { toaster } from 'toasterhea';\nimport BaseModal from '~/modals/BaseModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { Layer } from '~/utils/Layer';\nimport { RejectionReason } from '~/utils/exceptions';\nconst ConfirmationModal = ({ title, description, proceedLabel, cancelLabel, isDangerous = false, onResolve, ...props }) => {\n    return (React.createElement(BaseModal, { ...props }, (close) => (React.createElement(ModalBody, null,\n        React.createElement(Icon, null,\n            React.createElement(IconWrap, { \"$color\": isDangerous ? '#ff0f2d' : '#6240AF' },\n                React.createElement(InfoIcon, { label: \"Info\" }))),\n        React.createElement(Title, { \"$isDangerous\": isDangerous }, title),\n        React.createElement(CloseButton, { type: \"button\", onClick: () => void close(RejectionReason.CloseButton) },\n            React.createElement(SvgIcon, { name: \"crossMedium\" })),\n        React.createElement(Description, null, description),\n        React.createElement(DecisionButtons, null,\n            React.createElement(DecisionButton, { onClick: () => void onResolve?.(true), \"$isDangerous\": isDangerous }, proceedLabel),\n            React.createElement(Dot, null),\n            React.createElement(DecisionButton, { onClick: () => close(RejectionReason.CloseButton) }, cancelLabel))))));\n};\nexport const confirmationModal = toaster(ConfirmationModal, Layer.Modal);\nconst ModalBody = styled.div.withConfig({ displayName: \"ModalBody\", componentId: \"sc-voqu7n\" }) `\n    display: grid;\n    grid-template-columns: 24px auto 24px;\n    grid-template-rows: auto auto auto;\n    padding: 20px 16px;\n    grid-gap: 16px;\n    width: 400px;\n`;\nconst Icon = styled.div.withConfig({ displayName: \"Icon\", componentId: \"sc-qi231b\" }) `\n    grid-row-start: 1;\n    grid-row-end: 1;\n    grid-column-start: 1;\n    grid-column-end: 1;\n    width: 24px;\n    height: 24px;\n`;\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-sdo3t5\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 5px;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n    > svg {\n        width: 12px;\n        height: 12px;\n    }\n`;\nconst Title = styled.p.withConfig({ displayName: \"Title\", componentId: \"sc-12a02f3\" }) `\n    grid-row-start: 1;\n    grid-row-end: 1;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    font-weight: ${MEDIUM};\n    margin: 0;\n    font-size: 16px;\n    color: ${({ $isDangerous }) => ($isDangerous ? '#ff0f2d' : 'inherit')};\n`;\nconst Description = styled.p.withConfig({ displayName: \"Description\", componentId: \"sc-207eya\" }) `\n    grid-row-start: 2;\n    grid-row-end: 2;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    margin: 0;\n    font-size: 14px;\n    line-height: 20px;\n`;\nconst DecisionButtons = styled.div.withConfig({ displayName: \"DecisionButtons\", componentId: \"sc-6jyzvo\" }) `\n    grid-row-start: 3;\n    grid-row-end: 3;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n`;\nconst DecisionButton = styled.p.withConfig({ displayName: \"DecisionButton\", componentId: \"sc-d6isvw\" }) `\n    margin: 0;\n    color: ${({ $isDangerous }) => ($isDangerous ? '#ff0f2d' : COLORS.link)};\n    cursor: pointer;\n`;\nconst Dot = styled.div.withConfig({ displayName: \"Dot\", componentId: \"sc-1tn8edh\" }) `\n    width: 3px;\n    height: 3px;\n    border-radius: 50%;\n    background-color: ${COLORS.primary};\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-14g910u\" }) `\n    height: 24px;\n    width: 24px;\n    position: relative;\n    display: flex;\n    items-center;\n    justify-content: center;\n    flex-shrink: 0;\n    margin-right: 16px;\n    color: ${({ $color = 'inherit' }) => $color};\n`;\n","import { confirmationModal } from '~/modals/ConfirmationModal';\nexport async function confirm(props) {\n    try {\n        return await confirmationModal.pop(props);\n    }\n    catch (_) { }\n    return false;\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport Spinner from '~/components/Spinner';\nexport const Alert = ({ type, title, className, children }) => {\n    return (React.createElement(AlertWrap, { \"$type\": type, className: className },\n        React.createElement(AlertIcon, { type: type }),\n        React.createElement(\"div\", null,\n            React.createElement(Title, null, title),\n            children != null && React.createElement(Content, null, children))));\n};\nconst AlertIcon = ({ type }) => {\n    switch (type) {\n        case 'success':\n            return React.createElement(StyledIcon, { name: \"checkmark\" });\n        case 'error':\n            return React.createElement(StyledIcon, { name: \"warnBadge\" });\n        case 'loading':\n            return React.createElement(StyledSpinner, { color: \"blue\", size: \"medium\" });\n        case 'notice':\n            return React.createElement(StyledIcon, { name: \"infoBadge\" });\n    }\n};\nconst getAlertBackgroundColor = ({ $type }) => {\n    switch ($type) {\n        case 'success':\n            return COLORS.alertSuccessBackground;\n        case 'error':\n            return COLORS.alertErrorBackground;\n        case 'loading':\n        case 'notice':\n            return COLORS.alertInfoBackground;\n        default:\n            return 'transparent';\n    }\n};\nconst AlertWrap = styled.div.withConfig({ displayName: \"AlertWrap\", componentId: \"sc-ekjwlf\" }) `\n    display: grid;\n    grid-template-columns: 24px auto;\n    gap: 16px;\n    padding: 20px 16px;\n    border-radius: 8px;\n    background-color: ${getAlertBackgroundColor};\n`;\nconst StyledIcon = styled(SvgIcon).withConfig({ displayName: \"StyledIcon\", componentId: \"sc-p60j5u\" }) `\n    width: 22px;\n    height: 22px;\n    flex-shrink: 0;\n`;\nconst StyledSpinner = styled(Spinner).withConfig({ displayName: \"StyledSpinner\", componentId: \"sc-1jqcvlm\" }) `\n    align-self: baseline !important;\n    flex-shrink: 0;\n`;\nconst Title = styled.p.withConfig({ displayName: \"Title\", componentId: \"sc-dac3a\" }) `\n    font-weight: ${MEDIUM};\n    line-height: 20px;\n    margin: 0;\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-1kv50dt\" }) `\n    margin-top: 4px;\n    line-height: 20px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport function Slider({ min, max, value, onChange: onChangeProp, disabled, className, }) {\n    const borderPercentage = (100 * value) / (max - min);\n    return (React.createElement(SliderRoot, { className: className },\n        React.createElement(\"input\", { type: \"range\", min: min, max: max, value: value, onChange: (e) => {\n                onChangeProp?.(Number.parseInt(e.target.value, 10));\n            }, disabled: disabled, style: {\n                background: `linear-gradient(to right, ${COLORS.link} calc(${borderPercentage}%), ${COLORS.linkInactive} 1%)`,\n            } })));\n}\nconst SliderRoot = styled.div.withConfig({ displayName: \"SliderRoot\", componentId: \"sc-1xw479y\" }) `\n    width: 100%;\n    position: relative;\n    padding-bottom: 6px;\n\n    input {\n        appearance: none;\n        width: 100%;\n        outline: none;\n        transition: opacity 0.2s;\n        height: 3px;\n        border-radius: 2px;\n    }\n\n    input::-webkit-slider-thumb {\n        appearance: none;\n        width: 12px;\n        height: 12px;\n        background: #0324ff;\n        cursor: pointer;\n        border-radius: 50%;\n    }\n\n    input::-moz-range-thumb {\n        width: 12px;\n        height: 12px;\n        background: #0324ff;\n        cursor: pointer;\n        border-radius: 50%;\n    }\n\n    input:focus {\n        outline: none;\n    }\n\n    input[disabled] {\n        opacity: 0.5;\n        cursor: not-allowed;\n    }\n`;\n","export const ACTIVE = '#0424ff';\nexport const SUCCESS = '#2ac437';\nexport const CAUTION = '#f9cf0d';\nexport const ERROR = '#ff0f2d';\nexport const PROCESSING = '#cccccc';\nexport const DEFAULT = '#323232';\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport * as Colors from '~/shared/components/Ui/StateColors';\nimport { MEDIUM } from '~/shared/utils/styled';\nfunction UnstyledLabel({ children, ...props }) {\n    return React.createElement(\"label\", { ...props }, children);\n}\nconst Label = styled(UnstyledLabel).withConfig({ displayName: \"Label\", componentId: \"sc-e2ulv2\" }) `\n    color: ${({ state }) => (state ? Colors[state] : undefined) ||\n    Colors.DEFAULT};\n    display: block;\n    font-size: 12px;\n    font-weight: ${MEDIUM};\n    line-height: 1em;\n    margin: 0 0 8px;\n    transition: 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n    transition-property: color, transform;\n\n    ${({ $wrap = false }) => !$wrap &&\n    css `\n            white-space: nowrap;\n        `}\n`;\nexport default Label;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Label from '~/shared/components/Ui/Label';\nimport { COLORS, MEDIUM, REGULAR, SANS, TABLET } from '~/shared/utils/styled';\nimport { RejectionReason } from '~/utils/exceptions';\nimport BaseModal, { Footer } from './BaseModal';\nexport default function FormModal({ title = 'Untitled modal', onSubmit, children, onReject, submitLabel = 'Submit', cancelLabel, canSubmit = true, submitting = false, ...props }) {\n    const actions = {};\n    if (cancelLabel) {\n        actions.cancel = {\n            title: cancelLabel,\n            kind: 'link',\n            type: 'button',\n            onClick() {\n                onReject?.(RejectionReason.CancelButton);\n            },\n        };\n    }\n    actions.ok = {\n        title: submitLabel,\n        kind: 'primary',\n        type: 'submit',\n        disabled: !canSubmit,\n        spinner: submitting,\n    };\n    return (React.createElement(BaseModal, { ...props, onReject: onReject }, (close) => (React.createElement(\"form\", { onSubmit: async (e) => {\n            e.preventDefault();\n            try {\n                await onSubmit?.();\n            }\n            catch (e) {\n                onReject?.(e);\n            }\n        } },\n        React.createElement(FormModalRoot, null,\n            React.createElement(FormModalHead, null,\n                React.createElement(FormModalTitle, null, title),\n                React.createElement(FormModalCloseButton, { type: \"button\", onClick: () => void close(RejectionReason.CloseButton), disabled: submitting },\n                    React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n            React.createElement(FormModalContent, null, children),\n            React.createElement(Footer, { \"$borderless\": true, \"$spacious\": true },\n                React.createElement(Buttons, { actions: actions })))))));\n}\nexport const FormModalContent = styled.div.withConfig({ displayName: \"FormModalContent\", componentId: \"sc-a9t3q8\" }) `\n    padding: 0 40px;\n`;\nexport const FormModalRoot = styled.div.withConfig({ displayName: \"FormModalRoot\", componentId: \"sc-19s3hbr\" }) `\n    max-width: 672px;\n    width: 90vw;\n`;\nexport const FormModalHead = styled.div.withConfig({ displayName: \"FormModalHead\", componentId: \"sc-1rlv5dn\" }) `\n    align-items: center;\n    display: flex;\n    font-family: ${SANS};\n    font-size: 24px;\n    font-weight: normal;\n    height: 100px;\n    line-height: normal;\n    margin: 0;\n    position: relative;\n    padding: 20px 40px 0;\n    width: 100%;\n\n    @media ${TABLET} {\n        height: 120px;\n        padding-top: 0;\n    }\n`;\nexport const FormModalTitle = styled.div.withConfig({ displayName: \"FormModalTitle\", componentId: \"sc-12jr598\" }) `\n    flex-grow: 1;\n`;\nexport const FormModalCloseButton = styled.button.withConfig({ displayName: \"FormModalCloseButton\", componentId: \"sc-eccf5t\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 0.5rem;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n\n    &:disabled {\n        opacity: 0.2;\n        cursor: not-allowed;\n    }\n\n    & > svg {\n        width: 14px;\n        height: 14px;\n    }\n`;\nexport const SectionHeadline = styled.h4.withConfig({ displayName: \"SectionHeadline\", componentId: \"sc-1ycklcf\" }) `\n    font-size: 14px;\n    font-weight: normal;\n    line-height: 24px;\n    margin: 20px 0 8px;\n    display: flex;\n    align-items: center;\n    &:first-of-type {\n        margin: 0 0 8px;\n    }\n`;\nexport const Hint = styled.div.withConfig({ displayName: \"Hint\", componentId: \"sc-1s31m8e\" }) `\n    color: ${COLORS.primaryLight};\n    font-size: 12px;\n    margin-top: 8px;\n    line-height: 20px;\n\n    p {\n        margin: 0;\n        width: 90%;\n    }\n\n    p + p {\n        margin-top: 0.25em;\n    }\n`;\nexport const Section = styled.div.withConfig({ displayName: \"Section\", componentId: \"sc-9bdmf7\" }) `\n    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);\n    background: ${COLORS.section};\n    border-radius: 8px;\n    padding: 16px;\n\n    ${Label} {\n        line-height: 20px;\n    }\n\n    & + & {\n        margin-top: 16px;\n    }\n`;\nexport const Prop = styled.em.withConfig({ displayName: \"Prop\", componentId: \"sc-y9p5e4\" }) `\n    color: ${COLORS.primaryLight};\n    display: block;\n    flex-grow: 1;\n    font-size: 12px;\n    font-style: normal;\n    font-weight: ${MEDIUM};\n    opacity: 0.7;\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            color: ${COLORS.error};\n        `}\n`;\nexport const PropValue = styled.div.withConfig({ displayName: \"PropValue\", componentId: \"sc-2u2mtk\" }) `\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport const PropList = styled.ul.withConfig({ displayName: \"PropList\", componentId: \"sc-1qqs6nq\" }) `\n    background: ${COLORS.secondaryLight};\n    font-size: 14px;\n    list-style: none;\n    margin: 16px 0 0;\n    padding: 16px;\n    border-radius: 8px;\n    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);\n\n    li {\n        align-items: center;\n        display: flex;\n        gap: 8px;\n    }\n\n    li + li {\n        margin-top: 16px;\n    }\n`;\nexport const GroupHeadline = styled.h2.withConfig({ displayName: \"GroupHeadline\", componentId: \"sc-1mq7i5b\" }) `\n    font-size: 18px;\n    line-height: 24px;\n    font-weight: ${REGULAR};\n    margin: 0 0 24px;\n    border-bottom: 1px solid #efefef;\n    padding: 0 0 16px;\n`;\nexport const Group = styled.div.withConfig({ displayName: \"Group\", componentId: \"sc-1jeu5h7\" }) `\n    & + & {\n        margin-top: 40px;\n    }\n`;\nexport const WingedLabelWrap = styled.div.withConfig({ displayName: \"WingedLabelWrap\", componentId: \"sc-11u2edf\" }) `\n    display: flex;\n    align-items: center;\n\n    ${Label} {\n        flex-grow: 1;\n        min-width: 0;\n    }\n\n    ${Label} + ${Label} {\n        flex-grow: 0;\n    }\n`;\nexport const ErrorWrap = styled.div.withConfig({ displayName: \"ErrorWrap\", componentId: \"sc-kay23g\" }) `\n    text-align: right;\n`;\nexport const ErrorLabel = styled(Label).withConfig({ displayName: \"ErrorLabel\", componentId: \"sc-4qf3r8\" }) `\n    color: ${COLORS.error};\n    opacity: 0.7;\n`;\nexport const TextInput = styled.input.withConfig({ displayName: \"TextInput\", componentId: \"sc-1bpiaby\" }) `\n    background: none;\n    border: 0;\n    backface-visibility: hidden;\n    font-size: inherit;\n    height: 100%;\n    color: ${COLORS.primary};\n    padding: 0 18px;\n    flex-grow: 1;\n    outline: 0;\n    min-width: 48px;\n\n    ::-webkit-outer-spin-button,\n    ::-webkit-inner-spin-button {\n        -webkit-appearance: none;\n        margin: 0;\n    }\n\n    &[type='number'] {\n        -moz-appearance: textfield;\n    }\n\n    &::placeholder {\n        color: ${COLORS.primaryDisabled};\n    }\n`;\nexport const TextareaInput = styled.textarea.withConfig({ displayName: \"TextareaInput\", componentId: \"sc-qfm17k\" }) `\n    background: none;\n    border: 0;\n    backface-visibility: hidden;\n    font-size: inherit;\n    height: 100%;\n    color: ${COLORS.primary};\n    padding: 8px 18px 36px;\n    flex-grow: 1;\n    outline: 0;\n    resize: none;\n\n    ${({ $minHeight }) => $minHeight &&\n    css `\n            min-height: ${$minHeight}px;\n        `}\n\n    ::-webkit-outer-spin-button,\n    ::-webkit-inner-spin-button {\n        -webkit-appearance: none;\n        margin: 0;\n    }\n\n    &::placeholder {\n        color: ${COLORS.primaryDisabled};\n    }\n`;\nexport const TextareaCounter = styled.span.withConfig({ displayName: \"TextareaCounter\", componentId: \"sc-1n2jkqm\" }) `\n    position: absolute;\n    bottom: 8px;\n    right: 18px;\n    color: ${COLORS.primaryLight};\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            color: ${COLORS.error};\n        `}\n`;\nconst Appendix = styled.div.withConfig({ displayName: \"Appendix\", componentId: \"sc-1d79nts\" }) `\n    align-items: center;\n    display: flex;\n    flex-shrink: 0;\n    height: 100%;\n`;\nexport const TextAppendix = styled(Appendix).withConfig({ displayName: \"TextAppendix\", componentId: \"sc-1hfakpf\" }) `\n    padding: 0 18px;\n`;\nexport const FieldWrap = styled.div.withConfig({ displayName: \"FieldWrap\", componentId: \"sc-11sn36l\" }) `\n    display: flex;\n    position: relative;\n    border: 1px solid transparent;\n    align-items: center;\n    background: ${COLORS.primaryContrast};\n    font-size: 14px;\n    border-radius: 8px;\n    min-height: 40px;\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);\n\n    :focus-within {\n        box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);\n    }\n\n    & + ${Label} {\n        margin-top: 24px;\n    }\n\n    ${TextAppendix} {\n        border-left: 1px solid ${COLORS.Border};\n    }\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            border: 1px solid ${COLORS.error};\n\n            ${TextAppendix} {\n                border-color: ${COLORS.error};\n            }\n        `}\n\n    ${({ $grayedOut = false }) => $grayedOut &&\n    css `\n            border-color: ${COLORS.secondaryLight};\n            background: ${COLORS.secondaryLight};\n        `}\n\n    ${({ $top = false }) => $top &&\n    css `\n            border-radius: 8px 8px 0 0;\n        `}\n\n    ${({ $bottom = false }) => $bottom &&\n    css `\n            border-radius: 0 0 8px 8px;\n            border-top: 1px solid;\n            border-color: ${COLORS.secondaryLight};\n        `}\n\n    ${({ $padded = false }) => $padded &&\n    css `\n            padding: 0 16px;\n        `}\n`;\nexport const CopyButtonWrapAppendix = styled(Appendix).withConfig({ displayName: \"CopyButtonWrapAppendix\", componentId: \"sc-1ekm106\" }) `\n    padding: 0 16px 0 0;\n\n    button {\n        align-items: center;\n        appearance: none;\n        background: ${COLORS.primaryContrast};\n        border: 0;\n        color: ${COLORS.primaryLight};\n        display: flex;\n        height: 24px;\n        justify-content: center;\n        width: 24px;\n    }\n`;\nexport const IconWrapAppendix = styled(Appendix).withConfig({ displayName: \"IconWrapAppendix\", componentId: \"sc-1jvm6jt\" }) `\n    color: ${COLORS.primaryDisabled};\n    padding-right: 10px;\n`;\nfunction getMaxButtonAttrs() {\n    return {\n        type: 'button',\n        children: 'MAX',\n    };\n}\nexport const MaxButton = styled.button.attrs(getMaxButtonAttrs).withConfig({ displayName: \"MaxButton\", componentId: \"sc-4ixbdm\" }) `\n    appearance: none;\n    background: #f8f8f8;\n    border: 0;\n    border-radius: 4px;\n    color: #0324ff;\n    flex: 0;\n    font-size: 12px;\n    font-weight: ${MEDIUM};\n    line-height: normal;\n    padding: 2px 4px;\n\n    & + * {\n        margin-left: 12px;\n    }\n`;\n","import React, { useState, useCallback, useRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport AvatarEditor from 'react-avatar-editor';\nimport { Slider } from '~/components/Slider';\nimport BaseModal, { Footer } from '~/modals/BaseModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { FormModalCloseButton, FormModalContent, FormModalHead, FormModalRoot, FormModalTitle, } from '~/modals/FormModal';\nimport { Button } from '~/components/Button';\nimport { COLORS } from '~/shared/utils/styled';\nimport MaskSvg from '~/shared/assets/images/mask.svg';\nimport { RejectionReason } from '~/utils/exceptions';\nconst MAX_WIDTH = 1024;\n// only width is considered because images returned from the cropper will always be squared\nexport const getCroppedAndResizedBlob = async (imageUrl, cropInfo) => {\n    const imageElement = document.createElement('img');\n    await new Promise((resolve) => {\n        imageElement.onload = () => resolve(null);\n        imageElement.src = imageUrl;\n    });\n    let canvas = document.createElement('canvas');\n    const cropCanvasContext = canvas.getContext('2d');\n    const x = Math.round(imageElement.width * cropInfo.x);\n    const y = Math.round(imageElement.height * cropInfo.y);\n    const width = Math.round(imageElement.width * cropInfo.width);\n    const height = Math.round(imageElement.height * cropInfo.height);\n    canvas.width = width;\n    canvas.height = height;\n    cropCanvasContext.drawImage(imageElement, x, y, width, height, 0, 0, width, height);\n    if (canvas.width > MAX_WIDTH) {\n        const resizedCanvas = document.createElement('canvas');\n        const resizedCanvasContext = resizedCanvas.getContext('2d');\n        // Start with original image size\n        resizedCanvas.width = canvas.width;\n        resizedCanvas.height = canvas.height;\n        // Draw the original image on the (temp) resizing canvas\n        resizedCanvasContext.drawImage(canvas, 0, 0);\n        // Quickly reduce the size by 50% each time in few iterations until the size is less then\n        // 2x time the target size - the motivation for it, is to reduce the aliasing that would have been\n        // created with direct reduction of very big image to small image\n        while (resizedCanvas.width * 0.5 > MAX_WIDTH) {\n            resizedCanvas.width *= 0.5;\n            resizedCanvas.height *= 0.5;\n            resizedCanvasContext.drawImage(resizedCanvas, 0, 0, resizedCanvas.width, resizedCanvas.height);\n        }\n        // Now do final resize for the resizingCanvas to meet the dimension requirments\n        // directly to the output canvas, that will output the final image\n        resizedCanvas.width = MAX_WIDTH;\n        resizedCanvas.height = (resizedCanvas.width * canvas.height) / canvas.width;\n        resizedCanvasContext.drawImage(canvas, 0, 0, resizedCanvas.width, resizedCanvas.height);\n        canvas = resizedCanvas;\n    }\n    return await new Promise((resolve) => canvas.toBlob(resolve));\n};\nconst CropImageModal = ({ imageUrl, onResolve = (file) => file, onReject = () => { }, title = 'Scale and crop your image', mask = 'none', ...props }) => {\n    const editorRef = useRef(null);\n    const [sliderValue, setSliderValue] = useState(1);\n    const onSave = useCallback(async () => {\n        if (editorRef.current) {\n            const blob = await getCroppedAndResizedBlob(imageUrl, editorRef.current.getCroppingRect());\n            if (!blob) {\n                console.warn('Failed to get the blob');\n                return;\n            }\n            onResolve(new File([blob], 'coverImage.png'));\n        }\n    }, [onResolve, editorRef, imageUrl]);\n    return (React.createElement(BaseModal, { ...props, onReject: onReject }, (close) => (React.createElement(FormModalRoot, null,\n        React.createElement(FormModalHead, null,\n            React.createElement(FormModalTitle, null, title),\n            React.createElement(FormModalCloseButton, { type: \"button\", onClick: close },\n                React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n        React.createElement(FormModalContent, null,\n            React.createElement(\"div\", null,\n                React.createElement(AvatarEditorWrap, null,\n                    React.createElement(StyledAvatarEditor, { ref: editorRef, image: imageUrl, width: 1024, height: 1024, border: [0, 0], borderRadius: 0, color: [255, 255, 255, 0.6], scale: (100 + sliderValue) / 100, rotate: 0, \"$mask\": mask })),\n                React.createElement(ZoomControls, null,\n                    React.createElement(ZoomIcon, { name: 'zoomOut' }),\n                    React.createElement(ZoomSlider, { min: 0, max: 200, value: sliderValue, onChange: setSliderValue }),\n                    React.createElement(ZoomIcon, { name: 'zoomIn' })))),\n        React.createElement(Footer, { \"$borderless\": true, \"$autoHeight\": true },\n            React.createElement(ButtonsContainer, null,\n                React.createElement(StyledButton, { onClick: onSave }, \"Crop\"),\n                React.createElement(StyledButton, { kind: \"secondary\", onClick: () => void close(RejectionReason.CancelButton) }, \"Cancel\")))))));\n};\nexport default CropImageModal;\nconst StyledAvatarEditor = styled(AvatarEditor).withConfig({ displayName: \"StyledAvatarEditor\", componentId: \"sc-81f53u\" }) `\n    width: 100% !important;\n    height: auto !important;\n\n    ${({ $mask }) => $mask === 'round' &&\n    css `\n            mask: url(${MaskSvg}) center;\n            mask-size: 100% 100%;\n        `}\n`;\nconst AvatarEditorWrap = styled.div.withConfig({ displayName: \"AvatarEditorWrap\", componentId: \"sc-15ufzw2\" }) `\n    display: flex;\n    background-color: black;\n`;\nconst ZoomSlider = styled(Slider).withConfig({ displayName: \"ZoomSlider\", componentId: \"sc-davo35\" }) `\n    width: 50%;\n    min-width: 200px;\n    margin: 0 12px;\n`;\nconst ZoomControls = styled.div.withConfig({ displayName: \"ZoomControls\", componentId: \"sc-pbksug\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin-top: 35px;\n`;\nconst ZoomIcon = styled(SvgIcon).withConfig({ displayName: \"ZoomIcon\", componentId: \"sc-mle32t\" }) `\n    color: ${COLORS.link};\n    width: 20px;\n`;\nconst ButtonsContainer = styled.div.withConfig({ displayName: \"ButtonsContainer\", componentId: \"sc-smxesj\" }) `\n    display: flex;\n    flex-direction: column;\n    width: 100%;\n    margin: 40px 0 30px;\n`;\nconst StyledButton = styled(Button).withConfig({ displayName: \"StyledButton\", componentId: \"sc-d3dtj2\" }) `\n    margin-bottom: 10px;\n    width: 100%;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Anchor, useBoundingClientRect } from './Anchor';\nexport function Tooltip({ children, content, anchorDisplay }) {\n    const [isOpen, toggle] = useState(false);\n    useEffect(() => {\n        /**\n         * Let's dismiss tooltips on scroll to avoid temporarily\n         * stranded-looking ones.\n         */\n        function scrollSpy() {\n            toggle(false);\n        }\n        window.addEventListener('scroll', scrollSpy, true);\n        return () => {\n            window.removeEventListener('scroll', scrollSpy, true);\n        };\n    }, []);\n    return (React.createElement(Anchor, { component: TooltipComponent, componentProps: {\n            children: content,\n            visible: isOpen,\n        }, display: anchorDisplay, onMouseEnter: () => void toggle(true), onMouseLeave: () => void toggle(false), translate: (r) => (r ? [r.x + r.width / 2, r.y + window.scrollY] : [0, 0]) }, children));\n}\nfunction TooltipComponent({ x, y, visible = false, children, ...props }) {\n    const ref = useRef(null);\n    const dx = useBoundingClientRect(ref, (rect) => {\n        if (!rect) {\n            return 0;\n        }\n        const { clientWidth } = document.documentElement;\n        if (x > clientWidth / 2) {\n            return Math.min(0, clientWidth - x - rect.width / 2);\n        }\n        return -Math.min(0, x - rect.width / 2);\n    });\n    const [mounted, setMounted] = useState(visible);\n    const [animated, setAnimated] = useState(visible);\n    useEffect(() => {\n        let mounted = true;\n        if (!visible) {\n            return;\n        }\n        setMounted(true);\n        setTimeout(() => {\n            if (mounted) {\n                setAnimated(true);\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [visible]);\n    return (mounted && (React.createElement(TooltipRoot, { ...props, onTransitionEnd: ({ propertyName, target }) => {\n            /**\n             * In this block we remove the tooltip from DOM if its element\n             * becomes invisible.\n             */\n            if (propertyName !== 'visibility') {\n                return;\n            }\n            if (!(target instanceof HTMLDivElement)) {\n                return;\n            }\n            if (window.getComputedStyle(target).visibility === 'hidden') {\n                setAnimated(false);\n                setMounted(false);\n            }\n        }, \"$visible\": animated && visible, ref: ref, style: {\n            transform: `translate(${x | 0}px, ${y | 0}px) translate(-50%, -100%) translateY(-10px) translateX(${dx | 0}px)`,\n        } },\n        React.createElement(TooltipBody, null,\n            React.createElement(Indicator, { style: {\n                    transform: `translate(-50%, -50%) translateY(-2px)  translateX(${-dx | 0}px) rotate(45deg)`,\n                } }),\n            React.createElement(TooltipContent, null, children)))));\n}\nconst TooltipBody = styled.div.withConfig({ displayName: \"TooltipBody\", componentId: \"sc-1r9zbfq\" }) `\n    border-radius: 8px;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    transform: translateY(4px);\n    transition: 350ms transform;\n    white-space: normal;\n`;\nconst TooltipRoot = styled.div.withConfig({ displayName: \"TooltipRoot\", componentId: \"sc-1vemdf9\" }) `\n    left: 0;\n    max-width: min(256px, 100%);\n    opacity: 0;\n    padding: 0 8px;\n    pointer-events: none;\n    position: absolute;\n    top: 0;\n    transition: 350ms;\n    transition-delay: 350ms, 0s;\n    transition-property: visibility, opacity;\n    visibility: hidden;\n    z-index: 9999;\n\n    ${({ $visible = false }) => $visible &&\n    css `\n            opacity: 1;\n            pointer-events: auto;\n            transition-delay: 0s;\n            visibility: visible;\n\n            ${TooltipBody} {\n                transform: translateY(0);\n            }\n        `}\n`;\nconst TooltipContent = styled.div.withConfig({ displayName: \"TooltipContent\", componentId: \"sc-1sgc98g\" }) `\n    background: white;\n    border-radius: 8px;\n    color: #525252;\n    font-size: 12px;\n    line-height: 1.5em;\n    max-width: max-content;\n    padding: 8px 12px;\n    position: relative;\n    width: 100%;\n\n    > ul,\n    > p {\n        margin: 0;\n    }\n\n    > p + ul,\n    > ul + p,\n    > p + p {\n        margin-top: 0.5em;\n    }\n\n    > ul li + li {\n        margin-top: 0.25em;\n    }\n\n    > ul {\n        list-style: none;\n        padding: 0 0 0 12px;\n        position: relative;\n    }\n\n    > ul li::before {\n        content: '•';\n        display: block;\n        position: absolute;\n        left: 0;\n    }\n`;\nconst Indicator = styled.div.withConfig({ displayName: \"Indicator\", componentId: \"sc-hnn02x\" }) `\n    background: white;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    position: absolute;\n    width: 12px;\n    height: 12px;\n    border-radius: 2px;\n    left: 50%;\n    top: 100%;\n\n    ::before {\n        background: transparent;\n        content: '';\n        height: 12px;\n        position: absolute;\n        transform: rotate(-45deg) translateY(12px);\n        width: 12px;\n    }\n`;\nexport const TooltipIconWrap = styled.div.withConfig({ displayName: \"TooltipIconWrap\", componentId: \"sc-1jwjb5u\" }) `\n    color: ${({ $color = 'inherit' }) => $color};\n\n    span[role='img'],\n    svg {\n        display: block;\n        ${({ $svgSize }) => {\n    if ($svgSize) {\n        return css `\n                    width: ${$svgSize.width};\n                    height: ${$svgSize.height};\n                `;\n    }\n}}\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { Tooltip } from '~/components/Tooltip';\n/**\n * Question mark icon with a tooltip.\n */\nexport function Hint({ children }) {\n    return (React.createElement(Tooltip, { content: children },\n        React.createElement(IconWrap, null,\n            React.createElement(QuestionMarkIcon, null))));\n}\nexport const IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1jfme6l\" }) `\n    align-items: center;\n    color: ${({ $color = 'inherit' }) => $color};\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    position: relative;\n    width: 24px;\n`;\nfunction getQuestionMarkIconAttrs() {\n    return { name: 'outlineQuestionMark' };\n}\nconst QuestionMarkIcon = styled(SvgIcon).attrs(getQuestionMarkIconAttrs).withConfig({ displayName: \"QuestionMarkIcon\", componentId: \"sc-1yzmog0\" }) `\n    display: block;\n    height: 16px;\n    width: 16px;\n`;\n","import React, { useEffect, useRef, useState, } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Anchor, useBoundingClientRect } from '~/components/Anchor';\nimport { Tooltip } from '~/components/Tooltip';\nimport EnterIcon from '~/shared/assets/icons/enter.svg';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nexport function PropertyDropdown({ onDismiss, toggleIcon = React.createElement(React.Fragment, null), value = '', valuePlaceholder = '', ...props }) {\n    const [open, setOpen] = useState(false);\n    const displayValue = valuePlaceholder ? value || valuePlaceholder : null;\n    const content = (React.createElement(Toggle, { type: \"button\", onClick: () => {\n            setOpen(true);\n            onDismiss?.();\n        }, \"$active\": open },\n        React.createElement(IconWrap, null, toggleIcon),\n        displayValue && React.createElement(Value, { \"$unset\": !value }, displayValue)));\n    return (React.createElement(Anchor, { component: PropertyPopover, componentProps: {\n            ...props,\n            onDismiss: () => {\n                setOpen(false);\n            },\n            open,\n            value,\n        }, translate: (r) => (r ? [r.x, r.y + r.height + window.scrollY] : [0, 0]) }, value && !valuePlaceholder ? (React.createElement(Tooltip, { content: value }, content)) : (content)));\n}\nfunction PropertyPopover(props) {\n    const { disabled = false, error = '', onChange, onDismiss, onSubmit, open = false, placeholder, required = false, submitLabel = 'Submit', title = 'Property', value: valueProp = '', x, y, } = props;\n    const [value, setValue] = useState(valueProp);\n    useEffect(function syncValueWithUpstream() {\n        setValue(valueProp);\n    }, [valueProp, open]);\n    const bodyRef = useRef(null);\n    const onDismissRef = useRef(onDismiss);\n    if (onDismissRef.current !== onDismiss) {\n        onDismissRef.current = onDismiss;\n    }\n    useEffect(() => {\n        if (!open) {\n            return () => { };\n        }\n        function onMouseDown(e) {\n            if (!(e.target instanceof Element)) {\n                return;\n            }\n            if (bodyRef.current?.contains(e.target) === true) {\n                return;\n            }\n            onDismissRef.current?.();\n        }\n        window.addEventListener('mousedown', onMouseDown);\n        return () => {\n            window.removeEventListener('mousedown', onMouseDown);\n        };\n    }, [open]);\n    const dx = useBoundingClientRect(bodyRef, (r) => {\n        if (!r || !open) {\n            return 0;\n        }\n        return Math.min(0, document.documentElement.clientWidth - (x + r.width + 8));\n    });\n    return (open && (React.createElement(PropertyPopoverRoot, { style: {\n            '--propertyDropdownX': `${x | 0}px`,\n            '--propertyDropdownY': `${y | 0}px`,\n        } },\n        React.createElement(PropertyPopoverBody, { onSubmit: (e) => {\n                e.preventDefault();\n                e.stopPropagation();\n                try {\n                    onSubmit?.(value);\n                }\n                catch (e) {\n                    /**\n                     * If `onSubmit` explodes we don't dismiss the dropdown. Devs can\n                     * do whatever they want with it. It's a feature. ;)\n                     */\n                    console.warn('Failed to submit property value', e);\n                    return;\n                }\n                onDismiss?.();\n            }, ref: bodyRef, onKeyDown: (e) => {\n                if (e.key === 'Escape') {\n                    onDismiss?.();\n                    e.stopPropagation();\n                }\n            }, style: {\n                '--propertyDropdownDeltaX': `${dx}px`,\n            } },\n            React.createElement(Header, null,\n                React.createElement(Title, null, title),\n                !required && React.createElement(Optional, null, \"Optional\")),\n            React.createElement(InputWrap, null,\n                React.createElement(Input, { disabled: disabled, autoFocus: true, placeholder: placeholder, type: \"text\", value: value, onKeyDown: (e) => {\n                        if (e.key === 'Escape' && value !== valueProp) {\n                            setValue(valueProp);\n                            onChange?.();\n                            e.stopPropagation();\n                        }\n                    }, onChange: (e) => {\n                        setValue(e.target.value);\n                        onChange?.();\n                    } }),\n                React.createElement(EnterButton, { type: \"submit\", \"$visible\": !!value || !required, disabled: disabled },\n                    React.createElement(\"img\", { src: EnterIcon }))),\n            error ? (React.createElement(ValidationError, null, error)) : (React.createElement(Submit, { type: \"submit\", disabled: disabled },\n                React.createElement(PlusIcon, null),\n                submitLabel))))));\n}\nconst PropertyPopoverRoot = styled.div.withConfig({ displayName: \"PropertyPopoverRoot\", componentId: \"sc-je4jwl\" }) `\n    --propertyDropdownX: 0;\n    --propertyDropdownY: 0;\n\n    height: 0;\n    left: 0;\n    position: absolute;\n    top: 0;\n    transform: translate(var(--propertyDropdownX), var(--propertyDropdownY))\n        translateY(8px);\n    width: 0;\n    z-index: 12;\n`;\nconst PropertyPopoverBody = styled.form.withConfig({ displayName: \"PropertyPopoverBody\", componentId: \"sc-12feyaj\" }) `\n    --propertyDropdownDeltaX: 0;\n\n    background-color: #ffffff;\n    border-radius: 8px;\n    box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.05), 0 0 2px rgba(0, 0, 0, 0.25),\n        0 4px 10px rgba(0, 0, 0, 0.1);\n    padding: 16px;\n    transform: translateX(var(--propertyDropdownDeltaX));\n    width: 320px;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-15ijpke\" }) `\n    align-items: center;\n    display: flex;\n    line-height: 16px;\n    margin-bottom: 12px;\n`;\nconst Optional = styled.div.withConfig({ displayName: \"Optional\", componentId: \"sc-9d6338\" }) `\n    color: ${COLORS.primaryDisabled};\n    font-size: 12px;\n`;\nconst Title = styled.h4.withConfig({ displayName: \"Title\", componentId: \"sc-6rm546\" }) `\n    flex-grow: 1;\n    font-size: 14px;\n    font-weight: 400;\n    margin: 0;\n`;\nconst Input = styled.input.withConfig({ displayName: \"Input\", componentId: \"sc-1bdc7fk\" }) `\n    appearance: none;\n    border: 1px solid ${COLORS.secondaryHover};\n    border-radius: 4px;\n    color: inherit;\n    font-size: 14px;\n    line-height: 30px;\n    outline: 0;\n    padding: 8px 12px;\n    padding-right: 35px;\n    transition: 0.35s border-color;\n    width: 100%;\n\n    :placeholder-shown {\n        padding-right: 0;\n    }\n\n    ::placeholder {\n        color: ${COLORS.disabled};\n    }\n\n    :focus {\n        border-color: ${COLORS.focus};\n    }\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            outline-color: ${COLORS.error} !important;\n        `}\n`;\nconst InputWrap = styled.div.withConfig({ displayName: \"InputWrap\", componentId: \"sc-f27hus\" }) `\n    position: relative;\n`;\nconst EnterButton = styled.button.withConfig({ displayName: \"EnterButton\", componentId: \"sc-zb1g63\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    opacity: 0;\n    padding: 0;\n    pointer-events: none;\n    position: absolute;\n    right: 0;\n    top: 50%;\n    transform: translateX(-12px) translateY(-50%);\n    transition: 0.5s ease-out;\n    transition-delay: 0.5s, 0s;\n    transition-property: visibility, opacity;\n    visibility: hidden;\n\n    img {\n        display: block;\n    }\n\n    ${({ $visible = false }) => $visible &&\n    css `\n            opacity: 1;\n            pointer-events: auto;\n            transition-delay: 0s;\n            transition-duration: 0.1s;\n            transition-timing-function: ease-in;\n            visibility: visible;\n        `}\n`;\nfunction getPlusIconAttrs() {\n    return {\n        name: 'plusSmall',\n    };\n}\nconst PlusIcon = styled(SvgIcon).attrs(getPlusIconAttrs).withConfig({ displayName: \"PlusIcon\", componentId: \"sc-yimxa8\" }) `\n    display: block;\n    height: 10px;\n    margin-right: 5px;\n    width: 10px;\n`;\nconst Submit = styled.button.withConfig({ displayName: \"Submit\", componentId: \"sc-1xal8on\" }) `\n    align-items: center;\n    appearance: none;\n    background-color: ${COLORS.secondaryLight};\n    border: 0;\n    border-radius: 4px;\n    color: inherit;\n    display: flex;\n    font-size: 12px;\n    height: 40px;\n    margin-top: 8px;\n    padding: 0 10px;\n    width: 100%;\n`;\nconst ValidationError = styled.div.withConfig({ displayName: \"ValidationError\", componentId: \"sc-1q0zs13\" }) `\n    align-items: center;\n    color: ${COLORS.error};\n    display: flex;\n    font-size: 12px;\n    line-height: 1.5em;\n    margin-top: 8px;\n    min-height: 40px;\n    padding: 11px 0;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-542778\" }) `\n    flex-shrink: 0;\n    height: 16px;\n    width: 16px;\n\n    > svg {\n        display: block;\n        height: 100%;\n        width: 100%;\n    }\n\n    &:empty {\n        background: currentColor;\n        border-radius: 50%;\n    }\n`;\nconst Toggle = styled.button.withConfig({ displayName: \"Toggle\", componentId: \"sc-zyjjvm\" }) `\n    align-items: center;\n    appearance: none;\n    background-color: #ffffff;\n    box-shadow: 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);\n    display: flex;\n    border: 0;\n    border-radius: 4px;\n    height: 32px;\n    max-width: 100%;\n    min-width: 32px;\n    padding: 0 8px;\n    transition: 0.5s background-color;\n\n    &:hover {\n        background-color: ${COLORS.secondaryLight};\n        transition-duration: 0.1s;\n    }\n\n    a& {\n        color: inherit !important;\n    }\n\n    ${({ $dark: dark = false }) => dark &&\n    css `\n            box-shadow: none;\n            background-color: #1c1c1c;\n\n            &:hover {\n                background-color: #1c1c1c;\n            }\n\n            ${IconWrap} {\n                color: ${COLORS.Text};\n            }\n        `}\n\n    ${({ $active = false }) => $active &&\n    css `\n            background-color: ${COLORS.secondaryLight};\n        `}\n`;\nconst Value = styled.div.withConfig({ displayName: \"Value\", componentId: \"sc-1x2cc3s\" }) `\n    color: ${({ $unset = false }) => ($unset ? '#a3a3a3' : void 0)};\n    font-size: 14px;\n    line-height: normal;\n    margin-left: 6px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport const PropertyDropdownList = styled.ul.withConfig({ displayName: \"PropertyDropdownList\", componentId: \"sc-ag8ugh\" }) `\n    display: grid;\n    gap: 8px;\n    grid-template-columns: repeat(\n        ${({ children }) => React.Children.toArray(children).filter(Boolean).length},\n        auto\n    );\n    justify-content: start;\n    list-style: none;\n    margin: 0;\n    padding: 0;\n\n    > li {\n        min-width: 0;\n    }\n`;\nexport function PropertyDisplay(props) {\n    const { icon = React.createElement(React.Fragment, null), href = '#', displayValue, dark = false } = props;\n    const toggleProps = /^mailto:/.test(href)\n        ? {}\n        : {\n            rel: 'noopener noreferrer',\n            target: '_blank',\n        };\n    return (React.createElement(Toggle, { ...toggleProps, as: \"a\", href: href, onClick: (e) => {\n            if (href === '#') {\n                e.preventDefault();\n            }\n        }, \"$dark\": dark },\n        React.createElement(IconWrap, null, icon),\n        displayValue && React.createElement(Value, null, displayValue)));\n}\nexport const PropertyIcon = styled(SvgIcon).withConfig({ displayName: \"PropertyIcon\", componentId: \"sc-15ahgot\" }) `\n    color: ${({ $color = 'currentColor' }) => $color};\n    transition: 350ms color;\n`;\n","import get from 'lodash/get';\nconst getError = (res) => ({\n    message: get(res, 'response.data.error') ||\n        get(res, 'response.data.message') ||\n        (res && res.message) ||\n        'Something went wrong',\n    code: get(res, 'response.data.code') || null,\n    statusCode: res && res.response && res.response.status,\n    response: res.response,\n});\nexport default class RequestError extends Error {\n    constructor(res, ...args) {\n        const { message, code, statusCode, response } = getError(res);\n        super(message, ...args);\n        this.code = undefined;\n        this.statusCode = undefined;\n        this.response = undefined;\n        this.code = code;\n        this.statusCode = statusCode;\n        this.response = response;\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, RequestError);\n        }\n        Object.setPrototypeOf(this, RequestError.prototype);\n    }\n}\n","import axios from 'axios';\nimport merge from 'lodash/merge';\nimport RequestError from '~/shared/errors/RequestError';\nexport default async function request({ url, options, method = 'get', data = null, }) {\n    const defaultOptions = {\n        headers: {},\n    };\n    if (data !== null) {\n        defaultOptions.headers = {\n            ...defaultOptions.headers,\n            'Content-Type': 'application/json',\n        };\n    }\n    const requestOptions = merge(defaultOptions, options);\n    try {\n        return (await axios.request({ ...requestOptions, url, method, data })).data;\n    }\n    catch (e) {\n        throw new RequestError(e);\n    }\n}\n","import request from '~/shared/utils/request';\nexport const post = (args) => request({ ...args, method: 'post' });\n","import { z } from 'zod';\nimport { post } from '~/shared/utils/api';\nimport { PINATA_UPLOAD_ENDPOINT, getPinataJwt } from '~/utils/ipfs';\nconst UploadResponse = z.object({\n    data: z.object({\n        cid: z.string().min(1),\n    }),\n});\n/**\n * Uploads an image to the public IPFS network via Pinata.\n * @returns The CID of the uploaded file.\n */\nexport async function postImage(image) {\n    const jwt = getPinataJwt();\n    if (!jwt) {\n        throw new Error('Image upload is not configured (missing PINATA_JWT)');\n    }\n    const data = new FormData();\n    data.append('file', image, image.name);\n    data.append('network', 'public');\n    const uploadResult = await post({\n        url: PINATA_UPLOAD_ENDPOINT,\n        options: {\n            headers: {\n                /**\n                 * Overrides the default `application/json` so axios keeps the\n                 * FormData intact (the browser fills in the actual boundary).\n                 */\n                'Content-Type': 'multipart/form-data',\n                Authorization: `Bearer ${jwt}`,\n            },\n        },\n        data,\n    });\n    return UploadResponse.parse(uploadResult).data.cid;\n}\n","import { isError, } from 'ethers';\nimport { getWalletWeb3Provider } from '~/shared/stores/wallet';\nexport async function call(contract, method, params) {\n    const { args, onReceipt, replaceable = true } = params;\n    const provider = await getWalletWeb3Provider();\n    const blockNumber = await provider.getBlockNumber();\n    let tx = await contract[method](...args);\n    if (replaceable) {\n        tx = tx.replaceableTransaction(blockNumber);\n    }\n    for (;;) {\n        try {\n            const receipt = await tx.wait();\n            if (receipt) {\n                await onReceipt?.(receipt);\n            }\n            break;\n        }\n        catch (e) {\n            if (!isError(e, 'TRANSACTION_REPLACED') || e.cancelled) {\n                throw e;\n            }\n            tx = e.replacement;\n        }\n    }\n}\n","import { Contract, parseEther } from 'ethers';\nimport { postImage } from '~/services/images';\nimport { getSigner } from '~/shared/stores/wallet';\nimport { toBN } from '~/utils/bn';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { getPublicProvider } from '~/utils/providers';\nimport { toastedOperation, toastedOperations } from '~/utils/toastedOperation';\nimport { call } from '~/utils/tx';\nexport async function createOperator(chainId, params, { onReceipt } = {}) {\n    const { cut, name, redundancyFactor, description, imageToUpload, url, email, twitter, x, telegram, reddit, linkedIn, } = params;\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const walletAddress = await signer.getAddress();\n    const imageIpfsCid = imageToUpload ? await postImage(imageToUpload) : undefined;\n    const factory = new Contract(getContractAddress('operatorFactory', chainId), getContractAbi('operatorFactory'), signer);\n    const metadata = {\n        name,\n        description,\n        redundancyFactor,\n        imageIpfsCid,\n        url: url || undefined,\n        email: email || undefined,\n        twitter: twitter || undefined,\n        x: x || undefined,\n        telegram: telegram || undefined,\n        reddit: reddit || undefined,\n        linkedIn: linkedIn || undefined,\n    };\n    const poolTokenName = `StreamrOperator-${walletAddress.slice(-5)}`;\n    const operatorMetadata = JSON.stringify(metadata);\n    const policies = [\n        getContractAddress('operatorDefaultDelegationPolicy', chainId),\n        getContractAddress('operatorDefaultExchangeRatePolicy', chainId),\n        getContractAddress('operatorDefaultUndelegationPolicy', chainId),\n    ];\n    const operatorsCutFraction = parseEther(cut.toString()) / 100n;\n    const policyParams = [0, 0, 0];\n    await toastedOperation('Operator deployment', async () => {\n        await call(factory, 'deployOperator', {\n            args: [\n                operatorsCutFraction,\n                poolTokenName,\n                operatorMetadata,\n                policies,\n                policyParams,\n            ],\n            onReceipt,\n        });\n    });\n}\nexport async function updateOperator(chainId, operator, mods, { onReceipt } = {}) {\n    const { name, redundancyFactor, description = '', imageToUpload, cut, url, email, twitter, x, telegram, reddit, linkedIn, } = mods;\n    const { metadata } = operator;\n    const operations = [];\n    const hasUpdateCutOperation = !operator.stakes.length && operator.operatorsCut !== cut;\n    const hasUpdateMetadataOperation = !!imageToUpload ||\n        name !== metadata.name ||\n        description !== metadata.description ||\n        redundancyFactor !== metadata.redundancyFactor ||\n        url !== metadata.url ||\n        email !== metadata.email ||\n        twitter !== metadata.twitter ||\n        x !== metadata.x ||\n        telegram !== metadata.telegram ||\n        reddit !== metadata.reddit ||\n        linkedIn !== metadata.linkedIn;\n    if (hasUpdateCutOperation) {\n        operations.push({\n            id: 'updateCutOperation',\n            label: \"Update the owner's cut value\",\n        });\n    }\n    if (hasUpdateMetadataOperation) {\n        operations.push({\n            id: 'updateMetadataOperation',\n            label: \"Update the operator's metadata\",\n        });\n    }\n    if (!operations.length) {\n        return;\n    }\n    const blockNumbers = [];\n    await toastedOperations(operations, async (next) => {\n        if (hasUpdateCutOperation) {\n            await networkPreflight(chainId);\n            const operatorContract = new Contract(operator.id, getContractAbi('operator'), await getSigner());\n            await call(operatorContract, 'updateOperatorsCutFraction', {\n                args: [parseEther(toBN(cut).toString()) / 100n],\n                onReceipt: async (receipt) => {\n                    blockNumbers.push(receipt.blockNumber);\n                    if (!hasUpdateMetadataOperation) {\n                        await onReceipt?.(receipt);\n                    }\n                },\n            });\n            next();\n        }\n        if (hasUpdateMetadataOperation) {\n            await networkPreflight(chainId);\n            const operatorContract = new Contract(operator.id, getContractAbi('operator'), await getSigner());\n            const imageIpfsCid = imageToUpload\n                ? await postImage(imageToUpload)\n                : operator.metadata.imageIpfsCid;\n            await call(operatorContract, 'updateMetadata', {\n                args: [\n                    JSON.stringify({\n                        name: name || undefined,\n                        description: description || undefined,\n                        redundancyFactor,\n                        imageIpfsCid,\n                        url: url || undefined,\n                        email: email || undefined,\n                        twitter: twitter || undefined,\n                        x: x || undefined,\n                        telegram: telegram || undefined,\n                        reddit: reddit || undefined,\n                        linkedIn: linkedIn || undefined,\n                    }),\n                ],\n                onReceipt: async (receipt) => {\n                    blockNumbers.push(receipt.blockNumber);\n                    await onReceipt?.(receipt);\n                },\n            });\n        }\n    });\n}\nexport async function delegateToOperator(chainId, operatorId, amount, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = new Contract(getContractAddress('data', chainId), getContractAbi('erc677'), signer);\n    await toastedOperation('Delegate to operator', async () => {\n        await call(contract, 'transferAndCall', {\n            args: [operatorId, amount, '0x'],\n            onReceipt,\n        });\n    });\n}\nexport async function undelegateFromOperator(chainId, operatorId, amount, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Undelegate from operator', async () => {\n        await call(operatorContract, 'undelegate', {\n            args: [amount],\n            onReceipt,\n        });\n    });\n}\nexport async function getOperatorDelegationAmount(chainId, operatorId, address) {\n    const provider = await getPublicProvider(chainId);\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), provider);\n    return operatorContract.balanceInData(address);\n}\nexport async function setOperatorNodeAddresses(chainId, operatorId, addresses, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Save node addresses', async () => {\n        await call(operatorContract, 'setNodeAddresses', {\n            args: [addresses],\n            onReceipt,\n        });\n    });\n}\nexport async function addOperatorControllerAddress(chainId, operatorId, address, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Authorise staking agent', async () => {\n        await call(operatorContract, 'grantRole', {\n            args: [await operatorContract.CONTROLLER_ROLE(), address],\n            onReceipt,\n        });\n    });\n}\nexport async function removeOperatorControllerAddress(chainId, operatorId, address, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Revoke staking agent', async () => {\n        await call(operatorContract, 'revokeRole', {\n            args: [await operatorContract.CONTROLLER_ROLE(), address],\n            onReceipt,\n        });\n    });\n}\nexport async function processOperatorUndelegationQueue(chainId, operatorId, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Process undelegation queue', async () => {\n        await call(operatorContract, 'payOutQueue', {\n            args: [0],\n            onReceipt,\n        });\n    });\n}\n","import React from 'react';\nimport styled from 'styled-components';\nconst UnstyledLogo = ({ color = '#ff5c00', opacity = '1', ...props }) => (React.createElement(\"svg\", { ...props, xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 40 40\" },\n    React.createElement(\"path\", { fill: color, fillRule: \"evenodd\", fillOpacity: opacity, d: 'M25.0093 1.8487V.6955c0-.3953-.3296-.7135-.7246-.6947-7.7532.3682-13.96' +\n            '65 6.6158-14.279 14.3823.0166.4868.4106.6142.6423.6142h1.1714c.3707 0 .' +\n            '6745-.291.6938-.661.3327-6.3895 5.4596-11.5101 11.8521-11.8341.4876-.06' +\n            '26.644-.329.644-.6535m-10.544 13.1486h1.121c.364 0 .6607-.2836.6872-.64' +\n            '65.3168-4.341 3.798-7.8035 8.1473-8.092.1945-.013.5885-.1585.5885-.6625' +\n            'V4.455c0-.4033-.342-.72-.7446-.6937-5.6266.367-10.126 4.8659-10.4932 10' +\n            '.4917-.0262.4023.2905.7443.6939.7443m10.5439-6.7767v1.1466c0 .4691-.407' +\n            '3.6379-.606.6619-2.2755.2745-4.0807 2.0756-4.3614 4.3489-.0434.352-.336' +\n            '3.6193-.691.6193h-1.1194c-.4082 0-.7332-.3504-.6925-.7566.3545-3.5418 3' +\n            '.1713-6.3581 6.7136-6.7126.4062-.0406.7567.2844.7567.6925zM38.151 24.97' +\n            '38c-.3244 0-.5909-.1564-.6535-.6438-.3241-6.3917-5.4455-11.5178-11.8358' +\n            '-11.8505-.3702-.0192-.6612-.323-.6612-.6937v-1.1713c0-.2316.1274-.6255.' +\n            '6142-.6422 7.7678.3126 14.0161 6.525 14.3845 14.277.0188.395-.2995.7245' +\n            '-.6948.7245H38.151zM25.0005 14.4314c0-.4033.342-.72.7445-.6937 5.6266.3' +\n            '671 10.126 4.8659 10.4932 10.4917.0263.4024-.2905.7444-.6939.7444h-1.14' +\n            '15c-.504 0-.6496-.3939-.6625-.5884-.2885-4.3487-3.7516-7.8294-8.0932-8.' +\n            '1461-.363-.0265-.6466-.3232-.6466-.687v-1.1209zm6.7777 10.5424h-1.1468c' +\n            '-.4692 0-.638-.4073-.662-.6059-.2745-2.2751-2.076-4.0802-4.3495-4.3607-' +\n            '.352-.0435-.6194-.3363-.6194-.6909V18.197c0-.4081.3505-.733.7567-.6925 ' +\n            '3.5423.3545 6.359 3.1709 6.7135 6.7127.0407.4061-.2843.7566-.6925.7566z' +\n            'M1.849 14.9943c.3244 0 .5909.1564.6535.6439.3241 6.3916 5.4455 11.5178 ' +\n            '11.8358 11.8504.3702.0193.6612.3231.6612.6937v1.1713c0 .2317-.1274.6256' +\n            '-.6142.6422C6.6176 29.6833.3692 23.4709.0008 15.7188c-.0188-.395.2994-.' +\n            '7245.6949-.7245H1.849zm13.1505 10.5424c0 .4033-.342.72-.7445.6938-5.626' +\n            '6-.3673-10.126-4.866-10.4932-10.4917-.0263-.4025.2905-.7445.6939-.7445h' +\n            '1.1415c.504 0 .6496.394.6625.5884.2885 4.3487 3.7516 7.8294 8.0932 8.14' +\n            '62.363.0264.6466.3231.6466.687v1.1208zM8.2218 14.9943h1.1468c.4692 0 .6' +\n            '38.4073.662.606.2746 2.275 2.076 4.08 4.3495 4.3607.352.0434.6194.3362.' +\n            '6194.6908v1.1193c0 .4081-.3505.733-.7567.6925-3.5423-.3546-6.359-3.1709' +\n            '-6.7136-6.7127-.0406-.4061.2844-.7566.6926-.7566zm6.7805 23.157c0-.3244' +\n            '.1564-.5909.644-.6535 6.3926-.324 11.5194-5.4446 11.852-11.834.0194-.37' +\n            '02.3232-.6612.6939-.6612h1.1714c.2317 0 .6256.1275.6423.6142-.3125 7.76' +\n            '66-6.5258 14.014-14.279 14.3824-.395.0188-.7246-.2994-.7246-.6948v-1.15' +\n            '31zm10.5439-13.1487c.4033 0 .7201.342.6938.7444-.3671 5.6258-4.8666 10.' +\n            '1246-10.4932 10.4917-.4025.0263-.7445-.2904-.7445-.6937v-1.1414c0-.504.' +\n            '394-.6495.5885-.6624 4.3493-.2885 7.8305-3.751 8.1473-8.092.0265-.363.3' +\n            '232-.6466.6871-.6466h1.121zm-10.544 6.7768v-1.1466c0-.4692.4075-.6379.6' +\n            '06-.6619 2.2756-.2745 4.0809-2.0757 4.3614-4.349.0435-.3518.3364-.6193.' +\n            '691-.6193H21.78c.4082 0 .7332.3505.6926.7566-.3545 3.5419-3.1712 6.3582' +\n            '-6.7136 6.7126-.4062.0407-.7567-.2843-.7567-.6924z' })));\nconst Logo = styled(UnstyledLogo).withConfig({ displayName: \"Logo\", componentId: \"sc-1jx3dcr\" }) `\n    height: 2.5em;\n    width: 2.5em;\n`;\nexport default Logo;\n","import React from 'react';\nimport { Img as ReactImg } from 'react-image';\nimport styled from 'styled-components';\nimport Logo from '~/shared/components/Logo';\nimport { getImageCrossOrigin } from '~/utils/ipfs';\nconst DefaultImagePlaceholder = ({ alt, className }) => (React.createElement(DefaultImagePlaceholderRoot, { className: className },\n    React.createElement(Logo, { color: \"black\", opacity: \"0.15\" }),\n    React.createElement(\"img\", { src: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAA\\n                AA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=\", alt: alt })));\nexport function FallbackImage({ src, alt, className, placeholder }) {\n    const crossOrigin = getImageCrossOrigin(src);\n    return (React.createElement(ReactImg, { className: className, src: src, alt: alt, \n        /**\n         * `crossorigin` (lowercase) is consumed by react-image's preloader,\n         * `crossOrigin` ends up on the rendered `<img>`. Both have to match,\n         * otherwise the browser fetches the image twice with different\n         * request modes.\n         */\n        crossorigin: crossOrigin, crossOrigin: crossOrigin, unloader: placeholder || React.createElement(DefaultImagePlaceholder, { alt: alt, className: className }) }));\n}\nconst DefaultImagePlaceholderRoot = styled.div.withConfig({ displayName: \"DefaultImagePlaceholderRoot\", componentId: \"sc-7dckr0\" }) `\n    position: relative;\n    background-image: linear-gradient(135deg, #0045ff 0%, #7200ee 100%);\n    border-radius: 2px;\n    transition: 50ms ease-in-out transform;\n\n    img {\n        width: 100%;\n        height: 100%;\n        background-color: transparent;\n    }\n\n    svg {\n        position: absolute;\n        width: 80px;\n        height: 80px;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nconst Value = styled.div.withConfig({ displayName: \"Value\", componentId: \"sc-td3lin\" }) `\n    position: absolute;\n    text-align: center;\n    transform: translateY(-50%);\n    top: 50%;\n    width: 100%;\n`;\nconst UnstyledInitials = ({ children, ...props }) => (React.createElement(\"div\", { ...props },\n    React.createElement(\"svg\", { viewBox: \"0 0 1 1\", xmlns: \"http://www.w3.org/2000/svg\" }),\n    React.createElement(Value, null, children)));\nconst Initials = styled(UnstyledInitials).withConfig({ displayName: \"Initials\", componentId: \"sc-1n9a3ew\" }) `\n    background-color: #97bac0;\n    color: #ffffff;\n    font-family: var(--mono);\n    position: relative;\n`;\nexport default Initials;\n","import React from 'react';\nimport ReactIdenticon from 'react-identicons';\nimport styled from 'styled-components';\nconst UnstyledIdenticon = ({ id, size, ...props }) => (React.createElement(\"div\", { ...props },\n    React.createElement(\"svg\", { viewBox: \"0 0 1 1\", xmlns: \"http://www.w3.org/2000/svg\" }),\n    React.createElement(ReactIdenticon, { string: id, size: size })));\nconst Identicon = styled(UnstyledIdenticon).withConfig({ displayName: \"Identicon\", componentId: \"sc-s6t0fk\" }) `\n    position: relative;\n\n    .identicon {\n        position: absolute;\n        left: 50%;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 50% !important;\n        height: 50% !important;\n    }\n`;\nIdenticon.defaultProps = {\n    size: 80,\n};\nexport default Identicon;\n","import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { isAddress } from 'web3-validator';\nimport { FallbackImage as UnstyledFallbackImage } from '~/components/FallbackImage';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Initials from './Initials';\nimport Identicon from './Identicon';\nconst FallbackImage = styled(UnstyledFallbackImage).withConfig({ displayName: \"FallbackImage\", componentId: \"sc-1vsw38k\" }) `\n    display: block;\n    height: 100%;\n    width: 100%;\n`;\nconst UnstyledAvatarImage = ({ username, name, src, upload = false, ...props }) => {\n    const placeholder = useMemo(() => {\n        if (isAddress(username)) {\n            return React.createElement(Identicon, { id: username });\n        }\n        if (name) {\n            const initials = (name || '')\n                .split(/\\s+/)\n                .filter(Boolean)\n                .map((s) => s[0])\n                .slice(0, 2)\n                .join('')\n                .toUpperCase();\n            if (initials) {\n                return React.createElement(Initials, null, initials);\n            }\n        }\n        return React.createElement(SvgIcon, { name: upload ? 'emptyAvatarUpload' : 'profileMan' });\n    }, [username, name, upload]);\n    return (React.createElement(\"div\", { ...props },\n        React.createElement(FallbackImage, { alt: name || '', src: src || '', placeholder: placeholder })));\n};\nconst AvatarImage = styled(UnstyledAvatarImage).withConfig({ displayName: \"AvatarImage\", componentId: \"sc-t4cqwz\" }) ``;\nexport default AvatarImage;\nexport const HubAvatar = styled(Identicon).withConfig({ displayName: \"HubAvatar\", componentId: \"sc-1shr3mk\" }) `\n    width: 32px;\n    height: 32px;\n    border: 1px solid #f3f3f3;\n    border-radius: 50%;\n    background-color: white;\n`;\nexport const HubImageAvatar = styled(UnstyledFallbackImage).withConfig({ displayName: \"HubImageAvatar\", componentId: \"sc-wbzfnl\" }) `\n    width: 32px;\n    height: 32px;\n    border: 1px solid #f3f3f3;\n    border-radius: 50%;\n    background-color: white;\n`;\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { randomHex } from 'web3-utils';\nimport { z } from 'zod';\nimport { Alert } from '~/components/Alert';\nimport { Button } from '~/components/Button';\nimport CropImageModal from '~/components/CropImageModal/CropImageModal';\nimport { Hint } from '~/components/Hint';\nimport { PropertyDropdown, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport { BehindIndexError } from '~/errors/BehindIndexError';\nimport { getParsedOperatorByOwnerAddress } from '~/getters';\nimport FormModal, { ErrorLabel, FieldWrap, Section, SectionHeadline, TextAppendix, TextInput, TextareaCounter, TextareaInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { createOperator, updateOperator } from '~/services/operators';\nimport AvatarImage from '~/shared/components/AvatarImage';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Label from '~/shared/components/Ui/Label';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { sleep, waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { getImageCrossOrigin } from '~/utils/ipfs';\nconst cropModal = toaster(CropImageModal, Layer.Modal);\nconst DescriptionLengthLimit = 120;\nconst Validator = z.object({\n    cut: z.coerce\n        .number()\n        .min(0, 'Value must be between 0 and 100')\n        .max(100, 'Value must be between 0 and 100'),\n    description: z.string().max(DescriptionLengthLimit, 'Description is too long'),\n    imageToUpload: z.instanceof(File).optional(),\n    name: z.string().trim().min(1, 'Name is required'),\n    redundancyFactor: z.coerce.number().min(1, 'Value must be greater or equal to 1'),\n    url: z.union([z.literal(''), z.string().url()]),\n    email: z.union([z.literal(''), z.string().email()]),\n    twitter: z.union([z.literal(''), z.string().url()]),\n    x: z.union([z.literal(''), z.string().url()]),\n    telegram: z.union([z.literal(''), z.string().url()]),\n    reddit: z.union([z.literal(''), z.string().url()]),\n    linkedIn: z.union([z.literal(''), z.string().url()]),\n});\nfunction OperatorModal({ onResolve, onReject, operator, chainId, ...props }) {\n    const [title, submitLabel] = operator\n        ? ['Edit Operator', 'Save']\n        : ['Become an Operator', 'Become an Operator'];\n    const [busy, setBusy] = useState(false);\n    const currentData = useMemo(() => ({\n        cut: operator?.operatorsCut.toString() || '',\n        description: operator?.metadata.description || '',\n        imageToUpload: undefined,\n        name: operator?.metadata.name || '',\n        redundancyFactor: operator?.metadata.redundancyFactor?.toString() || '2',\n        url: operator?.metadata.url || '',\n        email: operator?.metadata.email || '',\n        twitter: operator?.metadata.twitter || '',\n        x: operator?.metadata.x || '',\n        telegram: operator?.metadata.telegram || '',\n        reddit: operator?.metadata.reddit || '',\n        linkedIn: operator?.metadata.linkedIn || '',\n    }), [operator]);\n    const [nextData, updateNextData] = useState(currentData);\n    useEffect(() => {\n        /**\n         * Handle an update coming from the outside. It won't happen often\n         * but it can happen.\n         */\n        updateNextData(currentData);\n    }, [currentData]);\n    const changelog = {\n        imageToUpload: !!nextData.imageToUpload,\n        name: currentData.name !== nextData.name,\n        description: currentData.description !== nextData.description,\n        redundancyFactor: Number(currentData.redundancyFactor) !== Number(nextData.redundancyFactor),\n        cut: Number(currentData.cut) !== Number(nextData.cut),\n        url: currentData.url !== nextData.url,\n        email: currentData.email !== nextData.email,\n        twitter: currentData.twitter !== nextData.twitter,\n        x: currentData.x !== nextData.x,\n        telegram: currentData.telegram !== nextData.telegram,\n        reddit: currentData.reddit !== nextData.reddit,\n        linkedIn: currentData.linkedIn !== nextData.linkedIn,\n    };\n    const dirty = Object.values(changelog).some(Boolean);\n    const randomAddress = useMemo(() => randomHex(20), []);\n    const fileInputRef = useRef(null);\n    const imageBlob = (nextData.imageToUpload && URL.createObjectURL(nextData.imageToUpload)) ||\n        operator?.metadata.imageUrl;\n    const [errors, setErrors] = useState({});\n    function resetError(key) {\n        setErrors(({ [key]: _, ...c }) => c);\n    }\n    function validate(fn) {\n        try {\n            fn();\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                const newErrors = {};\n                e.issues.forEach(({ path, message }) => {\n                    newErrors[path.join('.')] = message;\n                });\n                setErrors((existingErrors) => ({\n                    ...existingErrors,\n                    ...newErrors,\n                }));\n            }\n            throw e;\n        }\n    }\n    const finalData = useMemo(() => {\n        try {\n            return Validator.parse(nextData);\n        }\n        catch (_) {\n            return null;\n        }\n    }, [nextData]);\n    const walletAddress = useWalletAccount();\n    const canSubmit = !busy && !!finalData && dirty && !!walletAddress;\n    const readonlyCut = !!operator && operator.stakes.length > 0;\n    return (React.createElement(FormModal, { ...props, title: title, canSubmit: canSubmit, submitLabel: submitLabel, submitting: busy, onBeforeAbort: (reason) => !busy && (reason !== RejectionReason.Backdrop || !dirty), onReject: onReject, onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                let blockNumber = 0;\n                if (!operator) {\n                    await createOperator(chainId, finalData, {\n                        onReceipt: ({ blockNumber: blockNo }) => {\n                            blockNumber = blockNo;\n                            return waitForIndexedBlock(chainId, blockNo);\n                        },\n                    });\n                }\n                else {\n                    await updateOperator(chainId, operator, finalData, {\n                        onReceipt: ({ blockNumber: blockNo }) => {\n                            blockNumber = blockNo;\n                            return waitForIndexedBlock(chainId, blockNo);\n                        },\n                    });\n                }\n                let operatorId = operator?.id;\n                if (!operatorId) {\n                    /**\n                     * The following loop ensures that each thrown instance of `BehindIndexError`\n                     * causes a proper retry.\n                     */\n                    for (;;) {\n                        try {\n                            /**\n                             * If the following request hits the indexer too early, i.e. before block\n                             * at `blockNumber` got ingested, it'll give us nothing (it does not know\n                             * about the operator). The above loop helps maneuver through such edge case.\n                             */\n                            operatorId = (await getParsedOperatorByOwnerAddress(chainId, walletAddress, {\n                                force: true,\n                                minBlockNumber: blockNumber,\n                            }))?.id;\n                        }\n                        catch (e) {\n                            if (!(e instanceof BehindIndexError)) {\n                                throw e;\n                            }\n                            /**\n                             * If we're behind on the indexed blocks with the operator id request\n                             * we have to retry until we're good to move forward. Let's wait 5s\n                             * and retry.\n                             */\n                            await sleep(5000);\n                            continue;\n                        }\n                        /**\n                         * After all the trying the operator id can still be nullish. In such case we don't\n                         * wanna continue. It is, after all, unexpected behaviour, especially for newly\n                         * created operator.\n                         */\n                        if (!operatorId) {\n                            throw new Error('Empty operator id');\n                        }\n                        break;\n                    }\n                }\n                onResolve?.({ operatorId, blockNumber });\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please choose the percentage for the Owner's cut\",\n            ' ',\n            React.createElement(Hint, null,\n                React.createElement(\"p\", null, \"The Owner's cut percentage is the earnings split between the Operator and its Delegators. This value can be updated as long as the Operator is not staked on any\\u00A0Sponsorships.\"))),\n        React.createElement(Section, null,\n            React.createElement(WingedLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Owner's cut percentage*\"),\n                errors?.cut && React.createElement(ErrorLabel, null, errors.cut)),\n            React.createElement(FieldWrap, { \"$invalid\": !!errors?.cut, \"$grayedOut\": readonlyCut },\n                React.createElement(TextInput, { name: \"cut\", autoFocus: !readonlyCut, onChange: ({ target: { value: cut } }) => {\n                        updateNextData((c) => ({\n                            ...c,\n                            cut,\n                        }));\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, max: 100, value: nextData.cut, disabled: readonlyCut }),\n                React.createElement(TextAppendix, null, \"%\"))),\n        readonlyCut && (React.createElement(AlertContainer, null,\n            React.createElement(Alert, { type: \"notice\", title: \"Owner's cut locked\" },\n                React.createElement(\"span\", null, \"The owner's cut can't be modified while staked. To change it, fully unstake from all sponsorships.\")))),\n        React.createElement(SectionHeadline, null,\n            \"Please input your node redundancy factor\",\n            ' ',\n            React.createElement(Hint, null,\n                React.createElement(\"p\", null, \"Sets the amount of duplicated work when running a fleet of multiple nodes. Doing redundant work protects against slashing in case some of your nodes experience failures. For example, setting this to 1 means that no duplication of work occurs (the feature is off), and setting it to 2 means that each stream assignment will be worked on by 2 nodes in your fleet.\"))),\n        React.createElement(Section, null,\n            React.createElement(WingedLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Node redundancy factor*\"),\n                errors?.redundancyFactor && (React.createElement(ErrorLabel, null, errors.redundancyFactor))),\n            React.createElement(FieldWrap, { \"$invalid\": !!errors?.redundancyFactor },\n                React.createElement(TextInput, { name: \"redundancyFactor\", onChange: ({ target: { value: redundancyFactor } }) => {\n                        updateNextData((c) => ({\n                            ...c,\n                            redundancyFactor,\n                        }));\n                    }, placeholder: \"2\", readOnly: busy, type: \"number\", min: 1, max: 100, step: 1, value: nextData.redundancyFactor }))),\n        React.createElement(AboutOperator, null,\n            React.createElement(SectionHeadline, null, \"About Operator\"),\n            React.createElement(Section, null,\n                React.createElement(WingedLabelWrap, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Display name*\"),\n                    errors?.name && React.createElement(ErrorLabel, null, errors.name)),\n                React.createElement(FieldWrap, { \"$invalid\": !!errors?.name },\n                    React.createElement(TextInput, { name: \"name\", onChange: ({ target: { value: name } }) => {\n                            updateNextData((c) => ({\n                                ...c,\n                                name,\n                            }));\n                        }, readOnly: busy, type: \"text\", value: nextData.name, placeholder: \"Name\" })),\n                React.createElement(AboutOperatorField, null,\n                    React.createElement(WingedLabelWrap, null,\n                        React.createElement(Label, { \"$wrap\": true }, \"Description\"),\n                        errors?.description && (React.createElement(ErrorLabel, null, \"Description is too long\"))),\n                    React.createElement(FieldWrap, { \"$invalid\": !!errors?.description },\n                        React.createElement(TextareaInput, { name: \"description\", onChange: ({ target: { value: description } }) => {\n                                updateNextData((c) => ({\n                                    ...c,\n                                    description,\n                                }));\n                            }, readOnly: busy, value: nextData.description, placeholder: \"Description\", \"$minHeight\": 110 }),\n                        React.createElement(TextareaCounter, { \"$invalid\": !!errors?.description },\n                            nextData.description.length,\n                            \"/\",\n                            DescriptionLengthLimit)),\n                    React.createElement(PropertyDropdownList, null,\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.url, onChange: () => {\n                                    resetError('url');\n                                }, onDismiss: () => {\n                                    resetError('url');\n                                }, onSubmit: (url) => {\n                                    resetError('url');\n                                    validate(() => {\n                                        Validator.pick({\n                                            url: true,\n                                        }).parse({ url });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        url,\n                                    }));\n                                }, placeholder: \"https://siteinfo.com\", submitLabel: \"Add site URL\", title: \"Add a site URL\", toggleIcon: React.createElement(PropertyIcon, { name: \"web\" }), value: nextData.url, valuePlaceholder: \"Site URL\" })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.email, onChange: () => {\n                                    resetError('email');\n                                }, onDismiss: () => {\n                                    resetError('email');\n                                }, onSubmit: (email) => {\n                                    resetError('email');\n                                    validate(() => {\n                                        Validator.pick({\n                                            email: true,\n                                        }).parse({ email });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        email,\n                                    }));\n                                }, placeholder: \"owner@example.com\", submitLabel: \"Add contact email\", title: \"Add a contact email\", toggleIcon: React.createElement(PropertyIcon, { name: \"email\" }), value: nextData.email, valuePlaceholder: \"Contact email\" })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.twitter, onChange: () => {\n                                    resetError('twitter');\n                                }, onDismiss: () => {\n                                    resetError('twitter');\n                                }, onSubmit: (twitter) => {\n                                    resetError('twitter');\n                                    validate(() => {\n                                        Validator.pick({\n                                            twitter: true,\n                                        }).parse({ twitter });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        twitter,\n                                    }));\n                                }, submitLabel: \"Add Twitter link\", title: \"Add Twitter link\", toggleIcon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": nextData.twitter ? '#1da1f2' : undefined }), value: nextData.twitter })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.x, onChange: () => {\n                                    resetError('x');\n                                }, onDismiss: () => {\n                                    resetError('x');\n                                }, onSubmit: (x) => {\n                                    resetError('x');\n                                    validate(() => {\n                                        Validator.pick({\n                                            x: true,\n                                        }).parse({ x });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        x,\n                                    }));\n                                }, submitLabel: \"Add X link\", title: \"Add X link\", toggleIcon: React.createElement(PropertyIcon, { name: \"xCom\" }), value: nextData.x })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.telegram, onChange: () => {\n                                    resetError('telegram');\n                                }, onDismiss: () => {\n                                    resetError('telegram');\n                                }, onSubmit: (telegram) => {\n                                    resetError('telegram');\n                                    validate(() => {\n                                        Validator.pick({\n                                            telegram: true,\n                                        }).parse({ telegram });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        telegram,\n                                    }));\n                                }, submitLabel: \"Add Telegram link\", title: \"Add Telegram link\", toggleIcon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": nextData.telegram ? '#2aabee' : undefined }), value: nextData.telegram })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.reddit, onChange: () => {\n                                    resetError('reddit');\n                                }, onDismiss: () => {\n                                    resetError('reddit');\n                                }, onSubmit: (reddit) => {\n                                    resetError('reddit');\n                                    validate(() => {\n                                        Validator.pick({\n                                            reddit: true,\n                                        }).parse({ reddit });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        reddit,\n                                    }));\n                                }, submitLabel: \"Add Reddit link\", title: \"Add Reddit link\", toggleIcon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": nextData.reddit ? '#ff5700' : undefined }), value: nextData.reddit })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.linkedIn, onChange: () => {\n                                    resetError('linkedIn');\n                                }, onDismiss: () => {\n                                    resetError('linkedIn');\n                                }, onSubmit: (linkedIn) => {\n                                    resetError('linkedIn');\n                                    validate(() => {\n                                        Validator.pick({\n                                            linkedIn: true,\n                                        }).parse({ linkedIn });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        linkedIn,\n                                    }));\n                                }, submitLabel: \"Add LinkedIn link\", title: \"Add LinkedIn link\", toggleIcon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": nextData.linkedIn ? '#0077b5' : undefined }), value: nextData.linkedIn })))),\n                React.createElement(AboutOperatorField, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Operator Avatar\"),\n                    React.createElement(FieldWrap, null,\n                        React.createElement(AvatarField, null,\n                            React.createElement(AvatarDisplayContainer, null, imageBlob ? (React.createElement(OperatorAvatar, { src: imageBlob, crossOrigin: getImageCrossOrigin(imageBlob) })) : (React.createElement(AvatarPlaceholder, { username: randomAddress }))),\n                            React.createElement(\"div\", null,\n                                React.createElement(\"input\", { ref: fileInputRef, type: \"file\", accept: \".jpg,.jpeg,.png\", style: { display: 'none' }, onChange: (e) => {\n                                        void (async () => {\n                                            if (!e.target.files?.length) {\n                                                return;\n                                            }\n                                            try {\n                                                const imageToUpload = await cropModal.pop({\n                                                    imageUrl: URL.createObjectURL(e.target.files[0]),\n                                                    mask: 'round',\n                                                });\n                                                updateNextData((c) => ({\n                                                    ...c,\n                                                    imageToUpload,\n                                                }));\n                                            }\n                                            catch (e) {\n                                                if (isRejectionReason(e)) {\n                                                    return;\n                                                }\n                                                throw e;\n                                            }\n                                        })();\n                                    } }),\n                                React.createElement(Button, { kind: \"secondary\", size: \"normal\", type: \"button\", onClick: () => {\n                                        fileInputRef.current?.click();\n                                    } },\n                                    React.createElement(ButtonIcon, { name: \"plus\" }),\n                                    \"Upload Avatar\"),\n                                React.createElement(AvatarRequirements, null,\n                                    React.createElement(\"li\", null, \"JPEG or PNG format only\"))))))))));\n}\nexport const operatorModal = toaster(OperatorModal, Layer.Modal);\nconst AboutOperator = styled.div.withConfig({ displayName: \"AboutOperator\", componentId: \"sc-1ed0piv\" }) `\n    margin-top: 40px;\n`;\nconst AboutOperatorField = styled.div.withConfig({ displayName: \"AboutOperatorField\", componentId: \"sc-omguw7\" }) `\n    margin-top: 16px;\n\n    ${PropertyDropdownList} {\n        margin-top: 16px;\n    }\n`;\nconst AvatarField = styled.div.withConfig({ displayName: \"AvatarField\", componentId: \"sc-1wkflrd\" }) `\n    padding: 20px;\n    width: 100%;\n\n    button {\n        width: 100%;\n    }\n\n    @media ${TABLET} {\n        display: flex;\n\n        button {\n            width: auto;\n        }\n    }\n`;\nconst AvatarDisplayContainer = styled.div.withConfig({ displayName: \"AvatarDisplayContainer\", componentId: \"sc-1rv3bf3\" }) `\n    margin: 0 auto 16px;\n    width: max-content;\n\n    @media ${TABLET} {\n        margin: 0 32px 0 0;\n    }\n`;\nconst AvatarImageStyles = css `\n    width: 80px;\n    height: 80px;\n    border: 1px solid ${COLORS.secondaryHover};\n    border-radius: 100%;\n`;\nconst AvatarPlaceholder = styled(AvatarImage).withConfig({ displayName: \"AvatarPlaceholder\", componentId: \"sc-1qedmwc\" }) `\n    ${AvatarImageStyles}\n`;\nconst OperatorAvatar = styled.img.withConfig({ displayName: \"OperatorAvatar\", componentId: \"sc-1yguxbu\" }) `\n    ${AvatarImageStyles}\n`;\nconst AvatarRequirements = styled.ul.withConfig({ displayName: \"AvatarRequirements\", componentId: \"sc-15jucd9\" }) `\n    color: #555;\n    font-size: 12px;\n    list-style-position: inside;\n    margin: 10px 0 0;\n    padding: 0;\n    text-align: center;\n`;\nconst ButtonIcon = styled(SvgIcon).withConfig({ displayName: \"ButtonIcon\", componentId: \"sc-gp923z\" }) `\n    width: 12px;\n    height: 12px;\n    margin-right: 8px;\n`;\nconst AlertContainer = styled.div.withConfig({ displayName: \"AlertContainer\", componentId: \"sc-deckk8\" }) `\n    margin-top: 10px;\n`;\n","import EventEmitter from 'events';\nimport { GetMetadataDocument, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { sleep } from '~/utils';\nconst blockObservers = {};\nfunction getBlockObserver(chainId) {\n    let blockObserver = blockObservers[chainId];\n    if (blockObserver) {\n        return blockObserver;\n    }\n    let lastKnownBlockNumber = -1;\n    /**\n     * Collection of specific block numbers that we're interested in. See\n     * `onBlock` for more info.\n     */\n    const pending = {};\n    const emitter = new EventEmitter();\n    let started = false;\n    function start() {\n        if (started) {\n            return;\n        }\n        started = true;\n        void (async () => {\n            /**\n             * Delay between retries is calculated based on the number\n             * of consecutive failures. The larger the number the longer\n             * we wait before we try again.\n             */\n            let failureCount = 0;\n            /**\n             * `idleCount` increases if we the same block number twice in row, and decreases\n             * it's different 3 times in a row. It self-adjust to hit the remote endpoint\n             * reasonably often.\n             */\n            let idleCount = 0;\n            /**\n             * `consecutiveChangeCount` increases if we get the same value twice in a row.\n             */\n            let consecutiveChangeCount = 0;\n            const client = getGraphClient(chainId);\n            while (1) {\n                if (!Object.keys(pending).length) {\n                    /**\n                     * Pending list empty? Wait 2 seconds and retry. We only wanna query\n                     * the Graph if we're interested in something specific.\n                     */\n                    await sleep(2000);\n                    continue;\n                }\n                try {\n                    const { data: { _meta: meta }, } = await client.query({\n                        query: GetMetadataDocument,\n                        fetchPolicy: 'network-only',\n                    });\n                    const blockNumber = meta?.block.number;\n                    if (blockNumber == null) {\n                        throw new Error('Invalid block number');\n                    }\n                    failureCount = 0;\n                    if (blockNumber === lastKnownBlockNumber) {\n                        consecutiveChangeCount = 0;\n                        idleCount = Math.min(25, idleCount + 1);\n                    }\n                    else {\n                        consecutiveChangeCount += 1;\n                        lastKnownBlockNumber = blockNumber;\n                        emitter.emit('block', blockNumber);\n                        Object.keys(pending).forEach((key) => {\n                            if (Number(key) > blockNumber) {\n                                return;\n                            }\n                            delete pending[key];\n                            emitter.emit(`block:${key}`);\n                        });\n                    }\n                    if (consecutiveChangeCount === 3) {\n                        /**\n                         * After 3 different values in a row try a lower\n                         * idleCount. We may not have to wait that long.\n                         */\n                        idleCount = Math.max(0, idleCount - 1);\n                        consecutiveChangeCount = 0;\n                    }\n                    await sleep(500 + idleCount * 100);\n                    continue;\n                }\n                catch (_) {\n                    failureCount = Math.min(40, failureCount + 1);\n                    await sleep(250 * failureCount);\n                }\n            }\n        })();\n    }\n    blockObserver = (blockNumber, fn) => {\n        pending[blockNumber] = true;\n        emitter.once(`block:${blockNumber}`, fn);\n        start();\n        return () => void emitter.off(`block:${blockNumber}`, fn);\n    };\n    blockObservers[chainId] = blockObserver;\n    return blockObserver;\n}\nexport function onIndexedBlock(chainId, blockNumber, fn) {\n    getBlockObserver(chainId)(blockNumber, fn);\n}\n","import { QueryClient } from '@tanstack/react-query';\nimport React from 'react';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { StreamGptApiUrl } from '~/consts';\nimport { ParseError } from '~/errors';\nimport { getProjectRegistryContract } from '~/getters';\nimport { invalidateActiveOperatorByIdQueries, invalidateAllOperatorsQueries, invalidateDelegationsForWalletQueries, } from '~/hooks/operators';\nimport { operatorModal } from '~/modals/OperatorModal';\nimport InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { ProjectType } from '~/shared/types';\nimport getNativeTokenName from '~/shared/utils/nativeToken';\nimport { requirePositiveBalance } from '~/shared/utils/requirePositiveBalance';\nimport { Layer } from '~/utils/Layer';\nimport { onIndexedBlock } from '~/utils/blocks';\nimport { toBN } from '~/utils/bn';\nimport { getPublicProvider } from '~/utils/providers';\n/**\n * Gas money checker.\n * @param chainId Chain id.\n * @param account Account address.\n * @param options.recover If `true`, the function will pop up a \"try\n * again\" toast on failure. Default: `false`.\n * @throws `InsufficientFundsError` if the balance turns out to be 0.\n */\nexport async function ensureGasMonies(chainId, account, { recover = false } = {}) {\n    while (true) {\n        try {\n            await requirePositiveBalance(chainId, account);\n            break;\n        }\n        catch (e) {\n            if (recover && e instanceof InsufficientFundsError) {\n                const tokenName = getNativeTokenName(chainId);\n                try {\n                    await toaster(Toast, Layer.Toast).pop({\n                        title: 'Not enough tokens',\n                        type: ToastType.Warning,\n                        desc: (React.createElement(\"p\", null,\n                            \"You need \",\n                            tokenName,\n                            \" for gas. Get some\",\n                            React.createElement(\"br\", null),\n                            \"and try again.\")),\n                        okLabel: 'Try again',\n                        cancelLabel: 'Cancel',\n                    });\n                    continue;\n                }\n                catch (_) {\n                    throw e;\n                }\n            }\n            throw e;\n        }\n    }\n}\n/**\n * Scouts for the `Subscribed` event associated with the Project Registry contract\n * and explodes if it can't find one after given number of tries.\n * @param chainId The chain id related to the purchase.\n * @param projectId Project id.\n * @param account Account who made the purchase.\n * @param options.attempts Number of tries (with 3s delay between each).\n * @returns Nothing important. Watch for 'splosions tho.\n */\nexport async function waitForPurchasePropagation(chainId, projectId, account, { attempts = 30 } = {}) {\n    const provider = await getPublicProvider(chainId);\n    const contract = getProjectRegistryContract({ chainId, provider });\n    // Take a couple of blocks back to be sure.\n    const fromBlock = (await provider.getBlockNumber()) - 10;\n    for (let i = 0; i < attempts; i++) {\n        const events = await contract.queryFilter(contract.filters.Subscribed(projectId, account), fromBlock, 'latest');\n        if (events.length) {\n            return;\n        }\n        await sleep(3000);\n    }\n    throw new Error('Finding `Subscribed` event timed out');\n}\nexport function isProjectOwnedBy(permissions, address) {\n    const { canGrant = false } = permissions.find(({ userAddress }) => typeof userAddress === 'string' &&\n        userAddress.toLowerCase() === address.toLowerCase()) || {};\n    return !!canGrant;\n}\n/**\n * Returns a promise that resolves after a given number\n * of milliseconds. Uses `setTimeout` internally.\n */\nexport async function sleep(millis) {\n    await new Promise((resolve) => void setTimeout(resolve, millis));\n}\n/**\n * Takes the user back in history, but only if they've already navigated\n * somewhere within the app.\n * @param options.onBeforeNavigate Optional callback triggered right before\n * the actual step back. It does not get triggered if we can't take\n * the step.\n */\nexport function goBack(options = {}) {\n    const backable = z\n        .object({ idx: z.number().min(1) })\n        .safeParse(window.history.state).success;\n    if (!backable) {\n        return;\n    }\n    options.onBeforeNavigate?.();\n    window.history.back();\n}\nlet queryClient;\n/**\n * Returns the global QueryClient.\n */\nexport function getQueryClient() {\n    if (!queryClient) {\n        queryClient = new QueryClient({\n            defaultOptions: {\n                queries: {\n                    throwOnError: (error) => error instanceof ParseError,\n                },\n            },\n        });\n    }\n    return queryClient;\n}\nconst SiSymbol = ['', 'k', 'M', 'G', 'T', 'P'];\nfunction defaultFractionLength(integral) {\n    return integral.length < 7 ? 2 : 3;\n}\n/**\n * Abbreviates BigNumberish value.\n */\nexport function abbr(value, options = {}) {\n    const { fractionalLength = defaultFractionLength, stripFractionalZeros = true } = options;\n    const v = toBN(value).dp(typeof fractionalLength === 'number' ? Math.max(0, fractionalLength) + 1 : 10);\n    if (!v.isFinite()) {\n        console.warn('Invalid value', v.toString());\n        throw new Error('Invalid value');\n    }\n    const sign = v.isLessThan(0) ? '-' : '';\n    let [integral, fractional = ''] = v.abs().toString().split('.');\n    const fracLength = Math.max(0, typeof fractionalLength === 'function'\n        ? fractionalLength(integral)\n        : fractionalLength);\n    fractional = `${fractional}${[...Array(fracLength)].map(() => '0').join('')}`;\n    let size = 0;\n    /**\n     * Rebalance the dot and determine what suffix to use by moving digits from\n     * integral part to fractional part.\n     */\n    while (integral.length > 3 && size < SiSymbol.length - 1) {\n        fractional = `${integral.substring(integral.length - 3)}${fractional}`;\n        integral = integral.substring(0, integral.length - 3);\n        size++;\n    }\n    let frac = fractional.substring(0, fracLength);\n    if (stripFractionalZeros) {\n        frac = frac.replace(/0+$/, '');\n    }\n    return `${sign}${integral}${frac && `.${frac}`}${SiSymbol[size]}`;\n}\n/**\n * A function that takes the user through the process of creating\n * an operator or updating an existing operator.\n */\nexport function saveOperator(chainId, operator, options = {}) {\n    void (async () => {\n        try {\n            const { operatorId, blockNumber } = await operatorModal.pop({\n                chainId,\n                operator,\n            });\n            invalidateActiveOperatorByIdQueries(chainId, operatorId);\n            invalidateAllOperatorsQueries(chainId);\n            invalidateDelegationsForWalletQueries(chainId);\n            options.onDone?.(operatorId, blockNumber);\n        }\n        catch (e) {\n            if (options.onError) {\n                options.onError(e);\n            }\n            else {\n                console.warn('Failed to save an operator', e);\n            }\n        }\n    })();\n}\n/**\n * Returns a promise that resolves when the Graph indexes all blocks\n * to a given block height.\n */\nexport function waitForIndexedBlock(chainId, blockNumber) {\n    return new Promise((resolve) => {\n        onIndexedBlock(chainId, blockNumber, resolve);\n    });\n}\n/**\n * Determines if a given argument is a project type.\n */\nexport function isProjectType(arg) {\n    return (arg === ProjectType.DataUnion ||\n        arg === ProjectType.OpenData ||\n        arg === ProjectType.PaidData);\n}\n/**\n * Returns URL of the StreamGPT for the given path.\n */\nexport function getStreamGptApiUrl(path) {\n    return `${StreamGptApiUrl}${path}`;\n}\n","import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { toaster } from 'toasterhea';\nimport { isAddress } from 'web3-validator';\nimport { Minute } from '~/consts';\nimport { Operator_OrderBy, } from '~/generated/gql/network';\nimport { getAllOperators, getOperatorById, getOperatorsByDelegation, getOperatorsByDelegationAndId, getOperatorsByDelegationAndMetadata, getParsedOperators, getParsedOperatorsByOwnerOrControllerAddress, searchOperatorsByMetadata, } from '~/getters';\nimport { confirm } from '~/getters/confirm';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { useRequestedBlockNumber } from '~/hooks';\nimport { invalidateSponsorshipQueries } from '~/hooks/sponsorships';\nimport DelegateFundsModal from '~/modals/DelegateFundsModal';\nimport { forceUndelegateModal } from '~/modals/ForceUndelegateModal';\nimport { undelegateFundsModal } from '~/modals/UndelegateFundsModal';\nimport { Operator } from '~/parsers/Operator';\nimport { getOperatorDelegationAmount, processOperatorUndelegationQueue, } from '~/services/operators';\nimport { collectEarnings } from '~/services/sponsorships';\nimport { flagKey, useFlagger, useIsFlagged } from '~/shared/stores/flags';\nimport { useUncollectedEarningsStore } from '~/shared/stores/uncollectedEarnings';\nimport { getSigner } from '~/shared/stores/wallet';\nimport { truncate } from '~/shared/utils/text';\nimport { getQueryClient, waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { getBalance } from '~/utils/balance';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { Break, FlagBusy } from '~/utils/errors';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport { successToast } from '~/utils/toast';\nexport function useOperatorForWalletQuery(address = '') {\n    const currentChainId = useCurrentChainId();\n    return useQuery({\n        queryKey: ['useOperatorForWalletQuery', currentChainId, address.toLowerCase()],\n        queryFn: async () => {\n            const allOperators = await getParsedOperatorsByOwnerOrControllerAddress(currentChainId, address, {\n                force: true,\n            });\n            if (allOperators.length > 0) {\n                return allOperators[0];\n            }\n            return null;\n        },\n    });\n}\nexport function useAllOperatorsForWalletQuery(address = '') {\n    const currentChainId = useCurrentChainId();\n    return useQuery({\n        queryKey: [\n            'useAllOperatorsForWalletQuery',\n            currentChainId,\n            address.toLowerCase(),\n        ],\n        queryFn: () => getParsedOperatorsByOwnerOrControllerAddress(currentChainId, address, {\n            force: true,\n        }),\n    });\n}\nexport function useOperatorByIdQuery(operatorId = '') {\n    const currentChainId = useCurrentChainId();\n    const minBlockNumber = useRequestedBlockNumber();\n    return useQuery({\n        queryKey: ['operatorByIdQueryKey', currentChainId, operatorId, minBlockNumber],\n        async queryFn() {\n            if (!operatorId) {\n                return null;\n            }\n            const operator = await getOperatorById(currentChainId, operatorId, {\n                force: true,\n                minBlockNumber,\n            });\n            if (operator) {\n                return Operator.parse(operator, currentChainId);\n            }\n            return null;\n        },\n        placeholderData: keepPreviousData,\n        retry: false,\n        staleTime: Minute,\n    });\n}\nexport function invalidateActiveOperatorByIdQueries(chainId, operatorId) {\n    if (operatorId) {\n        return getQueryClient().invalidateQueries({\n            queryKey: ['operatorByIdQueryKey', chainId, operatorId],\n            exact: false,\n            refetchType: 'active',\n        });\n    }\n    return getQueryClient().invalidateQueries({\n        queryKey: ['operatorByIdQueryKey', chainId],\n        exact: false,\n        refetchType: 'active',\n    });\n}\nexport function useOperatorStatsForWallet(address = '') {\n    const { data: operator = null } = useOperatorForWalletQuery(address);\n    if (!operator) {\n        return operator;\n    }\n    const { delegatorCount: numOfDelegators, valueWithoutEarnings: value, stakes, } = operator;\n    return {\n        numOfDelegators,\n        numOfSponsorships: stakes.length,\n        value,\n    };\n}\n/**\n * @todo Refactor using `useQuery`.\n */\nexport function useDelegationsStats(address = '') {\n    const [stats, setStats] = useState();\n    const addr = address.toLowerCase();\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Refactor using useQuery. #refactor\n         */\n        let mounted = true;\n        if (!addr) {\n            setStats(null);\n            return () => { };\n        }\n        setStats(undefined);\n        setTimeout(async () => {\n            const operators = await getParsedOperators(() => getOperatorsByDelegation({\n                chainId,\n                first: 1000,\n                address: addr,\n            }), {\n                chainId,\n            });\n            if (!mounted) {\n                return;\n            }\n            if (!operators.length) {\n                return void setStats({\n                    value: 0n,\n                    minApy: 0,\n                    maxApy: 0,\n                    numOfOperators: 0,\n                });\n            }\n            let minApy = Number.POSITIVE_INFINITY;\n            let maxApy = Number.NEGATIVE_INFINITY;\n            operators.forEach(({ apy }) => {\n                minApy = Math.min(minApy, apy);\n                maxApy = Math.max(maxApy, apy);\n            });\n            const value = operators.reduce((sum, operator) => sum + operator.share(addr), 0n);\n            setStats({\n                value,\n                minApy,\n                maxApy,\n                numOfOperators: operators.length,\n            });\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [addr, chainId]);\n    return stats;\n}\nexport function invalidateDelegationsForWalletQueries(chainId) {\n    getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useDelegationsForWalletQuery', chainId],\n        refetchType: 'active',\n    });\n}\nexport function useDelegationsForWalletQuery({ address: addressProp = '', pageSize = 10, searchQuery: searchQueryProp = '', orderBy, orderDirection, }) {\n    const currentChainId = useCurrentChainId();\n    const address = addressProp.toLowerCase();\n    const searchQuery = searchQueryProp.toLowerCase();\n    return useInfiniteQuery({\n        queryKey: [\n            'useDelegationsForWalletQuery',\n            currentChainId,\n            address,\n            searchQuery,\n            pageSize,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const elements = await getParsedOperators(() => {\n                const params = {\n                    chainId: currentChainId,\n                    first: pageSize,\n                    skip,\n                    address,\n                    orderBy: mapOperatorOrder(orderBy),\n                    orderDirection: orderDirection,\n                    force: true,\n                };\n                if (!searchQuery) {\n                    /**\n                     * Empty search = look for all operators.\n                     */\n                    return getOperatorsByDelegation(params);\n                }\n                if (isAddress(searchQuery)) {\n                    /**\n                     * Look for a delegation for a given operator id.\n                     */\n                    return getOperatorsByDelegationAndId({\n                        ...params,\n                        operatorId: searchQuery,\n                    });\n                }\n                return getOperatorsByDelegationAndMetadata({\n                    ...params,\n                    searchQuery,\n                });\n            }, {\n                chainId: currentChainId,\n            });\n            return {\n                skip,\n                elements,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ skip, elements }) => {\n            return elements.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nexport function invalidateAllOperatorsQueries(chainId) {\n    getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useAllOperatorsQuery', chainId],\n        refetchType: 'active',\n    });\n}\nexport function useAllOperatorsQuery({ batchSize = 10, searchQuery: searchQueryProp = '', orderBy, orderDirection, }) {\n    const searchQuery = searchQueryProp.toLowerCase();\n    const currentChainId = useCurrentChainId();\n    return useInfiniteQuery({\n        queryKey: [\n            'useAllOperatorsQuery',\n            currentChainId,\n            searchQuery,\n            batchSize,\n            orderBy,\n            orderDirection,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const elements = await getParsedOperators(() => {\n                const params = {\n                    chainId: currentChainId,\n                    first: batchSize,\n                    skip,\n                    orderBy: mapOperatorOrder(orderBy),\n                    orderDirection: orderDirection,\n                    force: true,\n                };\n                if (!searchQuery) {\n                    return getAllOperators(params);\n                }\n                return searchOperatorsByMetadata({\n                    ...params,\n                    searchQuery,\n                });\n            }, {\n                chainId: currentChainId,\n            });\n            return {\n                skip,\n                elements,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ skip, elements }) => {\n            return elements.length === batchSize ? skip + batchSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nexport function useIsDelegatingFundsToOperator(operatorId, wallet) {\n    return useIsFlagged(flagKey('isDelegatingFunds', operatorId || '', wallet || ''));\n}\nconst delegateFundsModal = toaster(DelegateFundsModal, Layer.Modal);\n/**\n * Triggers funds delegation and raises an associated flag for the\n * duration of the process.\n */\nexport function useDelegateFunds() {\n    const withFlag = useFlagger();\n    return useCallback(({ chainId, onDone, operator, wallet, }) => {\n        if (!wallet) {\n            return;\n        }\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isDelegatingFunds', operator.id, wallet), async () => {\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        const delegatedTotal = await getOperatorDelegationAmount(chainId, operator.id, wallet);\n                        await delegateFundsModal.pop({\n                            operator,\n                            balance,\n                            delegatedTotal,\n                            chainId,\n                        });\n                        invalidateActiveOperatorByIdQueries(chainId, operator.id);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n                onDone?.();\n            }\n            catch (e) {\n                console.warn('Could not delegate funds', e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsUndelegatingFundsToOperator(operatorId, wallet) {\n    return useIsFlagged(flagKey('isUndelegatingFunds', operatorId || '', wallet || ''));\n}\n/**\n * Triggers funds undelegation and raises an associated flag for the\n * duration of the process.\n */\nexport function useUndelegateFunds() {\n    const withFlag = useFlagger();\n    return useCallback(({ chainId, onDone, operator, wallet, }) => {\n        if (!wallet) {\n            return;\n        }\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isUndelegatingFunds', operator.id, wallet), async () => {\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        const delegatedTotal = await getOperatorDelegationAmount(chainId, operator.id, wallet);\n                        await undelegateFundsModal.pop({\n                            chainId,\n                            operator,\n                            balance,\n                            delegatedTotal,\n                        });\n                        invalidateActiveOperatorByIdQueries(chainId, operator.id);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n                onDone?.();\n            }\n            catch (e) {\n                console.warn('Could not undelegate funds', e);\n            }\n        })();\n    }, [withFlag]);\n}\nconst mapOperatorOrder = (orderBy) => {\n    switch (orderBy) {\n        case 'totalValue':\n            return Operator_OrderBy.ValueWithoutEarnings;\n        case 'deployed':\n            return Operator_OrderBy.TotalStakeInSponsorshipsWei;\n        case 'operatorCut':\n            return Operator_OrderBy.OperatorsCutFraction;\n        default:\n            return Operator_OrderBy.Id;\n    }\n};\n/**\n * Returns a callback that takes the user through the process of collecting\n * earnings for given operator/sponsorship pair.\n */\nexport function useCollectEarnings() {\n    const { fetch: fetchUncollectedEarnings } = useUncollectedEarningsStore();\n    return useCallback((params) => {\n        const { chainId, sponsorshipIds, operatorId } = params;\n        void (async () => {\n            try {\n                if (!(await confirm({\n                    cancelLabel: 'Cancel',\n                    proceedLabel: 'Proceed',\n                    title: 'Confirm',\n                    description: (React.createElement(React.Fragment, null,\n                        \"This action transfers uncollected earnings to the Operator contract (\",\n                        truncate(operatorId),\n                        \").\")),\n                }))) {\n                    return;\n                }\n                await collectEarnings(chainId, sponsorshipIds, operatorId, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                await fetchUncollectedEarnings(chainId, operatorId);\n                /**\n                 * Let's refresh the operator page to incl. now-collected earnings\n                 * in the overview section.\n                 */\n                invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                successToast({\n                    title: 'Earnings collected!',\n                    autoCloseAfter: 5,\n                    desc: (React.createElement(\"p\", null, \"Earnings have been successfully collected and are now available in the Operator\\u00A0balance.\")),\n                });\n            }\n            catch (e) {\n                if (e === Break) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                console.error('Could not collect earnings', e);\n            }\n        })();\n    }, [fetchUncollectedEarnings]);\n}\n/**\n * Returns a callback that takes the user through force-undelegation process.\n */\nexport function useForceUndelegate() {\n    return useCallback((chainId, operator, amount) => {\n        void (async () => {\n            try {\n                const wallet = await (await getSigner()).getAddress();\n                await getSponsorshipTokenInfo(chainId);\n                const sponsorshipId = await forceUndelegateModal.pop({\n                    chainId,\n                    operator,\n                    amount,\n                });\n                invalidateSponsorshipQueries(chainId, wallet, sponsorshipId);\n            }\n            catch (e) {\n                if (e === Break) {\n                    return;\n                }\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                console.error('Could not force undelegate', e);\n            }\n        })();\n    }, []);\n}\n/**\n * Returns a callback that takes the user through undelegation queue processing.\n */\nexport function useProcessUndelegationQueue() {\n    return useCallback((chainId, operatorId) => {\n        void (async () => {\n            try {\n                await processOperatorUndelegationQueue(chainId, operatorId, {\n                    onReceipt: () => {\n                        // Refresh operator to update queue entries\n                        invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                    },\n                });\n            }\n            catch (e) {\n                if (e === Break) {\n                    return;\n                }\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                console.error('Could not process undelegation queue', e);\n            }\n        })();\n    }, []);\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { getERC20TokenContract } from '~/getters';\nimport { getQueryClient } from '~/utils';\nimport { getPublicProvider } from '~/utils/providers';\nexport async function getTokenInfo(tokenAddress, chainId) {\n    const tokenInfo = await getQueryClient().fetchQuery(tokenInfoQueryParams(chainId, tokenAddress));\n    if (!tokenInfo || !tokenInfo.symbol) {\n        throw new Error('Not an ERC-20 token');\n    }\n    return tokenInfo;\n}\nexport function useTokenInfo(tokenAddress, chainId) {\n    return useQuery(tokenInfoQueryParams(chainId, tokenAddress)).data;\n}\nfunction tokenInfoQueryParams(chainId, tokenAddress) {\n    return {\n        queryKey: ['tokenInfo', chainId, tokenAddress],\n        queryFn: async () => {\n            if (chainId == null || !tokenAddress) {\n                return null;\n            }\n            const provider = await getPublicProvider(chainId);\n            const contact = getERC20TokenContract({\n                tokenAddress,\n                provider,\n            });\n            try {\n                return {\n                    decimals: await contact.decimals(),\n                    name: await contact.name(),\n                    symbol: await contact.symbol(),\n                };\n            }\n            catch (e) {\n                console.warn(`Failed to fetch token info for ${tokenAddress}`, e);\n            }\n            return null;\n        },\n        staleTime: Infinity,\n        gcTime: Infinity,\n    };\n}\nexport function getCachedTokenInfo(tokenAddress, chainId) {\n    if (!tokenAddress || chainId == null) {\n        return null;\n    }\n    return getQueryClient().getQueryData(tokenInfoQueryParams(chainId, tokenAddress).queryKey);\n}\n","import { getContractAddress } from '~/utils/contracts';\nimport { getTokenInfo } from '~/utils/tokens';\nexport async function getSponsorshipTokenInfo(chainId) {\n    return getTokenInfo(getContractAddress('sponsorshipPaymentToken', chainId), chainId);\n}\n","import { useInfiniteQuery } from '@tanstack/react-query';\nimport { getSponsoringEvents } from '~/getters/getSponsoringEvents';\nimport { getQueryClient } from '~/utils';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { errorToast } from '~/utils/toast';\nconst FUNDING_HISTORY_PAGE_SIZE = 10;\nexport function invalidateSponsorshipFundingHistoryQueries(chainId, sponsorshipId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipFundingHistoryQuery', chainId, sponsorshipId || ''],\n        refetchType: 'active',\n    });\n}\nexport const useSponsorshipFundingHistoryQuery = (sponsorshipId, pageSize = FUNDING_HISTORY_PAGE_SIZE) => {\n    const currentChainId = useCurrentChainId();\n    return useInfiniteQuery({\n        queryKey: [\n            'useSponsorshipFundingHistoryQuery',\n            currentChainId,\n            sponsorshipId || '',\n            pageSize,\n        ],\n        queryFn: async (ctx) => {\n            try {\n                if (!sponsorshipId) {\n                    return {\n                        skippedElements: 0,\n                        events: [],\n                    };\n                }\n                const events = await getSponsoringEvents(currentChainId, sponsorshipId, pageSize, ctx.pageParam || 0, { force: true });\n                return {\n                    skippedElements: ctx.pageParam || 0,\n                    events,\n                };\n            }\n            catch (_) {\n                errorToast({ title: \"Could not load the sponsorship's funding history\" });\n                return {\n                    skippedElements: 0,\n                    events: [],\n                };\n            }\n        },\n        initialPageParam: 0,\n        getNextPageParam: (lastPage) => {\n            return lastPage.events.length === pageSize\n                ? lastPage.skippedElements + pageSize\n                : null;\n        },\n    });\n};\n","import { format } from 'date-fns';\nimport { GetSponsoringEventsDocument, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { toBigInt } from '~/utils/bn';\nexport const getSponsoringEvents = async (chainId, sponsorshipId, first, skip = 0, { force = false } = {}) => {\n    const { data: { sponsoringEvents }, } = await getGraphClient(chainId).query({\n        query: GetSponsoringEventsDocument,\n        variables: {\n            sponsorshipId,\n            first,\n            skip,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsoringEvents.map((event) => ({\n        id: event.id,\n        amount: toBigInt(event.amount),\n        sponsor: event.sponsor,\n        date: format(new Date(Number(event.date) * 1000), 'yyyy-MM-dd HH:mm:ss'),\n    }));\n};\n","import React from 'react';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nexport function SponsorshipPaymentTokenName() {\n    return React.createElement(React.Fragment, null, useSponsorshipTokenInfo()?.symbol || 'DATA');\n}\n","import React, { useMemo } from 'react';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { Tooltip } from '~/components/Tooltip';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport { abbr } from '~/utils';\nimport { toFloat } from '~/utils/bn';\n/**\n * Displays amount (in wei) in a human-readable way. Optionally it abbreviates\n * it and adds a on-hover tooltip showing a full value.\n */\nexport function Decimals({ abbr: abbrProp = false, amount, decimals, tooltip = false, unit, }) {\n    const humanAmount = toFloat(amount, decimals);\n    const value = useMemo(() => (abbrProp ? abbr(humanAmount) : humanAmount.toString()), [abbrProp, humanAmount]);\n    if (value === humanAmount.toString() || !tooltip) {\n        return (React.createElement(React.Fragment, null,\n            value,\n            unit != null ? React.createElement(React.Fragment, null,\n                \"\\u00A0\",\n                unit) : React.createElement(React.Fragment, null)));\n    }\n    return (React.createElement(Tooltip, { anchorDisplay: \"inline\", content: React.createElement(React.Fragment, null,\n            humanAmount.toString(),\n            unit != null ? React.createElement(React.Fragment, null,\n                \"\\u00A0\",\n                unit) : React.createElement(React.Fragment, null)) },\n        value,\n        unit != null ? React.createElement(React.Fragment, null,\n            \"\\u00A0\",\n            unit) : React.createElement(React.Fragment, null)));\n}\nexport function SponsorshipDecimals({ abbr = false, amount, tooltip = false, unitSuffix, }) {\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    return (React.createElement(Decimals, { abbr: abbr, amount: amount, decimals: decimals, tooltip: tooltip, unit: React.createElement(React.Fragment, null,\n            React.createElement(SponsorshipPaymentTokenName, null),\n            unitSuffix) }));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport ImageChecked from './checkbox-checked.svg';\nimport ImageUnchecked from './checkbox.svg';\nexport const Tick = styled.div.withConfig({ displayName: \"Tick\", componentId: \"sc-1a6pboa\" }) `\n    background: url(${ImageUnchecked}) no-repeat;\n    height: 16px;\n    position: relative;\n    width: 16px;\n\n    ::after {\n        background: url(${ImageChecked}) no-repeat;\n        bottom: 0;\n        content: ' ';\n        display: block;\n        left: 0;\n        opacity: 0;\n        position: absolute;\n        right: 0;\n        top: 0;\n        transition: opacity 0.1s;\n    }\n\n    :disabled {\n        filter: grayscale(1);\n        cursor: not-allowed;\n    }\n\n    ${({ $checked = false }) => !!$checked &&\n    css `\n            ::after {\n                opacity: 1;\n            }\n        `}\n`;\nconst noop = () => { };\nconst UnstyledCheckbox = ({ value, onChange = noop, onClick = noop, ...props }) => (React.createElement(Tick, { ...props, as: \"input\", type: \"checkbox\", checked: !!value, \"$checked\": !!value, onChange: onChange, onClick: onClick }));\nconst Checkbox = styled(UnstyledCheckbox).withConfig({ displayName: \"Checkbox\", componentId: \"sc-i2siht\" }) `\n    appearance: none;\n    border: 0;\n    cursor: pointer;\n    flex-shrink: 0;\n    margin-right: 0.5em;\n    top: 0;\n\n    :focus {\n        outline: none;\n    }\n`;\nexport default Checkbox;\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Alert } from '~/components/Alert';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { useJoinSponsorshipAsOperator } from '~/hooks/sponsorships';\nimport Checkbox from '~/shared/components/Checkbox';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function SponsorshipDisclaimer({ sponsorship, onResolve, checkboxState, onCheckboxStateChange, }) {\n    const chainId = useCurrentChainId();\n    const joinSponsorshipAsOperator = useJoinSponsorshipAsOperator();\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(StyledAlert, { type: \"error\", title: \"Warning\" },\n            \"To earn, Operators should\",\n            ' ',\n            sponsorship == null ? ('join Sponsorships') : (React.createElement(Link, { to: \"#\", onClick: () => {\n                    if (operator == null) {\n                        return;\n                    }\n                    // Close this modal\n                    onResolve?.();\n                    // Open join sponsorship modal\n                    joinSponsorshipAsOperator({\n                        chainId,\n                        sponsorship,\n                        operator,\n                    });\n                } }, \"join Sponsorships\")),\n            \", rather than fund/sponsor them. This action cannot be undone.\"),\n        React.createElement(Confirm, null,\n            React.createElement(Checkbox, { id: \"fund-sponsorship-checkbox\", value: checkboxState, onChange: (e) => {\n                    onCheckboxStateChange(e.target.checked);\n                } }),\n            React.createElement(\"label\", { htmlFor: \"fund-sponsorship-checkbox\" }, \"I understand this disclaimer and I know what I'm doing.\"))));\n}\nconst StyledAlert = styled(Alert).withConfig({ displayName: \"StyledAlert\", componentId: \"sc-wmuo9c\" }) `\n    margin-top: 16px;\n\n    a {\n        color: ${COLORS.link};\n    }\n`;\nconst Confirm = styled.div.withConfig({ displayName: \"Confirm\", componentId: \"sc-13wm4mw\" }) `\n    display: flex;\n    align-items: center;\n    margin-top: 8px;\n\n    & label {\n        margin-bottom: 0;\n    }\n`;\n","import isEmpty from 'lodash/isEmpty';\nimport omitBy from 'lodash/omitBy';\nimport { address0 } from '~/consts';\nimport { GetPagedStreamsDocument, GetStreamByIdDocument, OrderDirection as GraphOrderDirection, Stream_OrderBy, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nconst calculatePubSubCount = (permissions) => {\n    let publisherCount = 0;\n    let subscriberCount = 0;\n    permissions.forEach((perm) => {\n        // If stream has public permissions (zero address), return null for counts which means that anyone can\n        // publish or subscribe\n        if (perm.userId === address0) {\n            if (perm.subscribeExpiration >= Math.round(Date.now() / 1000)) {\n                subscriberCount = null;\n            }\n            if (perm.publishExpiration >= Math.round(Date.now() / 1000)) {\n                publisherCount = null;\n            }\n        }\n        if (perm.subscribeExpiration >= Math.round(Date.now() / 1000) &&\n            subscriberCount != null) {\n            subscriberCount += 1;\n        }\n        if (perm.publishExpiration >= Math.round(Date.now() / 1000) &&\n            publisherCount != null) {\n            publisherCount += 1;\n        }\n    });\n    return {\n        publisherCount,\n        subscriberCount,\n    };\n};\nconst mapStream = (stream) => {\n    const result = {\n        id: stream.id,\n        publisherCount: 0,\n        subscriberCount: 0,\n        permissions: stream.permissions,\n    };\n    // Get publisher and subscriber counts\n    const counts = calculatePubSubCount(stream.permissions || []);\n    result.publisherCount = counts.publisherCount;\n    result.subscriberCount = counts.subscriberCount;\n    // Try to parse metadata JSON\n    if (stream.metadata != null) {\n        try {\n            result.metadata = JSON.parse(stream.metadata);\n        }\n        catch (e) {\n            console.error(`Could not parse metadata for stream ${stream.id}`, e);\n            result.metadata = {};\n        }\n    }\n    return result;\n};\nconst prepareStreamResult = (result, pageSize) => {\n    let hasNextPage = false;\n    const streams = result.map((p) => mapStream(p));\n    if (streams.length > pageSize) {\n        hasNextPage = true;\n        // Remove last item\n        streams.splice(pageSize, 1);\n    }\n    return {\n        streams,\n        hasNextPage,\n        lastId: streams[streams.length - 1]?.id,\n    };\n};\nexport const getPagedStreams = async (chainId, first, lastId, owner, search, orderBy = Stream_OrderBy.Id, orderDirection = 'asc', { force = false } = {}) => {\n    const orderOperator = orderDirection === 'asc' ? 'gt' : 'lt';\n    const graphOrderDirection = orderDirection === 'asc' ? GraphOrderDirection.Asc : GraphOrderDirection.Desc;\n    let where = {\n        permissions_: {\n            stream_contains_nocase: search,\n            userId: owner,\n        },\n        [`id_${orderOperator}`]: lastId,\n    };\n    where.permissions_ = omitBy(where.permissions_, isEmpty);\n    where = omitBy(where, isEmpty);\n    const { data: { streams }, } = await getGraphClient(chainId).query({\n        query: GetPagedStreamsDocument,\n        variables: {\n            first: first + 1,\n            orderBy,\n            orderDirection: graphOrderDirection,\n            where,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    if (streams && streams.length > 0) {\n        return prepareStreamResult(streams.map((s) => ({\n            ...s,\n            permissions: s.permissions?.map((p) => ({\n                ...p,\n                userAddress: p.userId, // We need to add this deprecated field for now\n            })),\n        })), first);\n    }\n    return {\n        streams: [],\n        hasNextPage: false,\n        lastId: null,\n    };\n};\nexport const getStreamsOwnedBy = async (chainId, owner, search, onlyPublic, { force = false } = {}) => {\n    const allOwnedStreams = await getPagedStreams(chainId, 999, undefined, owner, search, Stream_OrderBy.Id, 'asc', { force });\n    let result = allOwnedStreams.streams;\n    if (onlyPublic) {\n        result = result.filter((s) => s.permissions.find((p) => p.userId.toLowerCase() === address0.toLowerCase()) != null);\n    }\n    return result;\n};\nexport const checkIfStreamExists = async (chainId, potentialStreamId) => {\n    const { data: { stream }, } = await getGraphClient(chainId).query({\n        query: GetStreamByIdDocument,\n        variables: {\n            streamId: potentialStreamId,\n        },\n        fetchPolicy: 'network-only',\n    });\n    return !!stream;\n};\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport function DropdownMenuItem({ highlight = false, highlightOnFocus = false, children, onKeyDown: onKeyDownProp, onKeyDownToNextButton, onKeyDownToPrevButton, ...props }) {\n    return (React.createElement(\"li\", null,\n        React.createElement(ItemRoot, { ...props, \"$highlight\": highlight, \"$highlightOnFocus\": highlightOnFocus, onKeyDown: (e) => {\n                void (() => {\n                    switch (e.key) {\n                        case 'ArrowDown':\n                            return void withNextButton(e.currentTarget, (b) => void onKeyDownToNextButton?.(e, b));\n                        case 'ArrowUp':\n                            e.preventDefault();\n                            return void withPrevButton(e.currentTarget, (b) => void onKeyDownToPrevButton?.(e, b));\n                        default:\n                    }\n                })();\n                onKeyDownProp?.(e);\n            } },\n            React.createElement(\"div\", null, children),\n            React.createElement(ReturnIconWrap, null,\n                React.createElement(\"svg\", { width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n                    React.createElement(\"rect\", { width: \"20\", height: \"20\", rx: \"2\", fill: COLORS.secondaryHover }),\n                    React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", \n                        // eslint-disable-next-line max-len\n                        d: \"M5.92578 10.9012C5.92578 10.7812 5.97346 10.6661 6.05834 10.5812C6.14321 10.4964 6.25832 10.4487 6.37835 10.4487H11.8092C12.1693 10.4487 12.5146 10.3056 12.7692 10.051C13.0238 9.79639 13.1669 9.45106 13.1669 9.09097V7.28069C13.1669 7.16067 13.2146 7.04555 13.2994 6.96068C13.3843 6.87581 13.4994 6.82812 13.6195 6.82812C13.7395 6.82812 13.8546 6.87581 13.9395 6.96068C14.0243 7.04555 14.072 7.16067 14.072 7.28069V9.09097C14.072 9.69111 13.8336 10.2667 13.4092 10.691C12.9849 11.1154 12.4093 11.3538 11.8092 11.3538H6.37835C6.25832 11.3538 6.14321 11.3061 6.05834 11.2213C5.97346 11.1364 5.92578 11.0213 5.92578 10.9012Z\", fill: \"black\" }),\n                    React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", \n                        // eslint-disable-next-line max-len\n                        d: \"M6.05829 11.2218C5.97344 11.1369 5.92578 11.0218 5.92578 10.9018C5.92578 10.7818 5.97344 10.6667 6.05829 10.5818L7.86856 8.77157C7.95392 8.68913 8.06824 8.64352 8.1869 8.64455C8.30556 8.64558 8.41907 8.69318 8.50298 8.77709C8.58689 8.861 8.63449 8.97451 8.63552 9.09317C8.63655 9.21183 8.59093 9.32615 8.50849 9.4115L7.01819 10.9018L8.50849 12.3921C8.55172 12.4339 8.5862 12.4838 8.60992 12.539C8.63364 12.5942 8.64612 12.6536 8.64664 12.7137C8.64716 12.7738 8.63571 12.8334 8.61296 12.889C8.5902 12.9446 8.5566 12.9952 8.5141 13.0377C8.47161 13.0802 8.42108 13.1138 8.36546 13.1365C8.30984 13.1593 8.25025 13.1707 8.19016 13.1702C8.13007 13.1697 8.07068 13.1572 8.01546 13.1335C7.96025 13.1098 7.91031 13.0753 7.86856 13.0321L6.05829 11.2218Z\", fill: \"black\" }))))));\n}\nfunction withNextButton(el, fn) {\n    fn(el.parentElement?.nextElementSibling?.querySelector('button'));\n}\nfunction withPrevButton(el, fn) {\n    fn(el.parentElement?.previousElementSibling?.querySelector('button'));\n}\nconst ReturnIconWrap = styled.div.withConfig({ displayName: \"ReturnIconWrap\", componentId: \"sc-1x8qf1u\" }) `\n    opacity: 0;\n    transition: 100ms opacity;\n\n    > svg {\n        display: block;\n        border-radius: 4px;\n    }\n`;\nconst ItemRoot = styled.button.withConfig({ displayName: \"ItemRoot\", componentId: \"sc-cxf9yn\" }) `\n    align-items: center;\n    appearance: none;\n    background: none;\n    border: 0;\n    display: flex;\n    gap: 8px;\n    font-size: 14px;\n    line-height: 1.5;\n    padding: 8px 24px;\n    text-align: left;\n    white-space: nowrap;\n    width: 100%;\n    transition: 250ms background-color;\n\n    :focus,\n    :hover {\n        background: ${COLORS.secondary};\n        transition-duration: 50ms;\n    }\n\n    > div:first-child {\n        flex-grow: 1;\n        min-width: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n\n    &[disabled] {\n        background: none;\n    }\n\n    ${({ $highlightOnFocus = false }) => $highlightOnFocus &&\n    css `\n            :focus > ${ReturnIconWrap} {\n                opacity: 1;\n            }\n        `}\n\n    ${({ $highlight = false }) => $highlight &&\n    css `\n            > ${ReturnIconWrap} {\n                opacity: 1;\n            }\n        `}\n`;\n","import SearchIcon from '@atlaskit/icon/glyph/search';\nimport { useQuery } from '@tanstack/react-query';\nimport React, { useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { useDebounce } from 'use-debounce';\nimport { SimpleDropdownMenu as PrestyledSimpleDropdownMenu, SimpleDropdown, SimpleListDropdownMenu, } from '~/components/SimpleDropdown';\nimport Spinner from '~/components/Spinner';\nimport { OrderDirection, Stream_OrderBy } from '~/generated/gql/network';\nimport { FieldWrap, IconWrapAppendix, TextInput } from '~/modals/FormModal';\nimport { getPagedStreams } from '~/services/streams';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { parseStreamId, truncate } from '~/shared/utils/text';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { DropdownMenuItem } from './DropdownMenuItem';\nexport function StreamIdDropdown({ disabled = false, readOnly, onBlur: onBlurProp, onChange, onFocus: onFocusProp, onKeyDown: onKeyDownProp, value = '', ...props }) {\n    const wallet = useWalletAccount();\n    const currentChainId = useCurrentChainId();\n    const inputRef = useRef(null);\n    const listRef = useRef(null);\n    const [queryValue] = useDebounce(value, 250);\n    const { data: streamIds = [], isLoading } = useQuery({\n        queryKey: ['StreamIdDropdown.streamIds', currentChainId, queryValue],\n        queryFn: async () => {\n            try {\n                return (await getPagedStreams(currentChainId, 20, undefined, undefined, queryValue, Stream_OrderBy.Id, OrderDirection.Asc, { force: true })).streams.map(({ id }) => id);\n            }\n            catch (e) {\n                console.warn('Failed to load streams', queryValue, e);\n            }\n        },\n    });\n    const [inputFocused, setInputFocused] = useState(false);\n    return (React.createElement(SimpleDropdown, { disabled: disabled, menuWrapComponent: StreamDropdownMenuWrap, menu: (toggle) => (React.createElement(SimpleListDropdownMenu, null, isLoading ? (React.createElement(SpinnerWrap, null,\n            React.createElement(Spinner, { color: \"blue\" }))) : streamIds.length ? (React.createElement(\"ul\", { ref: listRef }, streamIds.map((streamId, index) => {\n            const shortStreamId = (() => {\n                try {\n                    const { owner, pathname } = parseStreamId(streamId);\n                    return `${truncate(owner)}${pathname}`;\n                }\n                catch (_) { }\n                return streamId;\n            })();\n            return (React.createElement(DropdownMenuItem, { key: streamId, highlight: !index && inputFocused, highlightOnFocus: true, type: \"button\", onClick: () => {\n                    onChange?.(streamId);\n                    toggle(false);\n                    inputRef.current?.focus();\n                }, onKeyDown: (e) => {\n                    if (e.key === 'Escape') {\n                        e.stopPropagation();\n                        inputRef.current?.focus();\n                        toggle(false);\n                    }\n                    if (e.key === 'Backspace') {\n                        e.preventDefault();\n                        inputRef.current?.focus();\n                    }\n                }, onKeyDownToNextButton: (e, button) => {\n                    if (button) {\n                        button.focus();\n                        e.preventDefault();\n                    }\n                }, onKeyDownToPrevButton: (_, button) => {\n                    if (button) {\n                        return void button.focus();\n                    }\n                    inputRef.current?.focus();\n                } }, shortStreamId));\n        }))) : (React.createElement(Zero, null,\n            \"0 matches for \",\n            React.createElement(\"strong\", null, queryValue))))) }, (toggle, isOpen) => {\n        return (React.createElement(FieldWrap, null,\n            React.createElement(TextInput, { ...props, disabled: disabled, readOnly: readOnly, ref: inputRef, onMouseDown: () => {\n                    if (readOnly) {\n                        return;\n                    }\n                    toggle((c) => !c);\n                }, value: value, onChange: (e) => {\n                    onChange?.(e.target.value);\n                    toggle(true);\n                }, onFocus: (e) => {\n                    onFocusProp?.(e);\n                    setInputFocused(true);\n                }, onBlur: (e) => {\n                    onBlurProp?.(e);\n                    setInputFocused(false);\n                }, onKeyDown: (e) => {\n                    if (readOnly) {\n                        return;\n                    }\n                    onKeyDownProp?.(e);\n                    switch (e.key) {\n                        case 'Enter':\n                            if (isOpen && streamIds[0]) {\n                                e.preventDefault();\n                                onChange?.(streamIds[0]);\n                                toggle(false);\n                            }\n                            return;\n                        case 'Escape':\n                            if (isOpen) {\n                                toggle(false);\n                                return void e.stopPropagation();\n                            }\n                            if (value.length) {\n                                onChange?.('');\n                                return void e.stopPropagation();\n                            }\n                            return;\n                        case 'ArrowUp':\n                            e.preventDefault();\n                            return void toggle(false);\n                        case 'ArrowDown':\n                            e.preventDefault();\n                            if (!isOpen) {\n                                return void toggle(true);\n                            }\n                            listRef.current?.querySelector('button')?.focus();\n                            return;\n                        case 'ArrowRight':\n                            if (!value.length && wallet) {\n                                onChange?.(`${wallet.toLowerCase()}/`);\n                                toggle(true);\n                            }\n                            return;\n                        case 'Backspace':\n                            if (!value) {\n                                toggle(false);\n                            }\n                            return;\n                        default:\n                    }\n                } }),\n            React.createElement(IconWrapAppendix, null,\n                React.createElement(SearchIcon, { label: \"Search\" }))));\n    }));\n}\nconst StreamDropdownMenuWrap = styled(PrestyledSimpleDropdownMenu).withConfig({ displayName: \"StreamDropdownMenuWrap\", componentId: \"sc-vg3kks\" }) `\n    width: 100%;\n`;\nconst SpinnerWrap = styled.div.withConfig({ displayName: \"SpinnerWrap\", componentId: \"sc-18zeh7c\" }) `\n    align-items: center;\n    display: flex;\n    height: 40px;\n    justify-content: center;\n    width: 100%;\n`;\nconst Zero = styled.p.withConfig({ displayName: \"Zero\", componentId: \"sc-mbduk5\" }) `\n    font-size: 14px;\n    overflow: hidden;\n    padding: 8px 24px;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\n","import { Contract } from 'ethers';\nimport { toBN } from '~/utils/bn';\nimport { getContractAbi } from '~/utils/contracts';\nimport { getPublicProvider } from '~/utils/providers';\n/**\n * Scouts for Operator's funding share.\n */\nexport function getSponsorshipStakeForOperator(sponsorship, operatorId) {\n    return sponsorship.stakes.find((stake) => stake.operatorId === operatorId);\n}\n/**\n * Checks if a given Operator funds a given Sponsorship.\n */\nexport function isSponsorshipFundedByOperator(sponsorship, operator) {\n    if (operator == null) {\n        return false;\n    }\n    const operatorStake = getSponsorshipStakeForOperator(sponsorship, operator.id);\n    return operatorStake != null && operatorStake.amountWei > 0n;\n}\n/**\n * Gets the current Sponsorship leave penalty for a given Operator.\n */\nexport async function getSponsorshipLeavePenalty(chainId, sponsorshipId, operatorId) {\n    const provider = await getPublicProvider(chainId);\n    const contract = new Contract(sponsorshipId, getContractAbi('sponsorship'), provider);\n    return contract.getLeavePenalty(operatorId);\n}\nexport function getSponsorshipExtensionInDays(amount, dailyPayoutRate) {\n    return dailyPayoutRate > 0n && amount >= 0n\n        ? toBN(amount).dividedBy(toBN(dailyPayoutRate)).toNumber()\n        : 0;\n}\n","import { z } from 'zod';\nimport { getSponsorshipExtensionInDays } from '~/utils/sponsorships';\nexport const MinNumberOfOperatorsParser = z\n    .number()\n    .gte(1)\n    .refine((value) => Number.isSafeInteger(value));\nconst CreateSponsorshipForm = z\n    .object({\n    streamId: z.string().trim().min(1),\n    initialAmount: z.bigint().min(0n),\n    dailyPayoutRate: z.bigint().gt(0n),\n    minStakeDuration: z\n        .number()\n        .gte(0)\n        .refine((value) => Number.isSafeInteger(value)),\n    minNumberOfOperators: MinNumberOfOperatorsParser,\n    maxNumberOfOperators: z\n        .number()\n        .gte(0)\n        .refine((value) => Number.isSafeInteger(value))\n        .optional(),\n})\n    .refine(({ minNumberOfOperators: min, maxNumberOfOperators: max }) => typeof max === 'undefined' || max >= min, {\n    message: 'invalid range of operator numbers',\n    path: ['maxNumberOfOperators'],\n})\n    .refine(({ initialAmount, dailyPayoutRate, minStakeDuration }) => getSponsorshipExtensionInDays(initialAmount, dailyPayoutRate) >=\n    minStakeDuration, {\n    message: 'Payout rate is lower than minimum stake duration',\n    path: ['minStakeDuration'],\n});\nexport function isValidCreateSponsorshipForm(input) {\n    return CreateSponsorshipForm.safeParse(input).success;\n}\n","import { produce } from 'immer';\nimport { useCallback, useEffect } from 'react';\nimport { create } from 'zustand';\nimport { Minute } from '~/consts';\nimport { getEarningsForSponsorships } from '~/services/sponsorships';\nimport { toBigInt } from '~/utils/bn';\nimport { useCurrentChainId } from '~/utils/chains';\nconst FULL_SYNC_INTERVAL_MS = 3 * Minute;\nexport const useUncollectedEarningsStore = create((set, get) => {\n    function updateEarnings(operatorId, fn) {\n        set((store) => produce(store, ({ earnings }) => {\n            const draft = earnings[operatorId] || {\n                values: {},\n                fetching: false,\n                lastUpdatedTimestamp: undefined,\n                lastSyncTimestamp: undefined,\n            };\n            earnings[operatorId] = produce(draft, fn);\n        }));\n    }\n    return {\n        earnings: {},\n        async fetch(chainId, operatorId) {\n            const { fetching = false } = get().earnings[operatorId] || {};\n            if (fetching) {\n                return;\n            }\n            updateEarnings(operatorId, (draft) => {\n                draft.fetching = true;\n            });\n            try {\n                const values = await getEarningsForSponsorships(chainId, operatorId);\n                updateEarnings(operatorId, (draft) => {\n                    draft.values = values;\n                    draft.lastUpdatedTimestamp = performance.now();\n                    draft.lastSyncTimestamp = performance.now();\n                });\n            }\n            finally {\n                updateEarnings(operatorId, (draft) => {\n                    draft.fetching = false;\n                });\n            }\n        },\n        async tick(chainId, operatorId) {\n            const now = performance.now();\n            const { earnings, fetch } = get();\n            const operatorEarnings = earnings[operatorId];\n            if (operatorEarnings != null) {\n                const { lastSyncTimestamp } = operatorEarnings;\n                // Every once in a while we need to sync with blockchain state to get\n                // correct earnings rate. It may have changed because of other operators\n                // staking and unstaking.\n                if (lastSyncTimestamp != null &&\n                    now - lastSyncTimestamp > FULL_SYNC_INTERVAL_MS) {\n                    await fetch(chainId, operatorId);\n                }\n            }\n            set((store) => produce(store, ({ earnings }) => {\n                const draft = earnings[operatorId];\n                if (draft != null) {\n                    const elapsedInSeconds = toBigInt((now - (draft.lastUpdatedTimestamp ?? now)) / 1000);\n                    for (const sponsorshipId of Object.keys(draft.values)) {\n                        const sponsorshipEarnings = draft.values[sponsorshipId];\n                        if (!sponsorshipEarnings) {\n                            continue;\n                        }\n                        sponsorshipEarnings.uncollectedEarnings =\n                            sponsorshipEarnings.uncollectedEarnings +\n                                sponsorshipEarnings.changePerSecond * elapsedInSeconds;\n                    }\n                    draft.lastUpdatedTimestamp = now;\n                }\n            }));\n        },\n    };\n});\nexport function useUncollectedEarnings(operatorId, sponsorshipId) {\n    const { earnings, fetch, tick } = useUncollectedEarningsStore();\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Let's use `useQuery` instead.\n         */\n        void (async () => {\n            if (!operatorId) {\n                return;\n            }\n            try {\n                await fetch(chainId, operatorId);\n            }\n            catch (e) {\n                console.error(`Could not update earnings for \"${operatorId}\"`, e);\n            }\n        })();\n    }, [operatorId, fetch, chainId]);\n    useEffect(() => {\n        const timeoutId = setInterval(tick, 1000, chainId, operatorId);\n        return () => {\n            clearInterval(timeoutId);\n        };\n    }, [chainId, operatorId, tick]);\n    if (!operatorId) {\n        return null;\n    }\n    // Show spinner when fetching AND we don't have changePerSecond ready.\n    // Otherwise just keep the earnings updating and let the full sync catch up.\n    if (earnings[operatorId]?.fetching &&\n        earnings[operatorId]?.values[sponsorshipId]?.changePerSecond == null) {\n        return undefined;\n    }\n    return earnings[operatorId]?.values[sponsorshipId] || null;\n}\nexport function useCanCollectEarningsCallback() {\n    const { earnings } = useUncollectedEarningsStore();\n    return useCallback((operatorId, sponsorshipId) => {\n        if (earnings[operatorId]?.fetching) {\n            return false;\n        }\n        return ((earnings[operatorId]?.values[sponsorshipId]?.uncollectedEarnings || 0n) >\n            0n);\n    }, [earnings]);\n}\n","import { AbiCoder, Contract, ContractTransactionReceipt } from 'ethers';\nimport { DayInSeconds } from '~/consts';\nimport { getParsedSponsorshipById } from '~/getters';\nimport { useUncollectedEarningsStore } from '~/shared/stores/uncollectedEarnings';\nimport { getSigner, getWalletWeb3Provider } from '~/shared/stores/wallet';\nimport { toBigInt, toBN } from '~/utils/bn';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { getPublicProvider } from '~/utils/providers';\nimport { toastedOperation } from '~/utils/toastedOperation';\nimport { call } from '~/utils/tx';\nexport async function createSponsorship(chainId, formData, { onReceipt } = {}) {\n    const { dailyPayoutRate, initialAmount, maxNumberOfOperators, minNumberOfOperators, minStakeDuration, streamId, } = formData;\n    const payoutRatePerSecond = toBigInt(toBN(dailyPayoutRate).dividedBy(DayInSeconds));\n    const minStakeDurationInSeconds = minStakeDuration * DayInSeconds;\n    const policies = [\n        [\n            getContractAddress('sponsorshipStakeWeightedAllocationPolicy', chainId),\n            `${payoutRatePerSecond}`,\n        ],\n        [\n            getContractAddress('sponsorshipDefaultLeavePolicy', chainId),\n            `${minStakeDurationInSeconds}`,\n        ],\n        [getContractAddress('sponsorshipVoteKickPolicy', chainId), 0],\n    ];\n    if (maxNumberOfOperators !== undefined) {\n        policies.push([\n            getContractAddress('sponsorshipMaxOperatorsJoinPolicy', chainId),\n            `${maxNumberOfOperators}`,\n        ]);\n    }\n    await networkPreflight(chainId);\n    return new Promise((resolve, reject) => {\n        void (async () => {\n            try {\n                await toastedOperation('Sponsorship deployment', async () => {\n                    const data = AbiCoder.defaultAbiCoder().encode(['uint32', 'string', 'string', 'address[]', 'uint[]'], [\n                        minNumberOfOperators,\n                        streamId,\n                        JSON.stringify({}), // metadata\n                        policies.map(([policy]) => policy),\n                        policies.map(([, param]) => param),\n                    ]);\n                    const provider = await getWalletWeb3Provider();\n                    const signer = await getSigner();\n                    const token = new Contract(getContractAddress('sponsorshipPaymentToken', chainId), getContractAbi('erc677'), signer);\n                    await call(token, 'transferAndCall', {\n                        args: [\n                            getContractAddress('sponsorshipFactory', chainId),\n                            initialAmount,\n                            data,\n                        ],\n                        onReceipt: async (rawReceipt) => {\n                            /**\n                             * ContractTransactionReceipt converts some logs (Log) into\n                             * event logs (EventLog) – something we need later on to detect\n                             * transfer events.\n                             */\n                            const receipt = new ContractTransactionReceipt(token.interface, provider, rawReceipt);\n                            /**\n                             * 2nd transfer is the transfer from the sponsorship factory to the newly\n                             * deployed sponsorship contract.\n                             */\n                            const [, transfer = undefined] = (receipt.logs.filter((item) => 'eventName' in item && item.eventName === 'Transfer') || []);\n                            const sponsorshipId = transfer?.args.to;\n                            if (typeof sponsorshipId !== 'string') {\n                                throw new Error('Sponsorship deployment failed');\n                            }\n                            await onReceipt?.(receipt);\n                            resolve(sponsorshipId);\n                        },\n                    });\n                });\n            }\n            catch (e) {\n                reject(e);\n            }\n        })();\n    });\n}\nexport async function fundSponsorship(chainId, sponsorshipId, amount, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = new Contract(getContractAddress('sponsorshipPaymentToken', chainId), getContractAbi('erc677'), signer);\n    await toastedOperation('Sponsorship funding', async () => {\n        await call(contract, 'transferAndCall', {\n            args: [sponsorshipId, amount, '0x'],\n            onReceipt,\n        });\n    });\n}\nexport async function stakeOnSponsorship(chainId, sponsorshipId, amount, operatorAddress, options = {}) {\n    await networkPreflight(chainId);\n    const { toastLabel = 'Stake on sponsorship', onReceipt } = options;\n    await toastedOperation(toastLabel, async () => {\n        const signer = await getSigner();\n        const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n        await call(contract, 'stake', {\n            args: [sponsorshipId, amount],\n            onReceipt,\n        });\n        /**\n         * @todo The following rate updating logic does not belong here! Move\n         * it outside and call after `stakeOnSponsorship` (this util) calls.\n         */\n        /**\n         * Update uncollected earnings because the rate of change will change\n         * along with stake amount.\n         */\n        const { fetch: updateEarnings } = useUncollectedEarningsStore.getState();\n        await updateEarnings(chainId, operatorAddress);\n    });\n}\nexport async function reduceStakeOnSponsorship(chainId, sponsorshipId, targetAmount, operatorAddress, options = {}) {\n    const { toastLabel = 'Reduce stake on sponsorship', onReceipt } = options;\n    await networkPreflight(chainId);\n    await toastedOperation(toastLabel, async () => {\n        const signer = await getSigner();\n        const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n        await call(contract, 'reduceStakeTo', {\n            args: [sponsorshipId, targetAmount],\n            onReceipt,\n        });\n        /**\n         * @todo The following rate updating logic does not belong here! Move\n         * it outside and call after `reduceStakeOnSponsorship` (this util) calls.\n         */\n        /**\n         * Update uncollected earnings because the rate of change will change\n         * along with stake amount.\n         */\n        const { fetch: updateEarnings } = useUncollectedEarningsStore.getState();\n        await updateEarnings(chainId, operatorAddress);\n    });\n}\nexport async function forceUnstakeFromSponsorship(chainId, sponsorshipId, operatorAddress, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    await toastedOperation('Force unstake from sponsorship', async () => {\n        const signer = await getSigner();\n        const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n        /**\n         * @todo What is `maxQueuePayoutIterations`? Ask @jtakalai for details.\n         */\n        const maxQueuePayoutIterations = 1000000;\n        await call(contract, 'forceUnstake', {\n            args: [sponsorshipId, maxQueuePayoutIterations],\n            onReceipt,\n        });\n        /**\n         * @todo The following rate updating logic does not belong here! Move\n         * it outside and call after `forceUnstakeFromSponsorship` (this util) calls.\n         */\n        /**\n         * Update uncollected earnings because the rate of change will change\n         * along with stake amount.\n         */\n        const { fetch: updateEarnings } = useUncollectedEarningsStore.getState();\n        await updateEarnings(chainId, operatorAddress);\n    });\n}\nexport async function getEarningsForSponsorships(chainId, operatorAddress) {\n    const provider = await getPublicProvider(chainId);\n    const contract = new Contract(operatorAddress, getContractAbi('operator'), provider);\n    const { addresses, earnings } = await contract.getSponsorshipsAndEarnings();\n    const result = {};\n    for (let i = 0; i < addresses.length; i++) {\n        const sponsorshipId = addresses[i].toLowerCase();\n        const sponsorship = await getParsedSponsorshipById(chainId, sponsorshipId);\n        if (!sponsorship) {\n            result[sponsorshipId] = {\n                uncollectedEarnings: earnings[i],\n                changePerSecond: 0n,\n            };\n            continue;\n        }\n        const myStake = sponsorship.stakes.find((s) => s.operatorId.toLowerCase() === operatorAddress.toLowerCase())?.amountWei || 0n;\n        const { totalStakedWei, payoutPerSecond, isRunning, remainingBalanceWei } = sponsorship;\n        const isSponsorshipPaying = isRunning && remainingBalanceWei > 0n;\n        const totalPayoutPerSecond = isSponsorshipPaying ? payoutPerSecond : 0n;\n        const myPayoutPerSecond = totalStakedWei > 0n\n            ? toBigInt(toBN(myStake)\n                .dividedBy(toBN(totalStakedWei))\n                .multipliedBy(toBN(totalPayoutPerSecond)))\n            : 0n;\n        result[sponsorshipId] = {\n            uncollectedEarnings: earnings[i],\n            changePerSecond: myPayoutPerSecond,\n        };\n    }\n    return result;\n}\nexport async function collectEarnings(chainId, sponsorshipIds, operatorAddress, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n    await toastedOperation('Collect earnings', async () => {\n        await call(contract, 'withdrawEarningsFromSponsorships', {\n            args: [sponsorshipIds],\n            onReceipt,\n        });\n    });\n}\n","import React, { useState } from 'react';\nimport { toaster } from 'toasterhea';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipDisclaimer } from '~/components/SponsorshipDisclaimer';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { StreamIdDropdown } from '~/components/StreamIdDropdown';\nimport { DayInSeconds } from '~/consts';\nimport { MinNumberOfOperatorsParser, isValidCreateSponsorshipForm, } from '~/forms/createSponsorshipForm';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { ErrorLabel, ErrorWrap, FieldWrap, Group, GroupHeadline, Hint, Section, SectionHeadline, TextAppendix, TextInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { createSponsorship } from '~/services/sponsorships';\nimport { checkIfStreamExists } from '~/services/streams';\nimport Label from '~/shared/components/Ui/Label';\nimport Toast from '~/shared/toasts/Toast';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBigInt } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { getSponsorshipExtensionInDays } from '~/utils/sponsorships';\nimport { errorToast } from '~/utils/toast';\nconst streamNotFoundToaster = toaster(Toast, Layer.Toast);\nfunction CreateSponsorshipModal({ balance, chainId, streamId: streamIdProp = '', onResolve, ...props }) {\n    const [busy, setBusy] = useState(false);\n    const [confirmState, setConfirmState] = useState(false);\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const [streamId, setStreamId] = useState(streamIdProp);\n    const [rawInitialAmount, setRawInitialAmount] = useState('');\n    const initialAmount = toBigInt(rawInitialAmount || 0, decimals);\n    const [rawDailyPayoutRate, setRawDailyPayoutRate] = useState('');\n    const dailyPayoutRate = toBigInt(rawDailyPayoutRate || 0, decimals);\n    const [rawMinStakeDurationInDays, setRawMinStakeDurationInDays] = useState('');\n    const minStakeDuration = Math.max(0, Number(rawMinStakeDurationInDays) || 0);\n    const [rawMinNumberOfOperators, setRawMinNumberOfOperators] = useState('1');\n    const minNumberOfOperators = Math.max(0, Number(rawMinNumberOfOperators) || 0);\n    const backdropDismissable = streamId === streamIdProp &&\n        initialAmount !== 0n &&\n        dailyPayoutRate !== 0n &&\n        minStakeDuration === 0 &&\n        minNumberOfOperators === 1;\n    const extensionInDays = getSponsorshipExtensionInDays(initialAmount, dailyPayoutRate);\n    const insufficientFunds = initialAmount > balance;\n    const tooLowOperatorCount = !MinNumberOfOperatorsParser.safeParse(minNumberOfOperators).success;\n    const formData = {\n        streamId,\n        initialAmount,\n        dailyPayoutRate,\n        minStakeDuration,\n        minNumberOfOperators,\n    };\n    const canSubmit = !insufficientFunds && confirmState && isValidCreateSponsorshipForm(formData);\n    const invalidMinStakeDuration = initialAmount > 0n && dailyPayoutRate > 0n && extensionInDays < minStakeDuration;\n    const maxPenaltyPeriodInDays = useConfigValueFromChain('maxPenaltyPeriodSeconds', (value) => Number(value) * DayInSeconds);\n    const tooLongMinStakeDuration = !!maxPenaltyPeriodInDays && minStakeDuration > maxPenaltyPeriodInDays;\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: \"Create Sponsorship\", canSubmit: canSubmit && !busy, submitLabel: \"Create\", submitting: busy, onBeforeAbort: (reason) => !busy && (backdropDismissable || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                if (!(await checkIfStreamExists(chainId, streamId))) {\n                    errorToast({ title: 'Stream does not exist' }, streamNotFoundToaster);\n                    return;\n                }\n                let blockNumber = 0;\n                const sponsorshipId = await createSponsorship(chainId, formData, {\n                    onReceipt: ({ blockNumber: blockNo }) => {\n                        blockNumber = blockNo;\n                        return waitForIndexedBlock(chainId, blockNo);\n                    },\n                });\n                onResolve?.({\n                    sponsorshipId,\n                    streamId: streamIdProp,\n                    blockNumber,\n                });\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(Group, null,\n            React.createElement(GroupHeadline, null, \"Select a Stream\"),\n            React.createElement(SectionHeadline, null, \"Your Sponsorship will incentivize nodes to relay and secure this stream\"),\n            React.createElement(Section, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Select a Stream\"),\n                React.createElement(StreamIdDropdown, { autoFocus: !streamIdProp, placeholder: \"Type to select a stream\", disabled: busy, readOnly: !!streamIdProp, onChange: (value) => {\n                        setStreamId(value);\n                    }, value: streamId }))),\n        React.createElement(Group, null,\n            React.createElement(GroupHeadline, null, \"Set Sponsorship parameters\"),\n            React.createElement(Section, null,\n                React.createElement(WingedLabelWrap, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Initial amount to fund\"),\n                    insufficientFunds && React.createElement(ErrorLabel, null, \"Insufficient funds\")),\n                React.createElement(FieldWrap, { \"$invalid\": insufficientFunds },\n                    React.createElement(TextInput, { name: \"initialAmount\", autoFocus: !!streamIdProp, onChange: (e) => {\n                            setRawInitialAmount(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawInitialAmount }),\n                    React.createElement(TextAppendix, null,\n                        React.createElement(SponsorshipPaymentTokenName, null))),\n                React.createElement(Hint, null,\n                    React.createElement(\"p\", null,\n                        \"Wallet balance:\",\n                        ' ',\n                        React.createElement(\"strong\", null,\n                            React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))))),\n            React.createElement(Section, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Payout rate*\"),\n                React.createElement(FieldWrap, null,\n                    React.createElement(TextInput, { name: \"payoutRate\", onChange: (e) => {\n                            setRawDailyPayoutRate(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawDailyPayoutRate }),\n                    React.createElement(TextAppendix, null,\n                        React.createElement(SponsorshipPaymentTokenName, null),\n                        \"/day\")),\n                React.createElement(Hint, null,\n                    React.createElement(\"p\", null,\n                        \"The Sponsorship will be funded for\",\n                        ' ',\n                        extensionInDays.toFixed(2).replace(/\\.00$/, ''),\n                        \" days\"))),\n            React.createElement(Section, null,\n                React.createElement(WingedLabelWrap, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Minimum time operators must stay staked\"),\n                    React.createElement(ErrorWrap, null,\n                        invalidMinStakeDuration && (React.createElement(ErrorLabel, null, \"The value is higher than the duration of the sponsorship\")),\n                        tooLongMinStakeDuration && (React.createElement(ErrorLabel, null,\n                            \"Max amount: \",\n                            maxPenaltyPeriodInDays,\n                            \" days\")))),\n                React.createElement(FieldWrap, { \"$invalid\": invalidMinStakeDuration || tooLongMinStakeDuration },\n                    React.createElement(TextInput, { name: \"minStakeDuration\", onChange: (e) => {\n                            setRawMinStakeDurationInDays(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, value: rawMinStakeDurationInDays }),\n                    React.createElement(TextAppendix, null, \"Days\"))),\n            React.createElement(Section, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Minimum number of operators to start payout\"),\n                React.createElement(FieldWrap, { \"$invalid\": tooLowOperatorCount },\n                    React.createElement(TextInput, { name: \"minNumberOfOperators\", onChange: (e) => {\n                            setRawMinNumberOfOperators(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, value: rawMinNumberOfOperators }),\n                    React.createElement(TextAppendix, null,\n                        React.createElement(\"span\", null, \"Operators\"))))),\n        React.createElement(SponsorshipDisclaimer, { checkboxState: confirmState, onCheckboxStateChange: (value) => setConfirmState(value) })));\n}\nexport const createSponsorshipModal = toaster(CreateSponsorshipModal, Layer.Modal);\n","import moment from 'moment';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { confirm } from '~/getters/confirm';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { ErrorLabel, FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { forceUnstakeFromSponsorship, reduceStakeOnSponsorship, stakeOnSponsorship, } from '~/services/sponsorships';\nimport Label from '~/shared/components/Ui/Label';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { getSponsorshipStakeForOperator } from '~/utils/sponsorships';\nconst EmptyStake = {\n    joinedAt: new Date(0),\n    amountWei: 0n,\n};\nfunction EditStakeModal({ chainId, leavePenalty, onResolve, onReject, operator: { dataTokenBalanceWei: availableBalance, id: operatorId, queueEntries }, sponsorship, ...props }) {\n    const { id: sponsorshipId, minimumStakingPeriodSeconds } = sponsorship;\n    const [busy, setBusy] = useState(false);\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const stake = useMemo(() => getSponsorshipStakeForOperator(sponsorship, operatorId), [sponsorship, operatorId]);\n    const lockedStake = stake?.lockedWei || 0n;\n    useEffect(() => {\n        if (!stake) {\n            onReject?.(new Error('Cannot edit. Operator has no stake in sponsorship.'));\n        }\n    }, [stake, onReject]);\n    const globalMinimumStakeWei = useConfigValueFromChain('minimumStakeWei') || 0n;\n    const minimumStakeWei = ((a, b) => (a > b ? a : b))(globalMinimumStakeWei, lockedStake);\n    const { joinedAt, amountWei: currentAmount } = stake || EmptyStake;\n    const [rawAmount, setRawAmount] = useState(toFloat(currentAmount, decimals).toString());\n    useEffect(() => {\n        setRawAmount(toFloat(currentAmount, decimals).toString());\n    }, [currentAmount, decimals]);\n    const minLeaveDate = moment(joinedAt.getTime() + minimumStakingPeriodSeconds * 1000).format('YYYY-MM-DD HH:mm');\n    const hasUndelegationQueue = queueEntries.length > 0;\n    const amount = ((a) => (a > 0n ? a : 0n))(toBigInt(rawAmount || 0, decimals));\n    const difference = amount - currentAmount;\n    const insufficientFunds = difference > 0n && difference > availableBalance;\n    const isAmountWithinAcceptedRange = amount === 0n || amount >= minimumStakeWei;\n    const canSubmit = isAmountWithinAcceptedRange &&\n        !insufficientFunds &&\n        difference !== 0n &&\n        (difference > 0n ? !hasUndelegationQueue : true);\n    let submitLabel = 'Save';\n    if (amount === 0n) {\n        submitLabel = 'Unstake';\n    }\n    if (difference > 0n) {\n        submitLabel = 'Increase stake';\n    }\n    if (difference < 0n && amount !== 0n) {\n        submitLabel = 'Reduce stake';\n    }\n    const slashingAmount = amount > 0n ? 0n : leavePenalty + lockedStake;\n    const clean = amount === currentAmount;\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: \"Edit stake\", canSubmit: canSubmit && !busy, submitLabel: submitLabel, submitting: busy, onBeforeAbort: (reason) => !busy && (reason !== RejectionReason.Backdrop || clean), onReject: onReject, onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                if (difference >= 0n) {\n                    await stakeOnSponsorship(chainId, sponsorshipId, difference, operatorId, {\n                        toastLabel: 'Increase stake on sponsorship',\n                        onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                    });\n                    return void onResolve?.();\n                }\n                if (slashingAmount === 0n) {\n                    await reduceStakeOnSponsorship(chainId, sponsorshipId, amount, operatorId, {\n                        onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                        toastLabel: amount === 0n\n                            ? 'Unstake from sponsorship'\n                            : 'Reduce stake on sponsorship',\n                    });\n                    return void onResolve?.();\n                }\n                const slashingReason = leavePenalty > 0n && lockedStake > 0n ? (React.createElement(React.Fragment, null,\n                    \"Your minimum staking period is still ongoing and ends on\",\n                    ' ',\n                    minLeaveDate,\n                    \", and additionally some of your stake is locked in the Sponsorship due to open flags.\")) : leavePenalty > 0n ? (React.createElement(React.Fragment, null,\n                    \"Your minimum staking period is still ongoing and ends on\",\n                    ' ',\n                    minLeaveDate,\n                    \".\")) : (React.createElement(React.Fragment, null, \"Some of your stake is locked in the Sponsorship due to open flags.\"));\n                if (await confirm({\n                    title: 'Your stake will be slashed',\n                    description: (React.createElement(React.Fragment, null,\n                        slashingReason,\n                        \" If you unstake now, you will lose\",\n                        ' ',\n                        React.createElement(SponsorshipDecimals, { amount: slashingAmount }))),\n                    proceedLabel: 'Proceed anyway',\n                    cancelLabel: 'Cancel',\n                    isDangerous: true,\n                })) {\n                    await forceUnstakeFromSponsorship(chainId, sponsorshipId, operatorId, {\n                        onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                    });\n                    onResolve?.();\n                }\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please set the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" to stake on the selected Sponsorship\"),\n        React.createElement(Section, null,\n            React.createElement(WingedLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Amount to stake\"),\n                rawAmount !== '' && !isAmountWithinAcceptedRange && (React.createElement(ErrorLabel, null,\n                    \"Minimum value is\",\n                    ' ',\n                    React.createElement(SponsorshipDecimals, { amount: minimumStakeWei })))),\n            React.createElement(FieldWrap, { \"$invalid\": rawAmount !== '' && !isAmountWithinAcceptedRange },\n                React.createElement(TextInput, { autoFocus: true, name: \"amount\", onChange: (e) => {\n                        setRawAmount(e.target.value);\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(availableBalance + currentAmount, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Current stake\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: currentAmount, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Stake change\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: difference, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in Operator\")) : (React.createElement(React.Fragment, null, \"Available balance in Operator\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: availableBalance, tooltip: limitedSpace }))))),\n        amount === 0n && leavePenalty > 0n && (React.createElement(StyledAlert, { type: \"error\", title: \"Your stake will be slashed\" },\n            \"Your minimum staking period is still ongoing and ends on\",\n            ' ',\n            minLeaveDate,\n            \". If you unstake now, you will lose\",\n            ' ',\n            React.createElement(SponsorshipDecimals, { amount: leavePenalty }),\n            \".\")),\n        difference > 0n && hasUndelegationQueue && (React.createElement(StyledAlert, { type: \"error\", title: \"Warning!\" }, \"Cannot stake on sponsorship while delegators are awaiting undelegation\"))));\n}\nexport const editStakeModal = toaster(EditStakeModal, Layer.Modal);\nconst StyledAlert = styled(Alert).withConfig({ displayName: \"StyledAlert\", componentId: \"sc-1hd6slq\" }) `\n    margin-top: 16px;\n`;\n","export const pluralizeUnit = (value, unit) => {\n    return unit + `${value === 1 ? '' : 's'}`;\n};\n","import moment from 'moment';\nimport React, { useMemo, useState } from 'react';\nimport { toaster } from 'toasterhea';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipDisclaimer } from '~/components/SponsorshipDisclaimer';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, } from '~/modals/FormModal';\nimport { fundSponsorship } from '~/services/sponsorships';\nimport Label from '~/shared/components/Ui/Label';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { pluralizeUnit } from '~/utils/pluralizeUnit';\nfunction FundSponsorshipModal({ balance, chainId, onResolve, sponsorship, ...props }) {\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const [rawAmount, setRawAmount] = useState('');\n    const amount = ((a) => (a > 0n ? a : 0n))(toBigInt(rawAmount || 0, decimals));\n    const [confirmState, setConfirmState] = useState(false);\n    const { payoutPerSecond: pricePerSecond } = sponsorship;\n    const extensionInSeconds = Number(pricePerSecond > 0n ? amount / pricePerSecond : 0n);\n    const extensionDuration = moment.duration(extensionInSeconds, 'seconds');\n    const extensionText = useMemo(() => {\n        if (extensionDuration.asSeconds() === 0) {\n            return '0 days';\n        }\n        const years = extensionDuration.get('years');\n        const months = extensionDuration.get('months');\n        const days = extensionDuration.get('days');\n        const hours = extensionDuration.get('hours');\n        const minutes = extensionDuration.get('minutes');\n        if (!years && !months && !days && !hours) {\n            return `${minutes} ${pluralizeUnit(minutes, 'minute')}`;\n        }\n        if (!years && !months && !days) {\n            return (`${hours} ${pluralizeUnit(hours, 'hour')}` +\n                (minutes ? ` & ${minutes} ${pluralizeUnit(minutes, 'minute')}` : ''));\n        }\n        if (!years && !months) {\n            return `${days} ${pluralizeUnit(days, 'day')} & ${hours} ${pluralizeUnit(hours, 'hour')}`;\n        }\n        if (!years) {\n            return `${months} ${pluralizeUnit(months, 'month')} & ${days} ${pluralizeUnit(days, 'day')}`;\n        }\n        return `${years} ${pluralizeUnit(years, 'year')}, ${months} ${pluralizeUnit(months, 'month')} & ${days} ${pluralizeUnit(days, 'day')}`;\n    }, [extensionDuration]);\n    const startDate = sponsorship.projectedInsolvencyAt?.getTime() ?? Date.now();\n    const endDate = new Date(startDate + extensionInSeconds * 1000);\n    const insufficientFunds = amount > balance;\n    const canSubmit = amount > 0n && !insufficientFunds && confirmState;\n    const [busy, setBusy] = useState(false);\n    const clean = rawAmount === '';\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: \"Fund Sponsorship\", canSubmit: canSubmit && !busy, submitting: busy, submitLabel: \"Fund\", onBeforeAbort: (reason) => !busy && (reason !== RejectionReason.Backdrop || clean), onSubmit: async () => {\n            setBusy(true);\n            try {\n                await fundSponsorship(chainId, sponsorship.id, amount, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please set the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" to spend to extend the Sponsorship\"),\n        React.createElement(Section, null,\n            React.createElement(Label, { \"$wrap\": true }, \"Amount to sponsor\"),\n            React.createElement(FieldWrap, { \"$invalid\": insufficientFunds },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => void setRawAmount(target.value), placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(balance, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in your wallet\")) : (React.createElement(React.Fragment, null, \"Your wallet balance\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Sponsorship extended by\"),\n                    React.createElement(PropValue, null, extensionText)),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"New end date\"),\n                    React.createElement(PropValue, null, moment(endDate).format(limitedSpace ? 'YY-MM-DD' : 'YYYY-MM-DD'))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Rate\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: sponsorship.payoutPerDay, unitSuffix: \"/day\", tooltip: limitedSpace }))))),\n        React.createElement(SponsorshipDisclaimer, { sponsorship: sponsorship, onResolve: onResolve, checkboxState: confirmState, onCheckboxStateChange: (value) => setConfirmState(value) })));\n}\nexport const fundSponsorshipModal = toaster(FundSponsorshipModal, Layer.Modal);\n","import { useEffect, useState } from 'react';\nimport { NetworkNodeType } from '@streamr/sdk';\nimport { useSubscribe } from 'streamr-client-react';\nimport { z } from 'zod';\nexport function useInterceptHeartbeats(operatorId) {\n    const streamId = `${operatorId}/operator/coordination`;\n    const [heartbeats, setHeartbeats] = useState({});\n    useEffect(() => void setHeartbeats({}), [operatorId]);\n    useSubscribe({ id: streamId }, {\n        cacheKey: operatorId,\n        disabled: !operatorId,\n        onError: (e) => {\n            console.warn('Failed to count live nodes', e);\n        },\n        onMessage(msg) {\n            const parsedContent = msg.getParsedContent();\n            const message = {\n                parsedContent,\n                messageId: msg.messageId,\n            };\n            if (!isHeartbeatMessage(message)) {\n                return;\n            }\n            const { parsedContent: { peerDescriptor, applicationVersion }, messageId: { timestamp }, } = message;\n            setHeartbeats((prev) => ({\n                ...prev,\n                [peerDescriptor.nodeId]: {\n                    ...peerDescriptor,\n                    timestamp,\n                    applicationVersion,\n                },\n            }));\n        },\n    });\n    return heartbeats;\n}\nconst HeartbeatMessage = z.object({\n    messageId: z.object({\n        timestamp: z.number(),\n    }),\n    parsedContent: z.object({\n        msgType: z.literal('heartbeat'),\n        applicationVersion: z.string().optional(),\n        peerDescriptor: z.object({\n            nodeId: z.string(),\n            type: z.optional(z.nativeEnum(NetworkNodeType)),\n            websocket: z\n                .object({\n                host: z.string(),\n                port: z.number(),\n                tls: z.boolean(),\n            })\n                .optional(),\n            openInternet: z.boolean().optional(),\n            region: z.number().optional(),\n        }),\n    }),\n});\nfunction isHeartbeatMessage(arg) {\n    return HeartbeatMessage.safeParse(arg).success;\n}\n","import { useEffect, useState } from 'react';\nexport default function useOperatorLiveNodes(heartbeats) {\n    const count = Object.keys(heartbeats).length;\n    const [isLoading, setIsLoading] = useState(false);\n    const detectedAny = count > 0;\n    useEffect(() => {\n        if (detectedAny) {\n            return void setIsLoading(false);\n        }\n        let mounted = true;\n        setIsLoading(true);\n        setTimeout(() => {\n            if (mounted) {\n                setIsLoading(false);\n            }\n        }, 30000);\n        return () => {\n            mounted = false;\n        };\n    }, [detectedAny]);\n    return {\n        count,\n        isLoading,\n    };\n}\n","import { components } from 'react-select';\nimport styled, { css } from 'styled-components';\nimport BlackCheckmarkIcon from '~/shared/assets/icons/checkmark-black.svg';\nimport CheckmarkIcon from '~/shared/assets/icons/checkmark.svg';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nconst transitionTime = 150;\nexport const StyledCaretIcon = styled(SvgIcon).withConfig({ displayName: \"StyledCaretIcon\", componentId: \"sc-1k04u30\" }) `\n    height: 8px;\n    width: 10px;\n    transition: all ${transitionTime}ms ease-in-out;\n    color: ${COLORS.primaryLight};\n    &.rotated {\n        transform: rotate(180deg);\n        color: ${COLORS.primaryContrast};\n    }\n    &.disabled {\n        color: ${COLORS.disabled};\n    }\n    &.whiteVariant {\n        color: ${COLORS.primaryLight};\n    }\n`;\nexport const StyledDropdownIndicator = styled(components.DropdownIndicator).withConfig({ displayName: \"StyledDropdownIndicator\", componentId: \"sc-j84yrq\" }) `\n    margin-right: 10px;\n`;\nexport const StyledCloseIcon = styled(SvgIcon).withConfig({ displayName: \"StyledCloseIcon\", componentId: \"sc-1dsftzz\" }) `\n    color: ${COLORS.primaryLight};\n    &.menu-is-open {\n        color: ${COLORS.primaryContrast};\n    }\n`;\nconst StyledOptionAfter = css `\n    :after {\n        content: ' ';\n        background: url('${CheckmarkIcon}') center center no-repeat;\n        width: 10px;\n        height: 10px;\n        position: absolute;\n        right: 12px;\n        top: 12px;\n    }\n`;\nexport const StyledOption = styled(components.Option).withConfig({ displayName: \"StyledOption\", componentId: \"sc-zbdtph\" }) `\n    cursor: pointer;\n    color: ${COLORS.primaryLight};\n    font-size: 14px;\n    font-weight: 400;\n    transition: all ${transitionTime}ms ease-in-out;\n    position: relative;\n    &:active {\n        background-color: ${COLORS.primary} !important;\n    }\n    &:focus {\n        background-color: ${COLORS.focus};\n    }\n\n    ${(props) => {\n    if (props.isSelected) {\n        return StyledOptionAfter;\n    }\n}}\n`;\nexport const getControlStyles = (styles, isFocused, isOpen, isDisabled, noShrink, fullWidth) => {\n    const styleObject = {\n        ...styles,\n        backgroundColor: COLORS.secondary,\n        borderRadius: '4px',\n        border: 'none',\n        fontWeight: 500,\n        width: 'auto',\n        display: 'inline-flex',\n        transition: `background-color ${transitionTime}ms ease-in-out`,\n        cursor: 'pointer',\n    };\n    if (isFocused) {\n        styleObject.boxShadow = `none`;\n    }\n    if (isOpen) {\n        styleObject.backgroundColor = COLORS.primary;\n        styleObject.color = COLORS.primaryContrast;\n    }\n    if (isDisabled) {\n        styleObject.cursor = 'not-allowed';\n    }\n    if (noShrink) {\n        styleObject.flexWrap = 'nowrap';\n    }\n    if (fullWidth) {\n        styleObject.width = '100%';\n    }\n    return styleObject;\n};\nexport const getPlaceholderStyles = (styles, isOpen, isDisabled) => {\n    const styleObject = {\n        ...styles,\n        color: COLORS.primaryLight,\n        display: 'block',\n        position: 'relative',\n        top: '0',\n        transform: 'translateY(0)',\n        fontSize: '14px',\n        lineHeight: '36px',\n        fontWeight: 500,\n        transition: `color ${transitionTime}ms ease-in-out`,\n    };\n    if (isOpen) {\n        styleObject.color = COLORS.primaryContrast;\n    }\n    if (isDisabled) {\n        styleObject.color = COLORS.disabled;\n    }\n    return styleObject;\n};\nexport const getSingleValueStyles = (styles, isOpen, isDisabled, noShrink) => {\n    const styleObject = {\n        ...styles,\n        position: 'relative',\n        maxWidth: '100%',\n        top: 0,\n        transform: 'translateY(0)',\n        fontSize: '14px',\n        fontWeight: 500,\n        lineHeight: '36px',\n        color: COLORS.primaryLight,\n    };\n    if (isOpen) {\n        styleObject.color = COLORS.primaryContrast;\n    }\n    if (isDisabled) {\n        styleObject.color = COLORS.disabled;\n    }\n    if (noShrink) {\n        styleObject.overflow = 'unset';\n    }\n    return styleObject;\n};\nexport const getMenuStyles = (styles) => {\n    return {\n        ...styles,\n        background: '#FFF',\n        boxShadow: '0px 3px 5px rgba(9, 30, 66, 0.2), 0px 0px 1px rgba(9, 30, 66, 0.31)',\n        border: 'none',\n        borderRadius: '8px',\n        color: COLORS.primary,\n        width: '280px',\n        marginTop: '8px',\n        padding: 0,\n    };\n};\nexport const getMenuListStyles = (styles) => {\n    return {\n        ...styles,\n        padding: 0,\n        borderRadius: '8px',\n    };\n};\nexport const getOptionStyles = (styles, isSelected) => {\n    const styleObject = {\n        ...styles,\n        cursor: 'pointer',\n        color: COLORS.primaryLight,\n        fontSize: '14px',\n        fontWeight: 400,\n        lineHeight: '18px',\n    };\n    if (isSelected) {\n        styleObject.backgroundColor = COLORS.primaryLight;\n        styleObject.color = COLORS.primaryContrast;\n    }\n    return styleObject;\n};\nexport const getClearIndicatorStyles = (styles, isOpen) => {\n    const styleObject = {\n        ...styles,\n        color: COLORS.primaryLight,\n        transition: `color ${transitionTime}ms ease-in-out`,\n    };\n    if (isOpen) {\n        styleObject.color = COLORS.primaryContrast;\n    }\n    return styleObject;\n};\nconst SelectedWhiteOption = css `\n    :after {\n        content: ' ';\n        background: url('${BlackCheckmarkIcon}') center center no-repeat;\n        width: 10px;\n        height: 10px;\n        position: absolute;\n        right: 12px;\n        top: 18px;\n    }\n`;\nexport const StyledWhiteDropdownOption = styled(components.Option).withConfig({ displayName: \"StyledWhiteDropdownOption\", componentId: \"sc-10wpnoo\" }) `\n    position: relative;\n    &:active {\n        //background-color: ${COLORS.primary} !important;\n    }\n    &:focus {\n        background-color: ${COLORS.focus};\n    }\n\n    ${(props) => {\n    if (props.isSelected) {\n        return SelectedWhiteOption;\n    }\n}}\n`;\nexport const getWhitePlaceholderStyles = (styles) => {\n    return {\n        ...styles,\n        color: COLORS.disabled,\n    };\n};\nexport const getWhiteControlStyles = (styles, isFocused, isDisabled, noShrink, fullWidth) => {\n    const styleObject = {\n        ...styles,\n        fontSize: '14px',\n        borderColor: COLORS.secondaryHover,\n        width: 'auto',\n        display: 'inline-flex',\n    };\n    if (isFocused) {\n        styleObject.borderColor = COLORS.focus;\n        styleObject.boxShadow = `0 0 0 1px ${COLORS.focus}`;\n    }\n    if (isDisabled) {\n        styleObject.cursor = 'not-allowed';\n        styleObject.border = `1px solid ${COLORS.Border}`;\n        styleObject.backgroundColor = 'white';\n    }\n    if (noShrink) {\n        styleObject.flexWrap = 'nowrap';\n    }\n    if (fullWidth) {\n        styleObject.width = '100%';\n    }\n    return styleObject;\n};\nexport const getWhiteMenuStyles = (styles) => {\n    return {\n        ...styles,\n        background: '#FFF',\n        border: 'none',\n        borderRadius: '8px',\n        color: COLORS.primary,\n        padding: 0,\n        boxShadow: '0px 0px 4px rgba(0, 0, 0, 0.1)',\n        marginTop: '4px',\n        width: '280px',\n    };\n};\nexport const getWhiteMenuListStyles = (styles) => {\n    return {\n        ...styles,\n        padding: 0,\n        borderRadius: '8px',\n    };\n};\nexport const getWhiteOptionStyles = (styles, isSelected) => {\n    const styleObject = {\n        ...styles,\n        cursor: 'pointer',\n        color: COLORS.primaryLight,\n        fontSize: '14px',\n        fontWeight: 400,\n        lineHeight: '18px',\n    };\n    if (isSelected) {\n        styleObject.color = COLORS.primaryLight;\n        styleObject.backgroundColor = 'white';\n    }\n    return styleObject;\n};\n","import React, { useEffect, useMemo, useState } from 'react';\nimport ReactSelect, { components, } from 'react-select';\nimport { z } from 'zod';\nimport { StyledCaretIcon, StyledCloseIcon, StyledDropdownIndicator, StyledOption, StyledWhiteDropdownOption, getClearIndicatorStyles, getControlStyles, getMenuListStyles, getMenuStyles, getOptionStyles, getPlaceholderStyles, getSingleValueStyles, getWhiteControlStyles, getWhiteMenuListStyles, getWhiteMenuStyles, getWhiteOptionStyles, getWhitePlaceholderStyles, } from './selectField2.styles';\nconst DropdownIndicator = (props) => {\n    return (React.createElement(StyledDropdownIndicator, { ...props },\n        React.createElement(StyledCaretIcon, { name: \"caretDown\", className: (props.selectProps.menuIsOpen ? 'rotated ' : '') +\n                (props.selectProps.isDisabled ? 'disabled ' : '') +\n                (props.whiteVariant ? 'whiteVariant' : '') })));\n};\nconst ClearIndicator = (props) => {\n    return (components.ClearIndicator && (React.createElement(components.ClearIndicator, { ...props },\n        React.createElement(StyledCloseIcon, { name: 'close', className: props.selectProps.menuIsOpen ? 'menu-is-open' : '' }))));\n};\nexport function SelectField2({ placeholder, options, value, onChange, disabled = false, isClearable = true, whiteVariant = false, noShrink = false, fullWidth = false, }) {\n    const [isOpen, setIsOpen] = useState(false);\n    const [selected, setSelected] = useState();\n    const defaultStyles = useMemo(() => ({\n        control: (styles, props) => getControlStyles(styles, props.isFocused, isOpen, disabled, noShrink, fullWidth),\n        placeholder: (styles) => getPlaceholderStyles(styles, isOpen, disabled),\n        singleValue: (styles) => getSingleValueStyles(styles, isOpen, disabled, noShrink),\n        menu: (styles) => getMenuStyles(styles),\n        menuList: (styles) => getMenuListStyles(styles),\n        menuPortal: (styles) => ({\n            ...styles,\n            zIndex: 1000,\n        }),\n        option: (styles, props) => getOptionStyles(styles, props.isSelected),\n        clearIndicator: (styles) => getClearIndicatorStyles(styles, isOpen),\n    }), [disabled, fullWidth, isOpen, noShrink]);\n    const whiteVariantStyles = useMemo(() => ({\n        placeholder: (styles) => getWhitePlaceholderStyles(styles),\n        control: (styles, props) => getWhiteControlStyles(styles, props.isFocused, disabled, noShrink, fullWidth),\n        menu: (styles) => getWhiteMenuStyles(styles),\n        menuList: (styles) => getWhiteMenuListStyles(styles),\n        menuPortal: (styles) => ({\n            ...styles,\n            zIndex: 1000,\n        }),\n        option: (styles, props) => getWhiteOptionStyles(styles, props.isSelected),\n    }), [disabled, fullWidth, noShrink]);\n    useEffect(() => {\n        setSelected(value);\n    }, [value]);\n    const handleChange = (option) => {\n        if (disabled) {\n            return;\n        }\n        if (isClearable && option === null) {\n            setSelected(undefined);\n            onChange(null);\n            return;\n        }\n        if (!isOption(option)) {\n            return;\n        }\n        setSelected(option.value);\n        onChange(option.value);\n    };\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ReactSelect, { placeholder: placeholder, options: options, isSearchable: false, isClearable: isClearable, isDisabled: disabled, menuIsOpen: isOpen, onMenuOpen: () => {\n                setIsOpen(true);\n            }, onMenuClose: () => {\n                setIsOpen(false);\n            }, components: {\n                DropdownIndicator: (props) => (React.createElement(DropdownIndicator, { whiteVariant: whiteVariant, ...props })),\n                ClearIndicator,\n                IndicatorSeparator: () => React.createElement(React.Fragment, null),\n                Option: whiteVariant ? StyledWhiteDropdownOption : StyledOption,\n            }, value: selected ? options.find((option) => option.value === selected) : null, onChange: handleChange, styles: whiteVariant ? whiteVariantStyles : defaultStyles, menuPortalTarget: document.body })));\n}\nfunction isOption(arg) {\n    return z.object({ label: z.string(), value: z.string() }).safeParse(arg).success;\n}\n","import { useState, useCallback, useEffect, useReducer } from 'react';\nimport copyToClipboard from 'copy-to-clipboard';\nimport { toaster } from 'toasterhea';\nimport { successToast } from '~/utils/toast';\nimport Toast from '~/shared/toasts/Toast';\nimport { Layer } from '~/utils/Layer';\nconst SUSTAIN_FOR = 3000; // ms\nconst copyToast = toaster(Toast, Layer.Toast);\nexport default function useCopy() {\n    const [isCopied, setIsCopied] = useState(false);\n    const [copiedAt, touch] = useReducer((current, now) => (current + SUSTAIN_FOR > now ? current : now), Number.NEGATIVE_INFINITY);\n    const copy = useCallback((value, { onAfterCopied, toastMessage = 'Copied!', } = {}) => {\n        copyToClipboard(value);\n        onAfterCopied?.(value);\n        if (typeof toastMessage === 'string') {\n            successToast({\n                title: toastMessage,\n            }, copyToast);\n        }\n        touch(Date.now());\n    }, []);\n    useEffect(() => {\n        if (copiedAt < 0) {\n            return () => { };\n        }\n        setIsCopied(true);\n        const timeout = setTimeout(() => {\n            setIsCopied(false);\n        }, SUSTAIN_FOR);\n        return () => {\n            clearTimeout(timeout);\n        };\n    }, [copiedAt]);\n    return {\n        copy,\n        isCopied,\n    };\n}\n","const normalizeVersion = (ver) => {\n    if (!ver)\n        return [NaN, NaN, NaN];\n    const parts = ver.split('.').map((part) => {\n        const num = parseInt(part, 10);\n        return isNaN(num) ? NaN : num;\n    });\n    // Check if any part is invalid first\n    if (parts.some(isNaN))\n        return [NaN, NaN, NaN];\n    // Then pad missing parts with 0\n    return [parts[0] ?? 0, parts[1] ?? 0, parts[2] ?? 0];\n};\nexport const isNodeVersionGreaterThanOrEqualTo = (version, requiredVersion) => {\n    const [major, minor, patch] = normalizeVersion(version);\n    const [requiredMajor, requiredMinor, requiredPatch] = normalizeVersion(requiredVersion);\n    // Handle invalid inputs\n    if (isNaN(major) ||\n        isNaN(minor) ||\n        isNaN(patch) ||\n        isNaN(requiredMajor) ||\n        isNaN(requiredMinor) ||\n        isNaN(requiredPatch)) {\n        return false;\n    }\n    // Compare each part sequentially\n    if (major !== requiredMajor) {\n        return major > requiredMajor;\n    }\n    if (minor !== requiredMinor) {\n        return minor > requiredMinor;\n    }\n    return patch >= requiredPatch;\n};\n","import { Minute } from '~/consts';\nconst units = [\n    {\n        max: 60000,\n        value: 1000,\n        name: 'second',\n        prev: 'a second ago',\n    },\n    {\n        max: 2760000,\n        value: 60000,\n        name: 'minute',\n        prev: 'a minute ago',\n    },\n    {\n        max: 72000000,\n        value: 3600000,\n        name: 'hour',\n        prev: 'an hour ago',\n    },\n    {\n        max: 518400000,\n        value: 86400000,\n        name: 'day',\n        prev: 'yesterday',\n    },\n    {\n        max: 2419200000,\n        value: 604800000,\n        name: 'week',\n        prev: 'last week',\n    },\n    {\n        max: 28512000000,\n        value: 2592000000,\n        name: 'month',\n        prev: 'last month',\n    }, // max: 11 months\n];\nfunction format(diff, divisor, unit, prev) {\n    const val = Math.round(diff / divisor);\n    return val <= 1 ? prev : `${val} ${unit}s ago`;\n}\nexport function ago(date) {\n    const diff = Math.abs(Date.now() - date.getTime());\n    // less than a minute\n    if (diff < Minute) {\n        return 'just now';\n    }\n    for (let i = 0; i < units.length; i += 1) {\n        if (diff < units[i].max) {\n            return format(diff, units[i].value, units[i].name, units[i].prev);\n        }\n    }\n    // `year` is the final unit.\n    // same as:\n    //  {\n    //    max: Infinity,\n    //    value: 31536000000,\n    //    name: 'year',\n    //    prev: 'last year'\n    //  }\n    return format(diff, 31536000000, 'year', 'last year');\n}\nfunction humanFormat(diff, divisor, unit) {\n    const val = Math.round(diff / divisor);\n    return `${val} ${unit}${val === 1 ? '' : 's'}`;\n}\nexport function humanize(durationSeconds) {\n    const durationMs = durationSeconds * 1000;\n    for (let i = 0; i < units.length; i += 1) {\n        if (durationMs < units[i].max) {\n            return humanFormat(durationMs, units[i].value, units[i].name);\n        }\n    }\n    return humanFormat(durationMs, 31536000000, 'year');\n}\n","import CopyIcon from '@atlaskit/icon/glyph/copy';\nimport React, { useMemo, useState, useEffect } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { getSelfDelegationFraction } from '~/getters';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useAllOperatorsForWalletQuery } from '~/hooks/operators';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport useOperatorLiveNodes from '~/hooks/useOperatorLiveNodes';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport FormModal, { CopyButtonWrapAppendix, ErrorLabel, FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { stakeOnSponsorship } from '~/services/sponsorships';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Label from '~/shared/components/Ui/Label';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport Toast from '~/shared/toasts/Toast';\nimport { isNodeVersionGreaterThanOrEqualTo } from '~/shared/utils/nodeVersion';\nimport { COLORS } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { humanize } from '~/shared/utils/time';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isMessagedObject } from '~/utils/exceptions';\nimport { Route as R } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nconst limitErrorToaster = toaster(Toast, Layer.Toast);\nconst requiredNodeVersion = '102.0.0';\nfunction JoinSponsorshipModal({ chainId, onResolve, preselectedOperator, sponsorship, ...props }) {\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const wallet = useWalletAccount();\n    const { data: operatorChoices = null } = useAllOperatorsForWalletQuery(wallet);\n    const [operator, setSelectedOperator] = useState(preselectedOperator);\n    const { id: operatorId, dataTokenBalanceWei: operatorBalance, metadata } = operator;\n    const hasUndelegationQueue = operator.queueEntries.length > 0;\n    const { streamId } = sponsorship;\n    const [busy, setBusy] = useState(false);\n    const [rawAmount, setRawAmount] = useState('');\n    const amount = ((a) => (a > 0n ? a : 0n))(toBigInt(rawAmount || 0, decimals));\n    const heartbeats = useInterceptHeartbeats(operatorId);\n    const { count: liveNodesCount, isLoading: liveNodesCountLoading } = useOperatorLiveNodes(heartbeats);\n    const liveNodesOk = (!liveNodesCountLoading && liveNodesCount > 0) ||\n        /**\n         * Relax live node checking for broken operators (v1) as they cannot join the recovery\n         * sponsorship otherwise.\n         */\n        operator.contractVersion === 1;\n    const insufficientFunds = amount > operatorBalance;\n    const minimumSelfDelegationFraction = useConfigValueFromChain('minimumSelfDelegationFraction', (value) => toFloat(value, decimals)) || toBN(0);\n    const minimumSelfDelegationAmount = toBigInt(toBN(operator.valueWithoutEarnings).multipliedBy(minimumSelfDelegationFraction));\n    const earlyLeaverPenaltyWei = useConfigValueFromChain('earlyLeaverPenaltyWei') || 0n;\n    const ownerDelegationPercentage = useMemo(() => getSelfDelegationFraction(operator), [operator]);\n    const currentSelfDelegationAmount = toBigInt(toBN(operator.valueWithoutEarnings).multipliedBy(ownerDelegationPercentage));\n    const isBelowSelfFundingLimit = ownerDelegationPercentage.isLessThan(minimumSelfDelegationFraction);\n    const minimumStakeWei = useConfigValueFromChain('minimumStakeWei');\n    const isAboveMinimumStake = minimumStakeWei != null && amount >= minimumStakeWei;\n    const canSubmit = amount > 0n &&\n        !insufficientFunds &&\n        liveNodesOk &&\n        isAboveMinimumStake &&\n        !hasUndelegationQueue &&\n        !isBelowSelfFundingLimit;\n    const { copy } = useCopy();\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    const clean = amount === 0n;\n    return (React.createElement(FormModal, { ...props, title: \"Join Sponsorship as Operator\", canSubmit: canSubmit && !busy, submitLabel: \"Join\", submitting: busy, onBeforeAbort: (reason) => !busy && (clean || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                await stakeOnSponsorship(chainId, sponsorship.id, amount, operator.id, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isMessagedObject(e) && /error_tooManyOperators/.test(e.message)) {\n                    return void errorToast({\n                        title: 'Limit reached',\n                        desc: 'All operator slots are taken.',\n                    }, limitErrorToaster);\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please set the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" to stake on the selected Sponsorship\"),\n        React.createElement(Section, null,\n            React.createElement(Label, { \"$wrap\": true }, \"Sponsorship Stream ID\"),\n            React.createElement(FieldWrap, { \"$grayedOut\": true },\n                React.createElement(TextInput, { defaultValue: streamId, readOnly: true }),\n                !!streamId && (React.createElement(CopyButtonWrapAppendix, null,\n                    React.createElement(\"button\", { type: \"button\", onClick: () => void copy(streamId) },\n                        React.createElement(CopyIcon, { label: \"Copy\", size: \"small\" }))))),\n            React.createElement(StyledLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Amount to stake\"),\n                rawAmount !== '' && !isAboveMinimumStake && (React.createElement(ErrorLabel, null,\n                    \"Minimum value is\",\n                    ' ',\n                    React.createElement(SponsorshipDecimals, { amount: minimumStakeWei || 0n })))),\n            React.createElement(FieldWrap, { \"$invalid\": rawAmount !== '' && !isAboveMinimumStake },\n                React.createElement(TextInput, { autoFocus: true, name: \"amount\", onChange: ({ target }) => void setRawAmount(target.value), placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(operatorBalance, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Minimum stake duration\"),\n                    React.createElement(PropValue, null, humanize(sponsorship.minimumStakingPeriodSeconds))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in Operator\")) : (React.createElement(React.Fragment, null, \"Available balance in Operator\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: operatorBalance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Operator\"),\n                    React.createElement(PropValue, null, operatorChoices?.length === 1 ? (React.createElement(React.Fragment, null, metadata.name != null\n                        ? `${metadata.name} (${truncate(operatorId)})`\n                        : operatorId)) : (React.createElement(React.Fragment, null,\n                        React.createElement(SelectField2, { placeholder: \"Operator\", options: operatorChoices?.map((o) => ({\n                                value: o.id,\n                                label: `${o.metadata.name} (${truncate(o.id)})`,\n                            })) ?? [], value: operator.id, onChange: (id) => {\n                                const selectedOp = operatorChoices?.find((o) => o.id === id);\n                                if (selectedOp) {\n                                    setSelectedOperator(selectedOp);\n                                }\n                            }, whiteVariant: true, isClearable: false }))))))),\n        isBelowSelfFundingLimit && (React.createElement(StyledAlert, { type: \"error\", title: \"Low self-funding\" },\n            \"You cannot stake on Sponsorships because your Operator is below the self-funding requirement of\",\n            ' ',\n            minimumSelfDelegationFraction.multipliedBy(100).toFixed(0),\n            \"%. Increase your Operator stake by at least\",\n            ' ',\n            React.createElement(SponsorshipDecimals, { amount: minimumSelfDelegationAmount - currentSelfDelegationAmount }),\n            ' ',\n            \"to continue.\")),\n        hasUndelegationQueue && (React.createElement(StyledAlert, { type: \"error\", title: \"Warning!\" }, \"Cannot stake on sponsorship while delegators are awaiting undelegation\")),\n        !isBelowSelfFundingLimit && !hasUndelegationQueue && (React.createElement(LiveNodesAndVersionCheck, { liveNodesCountLoading: liveNodesCountLoading, liveNodesCount: liveNodesCount, heartbeats: heartbeats })),\n        sponsorship.minimumStakingPeriodSeconds > 0 && (React.createElement(StyledAlert, { type: \"error\", title: React.createElement(React.Fragment, null,\n                \"This Sponsorship has a minimum staking period of\",\n                ' ',\n                humanize(sponsorship.minimumStakingPeriodSeconds),\n                \". If you unstake or get voted out during this period, you will lose\",\n                ' ',\n                React.createElement(SponsorshipDecimals, { amount: earlyLeaverPenaltyWei }),\n                \" in addition to the normal slashing penalty.\") }))));\n}\nfunction LiveNodesAndVersionCheck({ liveNodesCountLoading, liveNodesCount, heartbeats, }) {\n    const [hasWaitedForHeartbeats, setHasWaitedForHeartbeats] = useState(false);\n    useEffect(() => {\n        const timer = setTimeout(() => {\n            setHasWaitedForHeartbeats(true);\n        }, 6000); // Wait for 6 seconds to ensure heartbeats are available from ~all nodes\n        return () => clearTimeout(timer);\n    }, []);\n    if (!hasWaitedForHeartbeats || liveNodesCountLoading) {\n        return (React.createElement(StyledAlert, { type: \"loading\", title: \"Checking Streamr nodes\" },\n            React.createElement(\"span\", null,\n                \"In order to continue, you need to have, 1 or more Streamr nodes running, and have them all be correctly configured. All of your nodes must be running version \",\n                requiredNodeVersion,\n                \" or higher. You are vulnerable to slashing if you stake with misconfigured nodes.\")));\n    }\n    const nodeVersions = Object.values(heartbeats).map((heartbeat) => heartbeat?.applicationVersion);\n    const areAllNodesRunningRequiredVersion = nodeVersions.every((version) => {\n        // If version is undefined (old node) or null, treat it as not meeting the requirement\n        if (!version) {\n            return false;\n        }\n        return isNodeVersionGreaterThanOrEqualTo(version, requiredNodeVersion);\n    });\n    if (!areAllNodesRunningRequiredVersion) {\n        return (React.createElement(StyledAlert, { type: \"error\", title: \"Streamr nodes are outdated\" },\n            React.createElement(\"p\", null,\n                \"The minimum required version for all of your Streamr nodes is\",\n                ' ',\n                requiredNodeVersion,\n                \" or higher. Please update your nodes.\"),\n            React.createElement(\"a\", { href: R.docs('/guides/how-to-update-your-streamr-node/'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                \"How to upgrade a Streamr node \",\n                React.createElement(LinkIcon, { name: \"externalLink\" }))));\n    }\n    if (liveNodesCount > 0) {\n        return (React.createElement(StyledAlert, { type: \"success\", title: \"Streamr nodes detected\" },\n            React.createElement(\"span\", null, \"Once you stake, your nodes will start working on the stream. Please ensure your nodes have enough resources available to handle the traffic in the stream.\")));\n    }\n    return (React.createElement(StyledAlert, { type: \"error\", title: \"Streamr nodes not detected\" },\n        React.createElement(\"p\", null, \"In order to continue, you need to have one or more Streamr nodes running and correctly configured. You will be slashed if you stake without your nodes contributing resources to the stream.\"),\n        React.createElement(\"a\", { href: R.docs('/node-runners/run-a-node'), target: \"_blank\", rel: \"noreferrer noopener\" },\n            \"How to run a Streamr node \",\n            React.createElement(LinkIcon, { name: \"externalLink\" }))));\n}\nconst StyledAlert = styled(Alert).withConfig({ displayName: \"StyledAlert\", componentId: \"sc-xe7nng\" }) `\n    margin-top: 16px;\n\n    a {\n        color: ${COLORS.link};\n        display: flex;\n        align-items: center;\n    }\n`;\nconst LinkIcon = styled(SvgIcon).withConfig({ displayName: \"LinkIcon\", componentId: \"sc-1tdviir\" }) `\n    width: 24px;\n`;\nconst StyledLabelWrap = styled(WingedLabelWrap).withConfig({ displayName: \"StyledLabelWrap\", componentId: \"sc-8yz978\" }) `\n    margin-top: 10px;\n`;\nexport const joinSponsorshipModal = toaster(JoinSponsorshipModal, Layer.Modal);\n","import { produce } from 'immer';\nimport { create } from 'zustand';\nimport { FlagBusy } from '~/utils/errors';\nconst Flag = {\n    isDelegatingFunds: (operatorId, wallet = '') => [\n        operatorId,\n        wallet.toLowerCase(),\n    ],\n    isUndelegatingFunds: (operatorId, wallet = '') => [\n        operatorId,\n        wallet.toLowerCase(),\n    ],\n    isCreatingSponsorship: (wallet) => [wallet.toLowerCase()],\n    isFundingSponsorship: (sponsorshipId, wallet) => [\n        sponsorshipId,\n        wallet.toLowerCase(),\n    ],\n    isJoiningSponsorshipAsOperator: (sponsorshipId, operatorId) => [\n        sponsorshipId,\n        operatorId,\n    ],\n    isEditingSponsorshipFunding: (sponsorshipId, operatorId) => [\n        sponsorshipId,\n        operatorId,\n    ],\n};\nexport function flagKey(key, ...params) {\n    const fn = Flag[key];\n    return JSON.stringify([key, ...fn(...params)]);\n}\nconst useFlagStore = create((set, get) => {\n    return {\n        flags: {},\n        async wrap(key, fn) {\n            if (get().flags[key]) {\n                throw FlagBusy;\n            }\n            set((store) => produce(store, ({ flags }) => {\n                flags[key] = true;\n            }));\n            try {\n                return await fn();\n            }\n            finally {\n                set((store) => produce(store, ({ flags }) => {\n                    delete flags[key];\n                }));\n            }\n        },\n    };\n});\nexport function useIsFlagged(key) {\n    const { flags } = useFlagStore();\n    return typeof key === 'string' && !!flags[key];\n}\nexport function useFlagger() {\n    return useFlagStore().wrap;\n}\n","import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { Minute } from '~/consts';\nimport { Sponsorship_OrderBy, } from '~/generated/gql/network';\nimport { getAllSponsorships, getParsedSponsorshipById, getSponsorshipsByCreator, getSponsorshipsByStreamId, } from '~/getters';\nimport { getSponsorshipStats } from '~/getters/getSponsorshipStats';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { invalidateActiveOperatorByIdQueries, useOperatorForWalletQuery, } from '~/hooks/operators';\nimport { invalidateSponsorshipFundingHistoryQueries } from '~/hooks/useSponsorshipFundingHistoryQuery';\nimport { createSponsorshipModal } from '~/modals/CreateSponsorshipModal';\nimport { editStakeModal } from '~/modals/EditStakeModal';\nimport { fundSponsorshipModal } from '~/modals/FundSponsorshipModal';\nimport { joinSponsorshipModal } from '~/modals/JoinSponsorshipModal';\nimport { Sponsorship } from '~/parsers/Sponsorship';\nimport { flagKey, useFlagger, useIsFlagged } from '~/shared/stores/flags';\nimport { getSigner, useWalletAccount } from '~/shared/stores/wallet';\nimport { getQueryClient } from '~/utils';\nimport { getBalance } from '~/utils/balance';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { FlagBusy } from '~/utils/errors';\nimport { isRejectionReason } from '~/utils/exceptions';\nimport { getSponsorshipLeavePenalty } from '~/utils/sponsorships';\nimport { errorToast } from '~/utils/toast';\nimport { useTokenInfo } from '~/utils/tokens';\nimport { useRequestedBlockNumber } from '.';\nasync function getSponsorshipsAndParse(chainId, getter) {\n    const sponsorships = [];\n    const rawSponsorships = await getter();\n    for (const raw of rawSponsorships) {\n        sponsorships.push(Sponsorship.parse(raw, chainId));\n    }\n    return sponsorships;\n}\nfunction invalidateSponsorshipsForCreatorQueries(chainId, address) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: [\n            'useSponsorshipsForCreatorQuery',\n            chainId,\n            address?.toLowerCase() || '',\n        ],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipsForCreatorQuery(address, { pageSize = 10, searchQuery, orderBy, orderDirection, filters, } = {}) {\n    const currentChainId = useCurrentChainId();\n    const creator = address?.toLowerCase() || '';\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return useInfiniteQuery({\n        queryKey: [\n            'useSponsorshipsForCreatorQuery',\n            currentChainId,\n            creator,\n            pageSize,\n            searchQuery,\n            orderBy,\n            orderDirection,\n            filters?.expired,\n            filters?.inactive,\n            filters?.my,\n            filters?.noFunding,\n            operator?.id,\n        ],\n        async queryFn({ pageParam: skip }) {\n            if (!creator) {\n                return {\n                    skip,\n                    sponsorships: [],\n                };\n            }\n            const sponsorships = await getSponsorshipsAndParse(currentChainId, () => getSponsorshipsByCreator(currentChainId, creator, {\n                first: pageSize,\n                skip,\n                searchQuery,\n                orderBy: mapSponsorshipOrder(orderBy),\n                orderDirection: orderDirection,\n                force: true,\n                hasOperatorId: filters?.my ? operator?.id : undefined,\n                includeExpiredFunding: !filters || filters.expired,\n                includeInactive: !filters || filters.inactive,\n                includeWithoutFunding: !filters || filters.noFunding,\n            }));\n            return {\n                skip,\n                sponsorships,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ sponsorships, skip }) => {\n            return sponsorships.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nfunction invalidateAllSponsorshipsQueries(chainId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useAllSponsorshipsQuery', chainId],\n        refetchType: 'active',\n    });\n}\nexport function useAllSponsorshipsQuery({ pageSize = 10, searchQuery, orderBy, orderDirection, filters, }) {\n    const currentChainId = useCurrentChainId();\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return useInfiniteQuery({\n        queryKey: [\n            'useAllSponsorshipsQuery',\n            currentChainId,\n            pageSize,\n            searchQuery,\n            orderBy,\n            orderDirection,\n            filters.expired,\n            filters.inactive,\n            filters.my,\n            filters.noFunding,\n            operator?.id,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const sponsorships = await getSponsorshipsAndParse(currentChainId, () => getAllSponsorships({\n                chainId: currentChainId,\n                first: pageSize,\n                skip,\n                searchQuery,\n                orderBy: mapSponsorshipOrder(orderBy),\n                orderDirection: orderDirection,\n                force: true,\n                hasOperatorId: filters.my && operator != null ? operator.id : undefined,\n                includeExpiredFunding: filters.expired,\n                includeInactive: filters.inactive,\n                includeWithoutFunding: filters.noFunding,\n            }));\n            return {\n                skip,\n                sponsorships,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ sponsorships, skip }) => {\n            return sponsorships.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nfunction invalidateSponsorshipByIdQueries(chainId, sponsorshipId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipByIdQuery', chainId, sponsorshipId.toLowerCase()],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipByIdQuery(sponsorshipId) {\n    const currentChainId = useCurrentChainId();\n    const minBlockNumber = useRequestedBlockNumber();\n    return useQuery({\n        queryKey: [\n            'useSponsorshipByIdQuery',\n            currentChainId,\n            sponsorshipId.toLowerCase(),\n            minBlockNumber,\n        ],\n        queryFn: () => getParsedSponsorshipById(currentChainId, sponsorshipId, {\n            force: true,\n            minBlockNumber,\n        }),\n        retry: false,\n    });\n}\nexport function useSponsorshipsByStreamIdQuery({ pageSize = 10, streamId, orderBy, orderDirection, filters, }) {\n    const currentChainId = useCurrentChainId();\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return useInfiniteQuery({\n        queryKey: [\n            'useSponsorshipsByStreamIdQuery',\n            currentChainId,\n            streamId,\n            pageSize,\n            orderBy,\n            orderDirection,\n            filters?.expired,\n            filters?.inactive,\n            filters?.my,\n            filters?.noFunding,\n            operator?.id,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const sponsorships = await getSponsorshipsAndParse(currentChainId, () => getSponsorshipsByStreamId({\n                chainId: currentChainId,\n                first: pageSize,\n                skip,\n                streamId,\n                orderBy: mapSponsorshipOrder(orderBy),\n                orderDirection: orderDirection,\n                force: true,\n                hasOperatorId: filters?.my ? operator?.id : undefined,\n                includeExpiredFunding: !filters || filters.expired,\n                includeInactive: !filters || filters.inactive,\n                includeWithoutFunding: !filters || filters.noFunding,\n            }));\n            return {\n                skip,\n                sponsorships,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ sponsorships, skip }) => {\n            return sponsorships.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nfunction invalidateSponsorshipsByStreamIdQueries(chainId, streamId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipsByStreamIdQuery', chainId, streamId || ''],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipTokenInfo() {\n    const chainId = useCurrentChainId();\n    return useTokenInfo(getContractAddress('sponsorshipPaymentToken', chainId), chainId);\n}\nexport function useIsCreatingSponsorshipForWallet(wallet) {\n    return useIsFlagged(flagKey('isCreatingSponsorship', wallet || ''));\n}\nexport function useCreateSponsorship() {\n    const withFlag = useFlagger();\n    return useCallback((chainId, wallet, options = {}) => {\n        if (!wallet) {\n            return;\n        }\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isCreatingSponsorship', wallet), async () => {\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        const { sponsorshipId, streamId, blockNumber } = await createSponsorshipModal.pop({\n                            chainId,\n                            balance,\n                            streamId: options.streamId,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorshipId, streamId);\n                        options.onDone?.(sponsorshipId, blockNumber);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Could not create a Sponsorship', e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsFundingSponsorship(sponsorshipId, wallet) {\n    return useIsFlagged(flagKey('isFundingSponsorship', sponsorshipId || '', wallet || ''));\n}\nfunction invalidateSponsorshipDailyBucketsQueries(chainId, sponsorshipId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipDailyBucketsQuery', chainId, sponsorshipId],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipDailyBucketsQuery({ sponsorshipId, period, dataSource, }) {\n    const currentChainId = useCurrentChainId();\n    return useQuery({\n        queryKey: [\n            'useSponsorshipDailyBucketsQuery',\n            currentChainId,\n            sponsorshipId,\n            period,\n            dataSource,\n        ],\n        queryFn: async () => {\n            try {\n                if (!sponsorshipId) {\n                    return [];\n                }\n                return await getSponsorshipStats(currentChainId, sponsorshipId, period, dataSource, {\n                    force: true,\n                    ignoreToday: false,\n                });\n            }\n            catch (e) {\n                console.warn('Could not load sponsorship chart data', e);\n                errorToast({ title: 'Could not load sponsorship chart data' });\n            }\n            return [];\n        },\n    });\n}\n/**\n * Returns a function that takes the user through the process of funding\n * a Sponsorship (with the modal and input validation).\n */\nexport function useFundSponsorshipCallback() {\n    const withFlag = useFlagger();\n    return useCallback((chainId, sponsorship, options = {}) => {\n        void (async () => {\n            try {\n                const wallet = await (await getSigner()).getAddress();\n                try {\n                    await withFlag(flagKey('isFundingSponsorship', sponsorship.id, wallet), async () => {\n                        await getSponsorshipTokenInfo(chainId);\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        await fundSponsorshipModal.pop({\n                            chainId,\n                            sponsorship,\n                            balance,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorship.id);\n                    });\n                    options.onDone?.(wallet);\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Failed to fund a sponsorship', sponsorship.id, e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsJoiningSponsorshipAsOperator(sponsorshipId, operatorId) {\n    return useIsFlagged(flagKey('isJoiningSponsorshipAsOperator', sponsorshipId || '', operatorId || ''));\n}\nexport function useJoinSponsorshipAsOperator() {\n    const withFlag = useFlagger();\n    return useCallback(({ chainId, onJoin, operator, sponsorship, }) => {\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isJoiningSponsorshipAsOperator', sponsorship.id, operator.id), async () => {\n                        const wallet = await (await getSigner()).getAddress();\n                        await joinSponsorshipModal.pop({\n                            chainId,\n                            sponsorship,\n                            preselectedOperator: operator,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorship.id);\n                        onJoin?.();\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Could not join a Sponsorship as an Operator', e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsEditingSponsorshipFunding(sponsorshipId, operatorId) {\n    return useIsFlagged(flagKey('isEditingSponsorshipFunding', sponsorshipId || '', operatorId || ''));\n}\n/**\n * Returns a callback that takes the user through the process\n * of editing their stake.\n */\nexport function useEditSponsorshipFunding() {\n    const withFlag = useFlagger();\n    return useCallback((params) => {\n        const { chainId, sponsorshipOrSponsorshipId, operator } = params;\n        void (async () => {\n            try {\n                try {\n                    const sponsorship = await (async () => {\n                        if (typeof sponsorshipOrSponsorshipId !== 'string') {\n                            return sponsorshipOrSponsorshipId;\n                        }\n                        const result = await getParsedSponsorshipById(chainId, sponsorshipOrSponsorshipId, { force: true });\n                        if (!result) {\n                            throw new Error('Sponsorship not found');\n                        }\n                        return result;\n                    })();\n                    await withFlag(flagKey('isEditingSponsorshipFunding', sponsorship.id, operator.id), async () => {\n                        const wallet = await (await getSigner()).getAddress();\n                        /**\n                         * If the sponsorship token info has already been fetched\n                         * the following call will do nothing. Otherwise, it'll fetch\n                         * and cache it. Speed things up later on.\n                         */\n                        await getSponsorshipTokenInfo(chainId);\n                        const leavePenalty = await getSponsorshipLeavePenalty(chainId, sponsorship.id, operator.id);\n                        await editStakeModal.pop({\n                            chainId,\n                            operator,\n                            sponsorship,\n                            leavePenalty,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorship.id);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Could not edit stake', e);\n            }\n        })();\n    }, [withFlag]);\n}\nconst mapSponsorshipOrder = (columnKey) => {\n    switch (columnKey) {\n        case 'operators':\n            return Sponsorship_OrderBy.OperatorCount;\n        case 'staked':\n            return Sponsorship_OrderBy.TotalStakedWei;\n        case 'apy':\n            return Sponsorship_OrderBy.SpotApy;\n        case 'fundedUntil':\n            return Sponsorship_OrderBy.ProjectedInsolvency;\n        case 'payoutPerDay':\n            return Sponsorship_OrderBy.TotalPayoutWeiPerSec;\n        case 'remainingWei':\n            return Sponsorship_OrderBy.RemainingWei;\n        case 'streamInfo':\n        default:\n            return Sponsorship_OrderBy.Id;\n    }\n};\n/**\n * Invalidates a collection of sponsorship-related queries.\n */\nexport function invalidateSponsorshipQueries(chainId, invalidator, sponsorshipId, streamId = undefined) {\n    if (!invalidator || !sponsorshipId) {\n        return;\n    }\n    invalidateSponsorshipsForCreatorQueries(chainId, invalidator);\n    invalidateAllSponsorshipsQueries(chainId);\n    invalidateSponsorshipByIdQueries(chainId, sponsorshipId);\n    invalidateSponsorshipDailyBucketsQueries(chainId, sponsorshipId);\n    invalidateSponsorshipFundingHistoryQueries(chainId, sponsorshipId);\n    invalidateSponsorshipsByStreamIdQueries(chainId, streamId);\n    /**\n     * Invalidate OperatorById queries used mainly by Operator pages,\n     * too. There's the Sponsorships section there and it's driven\n     * by operator's collection of stakes.\n     */\n    invalidateActiveOperatorByIdQueries(chainId, undefined);\n}\n","import moment from 'moment';\nimport { ChartPeriod } from '~/types';\nimport { toBN } from '~/utils/bn';\nimport { getSponsorshipDailyBuckets } from '~/getters';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nexport const getSponsorshipStats = async (chainId, sponsorshipId, selectedPeriod, dataSource, { force = false, ignoreToday = false } = {}) => {\n    const tokenInfo = await getSponsorshipTokenInfo(chainId);\n    const start = ignoreToday ? moment().utc().startOf('day') : moment().utc();\n    let result;\n    switch (selectedPeriod) {\n        case ChartPeriod.SevenDays:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(7, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneMonth:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(30, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.ThreeMonths:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(90, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneYear:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(365, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.YearToDate:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().startOf('year').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.All:\n            const maxAmount = 999;\n            const maxIterations = 5;\n            const endDate = start.clone().subtract(maxIterations * maxAmount, 'days');\n            const elements = [];\n            // yeah - I'm guessing we will not have a history longer than 5 thousand days :)\n            for (let i = 0; i < maxIterations; i++) {\n                const partialResult = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                    dateLowerThan: start.unix(),\n                    dateGreaterEqualThan: endDate.unix(),\n                    batchSize: maxAmount,\n                    skip: maxAmount * i,\n                    force,\n                });\n                elements.push(...partialResult);\n                if (partialResult.length < maxAmount) {\n                    break; // we're breaking the FOR loop here\n                }\n            }\n            result = elements;\n            break;\n        default:\n            result = [];\n    }\n    return result.map((bucket) => {\n        let yValue;\n        switch (dataSource) {\n            case 'amountStaked':\n                yValue = toBN(bucket.totalStakedWei)\n                    .dividedBy(Math.pow(10, Number(tokenInfo?.decimals.toString())))\n                    .toNumber();\n                break;\n            case 'numberOfOperators':\n                yValue = Number(bucket.operatorCount);\n                break;\n            case 'apy':\n                yValue = Number(bucket.spotAPY) * 100;\n                break;\n            default:\n                yValue = 0;\n                break;\n        }\n        return {\n            x: toBN(bucket.date).multipliedBy(1000).toNumber(),\n            y: yValue,\n        };\n    });\n};\n","import React, { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { Alert as PrestyledAlert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { getSelfDelegatedAmount, getSelfDelegationFraction } from '~/getters';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, } from '~/modals/FormModal';\nimport { delegateToOperator } from '~/services/operators';\nimport Label from '~/shared/components/Ui/Label';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { humanize } from '~/shared/utils/time';\nimport { waitForIndexedBlock } from '~/utils';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nexport default function DelegateFundsModal({ balance, chainId, delegatedTotal, onResolve, operator, ...props }) {\n    const walletAddress = useWalletAccount();\n    const isOwner = walletAddress?.toLowerCase() === operator.owner.toLowerCase();\n    const [submitLabel, title, amountLabel, totalLabel, subtitlePartial] = isOwner\n        ? [\n            'Fund',\n            'Fund Operator',\n            'Amount to stake',\n            'Your stake',\n            'you wish to stake on your Operator',\n        ]\n        : [\n            'Delegate',\n            'Delegate to Operator',\n            'Amount to delegate',\n            'Your delegation',\n            'to delegate to the selected Operator',\n        ];\n    const minimumDelegationWei = useConfigValueFromChain('minimumDelegationWei') || 0n;\n    const minimumSelfDelegationFraction = useConfigValueFromChain('minimumSelfDelegationFraction', (value) => toFloat(value, 18n)) || toBN(0);\n    const minimumDelegationSeconds = useConfigValueFromChain('minimumDelegationSeconds', (value) => !isOwner ? Number(value) : 0) || 0;\n    const [rawAmount, setRawAmount] = useState('');\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const value = toBigInt(rawAmount || 0, decimals);\n    const insufficientFunds = value > balance;\n    const selfDelegationFraction = useMemo(() => getSelfDelegationFraction(operator), [operator]);\n    const nextSelfDelegationFraction = useMemo(() => getSelfDelegationFraction(operator, { offset: value }), [operator, value]);\n    const tooLowCurrentSelfDelegation = !isOwner &&\n        selfDelegationFraction.isLessThanOrEqualTo(minimumSelfDelegationFraction);\n    const tooLowNextSelfDelegation = !isOwner &&\n        nextSelfDelegationFraction.isLessThanOrEqualTo(minimumSelfDelegationFraction);\n    const tooLowOwnerSelfDelegation = tooLowCurrentSelfDelegation || tooLowNextSelfDelegation;\n    const maxNextAmount = useMemo(() => {\n        if (minimumSelfDelegationFraction.isEqualTo(0)) {\n            return 0n;\n        }\n        const operatorSelfStake = getSelfDelegatedAmount(operator);\n        return (toBigInt(toBN(operatorSelfStake).dividedBy(minimumSelfDelegationFraction)) -\n            delegatedTotal -\n            operatorSelfStake);\n    }, [minimumSelfDelegationFraction, operator, delegatedTotal]);\n    const canSubmit = value > 0n &&\n        value >= minimumDelegationWei &&\n        !insufficientFunds &&\n        !tooLowOwnerSelfDelegation;\n    const [busy, setBusy] = useState(false);\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: title, canSubmit: canSubmit && !busy, submitting: busy, submitLabel: submitLabel, onBeforeAbort: (reason) => !busy && (rawAmount === '' || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                await delegateToOperator(chainId, operator.id, value, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please enter the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" tokens\",\n            ' ',\n            subtitlePartial),\n        React.createElement(Section, null,\n            React.createElement(Label, null, amountLabel),\n            React.createElement(FieldWrap, { \"$invalid\": insufficientFunds },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => {\n                        setRawAmount(target.value);\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(balance, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in your wallet\")) : (React.createElement(React.Fragment, null, \"Your wallet balance\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Operator\"),\n                    React.createElement(PropValue, null, operator.id)),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, totalLabel),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: delegatedTotal, tooltip: limitedSpace }))))),\n        React.createElement(React.Fragment, null, tooLowCurrentSelfDelegation ? (React.createElement(Alert, { type: \"error\", title: \"Unable to delegate\" }, \"This operator can not accept any further delegations at the moment, because the operator's own share of funds is below the required limit.\")) : (React.createElement(React.Fragment, null, tooLowNextSelfDelegation && (React.createElement(Alert, { type: \"error\", title: \"Amount too high\" },\n            \"This operator can currently only accept less than\",\n            ' ',\n            React.createElement(\"strong\", null,\n                React.createElement(SponsorshipDecimals, { amount: maxNextAmount })),\n            ' ',\n            \"in further delegations, because operators must stay above a certain proportion of their own funds vs. delegations.\"))))),\n        React.createElement(React.Fragment, null, value > 0n && value < minimumDelegationWei && (React.createElement(Alert, { type: \"notice\", title: React.createElement(React.Fragment, null,\n                \"Minimum delegation is\",\n                ' ',\n                React.createElement(SponsorshipDecimals, { amount: minimumDelegationWei })) }))),\n        React.createElement(React.Fragment, null, operator.contractVersion > 0 && minimumDelegationSeconds > 0 && (React.createElement(Alert, { type: \"notice\", title: `You will need to stay delegated for at least ${humanize(minimumDelegationSeconds)}.` }))),\n        React.createElement(React.Fragment, null, operator.contractVersion < 3 && !isOwner && (React.createElement(Alert, { type: \"error\", title: \"Slashing risk\" }, \"This Operator is running an older version of the Operator smart contract where Delegators are subject to slashing risk if the Operator is voted out of a Sponsorship. In newer Operator versions, Delegators are more protected from slashing.\")))));\n}\nconst Alert = styled(PrestyledAlert).withConfig({ displayName: \"Alert\", componentId: \"sc-11w8du0\" }) `\n    margin-top: 10px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport { getStreamDescription } from '~/getters';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function StreamDescription({ streamId }) {\n    const [desc, setDesc] = useState();\n    const chainId = useCurrentChainId();\n    /**\n     * @todo Refactor using `useQuery`.\n     */\n    useEffect(() => {\n        let mounted = true;\n        setDesc(undefined);\n        setTimeout(async () => {\n            try {\n                const description = await getStreamDescription(chainId, streamId);\n                if (mounted) {\n                    setDesc(description);\n                }\n            }\n            catch (_) {\n                /**\n                 * We're only interested in the happy path here. Ok to ignore\n                 * paths that are not so happy.\n                 */\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [streamId, chainId]);\n    return React.createElement(React.Fragment, null, desc);\n}\n","import React from 'react';\nimport { HubAvatar, HubImageAvatar } from '~/shared/components/AvatarImage';\nexport function OperatorAvatar({ operatorId, imageUrl, }) {\n    if (imageUrl) {\n        return (React.createElement(HubImageAvatar, { src: imageUrl, alt: \"\", placeholder: React.createElement(HubAvatar, { id: operatorId }) }));\n    }\n    return React.createElement(HubAvatar, { id: operatorId });\n}\n","import CheckIcon from '@atlaskit/icon/glyph/check';\nimport JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport { useQuery } from '@tanstack/react-query';\nimport moment from 'moment';\nimport React from 'react';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { StreamDescription } from '~/components/StreamDescription';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { HubAvatar, HubImageAvatar } from '~/shared/components/AvatarImage';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { truncate, truncateStreamName } from '~/shared/utils/text';\nimport { getStreamGptApiUrl } from '~/utils';\nimport { getIpfsGatewayUrl } from '~/utils/ipfs';\nimport { getSponsorshipStakeForOperator } from '~/utils/sponsorships';\nimport Spinner from './Spinner';\nimport { OperatorAvatar } from './avatars';\n/**\n * Operator name and avatar formatter.\n */\nexport function OperatorIdCell({ operatorId, imageUrl, operatorName, truncate: truncateProp = false, }) {\n    return (React.createElement(OperatorIdCellRoot, null,\n        React.createElement(OperatorAvatarWrap, null,\n            React.createElement(OperatorAvatar, { operatorId: operatorId, imageUrl: imageUrl })),\n        React.createElement(OperatorName, { \"$truncate\": truncateProp }, operatorName || truncate(operatorId))));\n}\nconst OperatorAvatarWrap = styled.div.withConfig({ displayName: \"OperatorAvatarWrap\", componentId: \"sc-112yhxn\" }) `\n    height: 32px;\n    width: 32px;\n`;\nconst OperatorName = styled.div.withConfig({ displayName: \"OperatorName\", componentId: \"sc-1p7xhp1\" }) `\n    ${({ $truncate = false }) => $truncate &&\n    css `\n            overflow: hidden;\n            text-overflow: ellipsis;\n            white-space: nowrap;\n            max-width: 12rem;\n        `}\n`;\nconst OperatorIdCellRoot = styled.div.withConfig({ displayName: \"OperatorIdCellRoot\", componentId: \"sc-u8x3bl\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: flex-start;\n    gap: 12px;\n`;\n/**\n * Deleted stream id formatter.\n */\nfunction DeletedStreamIdCell() {\n    return (React.createElement(StreamInfoCell, null,\n        React.createElement(StreamAvatarWrap, null),\n        React.createElement(StreamInfoCellOuter, null,\n            React.createElement(StreamIdWrap, { as: \"em\" }, \"(deleted stream)\"))));\n}\n/**\n * Stream id and description formatter.\n */\nexport function StreamIdCell({ streamId = '', description, }) {\n    const imageUrlQuery = useStreamImageUrlQuery(streamId);\n    if (!streamId) {\n        return React.createElement(DeletedStreamIdCell, null);\n    }\n    return (React.createElement(StreamInfoCell, null,\n        React.createElement(StreamAvatarWrap, null,\n            React.createElement(HubImageAvatar, { src: imageUrlQuery.data || '', alt: \"\", placeholder: imageUrlQuery.isFetching ? (React.createElement(SpinnerWrap, null,\n                    React.createElement(Spinner, { color: \"blue\", size: 10 }))) : (React.createElement(HubAvatar, { id: streamId })) })),\n        React.createElement(StreamInfoCellOuter, null,\n            React.createElement(StreamIdWrap, null, truncateStreamName(streamId)),\n            React.createElement(StreamDescriptionWrap, null, description == null ? (React.createElement(StreamDescription, { streamId: streamId })) : (description)))));\n}\nfunction useStreamImageUrlQuery(streamId) {\n    return useQuery({\n        queryKey: ['useStreamImageUrlQuery', streamId || ''],\n        queryFn: async () => {\n            if (!streamId) {\n                return null;\n            }\n            const resp = await fetch(getStreamGptApiUrl(`streams/${encodeURIComponent(streamId)}`));\n            if (resp.status !== 200) {\n                return null;\n            }\n            return z\n                .object({\n                imageHash: z.string(),\n            })\n                .transform(({ imageHash }) => imageHash ? getIpfsGatewayUrl(imageHash) : null)\n                .parse(await resp.json());\n        },\n        staleTime: Infinity,\n    });\n}\nconst SpinnerWrap = styled.div.withConfig({ displayName: \"SpinnerWrap\", componentId: \"sc-1icfy2\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n`;\nconst StreamAvatarWrap = styled.div.withConfig({ displayName: \"StreamAvatarWrap\", componentId: \"sc-mo25xt\" }) `\n    background: #f0f0f0;\n    border-radius: 50%;\n\n    &,\n    ${SpinnerWrap}, ${HubImageAvatar}, ${HubAvatar} {\n        width: 40px;\n        height: 40px;\n    }\n`;\nconst StreamInfoCellOuter = styled.div.withConfig({ displayName: \"StreamInfoCellOuter\", componentId: \"sc-17z8mkz\" }) ``;\nconst StreamInfoCell = styled.div.withConfig({ displayName: \"StreamInfoCell\", componentId: \"sc-1n4zaz4\" }) `\n    align-items: center;\n    display: flex;\n    gap: 12px;\n    line-height: 26px;\n`;\nconst StreamIdWrap = styled.div.withConfig({ displayName: \"StreamIdWrap\", componentId: \"sc-1sk57wg\" }) `\n    display: block;\n    font-weight: ${MEDIUM};\n    color: ${COLORS.primary};\n`;\nconst StreamDescriptionWrap = styled.div.withConfig({ displayName: \"StreamDescriptionWrap\", componentId: \"sc-zw1kt8\" }) `\n    font-size: 14px;\n    max-width: 208px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    :empty {\n        display: none;\n    }\n`;\n/**\n * Sponsorship's projected insolvency timestamp formatter.\n */\nexport function FundedUntilCell({ projectedInsolvencyAt, remainingBalance, }) {\n    const value = projectedInsolvencyAt == null ? null : moment(projectedInsolvencyAt);\n    return (React.createElement(Iconized, null,\n        value == null || !value.isValid() ? (React.createElement(React.Fragment, null, \"N/A\")) : (React.createElement(Tooltip, { content: value.format('YYYY-MM-DD, HH:mm') }, value.format('YYYY-MM-DD'))),\n        remainingBalance <= 0n && (React.createElement(Tooltip, { content: \"Sponsorship expired\" },\n            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\", \"$svgSize\": {\n                    width: '18px',\n                    height: '18px',\n                } },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" }))))));\n}\nconst Iconized = styled.div.withConfig({ displayName: \"Iconized\", componentId: \"sc-foe5i9\" }) `\n    align-items: center;\n    display: grid;\n    gap: 8px;\n    grid-template-columns: auto auto;\n    line-height: normal;\n\n    ${TooltipIconWrap} svg {\n        width: 18px;\n        height: 18px;\n    }\n`;\nexport function SponsorshipApyCell({ spotAPY, isRunning, }) {\n    return (React.createElement(Iconized, null,\n        `${(spotAPY * 100).toFixed(0)}%`,\n        !isRunning && (React.createElement(Tooltip, { content: \"Sponsorship not runnning\" },\n            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\", \"$svgSize\": {\n                    width: '18px',\n                    height: '18px',\n                } },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" }))))));\n}\nexport function NumberOfOperatorsCell({ sponsorship, currentOperatorId, }) {\n    const joinedByCurrentOperator = !!currentOperatorId &&\n        !!getSponsorshipStakeForOperator(sponsorship, currentOperatorId);\n    return (React.createElement(Iconized, null,\n        sponsorship.operatorCount,\n        joinedByCurrentOperator && (React.createElement(Tooltip, { content: \"Already joined as Operator.\" },\n            React.createElement(TooltipIconWrap, { \"$color\": \"currentColor\" },\n                React.createElement(CheckIcon, { label: \"Already joined as Operator.\" }))))));\n}\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport const Radio = ({ id, name, label, value, checked, disabled, disabledReason, onChange, className, size = 'normal', }) => {\n    const handleChange = useCallback((event) => onChange(event.target.value), [onChange]);\n    return (React.createElement(RadioLabel, { htmlFor: id, title: disabled && disabledReason ? disabledReason : '', className: className + (disabled ? ' disabled' : '') },\n        React.createElement(\"input\", { id: id, name: name, value: value, checked: checked, type: 'radio', disabled: disabled, onChange: handleChange, className: (!label ? 'no-label ' : '') + (size === 'large' ? 'large ' : '') }),\n        !!label && React.createElement(\"div\", null, label)));\n};\nconst RadioLabel = styled.label.withConfig({ displayName: \"RadioLabel\", componentId: \"sc-p5ok2x\" }) `\n    display: flex;\n    align-items: center;\n    cursor: pointer;\n    margin: 0;\n\n    &.disabled {\n        cursor: not-allowed;\n    }\n\n    input[type='radio'] {\n        appearance: none;\n        background-color: transparent;\n        margin: 0;\n        flex-shrink: 0;\n        font: inherit;\n        color: purple;\n        width: 15px;\n        height: 15px;\n        border: 2px solid ${COLORS.radioBorder};\n        border-radius: 50%;\n        transform: translateY(-2px);\n        display: grid;\n        place-content: center;\n\n        &.no-label {\n            transform: none;\n        }\n\n        &:checked {\n            border-color: ${COLORS.link};\n        }\n\n        &:disabled {\n            border-color: ${COLORS.secondaryHover};\n            &:not(:checked) {\n                background-color: ${COLORS.secondaryHover};\n            }\n        }\n\n        &.large {\n            width: 20px;\n            height: 20px;\n            ::before {\n                width: 10px;\n                height: 10px;\n                box-shadow: inset 1.5em 1.5em ${COLORS.link};\n            }\n        }\n    }\n\n    input[type='radio']::before {\n        content: '';\n        width: 7px;\n        height: 7px;\n        border-radius: 50%;\n        transform: scale(0);\n        transition: 120ms transform ease-in-out;\n        box-shadow: inset 1em 1em ${COLORS.link};\n        background-color: transparent;\n    }\n\n    input[type='radio']:checked::before {\n        transform: scale(1);\n    }\n\n    input[type='radio']:disabled:checked::before {\n        box-shadow: inset 1em 1em ${COLORS.disabled};\n    }\n\n    input[type='radio']:focus {\n        //outline: max(2px, 0.15em) solid cadetblue;\n        //outline-offset: max(2px, 0.15em);\n    }\n\n    > * {\n        margin-left: 9px;\n        font-size: 14px;\n        width: 100%;\n    }\n`;\n","import styled from 'styled-components';\nimport { Button } from '~/components/Button';\nexport const LoadMoreButton = styled(Button).withConfig({ displayName: \"LoadMoreButton\", componentId: \"sc-7xhb94\" }) `\n    display: block;\n    margin: 80px auto;\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nexport function Meatball({ alt, color, disabled, layout }) {\n    const vertical = layout === 'vertical';\n    return (React.createElement(Root, { \"$color\": color, \"$disabled\": disabled, \"data-test-hook\": \"meatball\" },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: vertical ? '0 0 4 20' : '0 0 20 4', width: vertical ? '4' : '20', height: vertical ? '20' : '4', \"data-alt\": alt },\n            React.createElement(\"circle\", { cx: \"2\", cy: \"2\", r: \"2\" }),\n            React.createElement(\"circle\", { cx: vertical ? '2' : '10', cy: vertical ? '10' : '2', r: \"2\" }),\n            React.createElement(\"circle\", { cx: vertical ? '2' : '18', cy: vertical ? '18' : '2', r: \"2\" }))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-sl6dmj\" }) `\n    border: 1px solid transparent;\n    border-radius: 2px;\n    opacity: 0.5;\n    padding: 5px;\n    transition: 200ms ease-in-out;\n    transition-property: border-color, opacity, box-shadow;\n\n    svg {\n        display: block;\n    }\n\n    circle {\n        fill: var(--greyDark);\n    }\n\n    ${({ $disabled = false }) => $disabled\n    ? css `\n                  cursor: not-allowed;\n              `\n    : css `\n                  a:hover &,\n                  a:focus &,\n                  :hover,\n                  :focus {\n                      opacity: 1;\n                      transition-duration: 50ms;\n                  }\n              `}\n\n    ${({ $color, $disabled = false }) => propsToCss($disabled, $color)}\n`;\nfunction propsToCss(disabled, color) {\n    if (color === 'white') {\n        return css `\n            border-color: rgba(255, 255, 255, 0.5);\n            box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);\n            opacity: 1;\n\n            circle {\n                fill: var(--white);\n            }\n\n            ${!disabled &&\n            css `\n                :hover,\n                :focus,\n                .dropdown.show & {\n                    border-color: var(--white);\n                    box-shadow: inset 0 0 0 0.5px #ffffff;\n                }\n            `}\n        `;\n    }\n    if (color === 'gray') {\n        return css `\n            border: none;\n            background-color: #efefef;\n            opacity: 1;\n            height: 1.5rem;\n            width: 2rem;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n\n            circle {\n                fill: var(--grey2);\n            }\n\n            ${!disabled &&\n            css `\n                :hover,\n                :focus,\n                .dropdown.show & {\n                    background-color: #f8f8f8;\n                }\n            `}\n        `;\n    }\n}\n","export const compose = (...fns) => (x) => fns.reduceRight((acc, cur) => cur(acc), x);\n","import React, { useCallback, useState, forwardRef } from 'react';\nconst FlushHistoryDecorator = (WrappedComponent) => {\n    const FlushHistoryDecoratorWrapper = ({ onBlur: onBlurProp, ...props }, ref) => {\n        const [blurCount, setBlurCount] = useState(0);\n        const onBlur = useCallback((e) => {\n            // `blurCount` is used as `key` of the actual control. Changing it replaces the control\n            // with a new instance thus the old instance along with its change history gets forgotten.\n            setBlurCount((count) => count + 1);\n            if (onBlurProp) {\n                onBlurProp(e);\n            }\n        }, [onBlurProp]);\n        return React.createElement(WrappedComponent, { ...props, ref: ref, key: blurCount, onBlur: onBlur });\n    };\n    const FlushHistoryDecoratorWrapperFR = forwardRef(FlushHistoryDecoratorWrapper);\n    const OptInFlushHistoryDecorator = ({ flushHistoryOnBlur = false, ...props }, ref) => flushHistoryOnBlur ? (React.createElement(FlushHistoryDecoratorWrapperFR, { ...props, ref: ref })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInFlushHistoryDecorator);\n};\nexport default FlushHistoryDecorator;\n","import React, { useCallback, useRef, forwardRef } from 'react';\nconst sanitise = (value) => (value == null ? '' : value);\nconst normalize = (value) => typeof value === 'string' ? value.trim() : String(sanitise(value));\nconst OnCommitDecorator = (WrappedComponent) => {\n    const OnCommitDecoratorWrapper = ({ noEmptyCommit, onBlur: onBlurProp, onChange: onChangeProp, onCommit: onCommitProp, onFocus: onFocusProp, onKeyDown: onKeyDownProp, smartCommit, ...props }, ref) => {\n        const valueRef = useRef(null);\n        const onCommit = useCallback((value, requireChanged = false) => {\n            if (onCommitProp) {\n                const newValue = noEmptyCommit ? normalize(value) : value;\n                if ((!requireChanged || valueRef.current !== value) &&\n                    (newValue || !noEmptyCommit)) {\n                    onCommitProp(value);\n                }\n            }\n        }, [onCommitProp, noEmptyCommit]);\n        const onChange = useCallback((e) => {\n            if (!smartCommit) {\n                onCommit(e.target.value);\n            }\n            if (onChangeProp) {\n                onChangeProp(e);\n            }\n        }, [onChangeProp, onCommit, smartCommit]);\n        const onKeyDown = useCallback((e) => {\n            if (e.key === 'Enter' &&\n                smartCommit &&\n                e.target instanceof HTMLInputElement) {\n                onCommit(e.target.value);\n            }\n            if (onKeyDownProp) {\n                onKeyDownProp(e);\n            }\n        }, [onKeyDownProp, onCommit, smartCommit]);\n        const onFocus = useCallback((e) => {\n            if (e.target instanceof HTMLInputElement ||\n                e.target instanceof HTMLTextAreaElement) {\n                valueRef.current = e.target.value;\n            }\n            if (onFocusProp) {\n                onFocusProp(e);\n            }\n        }, [onFocusProp]);\n        const onBlur = useCallback((e) => {\n            if (e.target instanceof HTMLInputElement ||\n                e.target instanceof HTMLTextAreaElement) {\n                const { value } = e.target;\n                if (smartCommit) {\n                    onCommit(value, true);\n                }\n            }\n            if (onBlurProp) {\n                onBlurProp(e);\n            }\n        }, [onBlurProp, onCommit, smartCommit]);\n        return (React.createElement(WrappedComponent, { ...props, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, ref: ref }));\n    };\n    const OnCommitDecoratorWrapperFR = forwardRef(OnCommitDecoratorWrapper);\n    const OptInOnCommitDecorator = ({ onCommit, smartCommit, noEmptyCommit, ...props }, ref) => onCommit ? (React.createElement(OnCommitDecoratorWrapperFR, { ...props, noEmptyCommit: noEmptyCommit, onCommit: onCommit, ref: ref, smartCommit: smartCommit })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInOnCommitDecorator);\n};\nexport default OnCommitDecorator;\n","import React, { useState, forwardRef, useEffect, useCallback } from 'react';\nconst sanitizeValue = (value) => (value != null ? value : '');\nconst RevertOnEscapeDecorator = (WrappedComponent) => {\n    const RevertOnEscapeDecoratorWrapper = ({ value: valueProp, onKeyDown: onKeyDownProp, onChange: onChangeProp, ...props }, ref) => {\n        const [value, setValue] = useState(sanitizeValue(valueProp));\n        useEffect(() => {\n            setValue(sanitizeValue(valueProp));\n        }, [valueProp]);\n        const onKeyDown = useCallback((e) => {\n            if (e.key === 'Escape') {\n                setValue(sanitizeValue(valueProp));\n            }\n            if (onKeyDownProp) {\n                onKeyDownProp(e);\n            }\n        }, [valueProp, onKeyDownProp]);\n        const onChange = useCallback((e) => {\n            setValue(e.target.value);\n            if (onChangeProp) {\n                onChangeProp(e);\n            }\n        }, [onChangeProp]);\n        return (React.createElement(WrappedComponent, { ...props, onChange: onChange, onKeyDown: onKeyDown, ref: ref, value: value }));\n    };\n    const RevertOnEscapeDecoratorWrapperFR = forwardRef(RevertOnEscapeDecoratorWrapper);\n    const OptInRevertOnEscapeDecoratorWrapper = ({ revertOnEscape, ...props }, ref) => revertOnEscape ? (React.createElement(RevertOnEscapeDecoratorWrapperFR, { ...props, ref: ref })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInRevertOnEscapeDecoratorWrapper);\n};\nexport default RevertOnEscapeDecorator;\n","import React, { useCallback, forwardRef } from 'react';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nconst SelectAllOnFocusDecorator = (WrappedComponent) => {\n    const SelectAllOnFocusDecoratorWrapper = ({ onFocus: onFocusProp, ...props }, ref) => {\n        const isMounted = useIsMounted();\n        const onFocus = useCallback((e) => {\n            e.persist();\n            setTimeout(() => {\n                if (isMounted() &&\n                    (e.target instanceof HTMLInputElement ||\n                        e.target instanceof HTMLTextAreaElement)) {\n                    e.target.select();\n                }\n            }, 0);\n            if (onFocusProp) {\n                onFocusProp(e);\n            }\n        }, [onFocusProp, isMounted]);\n        return React.createElement(WrappedComponent, { ...props, onFocus: onFocus, ref: ref });\n    };\n    const SelectAllOnFocusDecoratorWrapperFR = forwardRef(SelectAllOnFocusDecoratorWrapper);\n    const OptInSelectAllOnFocusDecoratorWrapper = ({ selectAllOnFocus = false, ...props }, ref) => selectAllOnFocus ? (React.createElement(SelectAllOnFocusDecoratorWrapperFR, { ...props, ref: ref })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInSelectAllOnFocusDecoratorWrapper);\n};\nexport default SelectAllOnFocusDecorator;\n","import styled, { css } from 'styled-components';\nconst StyledInput = styled.input.withConfig({ displayName: \"StyledInput\", componentId: \"sc-1sl8gbr\" }) `\n    background-color: ${({ dark }) => (dark ? '#fdfdfd' : '#ffffff')};\n    border: 1px solid #efefef;\n    border-radius: 4px;\n    box-shadow: none;\n    box-sizing: border-box;\n    color: #323232;\n    display: block;\n    font-size: 1rem;\n    height: 40px;\n    line-height: 1;\n    outline: none;\n    padding: 0 1rem;\n    width: 100%;\n\n    ${({ theme }) => !!(theme && theme.height) &&\n    css `\n            height: ${theme.height};\n        `}\n\n    ${({ theme }) => !!(theme && theme.lineHeight) &&\n    css `\n            line-height: ${theme.lineHeight};\n        `}\n\n    /* Avoids weird browser bug where translucent elements with\n     * same background colour and same opacity render with\n     * different colours\n     */\n    backface-visibility: hidden;\n\n    :disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n        background-color: #efefef;\n        border-color: #efefef;\n        color: #32323280;\n    }\n\n    :not(:disabled):focus {\n        border: 1px solid #0324ff;\n        box-shadow: none;\n        outline: none;\n    }\n\n    ::placeholder {\n        color: #cdcdcd;\n    }\n\n    &[type='number'] {\n        appearance: textfield; /* Hide spin buttons for Mozilla based browsers */\n        display: inline-block;\n        margin: 0;\n        width: 100%;\n    }\n\n    /* Hide spin buttons for Webkit based browsers */\n    &[type='number']::-webkit-inner-spin-button,\n    &[type='number']::-webkit-outer-spin-button {\n        appearance: none;\n        margin: 0;\n    }\n\n    ${({ invalid }) => !!invalid &&\n    css `\n            :not(:disabled),\n            :not(:disabled):focus {\n                border-color: #ff5c00;\n            }\n        `}\n`;\nexport default StyledInput;\n","import React, { forwardRef, } from 'react';\nimport { compose } from '~/shared/utils/compose';\nimport FlushHistoryDecorator from './FlushHistoryDecorator';\nimport OnCommitDecorator from './OnCommitDecorator';\nimport RevertOnEscapeDecorator from './RevertOnEscapeDecorator';\nimport SelectAllOnFocusDecorator from './SelectAllOnFocusDecorator';\nimport StyledInput from './StyledInput';\nconst Text = ({ tag: Tag = 'input', unstyled, ...props }, ref) => unstyled ? (React.createElement(Tag, { ...props, ref: ref })) : (React.createElement(StyledInput, { ...props, as: Tag, ref: ref }));\nconst EnhancedText = compose(FlushHistoryDecorator, OnCommitDecorator, SelectAllOnFocusDecorator, RevertOnEscapeDecorator)(forwardRef(Text));\nEnhancedText.displayName = 'Text';\nexport default EnhancedText;\n","import { gql } from '@apollo/client';\nexport var Aggregation_Interval;\n(function (Aggregation_Interval) {\n    Aggregation_Interval[\"Day\"] = \"day\";\n    Aggregation_Interval[\"Hour\"] = \"hour\";\n})(Aggregation_Interval || (Aggregation_Interval = {}));\nexport var BucketType;\n(function (BucketType) {\n    BucketType[\"Day\"] = \"DAY\";\n    BucketType[\"Hour\"] = \"HOUR\";\n})(BucketType || (BucketType = {}));\nexport var DataUnionStatsBucket_OrderBy;\n(function (DataUnionStatsBucket_OrderBy) {\n    DataUnionStatsBucket_OrderBy[\"DataUnion\"] = \"dataUnion\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionCreationDate\"] = \"dataUnion__creationDate\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionId\"] = \"dataUnion__id\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionMemberCount\"] = \"dataUnion__memberCount\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionOwner\"] = \"dataUnion__owner\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionRevenueWei\"] = \"dataUnion__revenueWei\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionTotalWeight\"] = \"dataUnion__totalWeight\";\n    DataUnionStatsBucket_OrderBy[\"EndDate\"] = \"endDate\";\n    DataUnionStatsBucket_OrderBy[\"Id\"] = \"id\";\n    DataUnionStatsBucket_OrderBy[\"MemberCountAtStart\"] = \"memberCountAtStart\";\n    DataUnionStatsBucket_OrderBy[\"MemberCountChange\"] = \"memberCountChange\";\n    DataUnionStatsBucket_OrderBy[\"RevenueAtStartWei\"] = \"revenueAtStartWei\";\n    DataUnionStatsBucket_OrderBy[\"RevenueChangeWei\"] = \"revenueChangeWei\";\n    DataUnionStatsBucket_OrderBy[\"StartDate\"] = \"startDate\";\n    DataUnionStatsBucket_OrderBy[\"TotalWeightAtStart\"] = \"totalWeightAtStart\";\n    DataUnionStatsBucket_OrderBy[\"TotalWeightChange\"] = \"totalWeightChange\";\n    DataUnionStatsBucket_OrderBy[\"Type\"] = \"type\";\n})(DataUnionStatsBucket_OrderBy || (DataUnionStatsBucket_OrderBy = {}));\nexport var DataUnion_OrderBy;\n(function (DataUnion_OrderBy) {\n    DataUnion_OrderBy[\"CreationDate\"] = \"creationDate\";\n    DataUnion_OrderBy[\"Id\"] = \"id\";\n    DataUnion_OrderBy[\"MemberCount\"] = \"memberCount\";\n    DataUnion_OrderBy[\"Members\"] = \"members\";\n    DataUnion_OrderBy[\"Owner\"] = \"owner\";\n    DataUnion_OrderBy[\"RevenueWei\"] = \"revenueWei\";\n    DataUnion_OrderBy[\"TotalWeight\"] = \"totalWeight\";\n})(DataUnion_OrderBy || (DataUnion_OrderBy = {}));\nexport var MemberStatus;\n(function (MemberStatus) {\n    MemberStatus[\"Active\"] = \"ACTIVE\";\n    MemberStatus[\"Inactive\"] = \"INACTIVE\";\n    MemberStatus[\"None\"] = \"NONE\";\n})(MemberStatus || (MemberStatus = {}));\nexport var Member_OrderBy;\n(function (Member_OrderBy) {\n    Member_OrderBy[\"Address\"] = \"address\";\n    Member_OrderBy[\"DataUnion\"] = \"dataUnion\";\n    Member_OrderBy[\"DataUnionCreationDate\"] = \"dataUnion__creationDate\";\n    Member_OrderBy[\"DataUnionId\"] = \"dataUnion__id\";\n    Member_OrderBy[\"DataUnionMemberCount\"] = \"dataUnion__memberCount\";\n    Member_OrderBy[\"DataUnionOwner\"] = \"dataUnion__owner\";\n    Member_OrderBy[\"DataUnionRevenueWei\"] = \"dataUnion__revenueWei\";\n    Member_OrderBy[\"DataUnionTotalWeight\"] = \"dataUnion__totalWeight\";\n    Member_OrderBy[\"Id\"] = \"id\";\n    Member_OrderBy[\"JoinDate\"] = \"joinDate\";\n    Member_OrderBy[\"Status\"] = \"status\";\n    Member_OrderBy[\"Weight\"] = \"weight\";\n})(Member_OrderBy || (Member_OrderBy = {}));\n/** Defines the order direction, either ascending or descending */\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"asc\";\n    OrderDirection[\"Desc\"] = \"desc\";\n})(OrderDirection || (OrderDirection = {}));\nexport var RevenueEvent_OrderBy;\n(function (RevenueEvent_OrderBy) {\n    RevenueEvent_OrderBy[\"AmountWei\"] = \"amountWei\";\n    RevenueEvent_OrderBy[\"DataUnion\"] = \"dataUnion\";\n    RevenueEvent_OrderBy[\"DataUnionCreationDate\"] = \"dataUnion__creationDate\";\n    RevenueEvent_OrderBy[\"DataUnionId\"] = \"dataUnion__id\";\n    RevenueEvent_OrderBy[\"DataUnionMemberCount\"] = \"dataUnion__memberCount\";\n    RevenueEvent_OrderBy[\"DataUnionOwner\"] = \"dataUnion__owner\";\n    RevenueEvent_OrderBy[\"DataUnionRevenueWei\"] = \"dataUnion__revenueWei\";\n    RevenueEvent_OrderBy[\"DataUnionTotalWeight\"] = \"dataUnion__totalWeight\";\n    RevenueEvent_OrderBy[\"Date\"] = \"date\";\n    RevenueEvent_OrderBy[\"Id\"] = \"id\";\n})(RevenueEvent_OrderBy || (RevenueEvent_OrderBy = {}));\nexport var _SubgraphErrorPolicy_;\n(function (_SubgraphErrorPolicy_) {\n    /** Data will be returned even if the subgraph has indexing errors */\n    _SubgraphErrorPolicy_[\"Allow\"] = \"allow\";\n    /** If the subgraph has indexing errors, data will be omitted. The default. */\n    _SubgraphErrorPolicy_[\"Deny\"] = \"deny\";\n})(_SubgraphErrorPolicy_ || (_SubgraphErrorPolicy_ = {}));\nexport const DataUnionFieldsFragmentDoc = gql `\n    fragment DataUnionFields on DataUnion {\n  id\n  owner\n  memberCount\n  revenueWei\n  creationDate\n}\n    `;\nexport const GetDataUnionsByIdDocument = gql `\n    query getDataUnionsById($id: ID!) {\n  dataUnions(where: {id: $id}) {\n    ...DataUnionFields\n  }\n}\n    ${DataUnionFieldsFragmentDoc}`;\nexport const GetDataUnionsOwnedByDocument = gql `\n    query getDataUnionsOwnedBy($owner: String!) {\n  dataUnions(where: {owner: $owner}) {\n    ...DataUnionFields\n  }\n}\n    ${DataUnionFieldsFragmentDoc}`;\n","import { hexToNumber } from 'web3-utils';\nimport { GetDataUnionsOwnedByDocument, } from '~/generated/gql/du';\nimport getClientConfig from '~/getters/getClientConfig';\nimport { getDataUnionGraphClient } from '~/getters/getGraphClient';\nimport { getWalletAccount, getWalletProvider } from '~/shared/stores/wallet';\nimport { getChainConfig, getChainConfigExtension } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nexport async function getDataUnionsOwnedByInChain(account, chainId) {\n    const client = getDataUnionGraphClient(chainId);\n    const { data = { dataUnions: [] } } = await client.query({\n        query: GetDataUnionsOwnedByDocument,\n        variables: {\n            owner: account.toLowerCase(),\n        },\n        fetchPolicy: 'network-only',\n    });\n    return data.dataUnions.map((du) => ({\n        ...du,\n        chainId,\n    }));\n}\nexport async function getDataUnionClient(chainId) {\n    const provider = await getWalletProvider();\n    const config = getChainConfig(chainId);\n    const { dataUnionJoinServerUrl: joinServerUrl } = getChainConfigExtension(chainId);\n    const providerUrl = config.rpcEndpoints.find((rpc) => rpc.url.startsWith('http'))?.url;\n    const providerChainId = hexToNumber(provider.chainId);\n    const isProviderInCorrectChain = providerChainId === chainId;\n    const account = await getWalletAccount();\n    if (!account) {\n        throw new Error('No wallet connected');\n    }\n    const isInCorrectChainAndUnlocked = isProviderInCorrectChain;\n    /**\n     * Data unions client has to be brought to ethers v6.\n     */\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const clientConfig = getClientConfig(chainId, {\n        auth: {\n            // If MetaMask is in right chain, use it to enable signing\n            ethereum: isInCorrectChainAndUnlocked ? provider : undefined,\n            // Otherwise use a throwaway private key to authenticate and allow read-only mode\n            privateKey: !isInCorrectChainAndUnlocked\n                ? '531479d5645596f264e7e3cbe80c4a52a505d60fad45193d1f6b8e4724bf0304'\n                : undefined,\n        },\n        network: {\n            chainId,\n            rpcs: [\n                {\n                    url: providerUrl,\n                    timeout: 120 * 1000,\n                },\n            ],\n        },\n        dataUnion: {\n            factoryAddress: getContractAddress('dataUnionFactory', chainId),\n        },\n        ...(joinServerUrl\n            ? {\n                joinServerUrl,\n            }\n            : {}),\n    });\n    throw new Error('Not implemented');\n}\nexport async function getDataUnion(dataUnionId, chainId) {\n    const dataUnion = await (await getDataUnionClient(chainId)).getDataUnion(dataUnionId);\n    if (!dataUnion) {\n        throw new Error('Data Union not found');\n    }\n    return dataUnion;\n}\nasync function getDataUnionAdminFee(dataUnionId, chainId) {\n    return (await getDataUnion(dataUnionId, chainId)).getAdminFee();\n}\nexport function getDataUnionAdminFeeForSalePoint(salePoint) {\n    const { beneficiary: dataUnionId, domainId: chainId } = salePoint;\n    return getDataUnionAdminFee(dataUnionId, chainId);\n}\n","export default class Transaction {\n    constructor(emitter) {\n        this.emitter = emitter;\n    }\n    onTransactionHash(cb) {\n        this.emitter.on('transactionHash', cb);\n        return this;\n    }\n    onTransactionComplete(cb) {\n        this.emitter.on('receipt', cb);\n        return this;\n    }\n    onError(cb) {\n        this.emitter.on('error', cb);\n        return this;\n    }\n}\n","import EventEmitter from 'events';\nimport { getDataUnionClient } from '~/getters/du';\nimport Transaction from '~/shared/utils/Transaction';\nimport networkPreflight from '~/utils/networkPreflight';\nexport function deployDataUnion({ productId, adminFee, chainId, }) {\n    const emitter = new EventEmitter();\n    const errorHandler = (error) => {\n        emitter.emit('error', error);\n    };\n    const tx = new Transaction(emitter);\n    void (async () => {\n        try {\n            await networkPreflight(chainId);\n            const client = await getDataUnionClient(chainId);\n            const dataUnion = await client.deployDataUnion({\n                dataUnionName: productId,\n                adminFee,\n            });\n            const duAddress = dataUnion.getAddress();\n            emitter.emit('transactionHash', duAddress);\n            emitter.emit('receipt', {\n                contractAddress: duAddress,\n            });\n        }\n        catch (e) {\n            errorHandler(e);\n        }\n    })();\n    return tx;\n}\n","export const timeUnits = {\n    second: 'second',\n    minute: 'minute',\n    hour: 'hour',\n    day: 'day',\n    week: 'week',\n    month: 'month',\n};\nexport const timeUnitSecondsMultiplierMap = new Map([\n    ['second', 1],\n    ['minute', 60],\n    ['hour', 3600],\n    ['day', 86400],\n    ['week', 604800],\n    ['month', 2.628e6],\n]);\n","import { isAddress } from 'web3-validator';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { ProjectType } from '~/shared/types';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { getChainDisplayName, getChainKey, getCurrentChain, isChainKey, } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nfunction getFormattedChainNameFromContext({ path: [, chainKey] }) {\n    const chainName = typeof chainKey === 'number'\n        ? `#${chainKey}`\n        : isChainKey(chainKey)\n            ? getChainDisplayName(chainKey)\n            : `\"${chainKey}\"`;\n    return `for ${chainName} network`;\n}\nexport const SalePointsPayload = z.record(z.string(), z\n    .object({\n    beneficiaryAddress: z.string().trim(),\n    chainId: z.number(),\n    enabled: z.boolean(),\n    price: z.bigint().gte(0n).or(z.undefined()),\n    pricePerSecond: z.bigint().gte(0n).or(z.undefined()),\n    pricingTokenAddress: z.string().trim(),\n    readOnly: z.boolean(),\n    timeUnit: z.union([\n        z.literal('second'),\n        z.literal('minute'),\n        z.literal('hour'),\n        z.literal('day'),\n        z.literal('week'),\n        z.literal('month'),\n    ]),\n})\n    .superRefine(({ enabled, price, beneficiaryAddress }, ctx) => {\n    if (!enabled) {\n        return;\n    }\n    if (price == null) {\n        return void ctx.addIssue({\n            code: z.ZodIssueCode.custom,\n            message: `Price ${getFormattedChainNameFromContext(ctx)} is missing`,\n            path: ['price'],\n        });\n    }\n    if (price > 0n || beneficiaryAddress === address0) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: `Price ${getFormattedChainNameFromContext(ctx)} has to be a positive number`,\n        path: ['price'],\n    });\n})\n    .superRefine(({ enabled, beneficiaryAddress }, ctx) => {\n    if (!enabled || !beneficiaryAddress || isAddress(beneficiaryAddress)) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: `Beneficiary address ${getFormattedChainNameFromContext(ctx)} is not a valid ERC-20 address`,\n        path: ['beneficiaryAddress'],\n    });\n})\n    .superRefine(({ enabled, pricingTokenAddress }, ctx) => {\n    if (!enabled) {\n        return;\n    }\n    if (!pricingTokenAddress) {\n        return void ctx.addIssue({\n            code: z.ZodIssueCode.custom,\n            message: `Token contract address ${getFormattedChainNameFromContext(ctx)} is missing`,\n            path: ['pricingTokenAddress'],\n        });\n    }\n    if (isAddress(pricingTokenAddress)) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: `Token contract address ${getFormattedChainNameFromContext(ctx)} is not a valid ERC-20 address`,\n        path: ['pricingTokenAddress'],\n    });\n}));\nexport const OpenDataPayload = z.object({\n    name: z.string().trim().min(1, { message: 'Product name cannot be empty' }),\n    type: z.literal(ProjectType.OpenData),\n    description: z.string().trim().min(1, {\n        message: 'Product description cannot be empty',\n    }),\n    creator: z.string().trim().min(1, { message: \"Missing or invalid creator's name\" }),\n    streams: z.array(z.string()).min(1, {\n        message: 'No streams selected',\n    }),\n    imageIpfsCid: z\n        .union([z.string(), z.null(), z.undefined()])\n        .transform((v) => v || ''),\n    imageUrl: z.string().optional(),\n    newImageToUpload: z.instanceof(File).optional(),\n    termsOfUse: z.object({\n        commercialUse: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        redistribution: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        reselling: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        storage: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        termsName: z\n            .string()\n            .trim()\n            .optional()\n            .transform((v) => v || undefined),\n        termsUrl: z\n            .string()\n            .trim()\n            .url('Invalid URL for detailed terms')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n    }),\n    contact: z.object({\n        url: z\n            .string()\n            .trim()\n            .url('Invalid site URL')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        email: z\n            .string()\n            .trim()\n            .email('Invalid contact email')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        twitter: z\n            .string()\n            .trim()\n            .url('Invalid Twitter link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        telegram: z\n            .string()\n            .trim()\n            .url('Invalid Telegram link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        reddit: z\n            .string()\n            .trim()\n            .url('Invalid Reddit link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        linkedIn: z\n            .string()\n            .trim()\n            .url('Invalid LinkedIn link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n    }),\n    salePoints: SalePointsPayload.transform(() => {\n        const { id: chainId } = getCurrentChain();\n        return {\n            [getChainKey(chainId)]: {\n                beneficiaryAddress: address0,\n                chainId,\n                enabled: true,\n                price: 0n,\n                pricePerSecond: 0n,\n                pricingTokenAddress: getContractAddress('data', chainId),\n                readOnly: true,\n                timeUnit: timeUnits.second,\n            },\n        };\n    }),\n});\nconst DataUnionPayload = OpenDataPayload.merge(z.object({\n    type: z.literal(ProjectType.DataUnion),\n    salePoints: SalePointsPayload.refine((salePoints) => Object.values(salePoints).some(({ enabled }) => enabled), {\n        message: 'No chains selected',\n    }).transform((salePoints) => {\n        const [key, value] = Object.entries(salePoints).find(([, { enabled }]) => enabled) || [];\n        return key && value ? { [key]: value } : salePoints;\n    }),\n    adminFee: z\n        .string()\n        .optional()\n        .transform((value, ctx) => {\n        const result = Number.parseFloat(value || '0');\n        if (Number.isNaN(result)) {\n            ctx.addIssue({\n                code: z.ZodIssueCode.custom,\n                message: 'Admin fee is not a number',\n            });\n            return z.NEVER;\n        }\n        return result;\n    })\n        .pipe(z\n        .number()\n        .min(0, 'Admin fee cannot be lower than 0%')\n        .max(100, 'Admin fee cannot be greater than 100%')),\n}));\nconst PaidDataPayload = OpenDataPayload.merge(z.object({\n    type: z.literal(ProjectType.PaidData),\n    salePoints: SalePointsPayload.refine((salePoints) => Object.values(salePoints).some(({ enabled }) => enabled), {\n        message: 'No chains selected',\n    }).transform((salePoints) => {\n        const enabledSalePoints = {};\n        Object.entries(salePoints).forEach(([key, salePoint]) => {\n            if (!salePoint.enabled) {\n                return;\n            }\n            enabledSalePoints[key] = salePoint;\n        });\n        return enabledSalePoints;\n    }),\n}));\nexport const PublishableProjectPayload = z\n    .union([OpenDataPayload, PaidDataPayload, DataUnionPayload])\n    .superRefine(({ imageUrl, newImageToUpload }, ctx) => {\n    if (imageUrl || newImageToUpload) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: 'Cover image is required',\n        path: ['imageUrl'],\n    });\n});\n","import moment from 'moment-timezone';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nconst momentDurationFormatsByTimeUnit = {\n    [timeUnits.second]: 's',\n    [timeUnits.minute]: 'm',\n    [timeUnits.hour]: 'h',\n    [timeUnits.day]: 'd',\n    [timeUnits.week]: 'w',\n    [timeUnits.month]: 'M',\n};\nconst abbrMapping = {\n    [timeUnits.second]: 's',\n    [timeUnits.minute]: 'min',\n    [timeUnits.hour]: 'hr',\n    [timeUnits.day]: 'd',\n    [timeUnits.week]: 'wk',\n    [timeUnits.month]: 'm',\n};\n/**\n * Convert duration to seconds.\n * @param quantity Number of units to convert.\n * @param timeUnit Unit, e.g. day, hour, minute, etc.\n */\nexport function toSeconds(quantity, timeUnit) {\n    const format = momentDurationFormatsByTimeUnit[timeUnit];\n    if (!format) {\n        throw new Error(`Invalid time unit: ${timeUnit}`);\n    }\n    return Math.floor(moment.duration(quantity, format).asSeconds());\n}\nexport const formatDateTime = (timestamp, timezone) => timestamp && timezone\n    ? moment.tz(timestamp, timezone).format('YYYY-MM-DD HH:mm:ss')\n    : undefined;\n/**\n * Returns short form for given time unit.\n * @param timeUnit Time unit to abbreviate.\n */\nexport function getAbbreviation(timeUnit) {\n    return abbrMapping[timeUnit] || '';\n}\n","import { toSeconds } from '~/marketplace/utils/time';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { BN, toBN, toBigInt } from '~/utils/bn';\n/**\n * Converts price per unit into price per given quantity of another unit.\n * @param value An amount/unit pair. If just the amount is given the unit defaults to seconds.\n * @param target A quantity/unit pair. If just the unit is given the quantity default to 1.\n */\nexport function convertPrice(value, target, { roundingMode = BN.ROUND_HALF_UP } = {}) {\n    const [valueAmount, valueUnit] = typeof value === 'bigint' ? [value, timeUnits.second] : value;\n    const [targetQuantity, targetUnit] = typeof target === 'string'\n        ? [1, target]\n        : typeof target === 'number'\n            ? [target, timeUnits.second]\n            : target;\n    return toBigInt(toBN(valueAmount)\n        .dividedBy(toSeconds(1, valueUnit))\n        .multipliedBy(toSeconds(targetQuantity, targetUnit))\n        .dp(0, roundingMode));\n}\n","import { GetProjectsByTextDocument, GetProjectsDocument, } from '~/generated/gql/network';\nimport { getProjectRegistryContract } from '~/getters';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { deployDataUnion } from '~/marketplace/modules/dataUnion/services';\nimport { getSigner, getWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType, TheGraph } from '~/shared/types';\nimport { truncate } from '~/shared/utils/text';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { PublishableProjectPayload } from '~/types/projects';\nimport { toBN } from '~/utils/bn';\nimport { isMessagedObject } from '~/utils/exceptions';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { convertPrice } from '~/utils/price';\nimport { errorToast } from '~/utils/toast';\nimport { call } from '~/utils/tx';\nimport { postImage } from './images';\nconst mapProject = (project) => {\n    let metadata = {};\n    try {\n        metadata = JSON.parse(project.metadata);\n    }\n    catch (e) {\n        console.warn('Could not parse metadata for project', project.id, e);\n    }\n    return {\n        ...project,\n        metadata,\n    };\n};\nconst prepareProjectResult = (results, pageSize) => {\n    let hasNextPage = false;\n    const projects = results.map((p) => mapProject(p));\n    if (projects.length > pageSize) {\n        hasNextPage = true;\n        // Remove last item\n        projects.splice(pageSize, 1);\n    }\n    return {\n        projects,\n        hasNextPage,\n        lastId: projects.length === 0 ? null : projects[projects.length - 1].id,\n    };\n};\nfunction getProjectFilter(params) {\n    const { owner, projectType, streamId } = params;\n    const filter = {};\n    if (projectType === TheGraph.ProjectType.Open) {\n        filter.paymentDetails_ = {\n            pricePerSecond: 0,\n        };\n    }\n    if (projectType === TheGraph.ProjectType.Paid) {\n        filter.paymentDetails_ = {\n            pricePerSecond_gt: 0,\n        };\n    }\n    if (projectType === TheGraph.ProjectType.DataUnion) {\n        filter.isDataUnion = true;\n    }\n    if (owner) {\n        filter.permissions_ = {\n            userAddress: owner,\n            canGrant: true,\n        };\n    }\n    if (streamId) {\n        filter.streams_contains = [streamId];\n    }\n    return filter;\n}\n/**\n * @todo Refactor to use `ProjectParser` and `useInfiniteQuery`.\n */\nexport async function getProjects(params) {\n    const { chainId, first = 20, owner, projectType, skip = 0, streamId } = params;\n    const { data: { projects = [] }, } = await getGraphClient(chainId).query({\n        query: GetProjectsDocument,\n        variables: {\n            skip,\n            first: first + 1,\n            where: getProjectFilter({\n                owner,\n                projectType,\n                streamId,\n            }),\n        },\n        fetchPolicy: 'network-only',\n    });\n    return prepareProjectResult(projects, first);\n}\n/**\n * @todo Refactor to use `ProjectParser`.\n */\nexport async function getProjectsByText(text, params) {\n    const { chainId, first = 20, owner, projectType, skip = 0, streamId } = params;\n    const { data: { projectSearch: projects = [] }, } = await getGraphClient(chainId).query({\n        query: GetProjectsByTextDocument,\n        variables: {\n            first,\n            skip,\n            text,\n            where: getProjectFilter({\n                owner,\n                projectType,\n                streamId,\n            }),\n        },\n        fetchPolicy: 'network-only',\n    });\n    return prepareProjectResult(projects, first);\n}\nasync function formatMetadata({ contact: contactDetails, creator, description, imageIpfsCid: existingImageIpfsCid, newImageToUpload, name, termsOfUse, type, }) {\n    const imageIpfsCid = newImageToUpload\n        ? await postImage(newImageToUpload)\n        : existingImageIpfsCid;\n    return JSON.stringify({\n        name,\n        description,\n        imageIpfsCid,\n        creator,\n        contactDetails,\n        termsOfUse,\n        isDataUnion: type === ProjectType.DataUnion,\n    });\n}\nexport async function getPublishableProjectProperties(project) {\n    const payload = PublishableProjectPayload.parse(project);\n    const salePoints = Object.values(payload.salePoints);\n    const domainIds = [];\n    const paymentDetails = [];\n    const wallet = (await getWalletAccount()) || '';\n    for (let i = 0; i < salePoints.length; i++) {\n        const { beneficiaryAddress, chainId: domainId, enabled, price, pricePerSecond: currentPricePerSecond, pricingTokenAddress, timeUnit, } = salePoints[i];\n        if (!enabled) {\n            continue;\n        }\n        /**\n         * Use current wallet's address as the default beneficiary for *paid* projects\n         * that carry no beneficiary address information. The placeholder for the\n         * beneficiary address input field reflects it, too.\n         */\n        const beneficiary = beneficiaryAddress || (payload.type === ProjectType.PaidData ? wallet : '');\n        const pricePerSecond = await (async () => {\n            if (currentPricePerSecond != null) {\n                /**\n                 * In the current implementation we disallow price changes, so\n                 * if initial `pricePerSecond` is defined we reuse it.\n                 */\n                return currentPricePerSecond;\n            }\n            if (!price) {\n                /**\n                 * 0 (or undefined amount of) tokens per time unit constitues 0 per\n                 * second. No need to fetch decimals.\n                 */\n                return 0n;\n            }\n            return convertPrice([price, timeUnit], timeUnits.second);\n        })();\n        domainIds.push(domainId);\n        paymentDetails.push({\n            beneficiary,\n            pricePerSecond,\n            pricingTokenAddress,\n        });\n    }\n    const metadata = await formatMetadata(payload);\n    return {\n        adminFee: 'adminFee' in payload\n            ? toBN(payload.adminFee).dividedBy(100).toNumber()\n            : void 0,\n        domainIds,\n        metadata,\n        paymentDetails,\n        streams: payload.streams,\n    };\n}\nexport async function createProject(chainId, projectId, options) {\n    const { domainIds, isPublicPurchasable, metadata, minimumSubscriptionSeconds = 0, paymentDetails, streams, } = options;\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = getProjectRegistryContract({\n        chainId,\n        provider: signer,\n    });\n    await call(contract, 'createProject', {\n        args: [\n            projectId,\n            domainIds,\n            paymentDetails,\n            streams,\n            minimumSubscriptionSeconds,\n            isPublicPurchasable,\n            metadata,\n        ],\n    });\n}\nexport async function updateProject(chainId, projectId, options) {\n    const { domainIds, metadata, minimumSubscriptionSeconds = 0, paymentDetails, streams, } = options;\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = getProjectRegistryContract({ chainId, provider: signer });\n    await call(contract, 'updateProject', {\n        args: [\n            projectId,\n            domainIds,\n            paymentDetails,\n            streams,\n            minimumSubscriptionSeconds,\n            metadata,\n        ],\n    });\n}\nexport async function deleteProject(chainId, projectId) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = getProjectRegistryContract({\n        chainId,\n        provider: signer,\n    });\n    try {\n        await call(contract, 'deleteProject', {\n            args: [projectId],\n        });\n    }\n    catch (e) {\n        if (isMessagedObject(e) && /error_projectDoesNotExist/.test(e.message)) {\n            errorToast({\n                title: 'No such project',\n                desc: `Project ${truncate(projectId)} does not exist.`,\n            });\n        }\n        throw e;\n    }\n}\nexport async function deployDataUnionContract(chainId, projectId, adminFee) {\n    await networkPreflight(chainId);\n    return new Promise((resolve, reject) => deployDataUnion({\n        productId: projectId,\n        chainId,\n        adminFee,\n    })\n        .onTransactionComplete(({ contractAddress }) => {\n        if (contractAddress == null) {\n            reject(new Error('DU contract deploy did not return an address!'));\n        }\n        else {\n            resolve(contractAddress);\n        }\n    })\n        .onError((e) => {\n        console.error(e);\n        reject(e);\n    }));\n}\n","/*\n    These are all type\n    {\n        id: label\n    }\n */\n// The order of these must be the same than in the smart contract\nexport const contractCurrencies = {\n    DATA: 'DATA',\n    USD: 'USD',\n    PRODUCT_DEFINED: 'PRODUCT_DEFINED',\n};\nexport const paymentCurrencies = {\n    DATA: 'DATA',\n    ETH: 'ETH',\n    DAI: 'DAI',\n    PRODUCT_DEFINED: 'PRODUCT_DEFINED',\n    NATIVE: 'NATIVE',\n};\nexport const maxFileSizeForImageUpload = 5242880;\n","import { contractCurrencies, paymentCurrencies } from '~/shared/utils/constants';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { toFloat } from '~/utils/bn';\nimport { convertPrice } from '~/utils/price';\nimport { getAbbreviation } from './time';\n/**\n * \"Intelligently\" reduce and display decimals in relation to number size and currency.\n * Human currencies: always 2 decimals for 0-99, always 1 decimal 100-999. 1000+ no decimals\n * DATA currency: Hide decimals for round numbers. 1000+ no decimals.\n * @param value\n * @param currency\n * @param decimals PricingToken decimal count\n * @returns {*}\n */\nexport function formatDecimals(value, currency, decimals) {\n    const bn = toFloat(value, decimals);\n    if (currency === paymentCurrencies.ETH) {\n        return bn.toFixed(4);\n    }\n    if (currency === paymentCurrencies.DAI) {\n        return bn.toFixed(2);\n    }\n    if (currency === paymentCurrencies.PRODUCT_DEFINED) {\n        if (!decimals) {\n            throw new Error('Decimals are required');\n        }\n        return toFloat(value, decimals).toFixed(2);\n    }\n    if (bn.abs().lt(10)) {\n        return currency === contractCurrencies.DATA\n            ? bn.decimalPlaces(3).toString()\n            : bn.toFixed(2);\n    }\n    if (bn.abs().lt(100)) {\n        return currency === contractCurrencies.DATA\n            ? bn.decimalPlaces(2).toString()\n            : bn.toFixed(2);\n    }\n    if (bn.abs().lt(1000)) {\n        return currency === contractCurrencies.DATA\n            ? bn.decimalPlaces(1).toString()\n            : bn.toFixed(1);\n    }\n    return bn.decimalPlaces(0).toString();\n}\n/**\n * Gets most relevant time unit for given price per second.\n * @param pricePerSecond Price per second.\n */\nexport function getMostRelevantTimeUnit(pricePerSecond, decimals) {\n    /**\n     * Go from smallest time unit to the largest and see when we get a value\n     * bigger than 1. This should be the most relevant unit for the user.\n     */\n    const guess = Object.keys(timeUnits).find((unit) => toFloat(convertPrice(pricePerSecond, [1, unit]), decimals).gte(1));\n    return guess || timeUnits.second;\n}\n/**\n * Formats given price to a human readable string\n * @param pricePerSecond Price per second in wei.\n * @param currency Currency.\n * @param decimals Decimals.\n * @param timeUnit TimeUnit to use. If omitted, the most relevant time unit is calculated.\n * @param symbol Symbol to use if currency === PRODUCT_DEFINED.\n */\nexport function formatPrice(pricePerSecond, currency, decimals, timeUnit, symbol) {\n    const actualTimeUnit = timeUnit || getMostRelevantTimeUnit(pricePerSecond, decimals);\n    const price = convertPrice(pricePerSecond, actualTimeUnit);\n    const timeUnitAbbreviation = getAbbreviation(actualTimeUnit);\n    const roundedPrice = formatDecimals(price, currency, decimals);\n    let actualSymbol = currency;\n    if (currency === contractCurrencies.PRODUCT_DEFINED && symbol != null) {\n        actualSymbol = symbol;\n    }\n    return `${roundedPrice} ${actualSymbol} / ${timeUnitAbbreviation}`;\n}\n","import { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { getProjectImageUrl } from '~/getters';\nimport { getDataUnionAdminFeeForSalePoint } from '~/getters/du';\nimport { getMostRelevantTimeUnit } from '~/marketplace/utils/price';\nimport { ProjectType } from '~/shared/types';\nimport { timeUnits, timeUnitSecondsMultiplierMap, } from '~/shared/utils/timeUnit';\nimport { toBigInt } from '~/utils/bn';\nimport { getChainConfig, getChainKey, getCurrentChainId, getMarketplaceChainConfigs, } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { getTokenInfo } from '~/utils/tokens';\nconst ParsedPaymentDetail = z.object({\n    beneficiary: z.string(),\n    domainId: z.coerce.number(),\n    pricePerSecond: z\n        .string()\n        .optional()\n        .default('0')\n        .transform((v) => toBigInt(v)),\n    pricingTokenAddress: z.string(),\n});\nconst ProjectParser = z.object({\n    id: z.union([z.string(), z.undefined()]),\n    isDataUnion: z.boolean().optional().default(false),\n    streams: z.array(z.string()).transform((streams) => streams.sort()),\n    metadata: z\n        .string()\n        .transform((metadata) => JSON.parse(metadata))\n        .pipe(z.object({\n        name: z\n            .string()\n            .optional()\n            .transform((v) => v || ''),\n        description: z\n            .string()\n            .optional()\n            .transform((v) => v || ''),\n        creator: z\n            .string()\n            .optional()\n            .transform((v) => v || ''),\n        imageIpfsCid: z\n            .string()\n            .optional()\n            .transform((v) => v || undefined),\n        imageUrl: z\n            .string()\n            .optional()\n            .transform((v) => v || undefined),\n        termsOfUse: z\n            .object({\n            commercialUse: z.boolean().optional().default(false),\n            redistribution: z.boolean().optional().default(false),\n            reselling: z.boolean().optional().default(false),\n            storage: z.boolean().optional().default(false),\n            termsName: z.string().optional().default(''),\n            termsUrl: z.string().optional().default(''),\n        })\n            .optional()\n            .default({\n            commercialUse: false,\n            redistribution: false,\n            reselling: false,\n            storage: false,\n            termsName: '',\n            termsUrl: '',\n        }),\n        contactDetails: z\n            .object({\n            url: z.string().optional().default(''),\n            email: z.string().optional().default(''),\n            twitter: z.string().optional().default(''),\n            telegram: z.string().optional().default(''),\n            reddit: z.string().optional().default(''),\n            linkedIn: z.string().optional().default(''),\n        })\n            .optional()\n            .default({\n            url: '',\n            email: '',\n            twitter: '',\n            telegram: '',\n            reddit: '',\n            linkedIn: '',\n        }),\n    })),\n    paymentDetails: z.array(ParsedPaymentDetail),\n    permissions: z.array(z.object({\n        canBuy: z.boolean().optional().default(false),\n        canDelete: z.boolean().optional().default(false),\n        canEdit: z.boolean().optional().default(false),\n        canGrant: z.boolean().optional().default(false),\n        userAddress: z.string(),\n    })),\n});\nexport function parseProject(value, options) {\n    const { chainId } = options;\n    return ProjectParser.transform(async ({ id, isDataUnion, streams, metadata: { contactDetails: contact, creator, description, imageIpfsCid, imageUrl, name, termsOfUse, }, paymentDetails, permissions, }) => {\n        const [payment, secondPayment] = paymentDetails;\n        const isOpenData = payment?.pricePerSecond === 0n && !secondPayment;\n        let adminFee;\n        if (isDataUnion) {\n            try {\n                adminFee = await getDataUnionAdminFeeForSalePoint(payment);\n            }\n            catch (e) {\n                console.warn('Failed to load Data Union admin fee', e);\n            }\n        }\n        const chains = getMarketplaceChainConfigs(chainId);\n        const salePoints = {};\n        chains.map(({ id }) => {\n            salePoints[getChainKey(id)] = {\n                beneficiaryAddress: '',\n                chainId: id,\n                enabled: false,\n                price: undefined,\n                pricePerSecond: undefined,\n                pricingTokenAddress: getContractAddress('data', id).toLowerCase(),\n                readOnly: false,\n                timeUnit: timeUnits.day,\n            };\n        });\n        for (let i = 0; i < paymentDetails.length; i++) {\n            try {\n                const { domainId, pricingTokenAddress, pricePerSecond, beneficiary } = paymentDetails[i];\n                /**\n                 * @todo Make sure we can trust domainId's type. It says it's a number thus\n                 * the explicit type coercion *should be* redundant.\n                 */\n                const { id: chainId } = getChainConfig(Number(domainId));\n                const { decimals } = await getTokenInfo(pricingTokenAddress, chainId);\n                const timeUnit = getMostRelevantTimeUnit(pricePerSecond, decimals);\n                const multiplier = timeUnitSecondsMultiplierMap.get(timeUnit);\n                if (!multiplier) {\n                    throw new Error('Invalid multiplier');\n                }\n                salePoints[getChainKey(chainId)] = {\n                    beneficiaryAddress: isOpenData\n                        ? address0\n                        : beneficiary.toLowerCase(),\n                    chainId,\n                    enabled: true,\n                    price: pricePerSecond * toBigInt(multiplier),\n                    pricePerSecond,\n                    pricingTokenAddress: pricingTokenAddress.toLowerCase(),\n                    readOnly: true,\n                    timeUnit,\n                };\n            }\n            catch (e) {\n                console.warn('Could not convert a payment details into a sale point', e);\n            }\n        }\n        return {\n            adminFee: typeof adminFee === 'undefined' ? '' : `${adminFee * 100}`,\n            chainId,\n            contact,\n            creator,\n            description,\n            id,\n            imageIpfsCid,\n            imageUrl: getProjectImageUrl({ imageUrl, imageIpfsCid }),\n            isDataUnion,\n            name,\n            newImageToUpload: undefined,\n            paymentDetails,\n            permissions,\n            salePoints,\n            streams,\n            termsOfUse,\n            type: isDataUnion\n                ? ProjectType.DataUnion\n                : isOpenData\n                    ? ProjectType.OpenData\n                    : ProjectType.PaidData,\n        };\n    }).parseAsync(value);\n}\nfunction getEmptySalePoints(chainId) {\n    const marketplaceChainConfigs = getMarketplaceChainConfigs(chainId);\n    const salePoints = {};\n    marketplaceChainConfigs.map(({ id }) => {\n        salePoints[getChainKey(id)] = {\n            beneficiaryAddress: '',\n            chainId: id,\n            enabled: false,\n            price: undefined,\n            pricePerSecond: undefined,\n            pricingTokenAddress: getContractAddress('data', id).toLowerCase(),\n            readOnly: false,\n            timeUnit: timeUnits.day,\n        };\n    });\n    return salePoints;\n}\nexport function getEmptyParsedProject({ chainId: chainIdProp, ...options }) {\n    const chainId = chainIdProp ?? getCurrentChainId();\n    return {\n        chainId,\n        adminFee: '',\n        contact: {\n            url: '',\n            email: '',\n            twitter: '',\n            telegram: '',\n            reddit: '',\n            linkedIn: '',\n        },\n        creator: '',\n        description: '',\n        id: undefined,\n        imageIpfsCid: undefined,\n        imageUrl: undefined,\n        isDataUnion: false,\n        name: '',\n        newImageToUpload: undefined,\n        paymentDetails: [],\n        permissions: [],\n        salePoints: getEmptySalePoints(chainId),\n        streams: [],\n        termsOfUse: {\n            commercialUse: false,\n            redistribution: false,\n            reselling: false,\n            storage: false,\n            termsName: '',\n            termsUrl: '',\n        },\n        ...options,\n    };\n}\n","import { GetProjectDocument, GetProjectSubscriptionsDocument, } from '~/generated/gql/network';\nimport { parseProject } from '~/parsers/ProjectParser';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { prehandleBehindBlockError } from '~/errors/BehindIndexError';\nexport async function getParsedProjectById(chainId, projectId, { force = false, minBlockNumber = 0 } = {}) {\n    try {\n        const { data: { project }, } = await getGraphClient(chainId).query({\n            query: GetProjectDocument,\n            variables: {\n                id: projectId.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        return (project || null) && (await parseProject(project, { chainId }));\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n}\nexport async function getProjectSubscriptions(chainId, projectId, { force = false } = {}) {\n    const { data: { project }, } = await getGraphClient(chainId).query({\n        query: GetProjectSubscriptionsDocument,\n        variables: {\n            id: projectId,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return project?.subscriptions || [];\n}\n","import { getCoingeckoNetworkId } from '~/utils/chains';\nconst BASE_URL = 'https://streamr-public.s3.amazonaws.com/truswallet-assets/blockchains';\nexport const getTokenLogoUrl = (tokenContractAddress, chainId) => {\n    const networkId = getCoingeckoNetworkId(chainId);\n    /**\n     * For more details see:\n     * https://api.coingecko.com/api/v3/asset_platforms\n     */\n    return `${BASE_URL}/${networkId}/assets/${tokenContractAddress}/logo.png`;\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport Color from 'color';\nconst Circle = styled.div.withConfig({ displayName: \"Circle\", componentId: \"sc-1wgwdd9\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 24px;\n    height: 24px;\n    line-height: 16px;\n    font-size: 16px;\n    border-radius: 50%;\n    color: ${({ tokenColor }) => (Color(tokenColor).isDark() ? '#ffffff' : '#000000')};\n    background-color: ${({ tokenColor }) => tokenColor};\n`;\nconst hashCode = (str) => {\n    let hash = 0;\n    for (let i = 0; i < str.length; i += 1) {\n        // eslint-disable-next-line no-bitwise\n        hash = str.charCodeAt(i) + ((hash << 5) - hash);\n    }\n    return hash;\n};\nconst intToRGB = (i) => {\n    // eslint-disable-next-line no-bitwise\n    const c = (i & 0x00ffffff).toString(16).toUpperCase();\n    return '00000'.substring(0, 6 - c.length) + c;\n};\nconst UnstyledGenericTokenLogo = ({ contractAddress, symbol, ...props }) => {\n    const cssColor = `#${intToRGB(hashCode(contractAddress || ''))}`;\n    return (React.createElement(Circle, { ...props, tokenColor: cssColor }, (symbol || '?').charAt(0).toUpperCase()));\n};\nconst GenericTokenLogo = styled(UnstyledGenericTokenLogo).withConfig({ displayName: \"GenericTokenLogo\", componentId: \"sc-1t6tcv5\" }) ``;\nexport default GenericTokenLogo;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useImage } from 'react-image';\nimport { getTokenLogoUrl } from '~/shared/utils/tokenAssets';\nimport GenericTokenLogo from './GenericTokenLogo';\nconst Image = styled.img.withConfig({ displayName: \"Image\", componentId: \"sc-q6829e\" }) `\n    width: 24px;\n    height: 24px;\n`;\nconst UnstyledTokenLogo = ({ contractAddress, symbol, chainId, ...props }) => {\n    const logoUrl = contractAddress ? getTokenLogoUrl(contractAddress, chainId) : '';\n    const { src: imgSrc } = useImage({\n        useSuspense: false,\n        srcList: [logoUrl],\n    });\n    return imgSrc ? (React.createElement(Image, { ...props, src: imgSrc, alt: \"Token logo\" })) : (React.createElement(GenericTokenLogo, { contractAddress: contractAddress, symbol: symbol }));\n};\nconst TokenLogo = styled(UnstyledTokenLogo).withConfig({ displayName: \"TokenLogo\", componentId: \"sc-li35s9\" }) ``;\nexport default TokenLogo;\n","import React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { Reason, useDiscardableEffect } from 'toasterhea';\nimport { COLORS } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { RejectionReason } from '~/utils/exceptions';\nexport function isAbandonment(e) {\n    return (e === RejectionReason.BackButton ||\n        e === RejectionReason.Backdrop ||\n        e === RejectionReason.CancelButton ||\n        e === RejectionReason.CloseButton ||\n        e === RejectionReason.EscapeKey ||\n        e === Reason.Host ||\n        e === Reason.Unmount ||\n        e === Reason.Update);\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-s6fn4l\" }) `\n    background: #f5f5f5;\n    color: #323232;\n    height: 100%;\n    left: 0;\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 1;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n`;\nconst Column = styled.div.withConfig({ displayName: \"Column\", componentId: \"sc-fzagel\" }) `\n    margin: 0 auto;\n    max-width: 528px;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n`;\nconst ScrollableContent = styled.div.withConfig({ displayName: \"ScrollableContent\", componentId: \"sc-3sac7r\" }) `\n    flex: 1;\n    overflow-y: auto;\n    padding: 0 16px;\n    \n    @media (min-width: 768px) {\n        padding: 0;\n    }\n`;\nconst Nav = styled.div.withConfig({ displayName: \"Nav\", componentId: \"sc-fyo131\" }) `\n    box-sizing: content-box;\n    height: 64px;\n    padding: 48px 16px;\n    \n    @media (min-width: 768px) {\n        padding: 48px 0;\n    }\n\n    button {\n        appearance: none;\n        background: none;\n        border: 0;\n        padding: 0;\n        width: 64px;\n        height: 100%;\n        display: flex;\n        align-items: center;\n        transform: translateX(-31%);\n    }\n\n    button svg {\n        display: block;\n        margin: 0 auto;\n    }\n\n    & + h2 {\n        font-size: 24px;\n        font-weight: 400;\n        line-height: normal;\n        margin: 0 0 20px;\n        padding: 0 16px;\n        \n        @media (min-width: 768px) {\n            padding: 0;\n        }\n    }\n`;\nconst BackButtonIcon = styled(SvgIcon).withConfig({ displayName: \"BackButtonIcon\", componentId: \"sc-1gl78h5\" }) `\n    color: ${COLORS.primaryLight};\n`;\nexport const Actions = styled.div.withConfig({ displayName: \"Actions\", componentId: \"sc-6y7s01\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: flex-end;\n    margin-top: 32px;\n    gap: 16px;\n    padding: 0 16px 16px;\n    background: #f5f5f5;\n    \n    @media (min-width: 768px) {\n        padding: 0 0 16px;\n    }\n\n    @media (max-width: 767px) {\n        flex-direction: column-reverse;\n        align-items: stretch;\n        \n        button {\n            width: 100%;\n        }\n    }\n\n    button {\n        min-width: 120px;\n    }\n`;\nexport default function ProjectModal({ backable = false, children, closeOnEscape = false, onReject, title, }) {\n    useDiscardableEffect((discard) => void setTimeout(discard));\n    useEffect(() => {\n        function onKeyDown(e) {\n            if (e.key === 'Escape' && closeOnEscape) {\n                onReject?.(RejectionReason.EscapeKey);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [onReject, closeOnEscape]);\n    return (React.createElement(Root, null,\n        React.createElement(Column, null,\n            React.createElement(Nav, null, backable && (React.createElement(\"button\", { type: \"button\", onClick: () => void onReject?.(RejectionReason.BackButton) },\n                React.createElement(BackButtonIcon, { name: \"backArrow\" })))),\n            !!title && React.createElement(\"h2\", null,\n                \"\\u200C\",\n                title),\n            React.createElement(ScrollableContent, null, children),\n            React.createElement(Actions, null))));\n}\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { address0 } from '~/consts';\nimport { getAllowance } from '~/getters';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport NetworkIcon from '~/shared/components/NetworkIcon';\nimport TokenLogo from '~/shared/components/TokenLogo';\nimport Text from '~/shared/components/Ui/Text';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { COLORS, LIGHT, MEDIUM } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { toFloat } from '~/utils/bn';\nimport { getChainDisplayName } from '~/utils/chains';\nimport { RejectionReason } from '~/utils/exceptions';\nimport { convertPrice } from '~/utils/price';\nimport ProjectModal, { Actions } from './ProjectModal';\nconst options = [timeUnits.hour, timeUnits.day, timeUnits.week, timeUnits.month].map((unit) => ({\n    label: `${unit.charAt(0).toUpperCase()}${unit.slice(1)}s`, // Uppercase first letter and pluralize\n    value: unit,\n}));\nconst PeriodContainer = styled.div.withConfig({ displayName: \"PeriodContainer\", componentId: \"sc-19jqspw\" }) `\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    background: #ffffff;\n    border-radius: 8px;\n    gap: 16px;\n    padding: 32px 24px;\n    position: relative;\n\n    @media (max-width: 768px) {\n        grid-template-columns: 1fr;\n    }\n`;\nconst DetailsContainer = styled.div.withConfig({ displayName: \"DetailsContainer\", componentId: \"sc-1pwdhu3\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    padding: 24px;\n    margin-top: 12px;\n`;\nconst Chain = styled.div.withConfig({ displayName: \"Chain\", componentId: \"sc-nek5xb\" }) `\n    display: grid;\n    grid-template-columns: auto 1fr;\n    background: ${COLORS.secondary};\n    border-radius: 8px;\n    padding: 18px 16px;\n    gap: 8px;\n    align-items: center;\n`;\nconst ChainIcon = styled(NetworkIcon).withConfig({ displayName: \"ChainIcon\", componentId: \"sc-aylxsz\" }) `\n    width: 32px;\n    height: 32px;\n`;\nconst ChainName = styled.div.withConfig({ displayName: \"ChainName\", componentId: \"sc-qg32fm\" }) `\n    font-weight: 400;\n    font-size: 14px;\n    line-height: 16px;\n`;\nconst Amount = styled.span.withConfig({ displayName: \"Amount\", componentId: \"sc-1bsh4vj\" }) `\n    font-size: 44px;\n    font-weight: ${LIGHT};\n`;\nconst AmountBoxInner = styled.div.withConfig({ displayName: \"AmountBoxInner\", componentId: \"sc-8iawiw\" }) `\n    padding: 0 16px;\n    width: max-content;\n`;\nconst AmountBox = styled.div.withConfig({ displayName: \"AmountBox\", componentId: \"sc-1caxpmp\" }) `\n    background: #f5f5f5;\n    border-radius: 8px;\n    position: relative;\n    margin-top: 12px;\n    line-height: normal;\n`;\nconst AmountScrollable = styled.div.withConfig({ displayName: \"AmountScrollable\", componentId: \"sc-1ki28es\" }) `\n    max-width: 100%;\n    overflow: auto;\n    padding: 44px 0;\n`;\nconst AmountBarInner = styled.div.withConfig({ displayName: \"AmountBarInner\", componentId: \"sc-z4fxmg\" }) `\n    padding: 0 16px;\n\n    > div {\n        height: 19px;\n        display: flex;\n        align-items: center;\n    }\n\n    > div > div {\n        overflow: hidden;\n        text-overflow: ellipsis;\n        max-width: 100%;\n    }\n\n    > div > * + div {\n        margin-left: 12px;\n    }\n\n    > div > span {\n        flex-grow: 1;\n    }\n`;\nconst AmountBar = styled.div.withConfig({ displayName: \"AmountBar\", componentId: \"sc-3uap05\" }) `\n    letter-spacing: 0.05em;\n    font-size: 12px;\n    white-space: nowrap;\n    width: 100%;\n    color: #525252;\n    text-transform: uppercase;\n    position: absolute;\n    padding: 18px 0;\n    pointer-events: none;\n\n    * + & {\n        color: #a3a3a3;\n        top: 90px;\n    }\n\n    em {\n        background: white;\n        padding: 2px 4px;\n        border-radius: 2px;\n        font-style: normal;\n        margin-right: 0.25em;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n`;\nconst Currency = styled.span.withConfig({ displayName: \"Currency\", componentId: \"sc-dpb4da\" }) `\n    font-weight: ${MEDIUM};\n    font-size: 12px;\n    line-height: 24px;\n    margin-left: 8px;\n`;\nexport default function AccessPeriodModal({ account = address0, backable = false, balance = 0n, chainId = 137, onReject, onResolve, pricePerSecond = 0n, quantity = 1, tokenAddress = address0, tokenDecimals = 18n, tokenSymbol = 'DATA', unit = timeUnits.hour, usdRate = 1, }) {\n    const [rawLength, setRawLength] = useState(`${quantity}`);\n    useEffect(function updateRawLength() {\n        setRawLength(`${quantity}`);\n    }, [quantity]);\n    const length = Math.max(0, Number(rawLength) || 0);\n    const [selectedUnit, setSelectedUnit] = useState(unit);\n    useEffect(() => {\n        setSelectedUnit(unit);\n    }, [unit]);\n    const total = ((a) => (a > 0n ? a : 0n))(convertPrice(pricePerSecond, [length, selectedUnit]));\n    const disabled = total === 0n;\n    const totalInUSD = toFloat(total, tokenDecimals).multipliedBy(usdRate);\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    /**\n     * It's safe to use `useIsMounted` here because even if we rerender the component\n     * for a different purchase it'll be disabled if there's one already being processed.\n     */\n    const isMounted = useIsMounted();\n    return (React.createElement(ProjectModal, { backable: backable, closeOnEscape: true, onReject: onReject, title: \"Choose access period\" },\n        React.createElement(\"form\", { onSubmit: async (e) => {\n                e.preventDefault();\n                if (disabled || isSubmitting) {\n                    return;\n                }\n                try {\n                    setIsSubmitting(true);\n                    if (!length) {\n                        throw new Error('Invalid quantity');\n                    }\n                    const allowance = await getAllowance(chainId, tokenAddress, account, {\n                        recover: true,\n                    });\n                    onResolve?.({\n                        quantity: length,\n                        unit: selectedUnit,\n                        exceedsAllowance: allowance < total,\n                    });\n                }\n                catch (e) {\n                    onReject?.(e);\n                }\n                finally {\n                    if (isMounted()) {\n                        setIsSubmitting(false);\n                    }\n                }\n            } },\n            React.createElement(PeriodContainer, null,\n                React.createElement(Text, { value: rawLength, onChange: (e) => {\n                        setRawLength(e.target.value);\n                    }, onCommit: setRawLength, autoFocus: true, name: \"quantity\", disabled: isSubmitting }),\n                React.createElement(SelectField2, { placeholder: \"Select a time unit\", options: options, value: selectedUnit, onChange: setSelectedUnit, isClearable: false, fullWidth: true, disabled: isSubmitting })),\n            React.createElement(DetailsContainer, null,\n                React.createElement(Chain, null,\n                    React.createElement(ChainIcon, { chainId: chainId }),\n                    React.createElement(ChainName, null, getChainDisplayName(chainId))),\n                React.createElement(AmountBox, null,\n                    React.createElement(AmountBar, null,\n                        React.createElement(AmountBarInner, null,\n                            React.createElement(\"div\", null,\n                                React.createElement(\"em\", null, toFloat(balance, tokenDecimals).toFixed(3)),\n                                ' ',\n                                React.createElement(\"span\", null, \"Balance\"),\n                                React.createElement(\"div\", null,\n                                    React.createElement(TokenLogo, { chainId: chainId, contractAddress: tokenAddress, symbol: tokenSymbol }))))),\n                    React.createElement(AmountScrollable, null,\n                        React.createElement(AmountBoxInner, null,\n                            React.createElement(Amount, null, toFloat(total, tokenDecimals).toFixed(3)),\n                            React.createElement(Currency, null, tokenSymbol))),\n                    React.createElement(AmountBar, null,\n                        React.createElement(AmountBarInner, null,\n                            React.createElement(\"div\", null,\n                                React.createElement(\"div\", null,\n                                    \"Approx \",\n                                    totalInUSD.toFixed(2),\n                                    \" USD\")))))),\n            React.createElement(Actions, null,\n                !backable && (React.createElement(Button, { kind: \"link\", type: \"button\", onClick: () => {\n                        onReject?.(RejectionReason.CancelButton);\n                    } }, \"Cancel\")),\n                React.createElement(Button, { type: \"submit\", disabled: disabled || isSubmitting, waiting: isSubmitting }, \"Pay now\")))));\n}\n","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nexport default function LoadingIndicator({ loading = false, ...props }) {\n    return (React.createElement(Root, { ...props, \"$loading\": loading },\n        React.createElement(\"div\", null)));\n}\nconst animation = keyframes `\n    0% {\n        transform: translateX(-100%) translateZ(0);\n    }\n\n    45% {\n        transform: translateX(0%) translateZ(0);\n    }\n\n    55% {\n        transform: translateX(0%) translateZ(0);\n    }\n\n    100% {\n        transform: translateX(100%) translateZ(0);\n    }\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-tk7lal\" }) `\n    height: 0;\n    opacity: 0;\n    transition: opacity 0.3s ease-out;\n    will-change: opacity;\n\n    ${({ $loading = false }) => $loading &&\n    css `\n            opacity: 1;\n        `}\n\n    div {\n        height: 2px;\n        position: relative;\n        overflow: hidden;\n    }\n\n    div:after {\n        animation: 2s infinite ${animation};\n        background: #0424ff;\n    }\n\n    div:after,\n    div:before {\n        content: '';\n        display: block;\n        height: 100%;\n        position: absolute;\n        width: 100%;\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport PrestyledLoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { COLORS } from '~/shared/utils/styled';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-cy5mjb\" }) `\n    margin: 0 auto;\n    padding: 48px 24px 56px;\n    max-width: 448px;\n    width: 100%;\n\n    p {\n        margin: 0 0 16px;\n    }\n`;\nconst LoadingIndicator = styled(PrestyledLoadingIndicator).withConfig({ displayName: \"LoadingIndicator\", componentId: \"sc-wvtkv7\" }) `\n    div {\n        border-radius: 8px;\n        height: 8px;\n    }\n\n    div:before,\n    div:after {\n        border-radius: 8px;\n    }\n\n    div:before {\n        background-color: ${COLORS.secondaryHover};\n    }\n`;\nexport default function AccessingProjectModal() {\n    return (React.createElement(Modal, { title: \"Accessing project\", onBeforeAbort: () => false, darkBackdrop: true },\n        React.createElement(Content, null,\n            React.createElement(\"p\", null, \"Accessing\\u2026\"),\n            React.createElement(LoadingIndicator, { loading: true })),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    ok: {\n                        title: 'Waiting',\n                        kind: 'primary',\n                        spinner: true,\n                    },\n                } }))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { Button } from '~/components/Button';\nimport { Route as R } from '~/utils/routes';\nimport ProjectModal, { Actions } from './ProjectModal';\nconst Box = styled.div.withConfig({ displayName: \"Box\", componentId: \"sc-gqztf5\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    padding: 32px 24px 24px;\n    font-size: 16px;\n    line-height: 24px;\n\n    p {\n        margin: 0;\n    }\n`;\nconst Explainer = styled.div.withConfig({ displayName: \"Explainer\", componentId: \"sc-1vuvt8n\" }) `\n    display: grid;\n    grid-template-columns: 18px 1fr;\n    background: ${COLORS.secondary};\n    border-radius: 8px;\n    padding: 20px 24px;\n    line-height: 24px;\n    gap: 12px;\n    margin-top: 32px;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-i2auw8\" }) `\n    align-items: center;\n    display: flex;\n    height: 24px;\n\n    svg {\n        display: block;\n    }\n`;\nexport default function AllowanceModal({ tokenSymbol = 'DATA', onReject }) {\n    return (React.createElement(ProjectModal, { onReject: onReject, title: \"Set Streamr Hub Allowance\" },\n        React.createElement(Box, null,\n            React.createElement(\"p\", null,\n                \"This step allows the Hub to transfer the required amount of\",\n                ' ',\n                tokenSymbol,\n                \".\"),\n            React.createElement(Explainer, null,\n                React.createElement(IconWrap, null,\n                    React.createElement(SvgIcon, { name: \"outlineQuestionMark2\" })),\n                React.createElement(\"p\", null,\n                    \"Allowance is a requirement of ERC-20 token transfers, designed to increase security and efficiency. For more about allowances, see this\",\n                    ' ',\n                    React.createElement(\"a\", { href: R.allowanceInfo(), target: \"_blank\", rel: \"noopener noreferrer\" }, \"page\"),\n                    \".\"))),\n        React.createElement(Actions, null,\n            React.createElement(Button, { waiting: true, type: \"button\" }, \"Waiting\"))));\n}\n","import request from '~/shared/utils/request';\nconst BASE_URL = 'https://api.coingecko.com/api/v3';\n// Got from: https://api.coingecko.com/api/v3/asset_platforms\nconst chainIdToNetworkMapping = {\n    '100': 'xdai',\n    '137': 'polygon-pos',\n};\nexport const getUsdRate = async (tokenContractAddress, chainId) => {\n    const vsCurrency = 'usd'; // https://api.coingecko.com/api/v3/simple/supported_vs_currencies\n    let contractAddress = tokenContractAddress;\n    let network = chainIdToNetworkMapping[chainId.toString()];\n    // Fallback to mainnet\n    if (network == null) {\n        network = 'ethereum';\n        contractAddress = '0x8f693ca8D21b157107184d29D398A8D082b38b76';\n        console.warn('CoinGecko: Fallback to mainnet DATA contract because network is unsupported');\n    }\n    const url = `${BASE_URL}/simple/token_price/${network}?contract_addresses=${contractAddress}&vs_currencies=${vsCurrency}`;\n    const result = await request({\n        method: 'get',\n        url,\n    });\n    const rate = result[contractAddress.toLowerCase()][vsCurrency.toLowerCase()] || 0;\n    return rate;\n};\n","import React, { useEffect, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Button } from '~/components/Button';\nimport NetworkIcon from '~/shared/components/NetworkIcon';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { getUsdRate } from '~/shared/utils/coingecko';\nimport { MEDIUM } from '~/shared/utils/styled';\nimport { getBalance } from '~/utils/balance';\nimport { getChainDisplayName } from '~/utils/chains';\nimport { RejectionReason } from '~/utils/exceptions';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { getTokenInfo } from '~/utils/tokens';\nimport { connectModal } from './ConnectModal';\nimport ProjectModal, { Actions } from './ProjectModal';\nconst ChainIcon = styled(NetworkIcon).withConfig({ displayName: \"ChainIcon\", componentId: \"sc-13lo3ft\" }) `\n    width: 40px;\n    height: 40px;\n`;\nconst ChainName = styled.span.withConfig({ displayName: \"ChainName\", componentId: \"sc-1ajq8th\" }) `\n    font-size: 18px;\n    line-height: normal;\n    font-weight: ${MEDIUM};\n`;\nconst Form = styled.form.withConfig({ displayName: \"Form\", componentId: \"sc-gcof0a\" }) `\n    ul {\n        list-style: none;\n        margin: 0;\n        padding: 0;\n    }\n`;\nconst Item = styled.label.withConfig({ displayName: \"Item\", componentId: \"sc-xpk97z\" }) `\n    align-items: center;\n    background: #ffffff;\n    border: 2px solid #ffffff;\n    border-radius: 8px;\n    display: grid;\n    gap: 12px;\n    grid-template-columns: auto 1fr auto;\n    padding: 20px;\n    width: 100%;\n    cursor: pointer;\n    transition: 200ms border-color;\n    user-select: none;\n\n    ${({ $selected = false }) => $selected &&\n    css `\n            border-color: #b3d4ff;\n        `}\n`;\nconst Radio = styled.div.withConfig({ displayName: \"Radio\", componentId: \"sc-1buatmx\" }) `\n    width: 20px;\n    height: 20px;\n    border: 2px solid #cdcdcd;\n    border-radius: 100%;\n    transition: 200ms ease-in-out border-color;\n\n    ::before {\n        background: #0324ff;\n        border-radius: 100%;\n        content: '';\n        display: block;\n        height: 12px;\n        opacity: 0;\n        margin: 2px 0 0 2px;\n        transform: translateZ(0) scale(0.5);\n        transition: 200ms ease-in-out;\n        transition-property: transform, opacity;\n        width: 12px;\n    }\n\n    ${({ $selected = false }) => $selected &&\n    css `\n            border-color: #0324ff;\n\n            ::before {\n                opacity: 1;\n                transform: translateZ(0) scale(1);\n            }\n        `}\n`;\nconst Placeholder = styled.div.withConfig({ displayName: \"Placeholder\", componentId: \"sc-ad29g4\" }) `\n    align-items: center;\n    border-radius: 8px;\n    display: flex;\n    height: 88px;\n    justify-content: center;\n    width: 100%;\n`;\nexport async function getPurchasePreconditions({ chainId, paymentDetails, }) {\n    await networkPreflight(chainId);\n    const paymentDetail = paymentDetails.find(({ domainId }) => domainId === chainId);\n    if (!paymentDetail) {\n        throw new Error('No matching payment detail');\n    }\n    const { pricingTokenAddress: tokenAddress, pricePerSecond } = paymentDetail;\n    const tokenInfo = await getTokenInfo(tokenAddress, chainId);\n    const account = await connectModal.pop();\n    if (!account) {\n        throw new Error('No account');\n    }\n    const balance = await getBalance({\n        chainId,\n        tokenAddress,\n        walletAddress: account,\n    });\n    const usdRate = await getUsdRate(tokenAddress, chainId);\n    return {\n        account,\n        balance,\n        chainId,\n        pricePerSecond,\n        tokenAddress,\n        tokenDecimals: tokenInfo.decimals,\n        tokenSymbol: tokenInfo.symbol,\n        usdRate,\n    };\n}\nexport default function ChainSelectorModal({ projectId, chainIds = [], selectedChainId: selectedChainIdProp, paymentDetails = [], onReject, onResolve, }) {\n    const [selectedChainId, selectChainId] = useState(selectedChainIdProp);\n    useEffect(() => {\n        selectChainId(selectedChainIdProp);\n    }, [selectedChainIdProp]);\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    const disabled = !Number.isSafeInteger(selectedChainId) || isSubmitting;\n    /**\n     * It's safe to use `useIsMounted` here because even if we rerender the component\n     * for a different purchase it'll be disabled if there's one already being processed.\n     */\n    const isMounted = useIsMounted();\n    return (React.createElement(ProjectModal, { closeOnEscape: true, onReject: onReject, title: \"Select chain for payment token\" },\n        React.createElement(Form, { onSubmit: async (e) => {\n                e.preventDefault();\n                if (disabled) {\n                    return;\n                }\n                try {\n                    setIsSubmitting(true);\n                    if (typeof selectedChainId !== 'number') {\n                        throw new Error('No selected chain id');\n                    }\n                    if (!projectId) {\n                        throw new Error('No project id');\n                    }\n                    const preconditions = await getPurchasePreconditions({\n                        chainId: selectedChainId,\n                        paymentDetails,\n                    });\n                    onResolve?.(preconditions);\n                }\n                catch (e) {\n                    onReject?.(e);\n                }\n                finally {\n                    if (isMounted()) {\n                        setIsSubmitting(false);\n                    }\n                }\n            } },\n            chainIds.length ? (React.createElement(\"ul\", null, chainIds.map((chainId) => (React.createElement(\"li\", { key: chainId },\n                React.createElement(Item, { \"$selected\": selectedChainId === chainId, onClick: () => void selectChainId((current) => current === chainId ? undefined : chainId) },\n                    React.createElement(ChainIcon, { chainId: chainId }),\n                    React.createElement(ChainName, null, getChainDisplayName(chainId)),\n                    React.createElement(Radio, { \"$selected\": selectedChainId === chainId }))))))) : (React.createElement(Placeholder, null, \"No available chains.\")),\n            React.createElement(Actions, null,\n                React.createElement(Button, { kind: \"link\", type: \"button\", onClick: () => void onReject?.(RejectionReason.CancelButton) }, \"Cancel\"),\n                React.createElement(Button, { type: \"submit\", disabled: disabled, waiting: isSubmitting }, \"Next\")))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nconst Content = styled.p.withConfig({ displayName: \"Content\", componentId: \"sc-1wl1qwq\" }) `\n    margin: 56px 0;\n    padding: 0 108px;\n    text-align: center;\n`;\nexport default function ConfirmPurchaseModal() {\n    return (React.createElement(Modal, { title: \"Payment confirmation\", onBeforeAbort: () => false, darkBackdrop: true },\n        React.createElement(Content, null, \"You need to confirm the transaction in your wallet to access this project\"),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    ok: {\n                        title: 'Waiting',\n                        kind: 'primary',\n                        spinner: true,\n                    },\n                } }))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { Buttons } from '~/components/Buttons';\nimport { RejectionReason } from '~/utils/exceptions';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-48o4i9\" }) `\n    padding: 64px 0;\n    text-align: center;\n\n    p {\n        margin: 32px auto 0;\n        padding: 0 96px;\n        position: relative;\n    }\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-zo1o6g\" }) `\n    height: 66px;\n    margin: 0 auto;\n    width: 94px;\n\n    img {\n        display: block;\n        transform: translate(-11%, -23%);\n    }\n`;\nexport default function FailedPurchaseModal({ onReject, onResolve }) {\n    return (React.createElement(Modal, { title: \"Access failed\", onReject: onReject, darkBackdrop: true },\n        React.createElement(Content, null,\n            React.createElement(IconWrap, null,\n                React.createElement(PngIcon, { name: \"walletError\", width: \"110\", height: \"110\" })),\n            React.createElement(\"p\", null, \"Failed to access the project. Please check your wallet or other settings and try again.\")),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    cancel: {\n                        title: 'Go back',\n                        kind: 'link',\n                        onClick() {\n                            onReject?.(RejectionReason.CancelButton);\n                        },\n                    },\n                    ok: {\n                        title: 'Try again',\n                        kind: 'primary',\n                        onClick() {\n                            onResolve?.();\n                        },\n                    },\n                } }))));\n}\n","import React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { LIGHT } from '~/shared/utils/styled';\nimport ProjectModal from './ProjectModal';\nconst Box = styled.div.withConfig({ displayName: \"Box\", componentId: \"sc-1sv82ou\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    padding: 32px 24px;\n    margin: 0 auto;\n    width: 100%;\n    max-width: 408px;\n\n    h2 {\n        font-size: 24px;\n        font-weight: ${LIGHT};\n        line-height: normal;\n        text-align: center;\n        margin: 0 0 12px;\n    }\n\n    p {\n        font-size: 14px;\n        line-height: normal;\n        text-align: center;\n        margin: 0;\n    }\n\n    button {\n        width: 100%;\n    }\n`;\nconst Icon = styled(SvgIcon).withConfig({ displayName: \"Icon\", componentId: \"sc-165u5ys\" }) `\n    width: 112px;\n    height: 112px;\n    justify-self: center;\n    align-self: center;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1hjs4xm\" }) `\n    align-items: center;\n    display: flex;\n    height: 224px;\n    justify-content: center;\n    width: 100%;\n\n    svg {\n        display: block;\n    }\n`;\nexport default function PurchaseCompleteModal({ onResolve, onReject }) {\n    useEffect(() => {\n        function onKeyDown(e) {\n            if (e.key === 'Escape') {\n                onResolve?.();\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [onResolve]);\n    return (React.createElement(ProjectModal, { onReject: onReject },\n        React.createElement(Box, null,\n            React.createElement(\"h2\", null, \"Success!\"),\n            React.createElement(\"p\", null, \"Access to the project was granted.\"),\n            React.createElement(IconWrap, null,\n                React.createElement(Icon, { name: \"checkmarkOutline\" })),\n            React.createElement(Button, { type: \"button\", onClick: () => void onResolve?.() }, \"Done\"))));\n}\n","import { produce } from 'immer';\nimport { useEffect } from 'react';\nimport { toaster } from 'toasterhea';\nimport { create } from 'zustand';\nimport { getAllowance, getERC20TokenContract, getMarketplaceContract } from '~/getters';\nimport { getParsedProjectById, getProjectSubscriptions } from '~/getters/hub';\nimport { toSeconds } from '~/marketplace/utils/time';\nimport AccessPeriodModal from '~/modals/AccessPeriodModal';\nimport AccessingProjectModal from '~/modals/AccessingProjectModal';\nimport AllowanceModal from '~/modals/AllowanceModal';\nimport ChainSelectorModal, { getPurchasePreconditions, } from '~/modals/ChainSelectorModal';\nimport ConfirmPurchaseModal from '~/modals/ConfirmPurchaseModal';\nimport FailedPurchaseModal from '~/modals/FailedPurchaseModal';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport PurchaseCompleteModal from '~/modals/PurchaseCompleteModal';\nimport InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { ensureGasMonies, waitForPurchasePropagation } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { RejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { convertPrice } from '~/utils/price';\nimport { call } from '~/utils/tx';\nimport { getSigner } from './wallet';\nconst usePurchaseStore = create((set, get) => {\n    function isInProgress(projectId) {\n        return !!get().inProgress[projectId];\n    }\n    return {\n        inProgress: {},\n        subscriptions: {},\n        fetchingSubscriptions: {},\n        async fetchSubscriptions(chainId, projectId) {\n            if (!!get().fetchingSubscriptions[projectId]) {\n                return;\n            }\n            set((current) => produce(current, (next) => {\n                next.fetchingSubscriptions[projectId] = true;\n            }));\n            try {\n                const entries = await getProjectSubscriptions(chainId, projectId, {\n                    force: true,\n                });\n                set((current) => produce(current, (next) => {\n                    const { cache } = next.subscriptions[projectId] || {};\n                    next.subscriptions[projectId] = {\n                        cache,\n                        entries,\n                    };\n                }));\n            }\n            finally {\n                set((current) => produce(current, (next) => {\n                    delete next.fetchingSubscriptions[projectId];\n                }));\n            }\n        },\n        invalidateSubscription(projectId) {\n            set((current) => produce(current, (next) => {\n                const { cache = 0, entries = [] } = next.subscriptions[projectId] || {};\n                next.subscriptions[projectId] = {\n                    cache: cache + 1,\n                    entries,\n                };\n            }));\n        },\n        async purchase(projectChainId, projectId) {\n            if (isInProgress(projectId)) {\n                return;\n            }\n            try {\n                set((current) => produce(current, (next) => {\n                    next.inProgress[projectId] = true;\n                }));\n                const { paymentDetails = [], streams = [] } = (await getParsedProjectById(projectChainId, projectId, {\n                    force: true,\n                })) || {};\n                const chainIds = paymentDetails.map(({ domainId }) => domainId);\n                let preselectedChainId = chainIds[0];\n                const skipChainSelector = typeof preselectedChainId !== 'undefined' && chainIds.length === 1;\n                let chainSelectorResult;\n                while (true) {\n                    /**\n                     * The following ifelse dance makes sure we\n                     * - don't open the Chain Selector for single-chain projects,\n                     * - recycle existing `chainSelectorResult` in a single-chain\n                     *   project scenario.\n                     *\n                     * For multi-chain projects we display the modal and let users\n                     * choose their preference.\n                     *\n                     * The Chain Selector modal uses `getPurchasePreconditions` internally.\n                     */\n                    if (skipChainSelector) {\n                        if (!chainSelectorResult) {\n                            chainSelectorResult = await getPurchasePreconditions({\n                                chainId: preselectedChainId,\n                                paymentDetails,\n                            });\n                        }\n                    }\n                    else {\n                        chainSelectorResult = undefined;\n                        chainSelectorResult = await toaster(ChainSelectorModal, Layer.Modal).pop({\n                            chainIds,\n                            paymentDetails,\n                            projectId,\n                            selectedChainId: preselectedChainId,\n                        });\n                    }\n                    if (!chainSelectorResult) {\n                        throw new Error('World flipped upside down');\n                    }\n                    /**\n                     * Store the selected chain id so that we can show it next time\n                     * we show the Chain Selector modal (if we loop back to it within\n                     * this purchase).\n                     */\n                    preselectedChainId = chainSelectorResult.chainId;\n                    const selectedChainId = preselectedChainId;\n                    const { account, balance, pricePerSecond, tokenAddress, tokenDecimals, tokenSymbol, usdRate, } = chainSelectorResult;\n                    let accessPeriod;\n                    const initialAccessRange = {\n                        quantity: 1,\n                        unit: timeUnits.hour,\n                        exceedsAllowance: false,\n                    };\n                    let allowanceModal;\n                    let startOver = false;\n                    while (true) {\n                        let bail = false;\n                        try {\n                            try {\n                                accessPeriod = await toaster(AccessPeriodModal, Layer.Modal).pop({\n                                    account,\n                                    backable: !skipChainSelector,\n                                    balance,\n                                    chainId: selectedChainId,\n                                    pricePerSecond,\n                                    quantity: initialAccessRange.quantity,\n                                    tokenAddress,\n                                    tokenDecimals,\n                                    tokenSymbol,\n                                    unit: initialAccessRange.unit,\n                                    usdRate,\n                                });\n                            }\n                            catch (e) {\n                                if (isAbandonment(e) && !skipChainSelector) {\n                                    /**\n                                     * The user abandoned the Access Period modal. We break the current\n                                     * phase and tell the workflow to take us back to the Chain Selector.\n                                     */\n                                    startOver = true;\n                                    break;\n                                }\n                                /**\n                                 * Something 'sploded in the Access Period and we end up here. Tell\n                                 * the workflow to terminate the purchase with the exception that\n                                 * brought us here.\n                                 */\n                                bail = true;\n                                throw e;\n                            }\n                            if (!accessPeriod) {\n                                throw new Error('World flipped upside down');\n                            }\n                            const { quantity, unit, exceedsAllowance } = accessPeriod;\n                            /**\n                             * Store the latest access range so that next time we loop back\n                             * to the Access Period modal we can prepopulate it with the recent\n                             * set of properties.\n                             */\n                            Object.assign(initialAccessRange, accessPeriod);\n                            if (exceedsAllowance) {\n                                /**\n                                 * Only show the Allowance modal if there's need for it. Access\n                                 * Period modal calculates it for us.\n                                 */\n                                allowanceModal = toaster(AllowanceModal, Layer.Modal);\n                                setTimeout(async () => {\n                                    try {\n                                        /**\n                                         * Open the Allowance modal asynchronously so that\n                                         * it does not block. We do it in a `setTimeout` so\n                                         * that we can react to exceptions in a clean and\n                                         * predictable way.\n                                         */\n                                        await allowanceModal?.pop({\n                                            tokenSymbol,\n                                        });\n                                    }\n                                    catch (e) {\n                                        if (!isAbandonment(e)) {\n                                            /**\n                                             * Let's just log. The AllowanceModal doesn't have\n                                             * all that many moving parts.\n                                             */\n                                            console.warn(e);\n                                        }\n                                    }\n                                });\n                                const total = convertPrice(pricePerSecond, [\n                                    quantity,\n                                    unit,\n                                ]);\n                                async function setAllowance() {\n                                    while (true) {\n                                        try {\n                                            /**\n                                             * Make sure the user can affort gas. Empty wallets\n                                             * take a walk.\n                                             */\n                                            await ensureGasMonies(selectedChainId, account, {\n                                                recover: true,\n                                            });\n                                            await networkPreflight(selectedChainId);\n                                            const provider = await getSigner();\n                                            /**\n                                             * Send the `approve` method on the selected\n                                             * ERC-20 token contract.\n                                             *\n                                             * This step is required so that the contract\n                                             * itself can spend user's funds.\n                                             */\n                                            const contract = getERC20TokenContract({\n                                                tokenAddress,\n                                                provider,\n                                            });\n                                            await call(contract, 'approve', {\n                                                args: [\n                                                    getContractAddress('marketplace', selectedChainId),\n                                                    total,\n                                                ],\n                                            });\n                                            /**\n                                             * Wallets do not force users to set the requested\n                                             * allowance amounts. Users can set more – that's ok,\n                                             * but also less (too little).\n                                             *\n                                             * In the next steps we verify if the allowance\n                                             * is set properly.\n                                             */\n                                            const allowance = await getAllowance(selectedChainId, tokenAddress, account, {\n                                                recover: true,\n                                            });\n                                            if (allowance < total) {\n                                                /**\n                                                 * If `total` exceeds `allowance` we loop back to top\n                                                 * and make the wallet pop up the allowance box again.\n                                                 */\n                                                continue;\n                                            }\n                                            /**\n                                             * If the allowance is set properly we can move on. Let's\n                                             * break the loop and let the function return.\n                                             */\n                                            break;\n                                        }\n                                        catch (e) {\n                                            console.warn('Setting allowance failed', e);\n                                            if (e instanceof InsufficientFundsError) {\n                                                /**\n                                                 * The user had a chance to react to the gas money\n                                                 * check and dismissed the Insufficient Funds\n                                                 * toast. Pass the exception on!\n                                                 *\n                                                 * This will take us back to the Access Period\n                                                 * modal (bail = false).\n                                                 */\n                                                throw e;\n                                            }\n                                            if (isTransactionRejection(e)) {\n                                                /**\n                                                 * The user rejected the transaction signature, thus\n                                                 * does not wanna continue. Go back to the Access\n                                                 * Period modal.\n                                                 */\n                                                throw e;\n                                            }\n                                            /**\n                                             * Something unexpected happened. Ask the user if they want\n                                             * to try setting the allowance again.\n                                             */\n                                            try {\n                                                await toaster(Toast, Layer.Toast).pop({\n                                                    title: 'Setting allowance failed',\n                                                    type: ToastType.Warning,\n                                                    desc: 'Would you like to try again?',\n                                                    okLabel: 'Yes',\n                                                    cancelLabel: 'No',\n                                                });\n                                                /**\n                                                 * She said yaaas! Take the user back to the top and make\n                                                 * the wallet pop up the allowance setting box again.\n                                                 */\n                                                continue;\n                                            }\n                                            catch (_) {\n                                                /**\n                                                 * The user does not want to retry thus we pass the exception\n                                                 * on and finish terminate the allowance track.\n                                                 *\n                                                 * This takes us back to the Access Period modal.\n                                                 */\n                                                throw e;\n                                            }\n                                        }\n                                    }\n                                }\n                                await setAllowance();\n                            }\n                            const seconds = toSeconds(quantity, unit);\n                            async function buy() {\n                                while (true) {\n                                    let confirmPurchaseModal = toaster(ConfirmPurchaseModal, Layer.Modal);\n                                    try {\n                                        setTimeout(async () => {\n                                            try {\n                                                /**\n                                                 * Open the Confirm Purchase modal in the background (i.e. via\n                                                 * `setTimeout`). This allows the main thread to continue with\n                                                 * the important stuff.\n                                                 */\n                                                await confirmPurchaseModal?.pop();\n                                            }\n                                            catch (e) {\n                                                if (!isAbandonment(e)) {\n                                                    console.warn(e);\n                                                }\n                                            }\n                                        });\n                                        /**\n                                         * Make sure the user can afford gas. Empty wallets\n                                         * take a walk.\n                                         */\n                                        await ensureGasMonies(selectedChainId, account, {\n                                            recover: true,\n                                        });\n                                        await networkPreflight(selectedChainId);\n                                        const provider = await getSigner();\n                                        let accessingProjectModal = toaster(AccessingProjectModal, Layer.Modal);\n                                        try {\n                                            const contract = getMarketplaceContract({\n                                                chainId: selectedChainId,\n                                                provider,\n                                            });\n                                            /**\n                                             * The following is the actual buying call emitted into the\n                                             * network. Note that the gas limit is dynamic and depends\n                                             * on the number of streams associated with the project.\n                                             */\n                                            const buyPromise = call(contract, 'buy', {\n                                                args: [\n                                                    projectId,\n                                                    seconds,\n                                                    {\n                                                        gasLimit: 2e5 + streams.length * 1e5,\n                                                    },\n                                                ],\n                                            });\n                                            /**\n                                             * Once we receive the transaction hash we can safely close the Confirm\n                                             * Purchase modal and carry on.\n                                             */\n                                            confirmPurchaseModal?.discard();\n                                            setTimeout(async () => {\n                                                /**\n                                                 * We pop up the Accessing Project modal and let it live for as long\n                                                 * as it takes. We close it later (see `finally`). It does not block.\n                                                 */\n                                                try {\n                                                    await accessingProjectModal?.pop();\n                                                }\n                                                catch (e) {\n                                                    if (!isAbandonment(e)) {\n                                                        console.warn(e);\n                                                    }\n                                                }\n                                            });\n                                            await buyPromise;\n                                            /**\n                                             * `Buy` transaction is done and now we wait for the `Subscribe` event\n                                             * to propagate through.\n                                             *\n                                             * We may want to either separate it from `buy` function, or wrap it with\n                                             * another `try…catch`, and pop up a \"retry\" toast on a timeout.\n                                             */\n                                            await waitForPurchasePropagation(selectedChainId, projectId, account);\n                                        }\n                                        finally {\n                                            accessingProjectModal?.discard();\n                                            accessingProjectModal = undefined;\n                                        }\n                                        break;\n                                    }\n                                    catch (e) {\n                                        if (e === RejectionReason.CancelButton ||\n                                            e === RejectionReason.EscapeKey) {\n                                            throw new Error('User decided to stay on the invalid network');\n                                        }\n                                        if (e instanceof InsufficientFundsError) {\n                                            /**\n                                             * The user had a chance to react to the gas money\n                                             * check and dismissed the Insufficient Funds\n                                             * toast. Pass the exception on!\n                                             *\n                                             * This will take us back to the Access Period\n                                             * modal (bail = false).\n                                             */\n                                            throw e;\n                                        }\n                                        if (isTransactionRejection(e)) {\n                                            /**\n                                             * The user rejected the transaction signature, thus\n                                             * does not wanna continue. Go back to the Access\n                                             * Period modal.\n                                             */\n                                            throw e;\n                                        }\n                                        confirmPurchaseModal?.discard();\n                                        try {\n                                            await toaster(FailedPurchaseModal, Layer.Modal).pop();\n                                            /**\n                                             * The user clicked \"Try again\" in the Failed Purchase\n                                             * modal. Loop back to the top and try to buy the\n                                             * product again.\n                                             */\n                                            continue;\n                                        }\n                                        catch (_) {\n                                            /**\n                                             * The user click \"Go back\" in the Failed Purchase\n                                             * modal which loops the workflow back to the Access\n                                             * Period modal.\n                                             */\n                                            throw e;\n                                        }\n                                    }\n                                    finally {\n                                        confirmPurchaseModal?.discard();\n                                        confirmPurchaseModal = undefined;\n                                    }\n                                }\n                            }\n                            await buy();\n                        }\n                        catch (e) {\n                            if (bail) {\n                                /**\n                                 * Exceptions that happen along the raised `bail` flag terminate\n                                 * the purchase.\n                                 */\n                                throw e;\n                            }\n                            console.warn('Unsuccessful purchase attempt. Trying again.', e);\n                            /**\n                             * Exceptions that happen with lowered `bail` flag take users back\n                             * to the Access Period modal.\n                             */\n                            continue;\n                        }\n                        finally {\n                            allowanceModal?.discard();\n                            allowanceModal = undefined;\n                        }\n                        /**\n                         * The user bought! Now we have to show the Purchase Complete modal,\n                         * which blocks the flow. Last stop!\n                         */\n                        break;\n                    }\n                    if (startOver) {\n                        continue;\n                    }\n                    try {\n                        await toaster(PurchaseCompleteModal, Layer.Modal).pop();\n                    }\n                    catch (e) {\n                        if (!isAbandonment(e)) {\n                            throw e;\n                        }\n                    }\n                    /**\n                     * Settle and finalize.\n                     */\n                    break;\n                }\n            }\n            finally {\n                set((current) => produce(current, (next) => {\n                    delete next.inProgress[projectId];\n                }));\n            }\n            /**\n             * After the following invalidation all mounted `useHasActiveProjectSubscription`\n             * hooks are gonna update. This will cause both the Connect and the Live data\n             * pages change from the \"Get access\" placeholder view to their\n             * actual views. All in place!\n             */\n            get().invalidateSubscription(projectId);\n        },\n    };\n});\nexport function usePurchaseCallback() {\n    return usePurchaseStore().purchase;\n}\nexport function useIsProjectBeingPurchased(projectId) {\n    const { inProgress } = usePurchaseStore();\n    return (Object.prototype.hasOwnProperty.call(inProgress, projectId) &&\n        !!inProgress[projectId]);\n}\nexport function useHasActiveProjectSubscription(projectId, account) {\n    const chainId = useCurrentChainId();\n    const { subscriptions, fetchSubscriptions } = usePurchaseStore();\n    const { cache } = (projectId && subscriptions[projectId]) || {};\n    useEffect(() => {\n        if (projectId) {\n            fetchSubscriptions(chainId, projectId);\n        }\n    }, [cache, fetchSubscriptions, chainId, projectId]);\n    if (!projectId || !account) {\n        return false;\n    }\n    const { entries } = subscriptions[projectId] || {};\n    if (!entries) {\n        return;\n    }\n    const { endTimestamp = '0' } = entries.find((s) => s.userAddress.toLowerCase() === account.toLowerCase()) || {};\n    return Number.parseInt(endTimestamp, 10) * 1000 >= Date.now();\n}\nexport function useIsAnyPurchaseInProgress() {\n    return !!Object.keys(usePurchaseStore().inProgress).length;\n}\n","import isEqual from 'lodash/isEqual';\nimport uniqueId from 'lodash/uniqueId';\nimport { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { randomHex } from 'web3-utils';\nimport { ValidationError } from '~/errors';\nimport { getDataUnion } from '~/getters/du';\nimport { createProject, deployDataUnionContract, getPublishableProjectProperties, updateProject, } from '~/services/projects';\nimport { useHasActiveProjectSubscription } from '~/shared/stores/purchases';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType } from '~/shared/types';\nimport { isProjectOwnedBy } from '~/utils';\nimport { toBN } from '~/utils/bn';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { createDraftStore, getEmptyDraft } from '~/utils/draft';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { validationErrorToast } from '~/utils/toast';\nimport { toastedOperations } from '~/utils/toastedOperation';\nexport const ProjectDraft = createDraftStore({\n    async persist({ entity }) {\n        const operations = [];\n        if (!entity) {\n            return;\n        }\n        const { cold, hot: project } = entity;\n        const { chainId } = cold;\n        if (project.id) {\n            const projectId = project.id;\n            const shouldUpdateAdminFee = requiresAdminFeeUpdate(project, cold);\n            const shouldUpdateMatadata = !eq(cold, project);\n            if (shouldUpdateAdminFee) {\n                operations.push({\n                    id: uniqueId('operation-'),\n                    label: 'Update admin fee',\n                });\n            }\n            if (shouldUpdateMatadata) {\n                operations.push({\n                    id: uniqueId('operation-'),\n                    label: 'Update project',\n                });\n            }\n            return void (await toastedOperations(operations, async (next) => {\n                const { domainIds, paymentDetails, adminFee, streams, metadata } = await getPublishableProjectProperties(project);\n                if (shouldUpdateAdminFee) {\n                    const [domainId] = domainIds;\n                    const [paymentDetail] = paymentDetails;\n                    if (!domainId) {\n                        throw new Error('No chain id');\n                    }\n                    if (typeof adminFee === 'undefined') {\n                        throw new Error('No admin fee');\n                    }\n                    if (!paymentDetail) {\n                        throw new Error('No payment details');\n                    }\n                    const { beneficiary: dataUnionId } = paymentDetail;\n                    if (!dataUnionId) {\n                        /**\n                         * Something broke above. We can update a Data Union only when\n                         * we know its deployment address.\n                         */\n                        throw new Error('No Data Union id');\n                    }\n                    const dataUnion = await getDataUnion(dataUnionId, domainId);\n                    await dataUnion.setAdminFee(adminFee);\n                    next();\n                }\n                if (shouldUpdateMatadata) {\n                    await updateProject(chainId, projectId, {\n                        domainIds,\n                        metadata,\n                        paymentDetails,\n                        streams,\n                    });\n                }\n            }));\n        }\n        const shouldDeployDataUnion = requiresDataUnionDeployment(project);\n        if (shouldDeployDataUnion) {\n            operations.push({\n                id: uniqueId('operation-'),\n                label: 'Deploy Data Union contract',\n            });\n        }\n        operations.push({\n            id: uniqueId('operation-'),\n            label: 'Create project',\n        });\n        await toastedOperations(operations, async (next) => {\n            const projectId = randomHex(32);\n            const { domainIds, paymentDetails, adminFee, streams, metadata } = await getPublishableProjectProperties(project);\n            if (shouldDeployDataUnion) {\n                const [domainId] = domainIds;\n                const [paymentDetail] = paymentDetails;\n                if (!domainId) {\n                    throw new Error('No chain id');\n                }\n                if (typeof adminFee === 'undefined') {\n                    throw new Error('No admin fee');\n                }\n                if (!paymentDetail) {\n                    throw new Error('No payment details');\n                }\n                if (paymentDetail.beneficiary) {\n                    /**\n                     * Something broke above. See `requiresDataUnionDeployment` for details.\n                     * We only deploy a new Data Union if the `beneficiary` is empty.\n                     */\n                    throw new Error('Unexpected beneficiary');\n                }\n                await networkPreflight(chainId);\n                const dataUnionId = await deployDataUnionContract(domainId, projectId, adminFee);\n                /**\n                 * We assing the newly deployed Data Union to the project\n                 * we're currently persisting.\n                 */\n                paymentDetail.beneficiary = dataUnionId;\n                next();\n            }\n            await createProject(chainId, projectId, {\n                domainIds,\n                isPublicPurchasable: project.type !== ProjectType.OpenData,\n                metadata,\n                paymentDetails,\n                streams,\n            });\n        });\n    },\n    getEmptyDraft() {\n        return getEmptyDraft(undefined);\n    },\n    isEqual: eq,\n    prefix: 'ProjectDraft-',\n});\nfunction eq(cold, hot) {\n    /**\n     * Admin fee is not metadata. We have to skip it in the\n     * below payload comparison.\n     */\n    return isEqual({ ...hot, adminFee: '' }, { ...cold, adminFee: '' });\n}\nexport function preselectSalePoint(project) {\n    if (project.type === ProjectType.OpenData) {\n        return;\n    }\n    const values = Object.values(project.salePoints);\n    if (values.some((salePoint) => salePoint?.enabled)) {\n        /**\n         * Project has at least one sale point selected already. We have to skip.\n         */\n        return;\n    }\n    const [salePoint] = values;\n    if (!salePoint) {\n        /**\n         * Nothing to enable, eh?\n         */\n        return;\n    }\n    salePoint.enabled = true;\n}\nfunction requiresDataUnionDeployment(project) {\n    return (project.type === ProjectType.DataUnion &&\n        !Object.values(project.salePoints).find((salePoint) => salePoint?.enabled)\n            ?.beneficiaryAddress);\n}\nfunction requiresAdminFeeUpdate(hot, cold) {\n    return (hot.type === ProjectType.DataUnion &&\n        !toBN(hot.adminFee || '0').isEqualTo(toBN(cold.adminFee || '0')));\n}\n/**\n * Checks if the current wallet can access project's streams right away.\n * @returns `undefined` if it's undetermined (= fetching). A `boolean` otherwise.\n */\nexport function useIsAccessibleByCurrentWallet() {\n    const wallet = useWalletAccount();\n    const draft = ProjectDraft.useDraft();\n    const fetching = !!draft?.fetching;\n    const project = draft?.entity?.cold;\n    const hasActiveProjectSubscription = useHasActiveProjectSubscription(project?.id, wallet);\n    if (fetching) {\n        return;\n    }\n    if (project?.type === ProjectType.OpenData) {\n        return true;\n    }\n    if (!wallet) {\n        return false;\n    }\n    return (isProjectOwnedBy(project?.permissions || [], wallet) ||\n        hasActiveProjectSubscription);\n}\nexport function usePersistProjectCallback() {\n    const persist = ProjectDraft.usePersistCallback();\n    const navigate = useNavigate();\n    const chainKey = useCurrentChainKey();\n    return useCallback(() => {\n        persist({\n            onDone(mounted) {\n                if (!mounted) {\n                    return;\n                }\n                navigate(R.projects(routeOptions(chainKey)));\n            },\n            onError(e) {\n                if (e instanceof ValidationError) {\n                    validationErrorToast({ title: 'Failed to publish', error: e });\n                }\n                console.warn('Failed to publish', e);\n            },\n        });\n    }, [persist, navigate, chainKey]);\n}\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { COLORS, MAX_CONTENT_WIDTH } from '~/shared/utils/styled';\nimport Text from '~/shared/components/Ui/Text';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { truncate } from '~/shared/utils/text';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { usePersistProjectCallback } from '~/stores/projectDraft';\nimport { Meatball } from '../Meatball';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '../SimpleDropdown';\nimport { DropdownMenuItem } from '../DropdownMenuItem';\nexport default function BeneficiaryAddressEditor({ disabled = false, invalid = false, onChange: onChangeProp, value: valueProp = '', }) {\n    const [value, setValue] = useState(valueProp);\n    useEffect(() => {\n        setValue(valueProp);\n    }, [valueProp]);\n    const valueRef = useRef(value);\n    if (valueRef.current !== value) {\n        valueRef.current = value;\n    }\n    const accountAddress = useWalletAccount();\n    const { copy } = useCopy();\n    function onChange(newValue) {\n        setValue(newValue);\n        onChangeProp?.(newValue);\n    }\n    const persist = usePersistProjectCallback();\n    return (React.createElement(Container, null,\n        React.createElement(Text, { value: value, onCommit: onChange, placeholder: accountAddress\n                ? accountAddress\n                : 'i.e. 0xa3d1F77ACfF0060F7213D7BF3c7fEC78df847De1', disabled: disabled, invalid: invalid, selectAllOnFocus: true, onKeyDown: ({ key }) => {\n                if (key === 'Enter') {\n                    persist();\n                }\n            } }),\n        React.createElement(Actions, null,\n            React.createElement(SimpleDropdown, { detached: true, menu: (toggle) => (React.createElement(SimpleListDropdownMenu, null,\n                    React.createElement(\"ul\", null,\n                        React.createElement(DropdownMenuItem, { tabIndex: -1, type: \"button\", disabled: !accountAddress, onClick: () => {\n                                toggle(false);\n                                if (!accountAddress) {\n                                    return;\n                                }\n                                onChange(accountAddress);\n                            } },\n                            React.createElement(AddressItem, null,\n                                React.createElement(\"div\", null, \"Fill wallet address\"),\n                                React.createElement(\"div\", null, accountAddress\n                                    ? truncate(accountAddress)\n                                    : 'Wallet locked'))),\n                        React.createElement(DropdownMenuItem, { tabIndex: -1, type: \"button\", disabled: !value, onClick: () => {\n                                copy(value);\n                                toggle(false);\n                            } }, \"Copy\")))) }, (toggle) => (React.createElement(ActionsToggle, { type: \"button\", onClick: () => void toggle((x) => !x), disabled: disabled },\n                React.createElement(Meatball, { alt: \"\", color: \"gray\", disabled: disabled })))))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1ioxbai\" }) `\n    background-color: ${COLORS.inputBackground};\n    max-width: ${MAX_CONTENT_WIDTH};\n    padding: 12px 24px;\n    position: relative;\n    line-height: normal;\n`;\nconst AddressItem = styled.div.withConfig({ displayName: \"AddressItem\", componentId: \"sc-1wt9kj9\" }) `\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n\n    div + div {\n        color: #adadad;\n        font-size: 10px;\n    }\n`;\nconst Actions = styled.div.withConfig({ displayName: \"Actions\", componentId: \"sc-3uqe2h\" }) `\n    position: absolute;\n    padding: 0 32px;\n    right: 0;\n    top: 50%;\n    transform: translateY(-50%);\n`;\nexport const ActionsToggle = styled.button.withConfig({ displayName: \"ActionsToggle\", componentId: \"sc-1ofe3uk\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    display: block;\n    outline: 0;\n    padding: 0;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport emptyStateIcon from '~/shared/assets/images/empty_state_icon.png';\nimport emptyStateIcon2x from '~/shared/assets/images/empty_state_icon@2x.png';\nimport { EmptyState } from '~/components/EmptyState';\nexport const NoData = ({ firstLine, secondLine, width, compact, }) => {\n    return (React.createElement(EmptyStateWrap, { image: React.createElement(\"img\", { src: emptyStateIcon, srcSet: `${emptyStateIcon2x} 2x`, alt: \"Not found\", style: width\n                ? { width: `${width}px`, height: 'auto', maxWidth: '100%' }\n                : {} }), compact: compact },\n        React.createElement(EmptyStateParagraph, null, firstLine),\n        secondLine && React.createElement(EmptyStateParagraph, null, secondLine)));\n};\nconst EmptyStateWrap = styled(EmptyState).withConfig({ displayName: \"EmptyStateWrap\", componentId: \"sc-2k2jc4\" }) `\n    padding: ${({ compact }) => (compact ? '48px' : '150px')} 0;\n`;\nconst EmptyStateParagraph = styled.p.withConfig({ displayName: \"EmptyStateParagraph\", componentId: \"sc-u3l7ho\" }) `\n    font-size: 16px;\n    margin-bottom: 0;\n`;\n","import styled, { css } from 'styled-components';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM, TABLET } from '~/shared/utils/styled';\nconst horizontalPaddingMobile = '24px';\nconst horizontalPaddingDesktop = '40px';\nconst actionPadding = '16px';\nexport const ScrollTableCellsWrap = styled.div.withConfig({ displayName: \"ScrollTableCellsWrap\", componentId: \"sc-1cepcml\" }) `\n    display: grid;\n    grid-template-columns: ${({ stickyColumnCount, nonStickyColumnCount }) => stickyColumnCount + nonStickyColumnCount === 1 ? '1fr' : 'min-content 1fr'};\n    position: relative;\n    overflow: auto;\n    max-height: inherit;\n`;\nexport const ScrollTableColumn = styled.div.withConfig({ displayName: \"ScrollTableColumn\", componentId: \"sc-1hg2ouu\" }) `\n    display: flex;\n    flex-direction: column;\n    flex: 1;\n    ${({ $actionColumn }) => {\n    if ($actionColumn) {\n        return css `\n                flex: 0.1;\n            `;\n    }\n}}\n`;\nexport const ScrollTableNonStickyColumnsWrap = styled.div.withConfig({ displayName: \"ScrollTableNonStickyColumnsWrap\", componentId: \"sc-1jp810v\" }) `\n    display: flex;\n    flex: 1;\n    overflow-x: auto;\n    overflow-y: hidden;\n`;\nexport const ScrollTableHeaderCell = styled.div.withConfig({ displayName: \"ScrollTableHeaderCell\", componentId: \"sc-1csjspu\" }) `\n    border-bottom: 1.5px solid ${COLORS.Border};\n    padding: 5px ${horizontalPaddingMobile};\n    height: 80px;\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n    font-size: 14px;\n    font-weight: ${MEDIUM};\n    white-space: nowrap;\n\n    ${({ $align }) => {\n    switch ($align) {\n        case 'start':\n            return css `\n                    justify-content: flex-start;\n                `;\n        case 'end':\n            return css `\n                    justify-content: flex-end;\n                `;\n    }\n}}\n\n    ${({ $pointer }) => {\n    if ($pointer) {\n        return css `\n                cursor: pointer;\n            `;\n    }\n}}\n\n    ${({ $actionCell }) => {\n    if ($actionCell) {\n        return css `\n                padding: ${actionPadding};\n            `;\n    }\n    return css `\n            @media (${TABLET}) {\n                padding: 5px ${horizontalPaddingDesktop};\n            }\n        `;\n}}\n`;\nexport const ScrollTableCell = styled.div.withConfig({ displayName: \"ScrollTableCell\", componentId: \"sc-84u3bq\" }) `\n    padding: 5px ${horizontalPaddingMobile};\n    font-size: 16px;\n    color: ${COLORS.primaryLight} !important; //to override the link styled when we use this StyledComponent as Link\n    height: 90px;\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n    border-bottom: 1px solid ${COLORS.secondary};\n    white-space: nowrap;\n\n    ${({ $align }) => {\n    switch ($align) {\n        case 'start':\n            return css `\n                    justify-content: flex-start;\n                `;\n        case 'end':\n            return css `\n                    justify-content: flex-end;\n                `;\n    }\n}}\n    ${({ $actionCell }) => {\n    if ($actionCell) {\n        return css `\n                border-left: 1px solid ${COLORS.secondary};\n                padding: ${actionPadding};\n                justify-content: center;\n            `;\n    }\n    return css `\n            @media (${TABLET}) {\n                padding: 5px ${horizontalPaddingDesktop};\n            }\n        `;\n}}\n    ${({ $hover }) => {\n    if ($hover) {\n        return css `\n                background-color: ${COLORS.secondaryLight};\n            `;\n    }\n}}\n`;\nexport const OrderCaretIcon = styled(SvgIcon).withConfig({ displayName: \"OrderCaretIcon\", componentId: \"sc-3efezy\" }) `\n    width: 10px;\n    margin-left: 10px;\n    transition: transform 200ms ease-in-out;\n\n    ${({ $direction }) => {\n    switch ($direction) {\n        case 'asc':\n            return css `\n                    transform: rotate(0deg);\n                `;\n        case 'desc':\n            return css `\n                    transform: rotate(180deg);\n                `;\n    }\n}}\n`;\nexport const FloatingLoadingIndicator = styled(LoadingIndicator).withConfig({ displayName: \"FloatingLoadingIndicator\", componentId: \"sc-yygz9b\" }) `\n    position: absolute;\n    top: 78px;\n    left: 0;\n    width: 100%;\n`;\nexport const NoDataWrap = styled.div.withConfig({ displayName: \"NoDataWrap\", componentId: \"sc-1vgu60s\" }) `\n    grid-column-start: 1;\n    grid-column-end: 3;\n`;\n","import React, { useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { DropdownMenuItem } from '~/components/DropdownMenuItem';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { Meatball } from '~/components/Meatball';\nimport { ActionsToggle } from '~/components/SalePointSelector/BeneficiaryAddressEditor';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '~/components/SimpleDropdown';\nimport { useMediaQuery } from '~/hooks';\nimport { NoData } from '~/shared/components/NoData';\nimport { FloatingLoadingIndicator, NoDataWrap, OrderCaretIcon, ScrollTableCell, ScrollTableCellsWrap, ScrollTableColumn, ScrollTableHeaderCell, ScrollTableNonStickyColumnsWrap, } from '~/shared/components/ScrollTable/ScrollTable.styles';\nimport { TABLET } from '~/shared/utils/styled';\nexport const ScrollTable = ({ isLoading, footerComponent, hasMoreResults, onLoadMore, ...tableProps }) => {\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ScrollTableCore, { isLoading: isLoading, ...tableProps }),\n        hasMoreResults && (React.createElement(LoadMoreButton, { disabled: isLoading, onClick: () => onLoadMore?.(), kind: \"primary2\" }, \"Load more\")),\n        footerComponent != null && footerComponent));\n};\nexport const ScrollTableCore = ({ elements, columns, actions, isLoading, noDataFirstLine, noDataSecondLine, orderDirection, orderBy, onOrderChange, linkMapper, }) => {\n    const isMobile = !useMediaQuery(`only screen and ${TABLET}`);\n    let actualColumns = columns;\n    // Disable sticky columns on mobile since it makes scrolling difficult\n    if (isMobile) {\n        actualColumns = columns.map((c) => ({\n            ...c,\n            isSticky: false,\n        }));\n    }\n    const stickyColumns = actualColumns.filter((column) => column.isSticky);\n    const nonStickyColumns = actualColumns.filter((column) => !column.isSticky);\n    const [hoveredRowIndex, setHoveredRowIndex] = useState(null);\n    const hasOrderingEnabled = orderBy && orderDirection && onOrderChange;\n    return (React.createElement(ScrollTableCellsWrap, { stickyColumnCount: stickyColumns.length, nonStickyColumnCount: nonStickyColumns.length },\n        stickyColumns.map((stickyColumn) => {\n            return (React.createElement(ScrollTableColumn, { key: stickyColumn.key },\n                React.createElement(ScrollTableHeaderCell, { \"$align\": stickyColumn.align, \"$pointer\": onOrderChange && stickyColumn.sortable, onClick: () => {\n                        if (onOrderChange && stickyColumn.sortable) {\n                            onOrderChange(stickyColumn.key);\n                        }\n                    } },\n                    React.createElement(\"span\", null, stickyColumn.displayName),\n                    ' ',\n                    hasOrderingEnabled && stickyColumn.key === orderBy && (React.createElement(OrderCaret, { orderDirection: orderDirection }))),\n                elements && elements.length > 0 && (React.createElement(React.Fragment, null, elements.map((element, id) => {\n                    return (React.createElement(ScrollTableCell, { key: id, \"$align\": stickyColumn.align, \"$hover\": hoveredRowIndex === id, as: linkMapper ? Link : 'div', to: linkMapper ? linkMapper(element) : '', onMouseEnter: () => setHoveredRowIndex(id), onMouseLeave: () => setHoveredRowIndex(null) }, stickyColumn.valueMapper(element)));\n                })))));\n        }),\n        React.createElement(ScrollTableNonStickyColumnsWrap, null,\n            nonStickyColumns.map((nonStickyColumn) => {\n                return (React.createElement(ScrollTableColumn, { key: nonStickyColumn.key },\n                    React.createElement(ScrollTableHeaderCell, { \"$align\": nonStickyColumn.align, \"$pointer\": onOrderChange && nonStickyColumn.sortable, onClick: () => {\n                            if (onOrderChange && nonStickyColumn.sortable) {\n                                onOrderChange(nonStickyColumn.key);\n                            }\n                        } },\n                        React.createElement(\"span\", null, nonStickyColumn.displayName),\n                        hasOrderingEnabled &&\n                            nonStickyColumn.key === orderBy && (React.createElement(OrderCaret, { orderDirection: orderDirection }))),\n                    elements && elements.length > 0 && (React.createElement(React.Fragment, null, elements.map((element, id) => {\n                        return (React.createElement(ScrollTableCell, { as: linkMapper ? Link : 'div', to: linkMapper ? linkMapper(element) : '', key: id, \"$align\": nonStickyColumn.align, \"$hover\": hoveredRowIndex === id, onMouseEnter: () => setHoveredRowIndex(id), onMouseLeave: () => setHoveredRowIndex(null) }, nonStickyColumn.valueMapper(element)));\n                    })))));\n            }),\n            actions && actions.length && (React.createElement(ScrollTableColumn, { \"$actionColumn\": true },\n                React.createElement(ScrollTableHeaderCell, { \"$actionCell\": true }),\n                elements.map((element, id) => (React.createElement(ScrollTableCell, { key: id, \"$actionCell\": true, \"$hover\": hoveredRowIndex === id, onMouseEnter: () => setHoveredRowIndex(id), onMouseLeave: () => setHoveredRowIndex(null) },\n                    React.createElement(SimpleDropdown, { detached: true, menu: (toggle) => (React.createElement(SimpleListDropdownMenu, null,\n                            React.createElement(\"ul\", null, actions.map((action, actionIndex) => {\n                                const { displayName, callback, disabled, } = typeof action === 'function'\n                                    ? action(element)\n                                    : {\n                                        displayName: typeof action.displayName ===\n                                            'function'\n                                            ? action.displayName(element)\n                                            : action.displayName,\n                                        callback() {\n                                            action.callback(element);\n                                        },\n                                        disabled: typeof action.disabled ===\n                                            'function'\n                                            ? action.disabled(element)\n                                            : action.disabled,\n                                    };\n                                return (React.createElement(DropdownMenuItem, { key: actionIndex, type: \"button\", disabled: disabled, onClick: () => {\n                                        callback();\n                                        toggle(false);\n                                    } }, displayName));\n                            })))) }, (toggle) => (React.createElement(ActionsToggle, { type: \"button\", onClick: () => void toggle((x) => !x) },\n                        React.createElement(Meatball, { alt: \"\", layout: \"vertical\" })))))))))),\n        (!elements || elements.length === 0) && (React.createElement(NoDataWrap, null,\n            React.createElement(NoData, { firstLine: noDataFirstLine || 'No data', secondLine: noDataSecondLine, compact: true }))),\n        React.createElement(FloatingLoadingIndicator, { loading: isLoading })));\n};\nconst OrderCaret = ({ orderDirection }) => {\n    return React.createElement(OrderCaretIcon, { name: \"caretUp\", \"$direction\": orderDirection });\n};\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport moment from 'moment';\nimport React, { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { Decimals } from '~/components/Decimals';\nimport { StreamIdCell } from '~/components/Table';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FormModalRoot, SectionHeadline, } from '~/modals/FormModal';\nimport { forceUnstakeFromSponsorship } from '~/services/sponsorships';\nimport { Radio } from '~/shared/components/Radio';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nfunction getOptimalStake(stakes, requestedAmount) {\n    return (stakes.find((s) => isStakedLongEnough(s.joinedAt, s.minimumStakingPeriodSeconds) &&\n        s.amountWei >= requestedAmount) || stakes[0]);\n}\nfunction isStakedLongEnough(joinedAt, minimumStakingPeriodSeconds) {\n    return joinedAt.getTime() + minimumStakingPeriodSeconds * 1000 < Date.now();\n}\nfunction ForceUndelegateModal({ amount, onResolve, operator, chainId, ...props }) {\n    const [busy, setBusy] = useState(false);\n    const stakes = useMemo(() => [...operator.stakes].sort((a, b) => (b.amountWei > a.amountWei ? -1 : 1)), [operator]);\n    const [selectedSponsorshipId, setSelectedSponsorshipId] = useState(getOptimalStake(stakes, amount)?.sponsorshipId);\n    const selectedSponsorship = useMemo(() => stakes.find((s) => s.sponsorshipId === selectedSponsorshipId), [stakes, selectedSponsorshipId]);\n    const willSlash = !!selectedSponsorship &&\n        !isStakedLongEnough(selectedSponsorship.joinedAt, selectedSponsorship.minimumStakingPeriodSeconds);\n    const isPartialPayout = !!selectedSponsorship && selectedSponsorship.amountWei < amount;\n    const canSubmit = !!selectedSponsorshipId;\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    return (React.createElement(ForceUndelegateFormModal, { ...props, title: \"Force unstake\", canSubmit: canSubmit && !busy, submitting: busy, submitLabel: \"Force unstake\", onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                await forceUnstakeFromSponsorship(chainId, selectedSponsorshipId, operator.id, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.(selectedSponsorshipId);\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(Root, null,\n            React.createElement(SectionHeadline, null, \"Because there are expired items in the undelegation queue, you can force the Operator to unstake from any Sponsorship, in order to pay out the queued undelegations.\"),\n            React.createElement(TableWrap, null,\n                React.createElement(ScrollTable, { elements: stakes, columns: [\n                        {\n                            displayName: 'Stream ID',\n                            valueMapper: ({ streamId }) => (React.createElement(StreamIdCell, { streamId: streamId })),\n                            align: 'start',\n                            isSticky: true,\n                            key: 'streamid',\n                        },\n                        {\n                            displayName: 'Amount',\n                            valueMapper: (element) => (React.createElement(WarningCell, null,\n                                React.createElement(Decimals, { abbr: true, amount: element.amountWei, decimals: decimals, tooltip: true }),\n                                element.amountWei < amount && (React.createElement(Tooltip, { content: React.createElement(\"p\", null, \"Partial payout\") },\n                                    React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                                        React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))))),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'amount',\n                        },\n                        {\n                            displayName: 'Joined',\n                            valueMapper: (element) => (React.createElement(WarningCell, null,\n                                moment(element.joinedAt).format('YYYY-MM-DD'),\n                                !isStakedLongEnough(element.joinedAt, element.minimumStakingPeriodSeconds) && (React.createElement(Tooltip, { content: React.createElement(\"p\", null,\n                                        \"Minimum stake period of\",\n                                        ' ',\n                                        element.minimumStakingPeriodSeconds /\n                                            60 /\n                                            60 /\n                                            24,\n                                        ' ',\n                                        \"days not reached. Operator will be slashed.\") },\n                                    React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                                        React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))))),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'joined',\n                        },\n                        {\n                            displayName: '',\n                            valueMapper: ({ sponsorshipId: id }) => (React.createElement(React.Fragment, null,\n                                React.createElement(Radio, { name: \"undelegate-sponsorship\", id: `undelegate-sponsorship-${id}`, label: \"\", value: id, checked: selectedSponsorshipId === id, onChange: (value) => {\n                                        setSelectedSponsorshipId(value);\n                                    } }))),\n                            align: 'end',\n                            isSticky: false,\n                            key: 'actions',\n                        },\n                    ] })),\n            willSlash && (React.createElement(Alert, { type: \"error\", title: \"Operator will be slashed\" }, \"Selecting this Sponsorship will result in slashing. Please consider selecting a different Sponsorship if available.\")),\n            isPartialPayout && (React.createElement(Alert, { type: \"error\", title: \"Partial payout\" }, \"Unstaking from this Sponsorship will not completely cover the queued undelegation. After unstaking, you can select additional Sponsorships to continue payouts.\")))));\n}\nexport const forceUndelegateModal = toaster(ForceUndelegateModal, Layer.Modal);\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1kc6igb\" }) `\n    display: grid;\n    grid-template-rows: auto auto auto;\n    gap: 16px;\n`;\nconst TableWrap = styled.div.withConfig({ displayName: \"TableWrap\", componentId: \"sc-15kkrn3\" }) `\n    max-height: ${90 * 6}px;\n    overflow: auto;\n`;\nconst ForceUndelegateFormModal = styled(FormModal).withConfig({ displayName: \"ForceUndelegateFormModal\", componentId: \"sc-1bpwuaz\" }) `\n    & ${FormModalRoot} {\n        max-width: 848px;\n    }\n`;\nconst WarningCell = styled.div.withConfig({ displayName: \"WarningCell\", componentId: \"sc-1yh5jhr\" }) `\n    align-items: center;\n    display: grid;\n    gap: 8px;\n    grid-template-columns: auto auto;\n\n    ${TooltipIconWrap} svg {\n        width: 18px;\n        height: 18px;\n    }\n`;\n","import moment from 'moment';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { useConfigValueFromChain, useMaxUndelegationQueueDays, useMediaQuery, } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, } from '~/modals/FormModal';\nimport { undelegateFromOperator } from '~/services/operators';\nimport Label from '~/shared/components/Ui/Label';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nfunction UndelegateFundsModal({ balance, chainId, delegatedTotal, onResolve, operator, ...props }) {\n    const wallet = useWalletAccount();\n    const isOwner = wallet?.toLowerCase() === operator.owner.toLowerCase();\n    const [title, submitLabel, amountLabel, totalLabel, subtitlePartial, pastAction] = isOwner\n        ? [\n            'Withdraw from Operator',\n            'Withdraw',\n            'Amount to unstake',\n            'Amount currently staked on Operator',\n            'you wish to unstake from your Operator',\n            'withdrawn',\n        ]\n        : [\n            'Undelegate from Operator',\n            'Undelegate',\n            'Amount to undelegate',\n            'Amount currently delegated to Operator',\n            'to undelegate from the selected Operator',\n            'undelegated',\n        ];\n    const [rawAmount, setRawAmount] = useState('');\n    const maxUndelegationQueueDays = useMaxUndelegationQueueDays();\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const amount = toBigInt(rawAmount || 0, decimals);\n    const freeFunds = operator.dataTokenBalanceWei;\n    const hasZeroDeployed = operator.totalStakeInSponsorshipsWei === 0n;\n    const minimumSelfDelegationFraction = useConfigValueFromChain('minimumSelfDelegationFraction', (value) => toFloat(value, decimals)) || toBN(0);\n    const minimumSelfDelegationPercentage = minimumSelfDelegationFraction\n        .multipliedBy(100)\n        .toNumber();\n    const isSelfDelegationTooLow = isOwner &&\n        minimumSelfDelegationFraction.isGreaterThan(0) &&\n        delegatedTotal - amount <\n            toBigInt(toBN(delegatedTotal).multipliedBy(minimumSelfDelegationFraction));\n    const earliestUndelegationTimestamp = operator.delegations.find((d) => d.delegator.toLowerCase() === wallet?.toLowerCase())?.earliestUndelegationTimestamp;\n    const isTooEarlyToUndelegate = operator.contractVersion > 0 &&\n        !isOwner &&\n        earliestUndelegationTimestamp != null &&\n        earliestUndelegationTimestamp * 1000 > Date.now();\n    const canSubmit = amount > 0n &&\n        !(isSelfDelegationTooLow && !hasZeroDeployed) &&\n        !isTooEarlyToUndelegate;\n    const [busy, setBusy] = useState(false);\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: title, canSubmit: canSubmit && !busy, submitting: busy, submitLabel: submitLabel, onBeforeAbort: (reason) => !busy && (rawAmount === '' || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            setBusy(true);\n            try {\n                await undelegateFromOperator(chainId, operator.id, amount >= delegatedTotal\n                    ? /**\n                       * If we are requesting all funds to be undelegated, send\n                       * a truely big number instead of infinity.\n                       */\n                        110763745230805656649802800132303954225n\n                    : amount, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please enter the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" tokens\",\n            ' ',\n            subtitlePartial),\n        React.createElement(Section, null,\n            React.createElement(Label, { \"$wrap\": true }, amountLabel),\n            React.createElement(FieldWrap, { \"$top\": true },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => {\n                        setRawAmount(target.value);\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(delegatedTotal, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(FieldWrap, { \"$bottom\": true, \"$padded\": true },\n                React.createElement(Prop, null,\n                    totalLabel,\n                    \":\",\n                    ' ',\n                    React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: delegatedTotal, tooltip: limitedSpace }))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Your wallet balance\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Operator\"),\n                    React.createElement(PropValue, null, operator.id)),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Available balance in Operator\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: freeFunds, tooltip: limitedSpace }))))),\n        React.createElement(Footer, null,\n            amount > 0 && amount <= freeFunds && (React.createElement(Alert, { type: \"notice\", title: React.createElement(React.Fragment, null,\n                    React.createElement(SponsorshipDecimals, { amount: amount }),\n                    \" will be\",\n                    ' ',\n                    pastAction,\n                    \" immediately\") })),\n            amount > freeFunds && (React.createElement(Alert, { type: \"notice\", title: \"Undelegation will be queued\" },\n                \"Your undelegation will be queued for a maximum of\",\n                ' ',\n                maxUndelegationQueueDays.toString(),\n                \" days, after which you will be able to force undelegation.\")),\n            isSelfDelegationTooLow && hasZeroDeployed && (React.createElement(Alert, { type: \"error\", title: \"Low self-funding\" },\n                \"At least \",\n                minimumSelfDelegationPercentage.toFixed(0),\n                \"% of the Operator's total stake must come from you as the owner. After your withdrawal, your remaining amount will be below this limit. This will prevent your Operator from staking on Sponsorships. It will also signal to Delegators that you're shutting down, and will most likely cause them to undelegate.\")),\n            isSelfDelegationTooLow && !hasZeroDeployed && (React.createElement(Alert, { type: \"error\", title: \"Low self-funding\" },\n                \"At least \",\n                minimumSelfDelegationPercentage.toFixed(0),\n                \"% of the Operator's total stake must come from you as the owner. If you wish to stop being an Operator, you can withdraw any amount once your Operator is not staked on any Sponsorships. Note that this prevents your Operator from staking on Sponsorships until the limit is reached again. It is also a strong signal to Delegators that you're shutting down, and will most likely cause them to undelegate.\")),\n            isTooEarlyToUndelegate && (React.createElement(Alert, { type: \"error\", title: React.createElement(React.Fragment, null,\n                    \"You can not undelegate because your minimum delegation period is still active. It will expire on\",\n                    ' ',\n                    moment(earliestUndelegationTimestamp * 1000).format('YYYY-MM-DD HH:mm'),\n                    \".\") })))));\n}\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-18w54iv\" }) `\n    display: grid;\n    gap: 8px;\n    margin-top: 8px;\n`;\nexport const undelegateFundsModal = toaster(UndelegateFundsModal, Layer.Modal);\n","import React from 'react';\nimport styled from 'styled-components';\nimport { truncate } from '~/shared/utils/text';\nimport { MEDIUM } from '~/shared/utils/styled';\nexport const Name = styled.div.withConfig({ displayName: \"Name\", componentId: \"sc-1l9f9v6\" }) `\n    font-weight: ${MEDIUM};\n    line-height: 1em;\n`;\nexport const Username = styled.div.withConfig({ displayName: \"Username\", componentId: \"sc-g88mn5\" }) `\n    color: #a3a3a3;\n    line-height: 1em;\n`;\nconst UnstyledAvatarless = ({ source, ...props }) => (React.createElement(\"div\", { ...props },\n    React.createElement(Username, { title: source },\n        truncate(source),\n        \"\\u200C\")));\nexport const Avatarless = styled(UnstyledAvatarless).withConfig({ displayName: \"Avatarless\", componentId: \"sc-amyqc0\" }) ``;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Menu as UnstyledMenu, NavDropdown } from '@streamr/streamr-layout';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport AvatarImage from '~/shared/components/AvatarImage';\nimport { COLORS, DESKTOP, MEDIUM, REGULAR } from '~/shared/utils/styled';\nimport { Avatarless, Name, Username } from './User';\nexport const MOBILE_LG = 576;\nconst CaretDownIcon = styled(SvgIcon).withConfig({ displayName: \"CaretDownIcon\", componentId: \"sc-mb9kg3\" }) `\n    opacity: 1;\n`;\nconst CaretUpIcon = styled(SvgIcon).withConfig({ displayName: \"CaretUpIcon\", componentId: \"sc-10lt16n\" }) `\n    opacity: 0;\n`;\nconst DropdownToggle = styled.div.withConfig({ displayName: \"DropdownToggle\", componentId: \"sc-m2um4m\" }) `\n    background: #f8f8f8;\n    width: 32px;\n    height: 32px;\n    border-radius: 4px;\n    position: relative;\n    margin-top: 1px;\n\n    svg {\n        position: absolute;\n        left: 50%;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 10px;\n        height: 10px;\n        transition: 200ms opacity;\n    }\n`;\nexport const Menu = styled(UnstyledMenu).withConfig({ displayName: \"Menu\", componentId: \"sc-77wf0i\" }) ``;\nexport const TextMenuItem = styled(Menu.Item).withConfig({ displayName: \"TextMenuItem\", componentId: \"sc-i8ek88\" }) `\n    align-items: center;\n    cursor: pointer;\n    display: flex;\n    padding: 12px 16px !important;\n\n    > span:first-child {\n        display: block;\n        flex-grow: 1;\n    }\n\n    :disabled,\n    &[disabled] {\n        cursor: default;\n        opacity: 0.5;\n    }\n`;\nexport const UserInfoMenuItem = styled(Menu.Item).withConfig({ displayName: \"UserInfoMenuItem\", componentId: \"sc-bkw7wj\" }) `\n    padding: 0 16px !important;\n`;\nexport const MenuDivider = styled(Menu.Divider).withConfig({ displayName: \"MenuDivider\", componentId: \"sc-13iga5\" }) `\n    margin: 0;\n`;\nexport const WalletAddress = styled.div.withConfig({ displayName: \"WalletAddress\", componentId: \"sc-1tu7xrr\" }) `\n    margin-left: 13px;\n    display: flex;\n    flex-direction: column;\n\n    span {\n        font-size: 14px;\n        line-height: 18px;\n        user-select: none;\n        color: ${COLORS.primary};\n        font-weight: 400;\n\n        &.ens-name {\n            font-weight: 500;\n        }\n    }\n`;\nexport const SignedInUserMenu = styled(NavDropdown).withConfig({ displayName: \"SignedInUserMenu\", componentId: \"sc-1bobody\" }) `\n    ${Menu} {\n        width: 260px;\n        padding: 0;\n\n        ${Menu.Item}:first-child {\n            padding: 0 4px;\n            margin-bottom: 10px;\n        }\n\n        ${Avatarless} {\n        }\n\n        ${Name},\n        ${Username} {\n            overflow: hidden;\n            white-space: nowrap;\n            text-overflow: ellipsis;\n        }\n    }\n\n    :hover ${DropdownToggle} {\n        ${CaretDownIcon} {\n            opacity: 0;\n        }\n\n        ${CaretUpIcon} {\n            opacity: 1;\n        }\n    }\n`;\nexport const Navbar = styled.div.withConfig({ displayName: \"Navbar\", componentId: \"sc-9anunl\" }) `\n    display: grid;\n    grid-template-columns: auto 1fr auto auto;\n    align-items: center;\n    gap: 16px;\n`;\nexport const MenuGrid = styled.div.withConfig({ displayName: \"MenuGrid\", componentId: \"sc-fdzpv0\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto auto 1fr;\n    justify-content: center;\n    align-items: center;\n`;\nexport const NavLink = styled.a.withConfig({ displayName: \"NavLink\", componentId: \"sc-1hxwmd8\" }) ``;\nexport const NavbarItem = styled.div.withConfig({ displayName: \"NavbarItem\", componentId: \"sc-p4yndu\" }) `\n    ${MenuGrid} & + & {\n        margin-left: 16px;\n    }\n`;\nconst LinkWrapper = styled.div.withConfig({ displayName: \"LinkWrapper\", componentId: \"sc-vrnt2t\" }) `\n    ${NavLink} {\n        display: block;\n        color: ${COLORS.primaryLight};\n        text-transform: uppercase;\n        font-weight: ${MEDIUM};\n        letter-spacing: 2px;\n        white-space: nowrap;\n        text-decoration: none !important;\n    }\n\n    &:hover {\n        ${NavLink} {\n            color: ${COLORS.primary};\n        }\n    }\n`;\nconst UnstyledNavbarLink = ({ children, ...props }) => {\n    return React.createElement(LinkWrapper, { ...props }, children);\n};\nexport const NavbarLinkDesktop = styled(UnstyledNavbarLink).withConfig({ displayName: \"NavbarLinkDesktop\", componentId: \"sc-m4bq7u\" }) `\n    position: relative;\n\n    ${NavLink} {\n        font-size: 12px;\n        padding: 0 10px;\n        height: 40px;\n        line-height: 40px;\n    }\n\n    &:after {\n        display: block;\n        content: '';\n        position: absolute;\n        bottom: 2px;\n        left: 50%;\n        transition: width 0.2s ease-out;\n        width: 0;\n        height: 2px;\n        background-color: ${COLORS.primary};\n        transform: translateX(-50%);\n    }\n\n    &:hover:after {\n        transition: width 0.2s ease-in;\n        width: 20px;\n    }\n\n    ${({ highlight = false }) => highlight &&\n    css `\n            &:after {\n                width: 20px;\n            }\n\n            ${NavLink} {\n                color: ${COLORS.primary};\n            }\n        `}\n`;\nexport const NavbarLinkMobile = styled(UnstyledNavbarLink).withConfig({ displayName: \"NavbarLinkMobile\", componentId: \"sc-13loojt\" }) `\n    position: relative;\n\n    ${({ $bottomBorder = true }) => $bottomBorder &&\n    css `\n            border-bottom: 1px solid #efefef;\n        `}\n\n    ${NavLink} {\n        font-size: 18px;\n        line-height: 100px;\n        color: ${COLORS.primary};\n    }\n\n    ${({ highlight = false }) => highlight &&\n    css `\n            &:after {\n                display: block;\n                content: '';\n                position: absolute;\n                top: 50%;\n                transform: translateY(-50%);\n                left: -24px;\n                width: 3px;\n                height: 32px;\n                background-color: ${COLORS.primary};\n            }\n\n            ${NavLink} {\n                color: ${COLORS.primary};\n            }\n\n            @media (min-width: ${MOBILE_LG}px) {\n                &:after {\n                    left: -64px;\n                }\n            }\n        `}\n`;\nexport const NavbarItemAccount = styled.div.withConfig({ displayName: \"NavbarItemAccount\", componentId: \"sc-d2nt1f\" }) `\n    margin: 0;\n`;\nconst UnstyledLogoLink = ({ children, ...props }) => {\n    return React.createElement(\"a\", { ...props }, children);\n};\nexport const LogoLink = styled(UnstyledLogoLink).withConfig({ displayName: \"LogoLink\", componentId: \"sc-12xyxpc\" }) `\n    color: #f65f0a !important;\n    display: block;\n    max-width: 64px;\n    width: 32px;\n\n    @media (${DESKTOP}) {\n        width: 40px;\n    }\n`;\nexport const Avatar = styled(AvatarImage).withConfig({ displayName: \"Avatar\", componentId: \"sc-f5qw9o\" }) `\n    width: 32px;\n    height: 32px;\n    border: 1px solid #f3f3f3;\n    border-radius: 50%;\n    background-color: white;\n\n    @media (${DESKTOP}) {\n        width: 40px;\n        height: 40px;\n    }\n`;\nexport const MenuItemAvatarContainer = styled.div.withConfig({ displayName: \"MenuItemAvatarContainer\", componentId: \"sc-1nn3rp\" }) `\n    background-color: ${COLORS.secondaryLight};\n    padding: 16px;\n    display: flex;\n    align-items: center;\n    border-radius: 4px;\n    margin: 16px 0;\n`;\nexport const UserInfoMobile = styled.div.withConfig({ displayName: \"UserInfoMobile\", componentId: \"sc-68eb6z\" }) `\n    background-color: #f8f8f8;\n    padding: 8px;\n    display: flex;\n    justify-content: flex-start;\n    border-radius: 4px;\n\n    ${Avatar} {\n        width: 45px;\n        height: 45px;\n        background-color: #fff;\n        margin-right: 8px;\n    }\n\n    ${Avatarless} {\n        display: flex;\n        flex-direction: column;\n        align-items: flex-start;\n        justify-content: center;\n\n        ${Name} {\n            font-size: 14px;\n            font-weight: ${REGULAR};\n            line-height: 1.25em;\n        }\n\n        ${Username} {\n            padding: 3px;\n            font-size: 12px;\n            font-weight: ${MEDIUM};\n            background-color: #fff;\n            color: #848484;\n            margin: 3px 0;\n        }\n    }\n`;\n","import React, { useRef, useState } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { NavLink, NavbarLinkDesktop } from '~/components/Nav/Nav.styles';\nimport { DefaultSimpleDropdownMenu, SimpleDropdown } from '~/components/SimpleDropdown';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function Dropdown() {\n    const [isOpen, setIsOpen] = useState(false);\n    const { pathname } = useLocation();\n    const timeoutRef = useRef();\n    function clear() {\n        if (timeoutRef.current != null) {\n            clearTimeout(timeoutRef.current);\n        }\n    }\n    function show(toggle) {\n        clear();\n        toggle(true);\n    }\n    function hide(toggle, { immediately = false } = {}) {\n        clear();\n        if (immediately) {\n            return void toggle(false);\n        }\n        timeoutRef.current = window.setTimeout(() => {\n            toggle(false);\n        }, 250);\n    }\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NavbarLinkDesktop, { highlight: isOpen || isNetworkTabActive(pathname) },\n        React.createElement(SimpleDropdown, { onToggle: setIsOpen, menu: (toggle) => (React.createElement(Menu, { onMouseEnter: () => void show(toggle), onMouseLeave: () => void hide(toggle) }, NetworkNavItems.map((i) => (React.createElement(DropdownItem, { \"$active\": pathname.startsWith(i.linkFn()), key: i.title, to: i.linkFn(routeOptions(chainKey)), onFocus: () => void show(toggle), onClick: () => void hide(toggle, { immediately: true }) },\n                React.createElement(\"strong\", null, i.title),\n                React.createElement(Subtitle, null, i.subtitle)))))) }, (toggle) => (React.createElement(NavLink, { as: Link, to: R.networkOverview(routeOptions(chainKey)), onFocus: () => void show(toggle), onBlur: () => void hide(toggle), onMouseEnter: () => void show(toggle), onMouseLeave: () => void hide(toggle), onClick: (e) => void e.preventDefault() }, \"Network\")))));\n}\nconst networkLinks = [R.networkOverview(), R.sponsorships(), R.operators()];\nexport const isNetworkTabActive = (path) => networkLinks.some((addr) => path.startsWith(addr));\nconst Menu = styled(DefaultSimpleDropdownMenu).withConfig({ displayName: \"Menu\", componentId: \"sc-rg0ihx\" }) `\n    padding-left: 0;\n    padding-right: 0;\n`;\nexport const NetworkNavItems = [\n    {\n        title: 'Overview',\n        subtitle: 'Your activity on one glance',\n        linkFn: R.networkOverview,\n    },\n    {\n        title: 'Sponsorships',\n        subtitle: 'Explore, create and join Sponsorships',\n        linkFn: R.sponsorships,\n    },\n    {\n        title: 'Operators',\n        subtitle: 'Explore Operators and delegate',\n        linkFn: R.operators,\n    },\n];\nconst Subtitle = styled.div.withConfig({ displayName: \"Subtitle\", componentId: \"sc-htqygn\" }) `\n    color: ${COLORS.primaryLight};\n`;\nfunction getTickIconAttrs() {\n    return {\n        name: 'tick',\n    };\n}\nconst TickIcon = styled(SvgIcon).attrs(getTickIconAttrs).withConfig({ displayName: \"TickIcon\", componentId: \"sc-hmzfc7\" }) `\n    width: 10px;\n    position: absolute;\n    transform: translateY(-50%);\n    top: 50%;\n    right: 24px;\n`;\nfunction getDropdownItemAttrs(props) {\n    return {\n        ...props,\n        children: (React.createElement(React.Fragment, null,\n            React.createElement(\"div\", null, props.children),\n            props.$active && React.createElement(TickIcon, null))),\n    };\n}\nconst DropdownItem = styled(Link).attrs(getDropdownItemAttrs).withConfig({ displayName: \"DropdownItem\", componentId: \"sc-va2n4e\" }) `\n    align-items: center;\n    cursor: pointer;\n    display: flex;\n    font-size: 16px;\n    line-height: 28px;\n    padding: 12px 32px;\n    position: relative;\n\n    &,\n    :hover,\n    :visited,\n    :link {\n        color: #000000;\n    }\n\n    :focus,\n    :hover {\n        background-color: #e9ecef;\n    }\n\n    &[disabled] {\n        color: #adadad;\n    }\n\n    :focus {\n        outline: none;\n        box-shadow: inset 0 0 0 1.5px var(--focus-border-color);\n    }\n\n    :active {\n        background-color: ${COLORS.primary};\n        color: #ffffff;\n    }\n\n    :active ${Subtitle} {\n        color: ${COLORS.radioBorder};\n    }\n`;\n","import React, { useReducer } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM, REGULAR } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { NavLink, NavbarLinkMobile } from './Nav.styles';\nimport { NetworkNavItems, isNetworkTabActive } from './NetworkDropdown';\nexport function NetworkAccordion() {\n    const { pathname } = useLocation();\n    const [isOpen, toggle] = useReducer((x) => !x, false);\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(React.Fragment, null,\n        React.createElement(NavbarLinkMobile, { highlight: isNetworkTabActive(pathname), \"$bottomBorder\": !isOpen },\n            React.createElement(NavLink, { as: Link, to: R.networkOverview(routeOptions(chainKey)), onClick: (e) => {\n                    e.preventDefault();\n                    e.stopPropagation();\n                    toggle();\n                } },\n                React.createElement(Wings, null,\n                    React.createElement(\"div\", null, \"Network\"),\n                    React.createElement(\"div\", null,\n                        React.createElement(CaretDownIcon, { \"$flipped\": isOpen }))))),\n        isOpen && (React.createElement(Menu, null, NetworkNavItems.map((networkNavElement) => {\n            const { title, subtitle, linkFn, ...rest } = networkNavElement;\n            return (React.createElement(NetworkMobileLink, { ...rest, to: linkFn(routeOptions(chainKey)), key: title },\n                React.createElement(NetworkNavElement, null,\n                    React.createElement(Title, null, title),\n                    React.createElement(Subtitle, null, subtitle))));\n        })))));\n}\nconst NetworkNavElement = styled.div.withConfig({ displayName: \"NetworkNavElement\", componentId: \"sc-19ewe4g\" }) `\n    display: flex;\n    flex-direction: column;\n    text-transform: none;\n    line-height: 24px;\n`;\nconst Title = styled.p.withConfig({ displayName: \"Title\", componentId: \"sc-15my2kk\" }) `\n    font-size: 16px;\n    font-weight: ${MEDIUM};\n    color: ${COLORS.black};\n    margin: 0;\n    letter-spacing: initial;\n`;\nconst Subtitle = styled.p.withConfig({ displayName: \"Subtitle\", componentId: \"sc-iyyr3w\" }) `\n    font-size: 16px;\n    font-weight: ${REGULAR};\n    color: ${COLORS.primaryLight};\n    margin: 0;\n    max-width: 350px;\n    white-space: pre-line;\n    letter-spacing: initial;\n`;\nconst NetworkMobileLink = styled(Link).withConfig({ displayName: \"NetworkMobileLink\", componentId: \"sc-16r7z00\" }) `\n    padding: 20px 0;\n    display: block;\n`;\nconst Menu = styled.div.withConfig({ displayName: \"Menu\", componentId: \"sc-1gizb9b\" }) `\n    margin-top: -20px;\n`;\nfunction getCaretDownIconAttrs() {\n    return {\n        name: 'caretDown',\n    };\n}\nconst CaretDownIcon = styled(SvgIcon).attrs(getCaretDownIconAttrs).withConfig({ displayName: \"CaretDownIcon\", componentId: \"sc-1h45794\" }) `\n    transform: rotate(0deg) translateY(-2%);\n    transition: 300ms transform;\n    width: 18px;\n\n    ${({ $flipped = false }) => $flipped &&\n    css `\n            transform: rotate(-180deg) translateY(-2%);\n        `}\n`;\nconst Wings = styled.div.withConfig({ displayName: \"Wings\", componentId: \"sc-h24jtu\" }) `\n    display: flex;\n    align-items: center;\n\n    > div:first-child {\n        flex-grow: 1;\n    }\n`;\n","import { Button, HamburgerButton, Logo, NavOverlay } from '@streamr/streamr-layout';\nimport React from 'react';\nimport { Link, useLocation, useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { ChainSelector as UnstyledChainSelector } from '~/components/ChainSelector';\nimport { useMediaQuery } from '~/hooks';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { connectModal } from '~/modals/ConnectModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useEns, useWalletAccount } from '~/shared/stores/wallet';\nimport { DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { saveOperator } from '~/utils';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport toast from '~/utils/toast';\nimport { Avatar, LogoLink, Menu, MenuDivider, MenuGrid, MenuItemAvatarContainer, MOBILE_LG, Navbar, NavbarItem, NavbarItemAccount, NavbarLinkDesktop, NavbarLinkMobile, NavLink, SignedInUserMenu, TextMenuItem, UserInfoMenuItem, UserInfoMobile, WalletAddress, } from './Nav.styles';\nimport { NetworkAccordion } from './NetworkAccordion';\nimport { Dropdown } from './NetworkDropdown';\nimport { Avatarless, Name, Username } from './User';\nconst UnstyledDesktopNav = (props) => {\n    const { pathname } = useLocation();\n    const account = useWalletAccount();\n    const ensName = useEns(account);\n    const navigate = useNavigate();\n    const operatorQuery = useOperatorForWalletQuery(account);\n    const { data: operator = null, isFetching: isOperatorFetching } = operatorQuery;\n    const isMobile = !useMediaQuery(`only screen and ${TABLET}`);\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(\"div\", { ...props, \"data-testid\": 'desktop-nav' },\n        React.createElement(Navbar, null,\n            React.createElement(NavbarItem, null,\n                React.createElement(LogoLink, { href: R.root() },\n                    React.createElement(Logo, { \"data-testid\": 'logo' }))),\n            React.createElement(ChainSelector, { \"data-mobile-only\": true, menuAlignment: \"left\" }),\n            React.createElement(MenuGrid, { \"data-desktop-only\": true },\n                React.createElement(\"div\", null),\n                React.createElement(NavbarItem, null,\n                    React.createElement(Dropdown, null)),\n                React.createElement(NavbarItem, null,\n                    React.createElement(NavbarLinkDesktop, { highlight: pathname.startsWith(R.streams()) },\n                        React.createElement(NavLink, { as: Link, to: R.streams(routeOptions(chainKey)) }, \"Streams\"))),\n                React.createElement(ChainSelector, { menuAlignment: \"right\" })),\n            !account && (React.createElement(NavbarItemAccount, null,\n                React.createElement(Button, { kind: \"primary\", size: \"mini\", outline: true, type: \"button\", onClick: async () => {\n                        try {\n                            await connectModal.pop();\n                        }\n                        catch (e) {\n                            console.warn('Wallet connecting failed', e);\n                        }\n                    } }, \"Connect\"))),\n            !!account && (React.createElement(NavbarItemAccount, null,\n                React.createElement(SignedInUserMenu, { edge: true, alignMenu: \"right\", nodeco: true, toggle: React.createElement(Avatar, { username: account }), menu: React.createElement(Menu, null,\n                        React.createElement(UserInfoMenuItem, null,\n                            React.createElement(MenuItemAvatarContainer, null,\n                                React.createElement(Avatar, { username: account }),\n                                React.createElement(WalletAddress, null,\n                                    !!ensName && (React.createElement(\"span\", { className: 'ens-name' }, truncate(ensName))),\n                                    React.createElement(\"span\", null, truncate(account))))),\n                        isMobile && (React.createElement(React.Fragment, null,\n                            React.createElement(MenuDivider, null),\n                            operator ? (React.createElement(TextMenuItem, { onClick: () => {\n                                    navigate(R.operator(operator.id, routeOptions(chainKey)));\n                                } },\n                                React.createElement(\"span\", null, \"My Operator\"))) : (React.createElement(TextMenuItem, { disabled: isOperatorFetching, onClick: () => {\n                                    if (isOperatorFetching) {\n                                        return;\n                                    }\n                                    saveOperator(chainId, undefined, {\n                                        onDone(id, blockNumber) {\n                                            navigate(R.operator(id, routeOptions(chainId, {\n                                                b: blockNumber,\n                                            })));\n                                        },\n                                    });\n                                } },\n                                React.createElement(\"span\", null, \"Become an Operator\"))))),\n                        React.createElement(MenuDivider, null),\n                        React.createElement(TextMenuItem, { onClick: () => {\n                                toast({\n                                    title: 'Use the \"Lock\" button in your wallet.',\n                                });\n                            } },\n                            React.createElement(\"span\", null, \"Disconnect\"),\n                            React.createElement(SvgIcon, { name: \"disconnect\" }))) }))),\n            React.createElement(HamburgerButton, { idle: true }))));\n};\nconst UnstyledMobileNav = ({ className }) => {\n    const account = useWalletAccount();\n    const { pathname } = useLocation();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NavOverlay, { className: className },\n        React.createElement(NavOverlay.Head, null,\n            React.createElement(Navbar, null,\n                React.createElement(NavbarItem, null,\n                    React.createElement(LogoLink, { href: R.root() },\n                        React.createElement(Logo, null))),\n                React.createElement(NavbarItem, null,\n                    React.createElement(HamburgerButton, null)))),\n        React.createElement(NavOverlay.Body, null,\n            !!account && (React.createElement(UserInfoMobile, null,\n                React.createElement(Avatar, { username: account }),\n                React.createElement(Avatarless, { \"data-testid\": 'avatarless', source: account }))),\n            React.createElement(NetworkAccordion, null),\n            React.createElement(NavbarLinkMobile, { highlight: pathname.startsWith(R.streams()) },\n                React.createElement(NavLink, { as: Link, to: R.streams(routeOptions(chainKey)) }, \"Streams\"))),\n        React.createElement(NavOverlay.Footer, null, !!account ? (React.createElement(Button, { kind: \"secondary\", size: \"normal\", type: \"button\", onClick: () => {\n                toast({\n                    title: 'Use the \"Lock\" button in your wallet.',\n                });\n            } }, \"Disconnect\")) : (React.createElement(Button, { type: \"button\", onClick: async () => {\n                try {\n                    await connectModal.pop();\n                }\n                catch (e) {\n                    console.warn('Wallet connecting failed', e);\n                }\n            }, kind: \"primary\", size: \"normal\" }, \"Connect Wallet\")))));\n};\nconst DesktopNav = styled(UnstyledDesktopNav).withConfig({ displayName: \"DesktopNav\", componentId: \"sc-e26ir0\" }) `\n    position: relative;\n\n    ${Navbar} {\n        > ${NavbarItem}:first-child {\n            flex-grow: initial;\n        }\n\n        > ${NavbarItem}:nth-child(2) {\n            flex-grow: 1;\n        }\n    }\n\n    @media (${DESKTOP}) {\n        ${Navbar} > ${NavbarItem}:first-child {\n            flex-grow: 1;\n        }\n    }\n\n    &[data-shadow='true'] {\n        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.02);\n    }\n\n    ${Avatarless} {\n        line-height: 20px;\n        padding: 4px 0 8px;\n    }\n\n    ${Name} {\n        font-size: 14px;\n        margin-bottom: 4px;\n    }\n\n    ${Username} {\n        font-size: 12px;\n    }\n`;\nconst MobileNav = styled(UnstyledMobileNav).withConfig({ displayName: \"MobileNav\", componentId: \"sc-tkrg3i\" }) `\n    ${HamburgerButton} {\n        margin-left: auto;\n    }\n\n    ${NavOverlay.Body} {\n        padding: 36px 24px 0 24px;\n\n        ${UserInfoMobile} {\n            margin-bottom: 24px;\n        }\n\n        ${NavbarLinkMobile} {\n            border-top: 1px solid #efefef;\n\n            + ${NavbarLinkMobile} {\n                border-top: none;\n            }\n        }\n\n        > :first-child {\n            border-top: none;\n        }\n    }\n\n    ${NavOverlay.Footer} {\n        background-color: #ffffff;\n        padding: 24px;\n\n        ${Button} {\n            width: 100%;\n        }\n    }\n\n    @media (min-width: ${MOBILE_LG}px) {\n        ${NavOverlay.Body} {\n            padding: 36px 64px 0 64px;\n\n            ${UserInfoMobile} {\n                margin-bottom: 64px;\n            }\n        }\n\n        ${NavOverlay.Footer} {\n            padding: 64px;\n\n            ${Button} {\n                width: auto;\n            }\n        }\n    }\n`;\nexport const NavContainer = styled.div.withConfig({ displayName: \"NavContainer\", componentId: \"sc-id2ix2\" }) `\n    background-color: #ffffff;\n    color: #323232;\n\n    ${HamburgerButton} {\n        background-color: #f8f8f8;\n    }\n\n    ${Navbar} {\n        padding: 20px 24px;\n\n        @media (${TABLET}) {\n            padding: 20px 24px;\n        }\n\n        @media (${DESKTOP}) {\n            padding: 20px 40px;\n        }\n\n        > ${HamburgerButton} {\n            display: flex;\n        }\n\n        ${NavbarItem}:empty {\n            display: none;\n        }\n\n        > [data-desktop-only='true'] {\n            display: none;\n        }\n    }\n\n    ${Button} {\n        padding: 0 16px;\n    }\n\n    > [data-mobile-only='true'] {\n        display: block;\n    }\n\n    @media (${TABLET}) {\n        ${Navbar} > [data-desktop-only='true'] {\n            display: grid;\n        }\n\n        ${Navbar} > ${HamburgerButton} {\n            display: none;\n        }\n\n        > [data-mobile-only='true'] {\n            display: none;\n        }\n    }\n`;\nconst ChainSelector = styled(UnstyledChainSelector).withConfig({ displayName: \"ChainSelector\", componentId: \"sc-wg4p6u\" }) `\n    justify-self: right;\n\n    &[data-mobile-only='true'] {\n        display: block;\n        justify-self: left;\n    }\n\n    @media (${TABLET}) {\n        &[data-mobile-only='true'] {\n            display: none;\n        }\n    }\n`;\nfunction N({ shadow = false, ...props }) {\n    return (React.createElement(NavContainer, { ...props },\n        React.createElement(DesktopNav, { \"data-shadow\": !!shadow }),\n        React.createElement(MobileNav, null)));\n}\nObject.assign(N, {\n    Container: NavContainer,\n});\nexport default N;\n","import React from 'react';\nimport styled, { createGlobalStyle } from 'styled-components';\nimport { DisclaimerBar } from '~/components/DisclaimerBar';\nimport Footer from '~/components/Footer';\nimport Helmet from '~/components/Helmet';\nimport Nav from '~/components/Nav';\nimport useScrollToTop from '~/shared/hooks/useScrollToTop';\nimport { MAX_BODY_WIDTH } from '~/shared/utils/styled';\nexport default function Layout({ children, footer = React.createElement(Footer, null), nav = React.createElement(Nav, null), columnize = false, pageTitle, innerBackgroundColor, outerBackgroundColor, rootBackgroundColor = '#f5f5f5', rootComponent: Root = LayoutRoot, outerComponent: Outer = LayoutOuter, innerComponent: Inner = LayoutInner, }) {\n    useScrollToTop();\n    return (React.createElement(React.Fragment, null,\n        pageTitle && React.createElement(Helmet, { title: pageTitle }),\n        React.createElement(GlobalStyles, null),\n        React.createElement(Root, { \"$bg\": rootBackgroundColor },\n            React.createElement(Outer, { \"$bg\": outerBackgroundColor },\n                React.createElement(DisclaimerBar, null),\n                nav,\n                React.createElement(Inner, { \"$bg\": innerBackgroundColor }, columnize ? React.createElement(LayoutColumn, null, children) : children)),\n            footer)));\n}\nconst LayoutRoot = styled.main.withConfig({ displayName: \"LayoutRoot\", componentId: \"sc-o8fh6i\" }) `\n    background-color: ${({ $bg }) => $bg};\n    color: #323232;\n`;\nconst LayoutOuter = styled.div.withConfig({ displayName: \"LayoutOuter\", componentId: \"sc-15sxygf\" }) `\n    background-color: ${({ $bg }) => $bg};\n    display: flex;\n    flex-direction: column;\n    font-size: 16px;\n    min-height: 100vh;\n    position: relative;\n    z-index: 1;\n`;\nexport const LayoutInner = styled.div.withConfig({ displayName: \"LayoutInner\", componentId: \"sc-11qdxpq\" }) `\n    background-color: ${({ $bg }) => $bg};\n`;\nconst GlobalStyles = createGlobalStyle `\n    body {\n        font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;\n        font-size: 16px;\n        line-height: 2em;\n        -webkit-overflow-scrolling: touch;\n    }\n\n    input {\n        font-family: inherit;\n    }\n\n    body a {\n        text-decoration: none;\n    }\n\n    p a {\n        text-decoration: underline;\n    }\n\n    strong {\n        font-weight: 500;\n    }\n\n    a {\n        color: #0324FF;\n        font-weight: inherit;\n    }\n\n    a:link,\n    a:active,\n    a:focus,\n    a:hover,\n    a:visited {\n        text-decoration: none;\n    }\n\n    a:focus,\n    a:hover {\n        color: #0D009A;\n    }\n\n    a:active {\n        color: #13013D;\n    }\n`;\nexport const LayoutColumn = styled.div.withConfig({ displayName: \"LayoutColumn\", componentId: \"sc-1il3kaf\" }) `\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 24px;\n\n    @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n        padding: 0;\n    }\n`;\n","import { useRef } from 'react';\nimport { useLocation } from 'react-router-dom';\nexport default function useScrollToTop() {\n    const { pathname } = useLocation();\n    const pathnameRef = useRef(pathname);\n    if (pathname !== pathnameRef.current) {\n        pathnameRef.current = pathname;\n        if (typeof window !== 'undefined') {\n            window.scroll(0, 0);\n        }\n    }\n}\n","import React from 'react';\nimport { Link, useRouteError } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { EmptyState } from '~/components/EmptyState';\nimport Layout from '~/components/Layout';\nimport { ParseError } from '~/errors';\nimport appCrashedImage from '~/shared/assets/images/app_crashed.png';\nimport appCrashedImage2x from '~/shared/assets/images/app_crashed@2x.png';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport default function GenericErrorPage() {\n    const error = useRouteError();\n    if (error instanceof ParseError) {\n        return React.createElement(ParseErrorPage, null);\n    }\n    return (React.createElement(Layout, { rootBackgroundColor: \"#EFEFEF\" },\n        React.createElement(GenericErrorPageContent, null)));\n}\nfunction ParseErrorPage() {\n    return (React.createElement(Layout, { rootBackgroundColor: \"#EFEFEF\" },\n        React.createElement(Root, null,\n            React.createElement(EmptyState, { image: React.createElement(\"img\", { src: appCrashedImage, srcSet: `${appCrashedImage2x} 2x`, alt: \"App crashed\" }), link: React.createElement(Button, { kind: \"special\", as: Link, to: \"https://streamr.network/\", className: \"d-none d-md-flex\" }, \"Go to public site\"), linkOnMobile: true },\n                React.createElement(\"p\", null, \"The Hub is temporarily unavailable.\"),\n                React.createElement(SecondaryP, null,\n                    \"Our connection to the Subgraph indexing the Streamr Smart Contracts\",\n                    React.createElement(\"br\", null),\n                    \"is currently unavailable. Please try again in a few minutes.\")))));\n}\nexport function GenericErrorPageContent() {\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Root, null,\n        React.createElement(EmptyState, { image: React.createElement(\"img\", { src: appCrashedImage, srcSet: `${appCrashedImage2x} 2x`, alt: \"App crashed\" }), link: React.createElement(Button, { kind: \"special\", as: Link, to: R.projects(routeOptions(chainKey)), className: \"d-none d-md-flex\" }, \"Projects\"), linkOnMobile: true },\n            React.createElement(\"p\", null,\n                \"Oops. Something has broken down here.\",\n                React.createElement(\"br\", null),\n                \"Please try one of the links below\",\n                React.createElement(\"br\", null),\n                \"to get things back on track.\"))));\n}\nconst SecondaryP = styled.p.withConfig({ displayName: \"SecondaryP\", componentId: \"sc-da52xt\" }) `\n    font-size: 0.8em;\n    margin-top: 1em;\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-28tayp\" }) `\n    text-align: center;\n    width: 100%;\n\n    img {\n        margin-bottom: -0.75em;\n        max-width: 180px;\n    }\n\n    @media (min-width: 376px) {\n        img {\n            max-width: 200px;\n        }\n    }\n\n    @media (min-width: 745px) {\n        img {\n            max-width: 40%;\n        }\n    }\n\n    @media (min-width: 1441px) {\n        img {\n            max-width: 50%;\n        }\n    }\n`;\n","/**\n * @param e probably `Event` himself!\n * @returns `true` if the given entity has the `preventDefault` function and the `defaultPrevented` flag.\n */\nexport default function isPreventable(e) {\n    return (typeof e === 'object' &&\n        !!e &&\n        'preventDefault' in e &&\n        typeof e.preventDefault === 'function' &&\n        'defaultPrevented' in e &&\n        typeof e.defaultPrevented === 'boolean');\n}\n","import throttle from 'lodash/throttle';\nimport React, { useEffect, useMemo, useReducer, useRef, useState, } from 'react';\nimport styled, { css } from 'styled-components';\nimport { TABLET } from '~/shared/utils/styled';\nimport isPreventable from '~/utils/isPreventable';\nexport const Tab = () => null;\n/**\n * Mainy used for type gating. This function checks if the given `child` is a `Tab`.\n * @param child Any instance of a ReactNode.\n * @returns `true` if the child is a `Tab`. `false` otherwise.\n */\nfunction isTab(child) {\n    return !!child && typeof child === 'object' && 'type' in child && child.type === Tab;\n}\nexport const Item = styled.button.withConfig({ displayName: \"Item\", componentId: \"sc-1o3sn5b\" }) `\n    border: 0;\n    background: none;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    font-family: inherit;\n    font-weight: inherit;\n    padding: 0 20px;\n    border-radius: 6px;\n    flex-shrink: 0;\n    font-size: inherit;\n    justify-content: center;\n    line-height: 1.25em;\n    text-align: center;\n    min-width: 0;\n\n    button& {\n        appearance: none;\n        cursor: pointer;\n    }\n\n    &,\n    :hover,\n    :focus,\n    :active,\n    :visited {\n        color: #323232 !important;\n        text-decoration: none;\n    }\n\n    :disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n    }\n\n    ${({ $flexBasis }) => typeof $flexBasis === 'string' &&\n    css `\n            flex-basis: ${$flexBasis};\n        `}\n\n    &.full-width {\n        padding: 0;\n        flex: 1;\n        line-height: 16px;\n        @media (${TABLET}) {\n            padding: 0 20px;\n            flex: none;\n            &.small-padding {\n                padding: 0 12px;\n            }\n        }\n    }\n\n    &.small-padding {\n        padding: 0 12px;\n    }\n`;\nconst ItemContent = styled.div.withConfig({ displayName: \"ItemContent\", componentId: \"sc-1yo8eea\" }) `\n    ${({ $truncate = false }) => $truncate &&\n    css `\n            overflow: hidden;\n            text-overflow: ellipsis;\n            white-space: nowrap;\n        `}\n`;\nconst Outer = styled.div.withConfig({ displayName: \"Outer\", componentId: \"sc-1mzh9f8\" }) `\n    height: 34px;\n    position: relative;\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-5oj1ob\" }) `\n    align-items: center;\n    display: flex;\n    height: 100%;\n`;\nexport const Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-19kqk6v\" }) `\n    background: #f5f5f5;\n    box-sizing: border-box;\n    border-radius: 8px;\n    padding: 4px;\n    width: max-content;\n    font-size: 14px;\n    font-weight: 500;\n    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.025);\n    user-select: none;\n    overflow: hidden;\n    max-width: 100%;\n    &.full-width {\n        width: 100%;\n        @media (${TABLET}) {\n            width: max-content;\n        }\n    }\n`;\nconst Trolley = styled.div.withConfig({ displayName: \"Trolley\", componentId: \"sc-27wxt8\" }) `\n    height: 100%;\n    display: flex;\n    align-items: center;\n    position: absolute;\n    visibility: hidden;\n    opacity: 0;\n    top: 0;\n    left: 0;\n    padding: 0 20px;\n    white-space: nowrap;\n    left: 50%;\n    transform: translateX(-50%);\n    min-width: 0;\n    width: 100%;\n    justify-content: center;\n    text-align: center;\n\n    ${({ $animated = false }) => $animated &&\n    css `\n            transition: 200ms ease-out;\n            transition-property: visibility, opacity;\n        `}\n\n    ${({ $selected = false }) => $selected &&\n    css `\n            visibility: visible;\n            opacity: 1;\n        `}\n`;\nconst Rails = styled.div.withConfig({ displayName: \"Rails\", componentId: \"sc-1pcmq99\" }) `\n    background: #323232;\n    color: #ffffff;\n    border-radius: 6px;\n    height: 100%;\n    position: absolute;\n    transition: 200ms ease-out;\n    transition-property: visiblilty, opecity;\n    visibility: visible;\n    opacity: 1;\n    pointer-events: none;\n    z-index: 1;\n\n    ${({ $animated = false }) => $animated &&\n    css `\n            transition: 200ms ease-out;\n            transition-property: visiblilty, opecity, transform, width;\n        `}\n`;\nexport default function Tabs({ children, onSelectionChange, selection: selectionProp, spreadEvenly = false, fullWidthOnMobile = false, smallPadding = false, ...props }) {\n    /**\n     * Since `Tab` returns `null` its props is all we care about. It's a carrier. Remember\n     * Rick's butter passing robot? Yeah, this here passes props – that's its purpose.\n     */\n    const tabs = useMemo(() => React.Children.toArray(children)\n        .filter(isTab)\n        .map(({ props }) => props), [children]);\n    const selectedId = useMemo(() => tabs.find(({ selected = 'id', tag: _tag, ...rest }) => {\n        /**\n         * First we check it `selected` is a string. If it is then we use it as\n         * a peroperty key. We take its property value and check if it matches\n         * `selection` passed to `Tabs`.\n         */\n        if (typeof selected === 'string') {\n            return (typeof selectionProp !== 'undefined' &&\n                Object.prototype.hasOwnProperty.call(rest, selected) &&\n                rest[selected] === selectionProp);\n        }\n        /**\n         * If `selected` is a boolean then the situation is simple. If it's\n         * a function though, we call it with current Tab's props.\n         */\n        return typeof selected === 'function' ? selected(rest) : selected;\n    })?.id, [tabs, selectionProp]);\n    /**\n     * `windowWidth` is listed as a dependency for the left and width calculation for\n     * the `Rails` component later or. It changes on window resize.\n     *\n     * We only use the width here because the height doesn't affect the component.\n     */\n    const [windowWidth, setWindowWidth] = useState(0);\n    useEffect(() => {\n        let mounted = true;\n        const onResize = throttle(() => {\n            if (mounted) {\n                setWindowWidth(window.outerWidth);\n            }\n        }, 200);\n        window.addEventListener('resize', onResize);\n        return () => {\n            mounted = false;\n            window.removeEventListener('resize', onResize);\n        };\n    }, []);\n    /**\n     * We collect HTML elements associated with each tab using callback stored in a ref.\n     * The following is an index-to-callback map that holds the setters for each mounted\n     * element. There's a reason to this maddness.\n     *\n     * For one element, to avoid extensive updates on `ref`, we'd use `useCallback`. In our\n     * case we avoid it (as much as possible) using the following contraption.\n     *\n     * In other words, unless `children` change, 0th element will always set its ref\n     * using the callback at 0th index in the map, and so on. Simple as that.\n     */\n    const elementSettersRef = useRef({});\n    useEffect(() => {\n        /**\n         * We reset the setters when the number of tabs change. Ideally we'd do it only when\n         * reducing the number of tabs, but that'd add complexity.\n         */\n        elementSettersRef.current = {};\n    }, [tabs.length]);\n    /**\n     * `elements` is a list of mounted `Item` elements. We use it for left/width\n     * calculations later.\n     */\n    const [elements, setElement] = useState([]);\n    function setElementAt(id, index) {\n        let setter = elementSettersRef.current[index];\n        if (typeof setter !== 'function') {\n            setter = (el) => {\n                setElement((current) => {\n                    const newElements = [...current];\n                    newElements[index] = [id, el];\n                    return newElements;\n                });\n            };\n            elementSettersRef.current[index] = setter;\n        }\n        return setter;\n    }\n    const [left, width] = useMemo(() => {\n        let left = 0;\n        ((_) => { })(windowWidth);\n        let width = 0;\n        for (let i = 0; i < elements.length; i++) {\n            const [id, el] = elements[i];\n            const w = el?.getBoundingClientRect().width || 0;\n            if (id === selectedId) {\n                width = w;\n                break;\n            }\n            left += w;\n        }\n        return [left, width];\n    }, [elements, selectedId, windowWidth]);\n    /**\n     * Animation is tricky. We have to delay any of it before all the `Item` elements\n     * are mounted and we know at list the width of the current one.\n     */\n    const canAnimate = width !== 0;\n    /**\n     * We cannot enable animations immediately after having the width. We have to\n     * let components mount without transition first to avoid making them transition\n     * from an unknown location and 0 width.\n     */\n    const [animated, enableAnimation] = useReducer(() => true, false);\n    useEffect(() => {\n        if (canAnimate) {\n            /**\n             * At this point we know the proper width is there and the components\n             * mounted. Let's give animations green light!\n             */\n            enableAnimation();\n        }\n    }, [canAnimate]);\n    return (React.createElement(Root, { ...props, className: fullWidthOnMobile ? 'full-width' : '' },\n        React.createElement(Outer, null,\n            React.createElement(Rails, { \"$animated\": animated, style: {\n                    transform: `translateX(${left}px)`,\n                    width: `${width}px`,\n                } }, tabs.map(({ id, children }) => (React.createElement(Trolley, { key: id, \"$selected\": id === selectedId, \"$animated\": animated },\n                React.createElement(ItemContent, { \"$truncate\": spreadEvenly }, children))))),\n            React.createElement(Inner, null, tabs.map(({ id, tag = 'button', onClick, disabled = false, selected: _selected, children, ...rest }, index) => (React.createElement(Item, { ...rest, \"$flexBasis\": spreadEvenly ? `${100 / tabs.length}%` : undefined, as: tag, key: id, className: (fullWidthOnMobile ? 'full-width ' : ' ') +\n                    (smallPadding ? 'small-padding ' : ' '), ref: setElementAt(id, index), disabled: disabled, onClick: (e, ...otherArgs) => {\n                    const preventable = isPreventable(e);\n                    if (disabled) {\n                        if (preventable) {\n                            e.preventDefault();\n                        }\n                        /**\n                         * If a Tab is disabled we don't go any further.\n                         * Additionally, if `e` is a default-preventable,\n                         * then at this point it's also taken care of.\n                         */\n                        return;\n                    }\n                    /**\n                     * Anything that the *og* onClick has given us we pass\n                     * onto the `onClick` coming from the outside.\n                     */\n                    onClick?.(e, ...otherArgs);\n                    /**\n                     * It is possible to prevent selection outside of the\n                     * component. Just prevent event's default behaviour.\n                     */\n                    if (preventable && e.defaultPrevented) {\n                        return;\n                    }\n                    onSelectionChange?.(id);\n                }, \"$selected\": id === selectedId },\n                React.createElement(ItemContent, { \"$truncate\": spreadEvenly }, children))))))));\n}\n","import React from 'react';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { ChartPeriod, isChartPeriod } from '~/types';\nexport function ChartPeriodTabs({ value = ChartPeriod.SevenDays, onChange, ...rest }) {\n    return (React.createElement(Tabs, { ...rest, selection: value, onSelectionChange: (value) => {\n            if (!isChartPeriod(value)) {\n                throw new Error('Invalid chart period');\n            }\n            onChange?.(value);\n        } },\n        React.createElement(Tab, { id: ChartPeriod.SevenDays }, \"7D\"),\n        React.createElement(Tab, { id: ChartPeriod.OneMonth }, \"1M\"),\n        React.createElement(Tab, { id: ChartPeriod.ThreeMonths }, \"3M\"),\n        React.createElement(Tab, { id: ChartPeriod.OneYear }, \"1Y\"),\n        React.createElement(Tab, { id: ChartPeriod.YearToDate }, \"YTD\"),\n        React.createElement(Tab, { id: ChartPeriod.All }, \"ALL\")));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Root as TabsRoot, Item as TabsItem } from '~/shared/components/Tabs';\nimport { TABLET } from '~/shared/utils/styled';\nexport default function NetworkChartDisplay({ children, periodTabs, sourceTabs, }) {\n    return (React.createElement(Root, null,\n        React.createElement(Header, null,\n            React.createElement(SetSelector, null, sourceTabs),\n            React.createElement(ChartPeriodWrap, null, periodTabs)),\n        React.createElement(Body, null, children),\n        React.createElement(ChartPeriodWrap, null, periodTabs)));\n}\nconst ChartPeriodWrap = styled.div.withConfig({ displayName: \"ChartPeriodWrap\", componentId: \"sc-1j4lpaf\" }) ``;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-x3j4w6\" }) `\n    ${TabsRoot} {\n        width: 100%;\n    }\n\n    ${TabsItem} {\n        flex: 1;\n        padding: 0;\n    }\n\n    > ${ChartPeriodWrap} {\n        display: block;\n        margin-top: 24px;\n    }\n\n    @media ${TABLET} {\n        ${TabsRoot} {\n            width: max-content;\n        }\n\n        ${TabsItem} {\n            flex: none;\n            padding: 0 20px;\n        }\n\n        ${ChartPeriodWrap} ${TabsItem} {\n            padding: 0 12px;\n        }\n\n        > ${ChartPeriodWrap} {\n            display: none;\n        }\n    }\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-fe1zeo\" }) `\n    ${ChartPeriodWrap} {\n        display: none;\n    }\n\n    @media ${TABLET} {\n        align-items: center;\n        display: flex;\n\n        ${ChartPeriodWrap} {\n            display: block;\n        }\n    }\n`;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-1qilzqp\" }) ``;\nconst SetSelector = styled.div.withConfig({ displayName: \"SetSelector\", componentId: \"sc-2mp5d\" }) `\n    flex: 1;\n    min-width: 0;\n`;\n","import styled, { css } from 'styled-components';\nimport { TABLET, DESKTOP } from '~/shared/utils/styled';\nconst ColoredBox = styled.div.withConfig({ displayName: \"ColoredBox\", componentId: \"sc-hkbf0g\" }) `\n    background-color: ${({ $backgroundColor = '#ffffff' }) => $backgroundColor};\n    border-radius: 16px;\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);\n\n    ${({ $borderColor }) => typeof $borderColor === 'string' &&\n    css `\n            border: 1px solid ${$borderColor};\n        `}\n\n    ${({ $pad = false }) => $pad &&\n    css `\n            padding: 24px;\n\n            @media ${TABLET} {\n                padding: 40px;\n            }\n\n            @media ${DESKTOP} {\n                padding: 52px;\n            }\n        `}\n`;\nexport default ColoredBox;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ColoredBox from '~/components/ColoredBox';\nimport { COLORS, MEDIUM, TABLET } from '~/shared/utils/styled';\nexport default function NetworkPageSegment({ bodyComponent: BodyComponent = Body, children, foot = false, headerComponent: HeaderComponent = Header, rootComponent: RootComponent = Root, title = 'Title', }) {\n    return (React.createElement(RootComponent, null,\n        React.createElement(ColoredBox, null,\n            React.createElement(HeaderComponent, null,\n                React.createElement(Pad, null, typeof title === 'string' ? React.createElement(\"h2\", null, title) : title)),\n            React.createElement(BodyComponent, null, children),\n            foot ? React.createElement(Foot, null) : React.createElement(React.Fragment, null))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1uhcjnl\" }) ``;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-1qfhmyf\" }) `\n    border-top: 1px solid #efefef;\n`;\nconst Foot = styled.div.withConfig({ displayName: \"Foot\", componentId: \"sc-hj9h9h\" }) `\n    border-top: 1px solid #efefef;\n    height: 32px;\n    margin-top: -1px;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-1p88m79\" }) `\n    h2 {\n        color: ${COLORS.primary};\n        font-size: 20px;\n        font-weight: ${MEDIUM};\n        line-height: 30px;\n        margin: 0;\n        white-space: nowrap;\n    }\n`;\nexport const Pad = styled.div.withConfig({ displayName: \"Pad\", componentId: \"sc-13c5qyf\" }) `\n    padding: 20px 24px;\n\n    @media ${TABLET} {\n        padding: 32px 40px;\n    }\n`;\nexport const SegmentGrid = styled.div.withConfig({ displayName: \"SegmentGrid\", componentId: \"sc-okv1gv\" }) `\n    display: grid;\n    grid-template-columns: minmax(0, 1fr);\n    gap: 24px;\n    margin-top: 64px;\n\n    * + &,\n    & & {\n        margin-top: 0;\n    }\n`;\nexport function TitleBar({ children, label, aux = React.createElement(React.Fragment, null) }) {\n    return (React.createElement(TitleBarRoot, null,\n        React.createElement(Lhs, null,\n            React.createElement(\"h2\", null, children),\n            label != null && React.createElement(TitleBarLabel, null, label)),\n        React.createElement(Rhs, null, aux)));\n}\nconst TitleBarRoot = styled.div.withConfig({ displayName: \"TitleBarRoot\", componentId: \"sc-e8le53\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n    height: 30px;\n`;\nconst Lhs = styled.div.withConfig({ displayName: \"Lhs\", componentId: \"sc-s4io2g\" }) `\n    align-items: center;\n    display: flex;\n    flex-grow: 1;\n    gap: 8px;\n`;\nconst TitleBarLabel = styled.div.withConfig({ displayName: \"TitleBarLabel\", componentId: \"sc-1pb5y56\" }) `\n    color: #a3a3a3;\n    display: flex;\n    font-size: 20px;\n    font-style: normal;\n    font-weight: 500;\n    letter-spacing: 0.2px;\n    line-height: 30px;\n`;\nconst Rhs = styled.div.withConfig({ displayName: \"Rhs\", componentId: \"sc-1xjt1af\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n    min-width: 0;\n\n    &:empty {\n        display: none;\n    }\n`;\n","import React from 'react';\nimport { Decimals, SponsorshipDecimals } from '~/components/Decimals';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { FundedUntilCell, NumberOfOperatorsCell, SponsorshipApyCell, StreamIdCell, } from '~/components/Table';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { useEditSponsorshipFunding, useFundSponsorshipCallback, useJoinSponsorshipAsOperator, useSponsorshipTokenInfo, } from '~/hooks/sponsorships';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { isSponsorshipFundedByOperator } from '~/utils/sponsorships';\nexport function QueriedSponsorshipsTable({ noDataFirstLine = 'No data', noDataSecondLine, orderBy, orderDirection, onOrderChange, query, hideStreamId = false, }) {\n    const sponsorships = query.data?.pages.map((page) => page.sponsorships).flat() || [];\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const fundSponsorship = useFundSponsorshipCallback();\n    const joinSponsorshipAsOperator = useJoinSponsorshipAsOperator();\n    const editSponsorshipFunding = useEditSponsorshipFunding();\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ScrollTableCore, { elements: sponsorships, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: onOrderChange, columns: [\n                ...(hideStreamId == false\n                    ? [\n                        {\n                            displayName: 'Stream ID',\n                            valueMapper: ({ streamId }) => (React.createElement(StreamIdCell, { streamId: streamId })),\n                            align: 'start',\n                            isSticky: true,\n                            key: 'streamInfo',\n                            sortable: true,\n                        },\n                    ]\n                    : []),\n                {\n                    displayName: (React.createElement(React.Fragment, null,\n                        React.createElement(SponsorshipPaymentTokenName, null),\n                        \"/day\")),\n                    valueMapper: (element) => (React.createElement(Decimals, { abbr: true, amount: element.payoutPerDay, decimals: decimals })),\n                    align: 'start',\n                    isSticky: hideStreamId,\n                    key: 'payoutPerDay',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Funds',\n                    valueMapper: (element) => (React.createElement(Decimals, { abbr: true, amount: element.timeCorrectedRemainingBalanceWeiAt(Date.now()), decimals: decimals })),\n                    align: 'start',\n                    isSticky: false,\n                    key: 'remainingWei',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Operators',\n                    valueMapper: (element) => (React.createElement(NumberOfOperatorsCell, { sponsorship: element, currentOperatorId: operator?.id })),\n                    align: 'start',\n                    isSticky: false,\n                    key: 'operators',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Staked',\n                    valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.totalStakedWei })),\n                    align: 'end',\n                    isSticky: false,\n                    key: 'staked',\n                    sortable: true,\n                },\n                {\n                    displayName: 'APY',\n                    valueMapper: (element) => (React.createElement(SponsorshipApyCell, { spotAPY: element.spotApy, isRunning: element.isRunning })),\n                    align: 'end',\n                    isSticky: false,\n                    key: 'apy',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Funded until',\n                    valueMapper: (element) => (React.createElement(FundedUntilCell, { projectedInsolvencyAt: element.projectedInsolvencyAt, remainingBalance: element.remainingBalanceWei })),\n                    align: 'start',\n                    isSticky: false,\n                    key: 'fundedUntil',\n                    sortable: true,\n                },\n            ], actions: [\n                {\n                    displayName: 'Sponsor',\n                    disabled: ({ streamId }) => !streamId,\n                    callback(element) {\n                        fundSponsorship(chainId, element);\n                    },\n                },\n                (element) => {\n                    if (isSponsorshipFundedByOperator(element, operator)) {\n                        return {\n                            displayName: 'Edit stake',\n                            callback() {\n                                if (!operator) {\n                                    return;\n                                }\n                                editSponsorshipFunding({\n                                    chainId,\n                                    sponsorshipOrSponsorshipId: element,\n                                    operator,\n                                });\n                            },\n                        };\n                    }\n                    const maxOperatorsReached = element.operatorCount >= element.maxOperators;\n                    return {\n                        displayName: 'Join as Operator',\n                        disabled: !element.streamId || !operator || maxOperatorsReached,\n                        callback() {\n                            if (!operator) {\n                                return;\n                            }\n                            joinSponsorshipAsOperator({\n                                chainId,\n                                sponsorship: element,\n                                operator,\n                            });\n                        },\n                    };\n                },\n            ], noDataFirstLine: noDataFirstLine, noDataSecondLine: noDataSecondLine, linkMapper: (element) => R.sponsorship(element.id, routeOptions(chainKey)) }),\n        query.hasNextPage && (React.createElement(LoadMoreButton, { disabled: query.isLoading || query.isFetching, onClick: () => void query.fetchNextPage(), kind: \"primary2\" }, \"Load more\"))));\n}\n","import styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport const Separator = styled.div.withConfig({ displayName: \"Separator\", componentId: \"sc-126ww4n\" }) `\n    background: ${COLORS.Border};\n    height: 1px;\n    width: 100%;\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS, DESKTOP, MEDIUM, TABLET } from '~/shared/utils/styled';\nexport const StatGrid = styled.div.withConfig({ displayName: \"StatGrid\", componentId: \"sc-1kvkarj\" }) `\n    align-items: center;\n    display: grid;\n    gap: 20px;\n\n    @media ${TABLET} {\n        gap: 16px;\n        grid-template-columns: repeat(\n            ${({ children }) => Math.min(3, Math.max(1, React.Children.count(children)))},\n            1fr\n        );\n    }\n\n    @media ${DESKTOP} {\n        gap: 24px;\n        grid-template-columns: repeat(\n            ${({ children, $desktopColumnCount: maxColumns = 4 }) => Math.min(maxColumns, Math.max(1, React.Children.count(children)))},\n            1fr\n        );\n    }\n`;\nexport function StatCell({ children, label = 'Label', tip, }) {\n    return (React.createElement(StatCellRoot, null,\n        React.createElement(StatCellLabel, null, label),\n        React.createElement(StatCellBody, null,\n            React.createElement(StatCellContent, null, children),\n            tip && React.createElement(TipWrap, null, tip))));\n}\nexport const StatCellLabel = styled.div.withConfig({ displayName: \"StatCellLabel\", componentId: \"sc-17rz9v9\" }) `\n    color: #868686;\n    font-size: 14px;\n    line-height: 24px;\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport const StatCellContent = styled.div.withConfig({ displayName: \"StatCellContent\", componentId: \"sc-1ilbytn\" }) `\n    color: ${COLORS.primary};\n    font-size: 18px;\n    font-weight: ${MEDIUM};\n    letter-spacing: -0.05em;\n    line-height: 24px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    @media ${TABLET} {\n        font-size: 20px;\n    }\n`;\nconst StatCellBody = styled.div.withConfig({ displayName: \"StatCellBody\", componentId: \"sc-5zztj5\" }) `\n    ${({ children }) => React.Children.count(children) > 1 &&\n    css `\n            align-items: center;\n            display: flex;\n        `}\n`;\nconst TipWrap = styled.div.withConfig({ displayName: \"TipWrap\", componentId: \"sc-dpz7pu\" }) `\n    flex-shrink: 0;\n    margin-left: 8px;\n`;\nconst StatCellRoot = styled.div.withConfig({ displayName: \"StatCellRoot\", componentId: \"sc-1uj0qkp\" }) `\n    align-items: center;\n    border: 1px solid ${COLORS.Border};\n    border-radius: 12px;\n    display: flex;\n    gap: 8px;\n    min-width: 0;\n    padding: 16px 20px;\n\n    ${StatCellLabel} {\n        flex-grow: 1;\n    }\n\n    @media ${TABLET} {\n        border-radius: 16px;\n        display: block;\n        padding: 32px 40px;\n\n        ${StatCellLabel} {\n            margin-bottom: 10px;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { connectModal } from '~/modals/ConnectModal';\nimport { Button } from '~/components/Button';\nimport { COLORS } from '~/shared/utils/styled';\nexport default function NoWalletOverlay({ resourceName }) {\n    return (React.createElement(Root, null,\n        React.createElement(Content, null,\n            React.createElement(\"p\", null,\n                \"Please connect wallet to view your \",\n                resourceName),\n            React.createElement(Button, { kind: \"primary\", size: \"mini\", outline: true, type: \"button\", onClick: async () => {\n                    try {\n                        await connectModal.pop();\n                    }\n                    catch (e) {\n                        console.warn('Wallet connecting failed', e);\n                    }\n                } }, \"Connect\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1pkuxei\" }) `\n    align-items: center;\n    background-color: rgba(255, 255, 255, 0.3);\n    display: flex;\n    height: 100%;\n    justify-content: center;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 100%;\n\n    p {\n        font-size: 16px;\n        color: ${COLORS.primaryLight};\n        margin: 0 0 24px;\n    }\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-qln0c7\" }) `\n    align-items: center;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    padding: 20px;\n    text-align: center;\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport NoWalletOverlay from './NoWalletOverlay';\nexport default function WalletPass({ children, resourceName, roundBorders = false, }) {\n    const locked = !useWalletAccount();\n    return (React.createElement(Root, { \"$roundBorders\": roundBorders },\n        React.createElement(Content, { \"$blur\": locked }, children),\n        locked ? React.createElement(NoWalletOverlay, { resourceName: resourceName }) : React.createElement(React.Fragment, null)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1wag082\" }) `\n    position: relative;\n\n    ${({ $roundBorders = false }) => $roundBorders &&\n    css `\n            border-radius: 16px;\n            overflow: hidden;\n        `}\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-etw4bn\" }) `\n    transition: 350ms filter;\n\n    ${({ $blur = false }) => $blur &&\n    css `\n            filter: blur(5px);\n        `}\n`;\n","import { gql } from '@apollo/client';\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"ASC\";\n    OrderDirection[\"Desc\"] = \"DESC\";\n})(OrderDirection || (OrderDirection = {}));\nexport var StreamOrderBy;\n(function (StreamOrderBy) {\n    StreamOrderBy[\"BytesPerSecond\"] = \"BYTES_PER_SECOND\";\n    StreamOrderBy[\"Description\"] = \"DESCRIPTION\";\n    StreamOrderBy[\"Id\"] = \"ID\";\n    StreamOrderBy[\"MessagesPerSecond\"] = \"MESSAGES_PER_SECOND\";\n    StreamOrderBy[\"PeerCount\"] = \"PEER_COUNT\";\n    StreamOrderBy[\"PublisherCount\"] = \"PUBLISHER_COUNT\";\n    StreamOrderBy[\"SubscriberCount\"] = \"SUBSCRIBER_COUNT\";\n})(StreamOrderBy || (StreamOrderBy = {}));\nexport const GetStreamsDocument = gql `\n    query getStreams($streamIds: [String!], $first: Int, $orderBy: StreamOrderBy, $orderDirection: OrderDirection, $search: String, $owner: String, $cursor: String) {\n  streams(\n    pageSize: $first\n    ids: $streamIds\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n    owner: $owner\n    searchTerm: $search\n    cursor: $cursor\n  ) {\n    items {\n      bytesPerSecond\n      description\n      id\n      messagesPerSecond\n      peerCount\n      publisherCount\n      subscriberCount\n    }\n    cursor\n  }\n}\n    `;\nexport const GetGlobalStreamsStatsDocument = gql `\n    query getGlobalStreamsStats {\n  summary {\n    bytesPerSecond\n    messagesPerSecond\n    streamCount\n  }\n}\n    `;\nexport const GetNeighborsDocument = gql `\n    query getNeighbors($cursor: String, $pageSize: Int, $streamPart: String, $node: String, $streamId: String) {\n  neighbors(\n    cursor: $cursor\n    pageSize: $pageSize\n    streamPart: $streamPart\n    node: $node\n    stream: $streamId\n  ) {\n    items {\n      streamPartId\n      nodeId1\n      nodeId2\n      rtt\n    }\n    cursor\n  }\n}\n    `;\n","import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { LineChart, Line, CartesianGrid, XAxis, YAxis, ResponsiveContainer, Tooltip, ReferenceLine, } from 'recharts';\nimport Spinner from '~/components/Spinner';\nimport { COLORS, MEDIUM, REGULAR, TABLET } from '~/shared/utils/styled';\nimport { NoData } from '~/shared/components/NoData';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1ugjy2q\" }) `\n    position: relative;\n`;\nconst NoDataContainer = styled.div.withConfig({ displayName: \"NoDataContainer\", componentId: \"sc-gj2gxu\" }) `\n    height: 400px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n`;\nconst SpinnerContainer = styled.div.withConfig({ displayName: \"SpinnerContainer\", componentId: \"sc-um9vla\" }) `\n    height: 400px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n`;\nconst TimeSeriesGraph = ({ graphData, isLoading, xAxisDisplayFormatter, yAxisAxisDisplayFormatter, tooltipLabelFormatter, tooltipValueFormatter, tooltipValuePrefix, noDataText, ...props }) => {\n    const chartData = useMemo(() => graphData.sort((a, b) => a.x - b.x), [graphData]);\n    const [crossHairY, setCrossHairY] = useState(null);\n    const [crossHairX, setCrossHairX] = useState(null);\n    const updateCrossHairCoordinates = useCallback((xValue, yValue) => {\n        setTimeout(() => {\n            setCrossHairX(xValue);\n            setCrossHairY(yValue);\n        });\n        // do not put anything in the dependencies array or it will cause endless rerendering cycle\n    }, []);\n    return (React.createElement(Container, { ...props },\n        !!isLoading && (React.createElement(SpinnerContainer, null,\n            React.createElement(Spinner, { size: \"large\", color: \"blue\" }))),\n        !isLoading && (!chartData || !chartData.length) && (React.createElement(NoDataContainer, null,\n            React.createElement(NoData, { width: 250, firstLine: noDataText || 'Not enough data' }))),\n        !isLoading && chartData && chartData.length > 0 && (React.createElement(ResponsiveContainer, { width: \"100%\", height: 400 },\n            React.createElement(LineChart, { data: chartData },\n                React.createElement(Line, { type: \"linear\", dataKey: \"y\", stroke: COLORS.link, dot: { r: 4, stroke: COLORS.link }, activeDot: { stroke: 'white', fill: COLORS.link, r: 5 }, isAnimationActive: false }),\n                React.createElement(CartesianGrid, { stroke: COLORS.dialogBorder, vertical: false }),\n                React.createElement(XAxis\n                // domain={xAxisDataDomain}\n                , { \n                    // domain={xAxisDataDomain}\n                    dataKey: \"x\", scale: \"point\", tickFormatter: xAxisDisplayFormatter || undefined, tickMargin: 10, tickLine: false, stroke: COLORS.dialogBorder, minTickGap: 10, tick: { stroke: COLORS.primaryLight, fontWeight: 200 }, interval: \"preserveStartEnd\" }),\n                React.createElement(YAxis, { domain: ['dataMin', 'dataMax'], dataKey: \"y\", orientation: \"right\", tickMargin: 10, tickFormatter: yAxisAxisDisplayFormatter || undefined, stroke: COLORS.dialogBorder, tickLine: false, tick: { stroke: COLORS.primaryLight, fontWeight: 200 }, interval: \"preserveStartEnd\" }),\n                React.createElement(Tooltip, { cursor: React.createElement(CustomCursor, { setSelectedPointValues: updateCrossHairCoordinates }), content: React.createElement(CustomTooltip, { valuePrefix: tooltipValuePrefix, labelFormatter: tooltipLabelFormatter, valueFormatter: tooltipValueFormatter }) }),\n                crossHairY !== null && crossHairX !== null && (React.createElement(React.Fragment, null,\n                    React.createElement(ReferenceLine, { y: crossHairY, stroke: COLORS.primaryLight, strokeDasharray: \"4 1\" }),\n                    React.createElement(ReferenceLine, { x: crossHairX, stroke: COLORS.primaryLight, strokeDasharray: \"4 1\" }))))))));\n};\nconst CustomCursor = (props) => {\n    const { setSelectedPointValues } = props;\n    if (props.payload) {\n        setSelectedPointValues(props.payload[0].payload.x, props.payload[0].payload.y);\n    }\n    const setSelectedPointValuesRef = useRef(setSelectedPointValues);\n    if (setSelectedPointValuesRef.current !== setSelectedPointValues) {\n        setSelectedPointValuesRef.current = setSelectedPointValues;\n    }\n    useEffect(() => {\n        const { current } = setSelectedPointValuesRef;\n        return () => {\n            current?.(null, null);\n        };\n    }, []);\n    return React.createElement(React.Fragment, null);\n};\nconst CustomTooltipContainer = styled.div.withConfig({ displayName: \"CustomTooltipContainer\", componentId: \"sc-1lcij3p\" }) `\n    border-radius: 8px;\n    padding: 12px;\n    background-color: white;\n    box-shadow: 0 8px 12px 0 #52525226;\n    font-size: 14px;\n\n    .label {\n        color: ${COLORS.primary};\n        margin-bottom: 5px;\n        font-weight: ${REGULAR};\n    }\n\n    .value {\n        font-weight: ${MEDIUM};\n        color: ${COLORS.primary};\n        margin-bottom: 0;\n    }\n\n    .value-prefix {\n        color: ${COLORS.primaryDisabled};\n        font-weight: ${REGULAR};\n    }\n`;\nconst CustomTooltip = (props) => {\n    const { active, payload, label, valuePrefix, labelFormatter, valueFormatter } = props;\n    return (active &&\n        payload &&\n        payload[0] && (React.createElement(CustomTooltipContainer, null,\n        React.createElement(\"p\", { className: \"label\" }, labelFormatter ? labelFormatter(label) : label),\n        React.createElement(\"p\", { className: \"value\" },\n            React.createElement(\"span\", { className: \"value-prefix\" },\n                valuePrefix,\n                \":\"),\n            ' ',\n            valueFormatter ? valueFormatter(payload[0].value) : payload[0].value))));\n};\nexport const NetworkChart = styled(TimeSeriesGraph).withConfig({ displayName: \"NetworkChart\", componentId: \"sc-l9v4yv\" }) `\n    margin: 40px 0;\n\n    @media ${TABLET} {\n        margin: 64px 0 0;\n    }\n`;\n","import { format } from 'date-fns';\nexport const formatShortDate = (value) => {\n    return format(new Date(value), 'dd MMM');\n};\nexport const formatLongDate = (value) => {\n    return format(new Date(value), 'dd/MM/yyyy');\n};\n","import { useQuery } from '@tanstack/react-query';\nimport moment from 'moment';\nimport React, { useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Button } from '~/components/Button';\nimport { ChartPeriodTabs } from '~/components/ChartPeriodTabs';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout from '~/components/Layout';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport NetworkChartDisplay from '~/components/NetworkChartDisplay';\nimport NetworkPageSegment, { Pad, SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport { QueriedSponsorshipsTable } from '~/components/QueriedSponsorshipsTable';\nimport { Separator } from '~/components/Separator';\nimport { StatCell, StatGrid } from '~/components/StatGrid';\nimport { OperatorIdCell } from '~/components/Table';\nimport WalletPass from '~/components/WalletPass';\nimport { GetStreamsDocument as GetIndexerStreamsDocument, StreamOrderBy as IndexerOrderBy, OrderDirection as IndexerOrderDirection, } from '~/generated/gql/indexer';\nimport { getNetworkStats, getOperatorDailyBuckets, getTimestampForChartPeriod, } from '~/getters';\nimport { getDelegationStats } from '~/getters/getDelegationStats';\nimport { getIndexerClient } from '~/getters/getGraphClient';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { useDelegationsForWalletQuery, useDelegationsStats, useOperatorForWalletQuery, useOperatorStatsForWallet, } from '~/hooks/operators';\nimport { useSponsorshipTokenInfo, useSponsorshipsForCreatorQuery, } from '~/hooks/sponsorships';\nimport { NoData } from '~/shared/components/NoData';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { NetworkChart } from '~/shared/components/TimeSeriesGraph';\nimport { formatLongDate, formatShortDate, } from '~/shared/components/TimeSeriesGraph/chartUtils';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ChartPeriod } from '~/types';\nimport { abbr } from '~/utils';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nexport function NetworkOverviewPage() {\n    return (React.createElement(Layout, { columnize: true },\n        React.createElement(NetworkHelmet, { title: \"Network Overview\" }),\n        React.createElement(SegmentGrid, null,\n            React.createElement(NetworkStats, null),\n            React.createElement(MyOperatorSummary, null),\n            React.createElement(MyDelegationsSummary, null),\n            React.createElement(MyDelegations, null),\n            React.createElement(MySponsorships, null))));\n}\nfunction NetworkStats() {\n    const currentChainId = useCurrentChainId();\n    const statsQuery = useQuery({\n        queryKey: ['networkStats', currentChainId],\n        async queryFn() {\n            return getNetworkStats(currentChainId);\n        },\n    });\n    const operatorCountQuery = useActiveOperatorCountQuery();\n    return (React.createElement(NetworkPageSegment, { title: \"Network stats\" },\n        React.createElement(Pad, null,\n            React.createElement(StatGrid, null,\n                React.createElement(StatCell, { label: \"Total stake\" }, statsQuery.isLoading ? (React.createElement(React.Fragment, null, \"\\u200C\")) : (React.createElement(React.Fragment, null, statsQuery.data ? (React.createElement(SponsorshipDecimals, { abbr: true, amount: statsQuery.data.totalStake, tooltip: true })) : (React.createElement(React.Fragment, null, \"N/A\"))))),\n                React.createElement(StatCell, { label: \"Sponsorships\" }, statsQuery.isLoading ? (React.createElement(React.Fragment, null, \"\\u200C\")) : (statsQuery.data?.sponsorshipsCount ?? React.createElement(React.Fragment, null, \"N/A\"))),\n                React.createElement(StatCell, { label: \"Active Operators\" }, operatorCountQuery.isLoading ? (React.createElement(React.Fragment, null, \"\\u200C\")) : (operatorCountQuery.data ?? React.createElement(React.Fragment, null, \"N/A\")))))));\n}\nfunction useActiveOperatorCountQuery() {\n    const chainId = useCurrentChainId();\n    return useQuery({\n        queryKey: ['useActiveOperatorCountQuery', chainId],\n        queryFn: async () => {\n            let cursor = '0';\n            const uniquenessGate = {};\n            let count = 0;\n            const client = getIndexerClient(chainId);\n            if (!client) {\n                return 0;\n            }\n            for (;;) {\n                const { data: { streams }, } = await client.query({\n                    fetchPolicy: 'network-only',\n                    query: GetIndexerStreamsDocument,\n                    variables: {\n                        first: 500,\n                        orderBy: IndexerOrderBy.MessagesPerSecond,\n                        orderDirection: IndexerOrderDirection.Desc,\n                        cursor,\n                    },\n                });\n                const breakEarly = (() => {\n                    for (const item of streams.items) {\n                        if (!item.messagesPerSecond) {\n                            /**\n                             * Make the whole stream fetching skip streams that have no\n                             * data flowing through them.\n                             */\n                            return true;\n                        }\n                        if (!uniquenessGate[item.id]) {\n                            if (/^[^/]+\\/operator\\/coordination$/.test(item.id)) {\n                                count += 1;\n                            }\n                        }\n                        uniquenessGate[item.id] = true;\n                    }\n                    return false;\n                })();\n                if (!streams.cursor || breakEarly) {\n                    break;\n                }\n                cursor = streams.cursor;\n            }\n            return count;\n        },\n    });\n}\nfunction MyOperatorSummary() {\n    const wallet = useWalletAccount();\n    const { symbol: tokenSymbol = 'DATA' } = useSponsorshipTokenInfo() || {};\n    const stats = useOperatorStatsForWallet(wallet);\n    const { value = 0n, numOfDelegators = 0, numOfSponsorships = 0 } = stats || {};\n    const [chartPeriod, setChartPeriod] = useState(ChartPeriod.ThreeMonths);\n    const [chartId, setChartId] = useState('earnings');\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    const currentChainId = useCurrentChainId();\n    const { data: chartData = [] } = useQuery({\n        queryKey: [\n            'operatorSummaryChartQuery',\n            currentChainId,\n            chartId,\n            chartPeriod,\n            operator?.id,\n        ],\n        async queryFn() {\n            if (!operator) {\n                return [];\n            }\n            try {\n                const end = moment().utc().subtract(1, 'day').endOf('day');\n                const buckets = await getOperatorDailyBuckets(currentChainId, operator.id, {\n                    dateGreaterEqualThan: getTimestampForChartPeriod(chartPeriod, end).unix(),\n                    dateLowerThan: end.unix(),\n                    force: true,\n                });\n                const { decimals } = await getSponsorshipTokenInfo(currentChainId);\n                const toValue = chartId === 'stake'\n                    ? ({ valueWithoutEarnings }) => toBigInt(valueWithoutEarnings)\n                    : ({ cumulativeEarningsWei }) => toBigInt(cumulativeEarningsWei);\n                return buckets.map((bucket) => ({\n                    x: Number(bucket.date) * 1000,\n                    y: toFloat(toValue(bucket), decimals).toNumber(),\n                }));\n            }\n            catch (e) {\n                errorToast({ title: 'Could not load operator chart data' });\n                console.warn('Could not load operator chart data', e);\n            }\n            return [];\n        },\n    });\n    const chartLabel = chartId === 'stake' ? 'Total stake' : 'Cumulative earnings';\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NetworkPageSegment, { title: React.createElement(TitleBar, { aux: operator && (React.createElement(Button, { kind: \"secondary\", as: Link, to: R.operator(operator.id, routeOptions(chainKey)) }, \"View Operator\")) }, \"My operator summary\") },\n        React.createElement(WalletPass, { resourceName: \"operator summary\", roundBorders: true }, !wallet || stats !== null ? (React.createElement(React.Fragment, null,\n            React.createElement(Pad, null,\n                React.createElement(StatGrid, null,\n                    React.createElement(StatCell, { label: \"Total stake\" },\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: value })),\n                    React.createElement(StatCell, { label: \"Delegators\" }, numOfDelegators),\n                    React.createElement(StatCell, { label: \"Sponsorships\" }, numOfSponsorships))),\n            React.createElement(Separator, null),\n            React.createElement(Pad, null,\n                React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: chartPeriod, onChange: setChartPeriod }), sourceTabs: React.createElement(Tabs, { selection: chartId, onSelectionChange: (newChartId) => {\n                            if (newChartId !== 'stake' &&\n                                newChartId !== 'earnings') {\n                                return;\n                            }\n                            setChartId(newChartId);\n                        } },\n                        React.createElement(Tab, { id: \"earnings\" }, \"Cumulative earnings\"),\n                        React.createElement(Tab, { id: \"stake\" }, \"Total stake\")) },\n                    React.createElement(NetworkChart, { tooltipValuePrefix: chartLabel, graphData: chartData, xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: (value) => abbr(value), tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: (value) => `${abbr(value)} ${tokenSymbol}` }))))) : (React.createElement(React.Fragment, null,\n            React.createElement(Pad, null,\n                React.createElement(NoData, { firstLine: \"You haven't initialized your operator.\", secondLine: React.createElement(React.Fragment, null,\n                        \"You can become an operator on the\",\n                        ' ',\n                        React.createElement(Link, { to: R.operators(routeOptions(chainKey)) }, \"Operators\"),\n                        ' ',\n                        \"page.\"), compact: true })))))));\n}\nfunction MyDelegationsSummary() {\n    const wallet = useWalletAccount();\n    const currentChainId = useCurrentChainId();\n    const stats = useDelegationsStats(wallet);\n    const { symbol: tokenSymbol = 'DATA' } = useSponsorshipTokenInfo() || {};\n    const { value = 0n, numOfOperators = 0, minApy = 0, maxApy = 0 } = stats || {};\n    const apy = minApy === maxApy ? [minApy] : [minApy, maxApy];\n    const [chartPeriod, setChartPeriod] = useState(ChartPeriod.ThreeMonths);\n    const [chartDataSource, setChartDataSource] = useState('cumulativeEarnings');\n    const dailyDelegationChartQuery = useQuery({\n        queryKey: [\n            'dailyDelegationChartQuery',\n            currentChainId,\n            wallet,\n            chartPeriod,\n            chartDataSource,\n        ],\n        queryFn: async () => {\n            try {\n                if (!wallet) {\n                    return [];\n                }\n                return await getDelegationStats(currentChainId, wallet, chartPeriod, chartDataSource, {\n                    force: true,\n                    ignoreToday: false,\n                });\n            }\n            catch (_) {\n                errorToast({ title: 'Could not load my delegations chart data' });\n                return [];\n            }\n        },\n    });\n    const chartLabel = chartDataSource === 'currentValue' ? 'Current value' : 'Cumulative earnings';\n    return (React.createElement(NetworkPageSegment, { title: \"My delegations summary\" },\n        React.createElement(WalletPass, { resourceName: \"delegations summary\", roundBorders: true },\n            React.createElement(Pad, null,\n                React.createElement(StatGrid, null,\n                    React.createElement(StatCell, { label: \"Current value\" },\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: value })),\n                    React.createElement(StatCell, { label: \"Operators\" }, numOfOperators),\n                    React.createElement(StatCell, { label: \"APY\" },\n                        apy.map((v) => (v * 100).toFixed(0)).join('-'),\n                        \"%\"))),\n            React.createElement(Separator, null),\n            React.createElement(Pad, null,\n                React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: chartPeriod, onChange: setChartPeriod }), sourceTabs: React.createElement(Tabs, { selection: chartDataSource, onSelectionChange: (newChartId) => {\n                            if (newChartId !== 'currentValue' &&\n                                newChartId !== 'cumulativeEarnings') {\n                                return;\n                            }\n                            setChartDataSource(newChartId);\n                        } },\n                        React.createElement(Tab, { id: \"cumulativeEarnings\" }, \"Cumulative earnings\"),\n                        React.createElement(Tab, { id: \"currentValue\" }, \"Current value\")) },\n                    React.createElement(NetworkChart, { tooltipValuePrefix: chartLabel, graphData: dailyDelegationChartQuery.data || [], xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: (value) => abbr(value), isLoading: dailyDelegationChartQuery.isLoading, tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: (value) => `${abbr(value)} ${tokenSymbol}` }))))));\n}\nfunction MyDelegations() {\n    const wallet = useWalletAccount();\n    const query = useDelegationsForWalletQuery({ address: wallet });\n    const isLoading = query.isLoading || query.isFetching;\n    // We want to hide delegations to broken operator contract version 1\n    // as we cannot get rid of them otherwise\n    const delegations = query.data?.pages\n        .flatMap((page) => page.elements)\n        .filter((d) => d.contractVersion !== 1) || [];\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NetworkPageSegment, { title: \"My delegations\", foot: true },\n        React.createElement(WalletPass, { resourceName: \"delegations\" }, !wallet || delegations.length || isLoading ? (React.createElement(React.Fragment, null,\n            React.createElement(ScrollTableCore, { isLoading: isLoading, elements: delegations, columns: [\n                    {\n                        displayName: 'Operator',\n                        valueMapper: ({ id, metadata: { imageUrl, name }, }) => (React.createElement(OperatorIdCell, { operatorId: id, imageUrl: imageUrl, operatorName: name })),\n                        align: 'start',\n                        isSticky: true,\n                        key: 'operatorId',\n                    },\n                    {\n                        displayName: 'My delegation',\n                        valueMapper: (sponsorship) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: wallet ? sponsorship.share(wallet) : 0n })),\n                        align: 'start',\n                        isSticky: false,\n                        key: 'myShare',\n                    },\n                    {\n                        displayName: 'Total stake',\n                        valueMapper: ({ valueWithoutEarnings }) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: valueWithoutEarnings })),\n                        align: 'end',\n                        isSticky: false,\n                        key: 'totalStake',\n                    },\n                    {\n                        displayName: \"Owner's cut\",\n                        valueMapper: ({ operatorsCut }) => `${operatorsCut}%`,\n                        align: 'end',\n                        isSticky: false,\n                        key: 'operatorsCut',\n                    },\n                    {\n                        displayName: 'APY',\n                        valueMapper: ({ apy }) => `${(apy * 100).toFixed(0)}%`,\n                        align: 'end',\n                        isSticky: false,\n                        key: 'apy',\n                    },\n                    {\n                        displayName: 'Sponsorships',\n                        valueMapper: (element) => element.stakes.length,\n                        align: 'end',\n                        isSticky: false,\n                        key: 'sponsorships',\n                    },\n                ], linkMapper: ({ id }) => R.operator(id, routeOptions(chainKey)) }),\n            query.hasNextPage ? (React.createElement(LoadMoreButton, { disabled: isLoading, onClick: () => void query.fetchNextPage(), kind: \"primary2\" }, \"Load more\")) : (React.createElement(React.Fragment, null)))) : (React.createElement(NoData, { firstLine: \"You haven't delegated to anyone yet.\", secondLine: React.createElement(React.Fragment, null,\n                \"You can browse\",\n                ' ',\n                React.createElement(Link, { to: R.operators(routeOptions(chainKey)) }, \"operators\"),\n                ' ',\n                \"to start delegating.\"), compact: true })))));\n}\nfunction MySponsorships() {\n    const query = useSponsorshipsForCreatorQuery(useWalletAccount());\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NetworkPageSegment, { title: \"My sponsorships\", foot: true },\n        React.createElement(WalletPass, { resourceName: \"sponsorships\" },\n            React.createElement(QueriedSponsorshipsTable, { query: query, noDataFirstLine: \"You don't have any sponsorships yet.\", noDataSecondLine: React.createElement(React.Fragment, null,\n                    \"You can\",\n                    ' ',\n                    React.createElement(Link, { to: R.sponsorships(routeOptions(chainKey)) }, \"start a sponsorship\"),\n                    ' ',\n                    \"here\") }))));\n}\n","import moment from 'moment/moment';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { getDelegatorDailyBuckets } from '~/getters/index';\nimport { ChartPeriod } from '~/types';\nimport { toBN, toFloat } from '~/utils/bn';\nexport const getDelegationStats = async (chainId, delegatorId, selectedPeriod, dataSource, { force = false, ignoreToday = false } = {}) => {\n    const { decimals = 18n } = await getSponsorshipTokenInfo(chainId);\n    const start = ignoreToday ? moment().utc().startOf('day') : moment().utc();\n    let result;\n    switch (selectedPeriod) {\n        case ChartPeriod.SevenDays:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(7, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneMonth:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(30, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.ThreeMonths:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(90, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneYear:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(365, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.YearToDate:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().startOf('year').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.All:\n            const maxAmount = 999;\n            const maxIterations = 5;\n            const endDate = start.clone().subtract(maxIterations * maxAmount, 'days');\n            const elements = [];\n            // yeah - I'm guessing we will not have a history longer than 5 thousand days :)\n            for (let i = 0; i < maxIterations; i++) {\n                const partialResult = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                    dateGreaterEqualThan: endDate.unix(),\n                    dateLowerThan: start.unix(),\n                    batchSize: maxAmount,\n                    skip: maxAmount * i,\n                    force,\n                });\n                elements.push(...partialResult);\n                if (partialResult.length < maxAmount) {\n                    break; // we're breaking the FOR loop here\n                }\n            }\n            result = elements;\n            break;\n        default:\n            result = [];\n    }\n    return result.map((bucket) => {\n        const yValue = dataSource === 'currentValue'\n            ? toFloat(bucket.totalValueDataWei, decimals).toNumber()\n            : dataSource === 'cumulativeEarnings'\n                ? toFloat(bucket.cumulativeEarningsWei, decimals).toNumber()\n                : 0;\n        return {\n            x: toBN(bucket.date).multipliedBy(1000).toNumber(),\n            y: yValue,\n        };\n    });\n};\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { EmptyState } from '~/components/EmptyState';\nimport Layout from '~/components/Layout';\nimport pageNotFoundPic from '~/shared/assets/images/404_blocks.png';\nimport pageNotFoundPic2x from '~/shared/assets/images/404_blocks@2x.png';\nimport { useCurrentChainFullName, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport default function NotFoundPage() {\n    return (React.createElement(Layout, { rootBackgroundColor: \"#EFEFEF\" },\n        React.createElement(NotFoundPageContent, null)));\n}\nexport function NotFoundPageContent() {\n    const chainKey = useCurrentChainKey();\n    const fullChainName = useCurrentChainFullName();\n    return (React.createElement(Root, null,\n        React.createElement(EmptyState, { image: React.createElement(\"img\", { src: pageNotFoundPic, srcSet: `${pageNotFoundPic2x} 2x`, alt: \"Not found\" }), link: React.createElement(React.Fragment, null,\n                React.createElement(Button, { kind: \"special\", as: Link, to: R.streams(routeOptions(chainKey)) }, \"Go to streams\"),\n                React.createElement(Button, { kind: \"special\", as: Link, to: R.projects(routeOptions(chainKey)) }, \"Go to projects\"),\n                React.createElement(Button, { kind: \"special\", as: Link, to: R.root() }, \"Go to public site\")), linkOnMobile: true },\n            React.createElement(\"p\", null,\n                \"Whoops! We don't seem to be able to find your data.\",\n                React.createElement(\"br\", null),\n                React.createElement(\"small\", null,\n                    \"You are on the \",\n                    fullChainName,\n                    \" chain. Are you on the right chain?\")))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-xrbw83\" }) `\n    text-align: center;\n    width: 100%;\n`;\n","import React, { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { isAddress } from 'web3-validator';\nimport { Alert as PrestyledAlert } from '~/components/Alert';\nimport FormModal, { FieldWrap, Section, TextInput, } from '~/modals/FormModal';\nimport Label from '~/shared/components/Ui/Label';\nexport default function AddNodeAddressModal({ title = 'Add node address', onResolve, onSubmit, submitLabel = 'Add node address', warning, ...props }) {\n    const [address, setAddress] = useState('');\n    const isValidAddress = useMemo(() => (address.length > 0 ? isAddress(address) : true), [address]);\n    return (React.createElement(FormModal, { ...props, title: title, submitLabel: submitLabel, canSubmit: isValidAddress && address.length > 0, onSubmit: () => {\n            onSubmit(address);\n            onResolve?.(address);\n        } },\n        React.createElement(Section, null,\n            React.createElement(Label, null, \"Address\"),\n            React.createElement(FieldWrap, { \"$invalid\": !isValidAddress },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => void setAddress(target.value), placeholder: \"0x795...f109A\", value: address }))),\n        warning != null && (React.createElement(Alert, { type: \"error\", title: \"\" }, warning))));\n}\nconst Alert = styled(PrestyledAlert).withConfig({ displayName: \"Alert\", componentId: \"sc-zoxhdl\" }) `\n    margin-top: 10px;\n`;\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Button } from '~/components/Button';\nimport { Separator } from '~/components/Separator';\nimport Spinner from '~/components/Spinner';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport AddAddressModal from '~/modals/AddAddressModal';\nimport { addOperatorControllerAddress, removeOperatorControllerAddress, setOperatorNodeAddresses, } from '~/services/operators';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { COLORS } from '~/shared/utils/styled';\nimport { Layer } from '~/utils/Layer';\nimport { getBalance } from '~/utils/balance';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport { errorToast } from '~/utils/toast';\nexport var AddressType;\n(function (AddressType) {\n    AddressType[AddressType[\"Node\"] = 0] = \"Node\";\n    AddressType[AddressType[\"Automation\"] = 1] = \"Automation\";\n})(AddressType || (AddressType = {}));\nconst dialogTitleMap = {\n    [AddressType.Node]: 'Add node address',\n    [AddressType.Automation]: 'Authorise staking agent',\n};\nconst dialogSubmitLabelMap = {\n    [AddressType.Node]: 'Add node address',\n    [AddressType.Automation]: 'Authorise staking agent',\n};\nexport function AddressTable({ type, busy = false, disableEditing = false, onChange, onAddAddress, onRemoveAddress, value = [], }) {\n    function toggle(element) {\n        if (element.persisted) {\n            return void onChange?.(value.map((node) => node !== element ? node : { ...node, enabled: !node.enabled }));\n        }\n        onChange?.(value.filter((node) => node !== element));\n    }\n    return (React.createElement(ScrollTable, { elements: value, columns: [\n            {\n                displayName: 'Address',\n                valueMapper: (element) => (React.createElement(Address, { \"$new\": element.enabled && !element.persisted }, element.address)),\n                align: 'start',\n                isSticky: true,\n                key: 'id',\n            },\n            {\n                displayName: 'POL balance',\n                valueMapper: (element) => React.createElement(PolBalance, { address: element.address }),\n                align: 'start',\n                isSticky: false,\n                key: 'balance',\n            },\n            {\n                displayName: '',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, element.persisted !== element.enabled ? (React.createElement(PendingIndicator, { disabled: busy },\n                    \"Pending \",\n                    element.enabled ? 'addition' : 'deletion')) : (React.createElement(Button, { disabled: busy || disableEditing, kind: \"secondary\", onClick: () => {\n                        toggle(element);\n                        return void onRemoveAddress?.(element.address);\n                    } }, \"Delete\")))),\n                align: 'end',\n                isSticky: false,\n                key: 'actions',\n            },\n        ], footerComponent: React.createElement(Footer, null,\n            React.createElement(Button, { kind: \"secondary\", disabled: busy || disableEditing, onClick: async () => {\n                    try {\n                        await addAddressModal.pop({\n                            title: dialogTitleMap[type],\n                            submitLabel: dialogSubmitLabelMap[type],\n                            warning: type === AddressType.Automation ? (React.createElement(React.Fragment, null, \"While this address cannot withdraw your tokens, it may trigger penalties for your Operator by engaging in unsuitable Sponsorships or prematurely exiting Sponsorships before the minimum stake period expires. It's important to exercise caution.\")) : undefined,\n                            async onSubmit(newAddress) {\n                                const address = `0x${newAddress.replace(/^0x/i, '')}`.toLowerCase();\n                                const exists = value.some((node) => node.address.toLowerCase() === address);\n                                if (!exists) {\n                                    onChange?.([\n                                        ...value,\n                                        {\n                                            address,\n                                            persisted: false,\n                                            enabled: true,\n                                        },\n                                    ]);\n                                    return void onAddAddress?.(address);\n                                }\n                                errorToast({\n                                    title: 'Address already declared',\n                                });\n                            },\n                        });\n                    }\n                    catch (e) {\n                        if (isRejectionReason(e)) {\n                            return;\n                        }\n                        console.warn('Failed to add address', e);\n                    }\n                } }, dialogTitleMap[type])) }));\n}\nconst Address = styled.div.withConfig({ displayName: \"Address\", componentId: \"sc-r6ikb5\" }) `\n    color: ${({ $new = false }) => ($new ? '#a3a3a3' : '#525252')};\n`;\nconst addAddressModal = toaster(AddAddressModal, Layer.Modal);\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-1w3iyj4\" }) `\n    display: flex;\n    justify-content: right;\n    padding: 32px;\n    gap: 10px;\n`;\nconst LowBalanceThreshold = toBigInt(0.1, 18n);\nfunction PolBalance({ address }) {\n    const [balance, setBalance] = useState();\n    const currentChainId = useCurrentChainId();\n    useEffect(() => {\n        let mounted = true;\n        void (async () => {\n            try {\n                const newBalance = await getBalance({\n                    chainId: currentChainId,\n                    tokenAddress: 'native',\n                    walletAddress: address,\n                });\n                if (mounted) {\n                    setBalance(newBalance);\n                }\n            }\n            catch (e) {\n                console.warn(`Failed to get balance for \"${address}\"`, e);\n            }\n        })();\n        return () => {\n            mounted = false;\n        };\n    }, [address, currentChainId]);\n    const lowBalance = balance != null && balance < LowBalanceThreshold;\n    return balance != null ? (React.createElement(PolBalanceRoot, null,\n        React.createElement(\"div\", null, toFloat(balance, 18n).toFixed(2)),\n        lowBalance && (React.createElement(Tooltip, { content: \"Low POL\" },\n            React.createElement(TooltipIconWrap, { className: \"ml-1\", \"$color\": \"#ff5c00\", \"$svgSize\": { width: '18px', height: '18px' } },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))))) : (React.createElement(Spinner, { color: \"blue\" }));\n}\nconst PolBalanceRoot = styled.div.withConfig({ displayName: \"PolBalanceRoot\", componentId: \"sc-1lt1g56\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n\n    > * {\n        flex-shrink: 0;\n    }\n`;\nfunction PendingIndicator({ children, ...props }) {\n    return (React.createElement(PendingIndicatorRoot, { ...props, type: \"button\" },\n        React.createElement(\"div\", null, children),\n        React.createElement(Separator, null),\n        React.createElement(\"div\", null,\n            React.createElement(Spinner, { color: \"blue\" }))));\n}\nconst PendingIndicatorRoot = styled.button.withConfig({ displayName: \"PendingIndicatorRoot\", componentId: \"sc-xy28i0\" }) `\n    align-items: center;\n    appearance: none;\n    background: #deebff;\n    border-radius: 4px;\n    border: 0;\n    color: ${COLORS.primary};\n    display: grid;\n    font-size: 12px;\n    font-weight: 500;\n    grid-template-columns: auto 1px 24px;\n    height: 32px;\n    line-height: 20px;\n    padding: 0;\n\n    :disabled {\n        opacity: 0.5;\n    }\n\n    ${Separator} {\n        background: #d1dfff;\n        height: 100%;\n    }\n\n    > div:first-child {\n        padding: 0 8px;\n    }\n\n    svg {\n        color: ${COLORS.close};\n        display: block;\n        height: 8px;\n        margin: 0 auto;\n        width: 8px;\n    }\n\n    ${Spinner} {\n        height: 8px;\n        width: 8px;\n        margin: 0 auto;\n        display: flex;\n        align-items: center;\n        justify-items: center;\n    }\n`;\nexport function useSubmitNodeAddressesCallback() {\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    const cb = useCallback(async (chainId, operatorId, addresses, { onSuccess, onError, onReject } = {}) => {\n        setIsSubmitting(true);\n        try {\n            await setOperatorNodeAddresses(chainId, operatorId, addresses, {\n                onReceipt: ({ blockNumber }) => {\n                    onSuccess?.(blockNumber);\n                },\n            });\n        }\n        catch (e) {\n            if (isTransactionRejection(e) || isRejectionReason(e)) {\n                /**\n                 * User rejected the transaction. Let's move on like\n                 * nothing happened.\n                 */\n                onReject?.();\n                return;\n            }\n            console.warn('Failed to save the node addresses', e);\n            onError?.(e);\n        }\n        finally {\n            setIsSubmitting(false);\n        }\n    }, []);\n    return [cb, isSubmitting];\n}\nexport function useSubmitControllerAddressesCallback() {\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    const cb = useCallback(async (chainId, operatorId, address, addNew, { onSuccess, onError, onReject } = {}) => {\n        setIsSubmitting(true);\n        try {\n            if (addNew) {\n                await addOperatorControllerAddress(chainId, operatorId, address, {\n                    onReceipt: ({ blockNumber }) => {\n                        onSuccess?.(blockNumber);\n                    },\n                });\n            }\n            else {\n                await removeOperatorControllerAddress(chainId, operatorId, address, {\n                    onReceipt: ({ blockNumber }) => {\n                        onSuccess?.(blockNumber);\n                    },\n                });\n            }\n        }\n        catch (e) {\n            if (isTransactionRejection(e) || isRejectionReason(e)) {\n                /**\n                 * User rejected the transaction. Let's move on like\n                 * nothing happened.\n                 */\n                onReject?.();\n                return;\n            }\n            console.warn('Failed to save the controller addresses', e);\n            onError?.(e);\n        }\n        finally {\n            setIsSubmitting(false);\n        }\n    }, []);\n    return [cb, isSubmitting];\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport Spinner from './Spinner';\nimport { Tooltip } from './Tooltip';\nexport function BehindBlockErrorDisplay({ latest, initial = latest, }) {\n    const { actualBlockNumber: initialBlockNumber } = initial;\n    const { actualBlockNumber, expectedBlockNumber } = latest;\n    const total = Math.max(1, expectedBlockNumber - initialBlockNumber);\n    const completed = Math.max(0, actualBlockNumber - initialBlockNumber);\n    const togo = Math.max(0, expectedBlockNumber - actualBlockNumber);\n    return (React.createElement(Root, null,\n        React.createElement(Spinner, { fixed: true, coverage: Math.min(1, completed / total), size: 24, strokeWidth: 3 }),\n        React.createElement(\"h2\", null, \"Indexing\"),\n        React.createElement(\"p\", null,\n            \"Your resource is being indexed.\",\n            React.createElement(\"br\", null),\n            \"It will be available shortly.\"),\n        React.createElement(Tooltip, { anchorDisplay: \"inline-block\", content: `${actualBlockNumber} / ${expectedBlockNumber}` },\n            React.createElement(Blocks, null,\n                togo,\n                \" block\",\n                togo !== 1 ? 's' : '',\n                \" to go\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1q9ovah\" }) `\n    padding: 240px 0;\n    text-align: center;\n\n    ${Spinner} {\n        margin: 0 auto;\n    }\n\n    p {\n        margin: 12px 0 16px;\n        line-height: 1.5em;\n    }\n\n    h2 {\n        font-weight: normal;\n        font-size: 24px;\n        margin: 20px 0 0;\n    }\n`;\nconst Blocks = styled.div.withConfig({ displayName: \"Blocks\", componentId: \"sc-1ejmyl2\" }) `\n    align-items: center;\n    background: #fafafa;\n    border-radius: 16px;\n    color: ${COLORS.primaryLight};\n    display: flex;\n    font-size: 14px;\n    gap: 4px;\n    height: 32px;\n    margin: 0 auto;\n    padding: 0 12px;\n    width: max-content;\n`;\n","import { produce } from 'immer';\nimport { useEffect } from 'react';\nimport { create } from 'zustand';\nimport { Minute } from '~/consts';\nconst TTL = Minute;\nconst useOperatorReachabilityStore = create((set, get) => {\n    function updateProbe(url, fn) {\n        set((store) => produce(store, ({ probes }) => {\n            const updatedAt = Date.now();\n            probes[url] = produce(Object.assign(probes[url] || { reachable: false, pending: false }, {\n                updatedAt,\n            }), fn);\n        }));\n    }\n    return {\n        nodes: {},\n        probes: {},\n        async probe(nodeId, heartbeat) {\n            const { host, port, tls = false } = heartbeat.websocket || {};\n            const url = host && port ? `${tls ? 'wss:' : 'ws:'}//${host}:${port}` : '';\n            set((store) => produce(store, (draft) => {\n                /**\n                 * Heartbeats for a single node can carry different WebSocket URLs\n                 * over time, cause c'est la vie.\n                 */\n                draft.nodes[nodeId] = url;\n            }));\n            const { updatedAt = 0, pending = false } = get().probes[url] || {};\n            if (pending || updatedAt + TTL >= Date.now()) {\n                /**\n                 * Ignore cache hits and pending probes. Note that we probe based\n                 * on WebSocket URLs not on node addresses. We support the unlikely\n                 * but technically possible scenario where nodes share a URL.\n                 */\n                return;\n            }\n            updateProbe(url, (draft) => {\n                draft.pending = true;\n            });\n            /**\n             * StreamrClient opens many WebSocket connections, often hitting\n             * browser limits.\n             *\n             * Normally, we'd attempt a real WSS connection, but since browsers\n             * handle limits differently, it's hard to tell whether a failure\n             * is due to node issues or browser constraints.\n             *\n             * @todo Let’s revisit this once we have a more reliable method for\n             * confirming node reachability.\n             */\n            updateProbe(url, (draft) => {\n                Object.assign(draft, {\n                    pending: false,\n                    reachable: tls && !!port && !!host && !isIPAddress(host),\n                });\n            });\n        },\n    };\n});\nexport function useOperatorReachability(heartbeats) {\n    const { probe, nodes, probes } = useOperatorReachabilityStore();\n    useEffect(() => {\n        Object.entries(heartbeats).forEach(([nodeId, heartbeat]) => {\n            if (!heartbeat) {\n                return;\n            }\n            void (async () => {\n                try {\n                    await probe(nodeId, heartbeat);\n                }\n                catch (e) {\n                    console.warn(`Failed to probe WebSocket URL for node \"${nodeId}\"`, heartbeat, e);\n                }\n            })();\n        });\n    }, [heartbeats, probe]);\n    const nodeIds = Object.keys(heartbeats);\n    let numOfReachableNodes = 0;\n    for (const nodeId of nodeIds) {\n        const { reachable = false, pending = false } = probes[nodes[nodeId] || ''] || {};\n        if (pending) {\n            /**\n             * At least one node is being probbed and that's all we can tell\n             * about the collective.\n             */\n            return 'probing';\n        }\n        if (reachable) {\n            numOfReachableNodes += 1;\n        }\n    }\n    return [numOfReachableNodes, nodeIds.length];\n}\nexport function useIsNodeIdReachable(nodeId) {\n    const { nodes, probes } = useOperatorReachabilityStore();\n    const { reachable = false, pending = false } = probes[nodes[nodeId] || ''] || {};\n    return pending ? 'pending' : reachable;\n}\nconst IPv4RegExp = /^(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)){3}$/;\nconst IPv6RegExp = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4}:){1,7}:|:([0-9a-fA-F]{1,4}:){1,7}|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})$/;\nfunction isIPAddress(value) {\n    return IPv4RegExp.test(value) || IPv6RegExp.test(value);\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport moment from 'moment';\nimport CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';\nimport JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { truncateNodeId } from '~/shared/utils/text';\nimport { useIsNodeIdReachable } from '~/shared/stores/operatorReachability';\nimport Spinner from '~/components/Spinner';\nexport function LiveNodesTable({ heartbeats, }) {\n    const values = Object.values(heartbeats);\n    return (React.createElement(ScrollTable, { elements: values, columns: [\n            {\n                align: 'start',\n                displayName: 'Node ID',\n                isSticky: true,\n                key: 'id',\n                valueMapper: ({ nodeId }) => truncateNodeId(nodeId),\n            },\n            {\n                align: 'start',\n                displayName: 'Connectivity',\n                isSticky: false,\n                key: 'connectivity',\n                valueMapper: ({ nodeId }) => React.createElement(Connectivity, { nodeId: nodeId }),\n            },\n            {\n                align: 'start',\n                displayName: 'Last seen',\n                isSticky: false,\n                key: 'lastSeen',\n                valueMapper: ({ timestamp }) => moment(timestamp).format('YYYY-MM-DD HH:mm'),\n            },\n            {\n                align: 'start',\n                displayName: 'Version',\n                isSticky: false,\n                key: 'version',\n                valueMapper: ({ applicationVersion }) => applicationVersion || 'N/A',\n            },\n            {\n                align: 'start',\n                displayName: 'Host',\n                isSticky: false,\n                key: 'host',\n                valueMapper: ({ websocket }) => websocket?.host || 'N/A',\n            },\n            {\n                align: 'start',\n                displayName: 'Port',\n                isSticky: false,\n                key: 'port',\n                valueMapper: ({ websocket }) => typeof websocket?.port === 'undefined' ? 'N/A' : websocket.port,\n            },\n            {\n                align: 'start',\n                displayName: 'TLS',\n                isSticky: false,\n                key: 'tls',\n                valueMapper: ({ websocket }) => typeof websocket?.tls === 'undefined'\n                    ? 'N/A'\n                    : websocket.tls\n                        ? 'Yes'\n                        : 'No',\n            },\n        ] }));\n}\nfunction Connectivity({ nodeId }) {\n    const reachable = useIsNodeIdReachable(nodeId);\n    return reachable === 'pending' ? (React.createElement(Spinner, { color: \"blue\" })) : reachable ? (React.createElement(IconWrap, { \"$color\": \"#0EAC1B\" },\n        React.createElement(CheckCircleIcon, { label: \"Ok\", size: \"medium\" }))) : (React.createElement(IconWrap, { \"$color\": \"#FF5C00\" },\n        React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\", size: \"medium\" })));\n}\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-10z0ufy\" }) `\n    align-items: center;\n    color: ${({ $color = 'inherit' }) => $color};\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    position: relative;\n    width: 24px;\n`;\n","import styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nexport const NetworkActionBarBackLink = styled(Link).withConfig({ displayName: \"NetworkActionBarBackLink\", componentId: \"sc-1cjzv6o\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n    margin: 0 7px 0 -9px;\n    width: 42px;\n`;\nexport const NetworkActionBarBackButtonIcon = styled(SvgIcon).withConfig({ displayName: \"NetworkActionBarBackButtonIcon\", componentId: \"sc-1sqye6z\" }) `\n    color: ${COLORS.primaryLight};\n    display: block;\n`;\nexport const NetworkActionBarTitle = styled.div.withConfig({ displayName: \"NetworkActionBarTitle\", componentId: \"sc-1m8fdcp\" }) `\n    line-height: 30px;\n    font-size: 24px;\n    font-weight: ${MEDIUM};\n    margin: 0;\n    display: flex;\n    gap: 10px;\n    justify-content: center;\n    align-items: center;\n    word-break: break-word;\n`;\nexport const NetworkActionBarStatsTitle = styled.p.withConfig({ displayName: \"NetworkActionBarStatsTitle\", componentId: \"sc-94n0rj\" }) `\n    font-weight: ${MEDIUM};\n    letter-spacing: 0.6px;\n    line-height: 30px;\n    font-size: 12px;\n    color: ${COLORS.primaryLight};\n    text-transform: uppercase;\n    margin-top: 44px;\n`;\n","import { useQuery } from '@tanstack/react-query';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { NetworkActionBarBackButtonIcon, NetworkActionBarBackLink, NetworkActionBarTitle, } from '~/components/ActionBars/NetworkActionBar.styles';\nimport { OperatorAvatar } from '~/components/avatars';\nimport { Button } from '~/components/Button';\nimport { LayoutColumn } from '~/components/Layout';\nimport { useDelegateFunds, useIsDelegatingFundsToOperator, useIsUndelegatingFundsToOperator, useUndelegateFunds, } from '~/hooks/operators';\nimport { getOperatorDelegationAmount } from '~/services/operators';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { goBack } from '~/utils';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function OperatorActionBar({ operator }) {\n    const walletAddress = useWalletAccount();\n    const isDelegatingFunds = useIsDelegatingFundsToOperator(operator.id, walletAddress);\n    const delegateFunds = useDelegateFunds();\n    const isUndelegatingFunds = useIsUndelegatingFundsToOperator(operator.id, walletAddress);\n    const undelegateFunds = useUndelegateFunds();\n    const currentChainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const canUndelegateQuery = useQuery({\n        queryKey: [\n            'operatorActionBar',\n            currentChainId,\n            operator.id,\n            walletAddress?.toLowerCase(),\n        ],\n        async queryFn() {\n            try {\n                if (!operator.id || !walletAddress) {\n                    return false;\n                }\n                return ((await getOperatorDelegationAmount(currentChainId, operator.id, walletAddress)) > 0n);\n            }\n            catch (e) {\n                console.warn('Failed to load delegation amount', operator.id, walletAddress, e);\n            }\n            return null;\n        },\n    });\n    const canUndelegate = !!canUndelegateQuery.data;\n    const { metadata } = operator;\n    const [delegateLabel, undelegateLabel] = walletAddress?.toLowerCase() === operator.owner\n        ? ['Fund', 'Withdraw']\n        : ['Delegate', 'Undelegate'];\n    return (React.createElement(OperatorActionBarRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(OuterWrap, null,\n                React.createElement(Wrap0, null,\n                    React.createElement(NetworkActionBarBackLink, { to: R.operators(routeOptions(chainKey)), onClick: (e) => {\n                            goBack({\n                                onBeforeNavigate() {\n                                    e.preventDefault();\n                                },\n                            });\n                        } },\n                        React.createElement(NetworkActionBarBackButtonIcon, { name: \"backArrow\" })),\n                    React.createElement(NetworkActionBarTitle, null,\n                        React.createElement(OperatorAvatar, { imageUrl: metadata.imageUrl, operatorId: operator.id }),\n                        React.createElement(\"span\", null, metadata.name || operator.id))),\n                React.createElement(Wrap1, null,\n                    React.createElement(Button, { onClick: () => {\n                            delegateFunds({\n                                chainId: currentChainId,\n                                operator,\n                                wallet: walletAddress,\n                                onDone: () => {\n                                    canUndelegateQuery.refetch();\n                                },\n                            });\n                        }, \n                        // Operator contract v1 has a bug so we need to disable delegation\n                        disabled: !walletAddress || operator.contractVersion === 1, waiting: isDelegatingFunds }, delegateLabel),\n                    React.createElement(Button, { onClick: () => {\n                            undelegateFunds({\n                                chainId: currentChainId,\n                                operator,\n                                wallet: walletAddress,\n                            });\n                        }, disabled: !canUndelegate, waiting: isUndelegatingFunds }, undelegateLabel))))));\n}\nconst OperatorActionBarRoot = styled.div.withConfig({ displayName: \"OperatorActionBarRoot\", componentId: \"sc-fbifvz\" }) `\n    background: ${COLORS.Background};\n    padding-top: 32px;\n\n    @media ${TABLET} {\n        padding-top: 40px;\n    }\n\n    @media ${DESKTOP} {\n        padding-top: 72px;\n    }\n`;\nconst Wrap0 = styled.div.withConfig({ displayName: \"Wrap0\", componentId: \"sc-6n4tu8\" }) `\n    align-items: center;\n    display: flex;\n    flex-grow: 1;\n`;\nconst Wrap1 = styled.div.withConfig({ displayName: \"Wrap1\", componentId: \"sc-k7a54r\" }) `\n    gap: 8px;\n`;\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-61bkfi\" }) `\n    ${Wrap1} {\n        align-items: center;\n        display: grid;\n        grid-template-columns: 1fr 1fr;\n        margin-top: 20px;\n    }\n\n    @media ${TABLET} {\n        align-items: center;\n        display: flex;\n\n        ${Wrap1} {\n            display: flex;\n            margin-top: 0;\n        }\n    }\n`;\n","import { produce } from 'immer';\nimport { create } from 'zustand';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { onIndexedBlock } from '~/utils/blocks';\nfunction getFinalKey(chainId, key) {\n    return JSON.stringify([chainId, ...key]);\n}\nconst useBlockNumberDependenciesStore = create((set) => {\n    return {\n        dependencies: {},\n        setDependency(chainId, blockNumber, key) {\n            const finalKey = getFinalKey(chainId, key);\n            set((store) => produce(store, (draft) => {\n                draft.dependencies[finalKey] = blockNumber;\n            }));\n            onIndexedBlock(chainId, blockNumber, () => {\n                set((store) => produce(store, (draft) => {\n                    if (draft.dependencies[finalKey] !== blockNumber) {\n                        /**\n                         * Apparently the awaited block number for the given key has changed.\n                         * Usually it's a result of… scheduling a wait for a newer block.\n                         */\n                        return;\n                    }\n                    delete draft.dependencies[finalKey];\n                }));\n            });\n        },\n    };\n});\nexport function useIsWaitingForBlockNumber(key) {\n    const chainId = useCurrentChainId();\n    const { dependencies: { [getFinalKey(chainId, key)]: awaitedBlockNumber }, } = useBlockNumberDependenciesStore();\n    return awaitedBlockNumber != null;\n}\nexport function useSetBlockDependency() {\n    return useBlockNumberDependenciesStore().setDependency;\n}\n","import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';\nimport JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Hint, IconWrap } from '~/components/Hint';\nimport { Separator } from '~/components/Separator';\nimport Spinner from '~/components/Spinner';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { useOperatorByIdQuery } from '~/hooks/operators';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport useOperatorLiveNodes from '~/hooks/useOperatorLiveNodes';\nimport { useOperatorReachability } from '~/shared/stores/operatorReachability';\nimport { TABLET } from '~/shared/utils/styled';\nimport { useIsWaitingForBlockNumber } from '~/stores/blockNumberDependencies';\nimport { getBalance } from '~/utils/balance';\nimport { toBigInt } from '~/utils/bn';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function OperatorChecklist({ operatorId }) {\n    const { funded, nodesDeclared, nodesFunded, nodesReachability, nodesRunning } = useOperatorChecklist(operatorId);\n    const [reachable = 0, total = 0] = nodesReachability || [];\n    const nodesReachable = !nodesReachability\n        ? undefined\n        : reachable <= total / 2\n            ? false\n            : reachable === total\n                ? true\n                : 'caution';\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ChecklistItem, { state: funded, tip: React.createElement(\"p\", null,\n                \"The owner must fund the Operator with\",\n                ' ',\n                React.createElement(SponsorshipPaymentTokenName, null),\n                \"\\u00A0 tokens before it can be used for staking on sponsorships or receiving delegations.\") }, \"Operator funded\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesDeclared, tip: React.createElement(\"p\", null, \"The owner must pair at least 1 node address with their Operator.\") }, \"Node addresses declared\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesFunded, tip: React.createElement(React.Fragment, null,\n                React.createElement(\"p\", null, \"The Operator's node address(es) must each have at least 0.1 POL tokens.\"),\n                React.createElement(\"p\", null, \"This alert triggers if a balance is less than 0.1 POL.\")) }, \"Node addresses funded\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesRunning, tip: React.createElement(\"p\", null, \"The Operator's nodes must run the operator plugin, the node's config file must contain a private key of one of the paired node addresses, and it must contain the Operator contract address.\") }, \"Nodes running\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesReachable, tip: React.createElement(React.Fragment, null,\n                React.createElement(\"p\", null, \"The Operator must ensure that their nodes can be reached on their node's configured WebSocket port.\"),\n                React.createElement(\"p\", null, \"The default port is 32200.\")) },\n            \"Nodes reachable\",\n            nodesReachable != null && (React.createElement(React.Fragment, null,\n                ' ',\n                \"(\",\n                reachable,\n                \" out of \",\n                total,\n                \")\")))));\n}\nfunction useOperatorChecklist(operatorId) {\n    const stale = useIsWaitingForBlockNumber(['operatorNodes', operatorId]);\n    const operatorQuery = useOperatorByIdQuery(operatorId);\n    const { data: operator, isLoading, isFetching } = operatorQuery;\n    const [nodesFunded, setNodesFunded] = useState();\n    const heartbeats = useInterceptHeartbeats(operatorId);\n    const { count, isLoading: isLoadingLiveNodes } = useOperatorLiveNodes(heartbeats);\n    const nodesRunning = isLoadingLiveNodes ? undefined : count > 0;\n    const reachability = useOperatorReachability(heartbeats);\n    const nodesReachability = isLoadingLiveNodes || reachability === 'probing' ? undefined : reachability;\n    const currentChainId = useCurrentChainId();\n    useEffect(() => {\n        setNodesFunded(undefined);\n        if (!operator) {\n            return;\n        }\n        if (!operator.nodes.length) {\n            /**\n             * No nodes = no funded nodes, eh? Let's report that\n             * and cut it short!\n             */\n            return void setNodesFunded(false);\n        }\n        let mounted = true;\n        setTimeout(async () => {\n            class InsufficientFundsError {\n            }\n            let result = false;\n            try {\n                for (const { address: nodeAddress } of operator.nodes) {\n                    const balance = await getBalance({\n                        chainId: currentChainId,\n                        tokenAddress: 'native',\n                        walletAddress: nodeAddress,\n                    });\n                    if (!mounted) {\n                        return;\n                    }\n                    if (balance < toBigInt(0.1, 18n)) {\n                        throw new InsufficientFundsError();\n                    }\n                }\n                result = true;\n            }\n            catch (e) {\n                if (e instanceof InsufficientFundsError) {\n                    return;\n                }\n                console.warn('Failed to check if nodes are funded', e);\n            }\n            finally {\n                if (mounted) {\n                    setNodesFunded(result);\n                }\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [operator, currentChainId]);\n    if (isLoading || isFetching) {\n        /**\n         * We're loading the operator. Make all checklist items undefined (all TBD).\n         */\n        return {};\n    }\n    if (!operator) {\n        /**\n         * We're done loading, and found no Operator. There are no checklist\n         * items to dash out.\n         */\n        return {\n            funded: false,\n            nodesDeclared: false,\n            nodesFunded: false,\n            nodesReachability: [0, 0],\n            nodesRunning: false,\n        };\n    }\n    const funded = operator.valueWithoutEarnings > 0n;\n    if (stale) {\n        return {\n            funded,\n        };\n    }\n    const nodesDeclared = operator.nodes.length > 0;\n    return {\n        funded,\n        nodesDeclared,\n        nodesFunded,\n        nodesReachability,\n        nodesRunning,\n    };\n}\nfunction ChecklistItem({ children, state: stateProp, tip = '', }) {\n    const state = typeof stateProp === 'string'\n        ? stateProp\n        : typeof stateProp === 'undefined'\n            ? 'tbd'\n            : stateProp\n                ? 'success'\n                : 'failure';\n    return (React.createElement(ChecklistItemRoot, null,\n        React.createElement(\"div\", null,\n            state === 'failure' && (React.createElement(IconWrap, { \"$color\": \"#FF5C00\" },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\", size: \"medium\" }))),\n            state === 'caution' && (React.createElement(IconWrap, { \"$color\": \"#FFB800\" },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\", size: \"medium\" }))),\n            state === 'tbd' && (React.createElement(IconWrap, null,\n                React.createElement(Spinner, { color: \"blue\" }))),\n            state === 'success' && (React.createElement(IconWrap, { \"$color\": \"#0EAC1B\" },\n                React.createElement(CheckCircleIcon, { label: \"Ok\", size: \"medium\" })))),\n        React.createElement(\"div\", null, children),\n        tip ? (React.createElement(\"div\", null,\n            React.createElement(Hint, null, tip))) : (React.createElement(React.Fragment, null))));\n}\nconst ChecklistItemRoot = styled.div.withConfig({ displayName: \"ChecklistItemRoot\", componentId: \"sc-s0s5pk\" }) `\n    align-items: center;\n    display: grid;\n    gap: 20px;\n    grid-template-columns: 24px 1fr 24px;\n    padding: 12px 24px;\n\n    @media ${TABLET} {\n        padding: 16px 40px;\n    }\n`;\n","import styled from 'styled-components';\nexport const IconButton = styled.button.withConfig({ displayName: \"IconButton\", componentId: \"sc-2h9jyl\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    display: block;\n    padding: 0;\n\n    :active {\n        transform: translateY(1px);\n    }\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nexport function CopyIcon() {\n    return (React.createElement(IconWrap, { \"aria-label\": \"Copy\", \"$width\": 16, \"$height\": 16 },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\" },\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M5.33398 2.66665V10.6666C5.33398 11.0203 5.47446 11.3594 5.72451 11.6095C5.97456 11.8595 6.3137 12 6.66732 12H12.0007C12.3543 12 12.6934 11.8595 12.9435 11.6095C13.1935 11.3594 13.334 11.0203 13.334 10.6666V4.82798C13.334 4.65035 13.2984 4.47452 13.2295 4.31081C13.1606 4.1471 13.0597 3.99881 12.9327 3.87465L10.7227 1.71331C10.4736 1.46975 10.139 1.33336 9.79065 1.33331H6.66732C6.3137 1.33331 5.97456 1.47379 5.72451 1.72384C5.47446 1.97389 5.33398 2.31302 5.33398 2.66665Z\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M10.667 12V13.3333C10.667 13.6869 10.5265 14.0261 10.2765 14.2761C10.0264 14.5262 9.68728 14.6666 9.33366 14.6666H4.00033C3.6467 14.6666 3.30756 14.5262 3.05752 14.2761C2.80747 14.0261 2.66699 13.6869 2.66699 13.3333V5.99996C2.66699 5.64634 2.80747 5.3072 3.05752 5.05715C3.30756 4.8071 3.6467 4.66663 4.00033 4.66663H5.33366\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))));\n}\nexport function ExternalLinkIcon() {\n    return (React.createElement(IconWrap, { \"aria-label\": \"External link\", \"$width\": 14, \"$height\": 14 },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", fill: \"none\" },\n            React.createElement(\"path\", { d: \"M12.9999 4.42857V1H9.57129\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M13.0004 1L5.28613 8.71429\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M6.5 3.57141H1.78571C1.35178 3.57141 1 3.92319 1 4.35713V12.2143C1 12.6482 1.35178 13 1.78571 13H9.64286C10.0768 13 10.4286 12.6482 10.4286 12.2143V7.49998\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))));\n}\nexport function PencilIcon() {\n    return (React.createElement(IconWrap, { \"aria-label\": \"Edit\", \"$width\": 14, \"$height\": 14 },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", fill: \"none\" },\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M12.1169 1.71649C11.9402 1.54061 11.7305 1.40148 11.4998 1.30712C11.2691 1.21276 11.022 1.16504 10.7727 1.16673C10.5235 1.16842 10.277 1.21947 10.0476 1.31695C9.81822 1.41442 9.6104 1.55639 9.43617 1.73464L1.91776 9.25304L1 12.8334L4.58031 11.9151L12.0987 4.39667C12.277 4.22252 12.419 4.01475 12.5165 3.78539C12.614 3.55602 12.6651 3.30959 12.6668 3.06036C12.6685 2.81114 12.6208 2.56404 12.5264 2.33338C12.432 2.10271 12.2928 1.89304 12.1169 1.71649V1.71649Z\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M9.2207 1.94983L11.8827 4.61186\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M1.91797 9.2525L4.58259 11.9125\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))));\n}\nconst IconWrap = styled.span.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1qgkvp9\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n\n    &,\n    svg {\n        display: block;\n\n        ${({ $width = 24, $height = 24 }) => css `\n            width: ${$width}px;\n            height: ${$height}px;\n        `}\n    }\n`;\nIconWrap.defaultProps = { rel: 'img ' };\n","import React from 'react';\nimport { IconButton } from '~/components/IconButton';\nimport { CopyIcon } from '~/icons';\nimport useCopy from '~/shared/hooks/useCopy';\nexport function CopyButton({ value = '' }) {\n    const { copy } = useCopy();\n    return (React.createElement(IconButton, { type: \"button\", onClick: () => void copy(value) },\n        React.createElement(CopyIcon, null)));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Buttonesque } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport { CopyButton } from '~/components/CopyButton';\nimport { FallbackImage } from '~/components/FallbackImage';\nimport { LayoutColumn } from '~/components/Layout';\nimport { PropertyDisplay, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport { Separator } from '~/components/Separator';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { Tooltip } from '~/components/Tooltip';\nimport Identicon from '~/shared/components/AvatarImage/Identicon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, DESKTOP, MEDIUM, TABLET } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { saveOperator } from '~/utils';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function OperatorDetails({ operator }) {\n    const { metadata } = operator;\n    const chainId = useCurrentChainId();\n    const walletAddress = useWalletAccount();\n    const canEdit = !!walletAddress && walletAddress == operator.owner;\n    return (React.createElement(OperatorDetailsRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(ColoredBox, { \"$backgroundColor\": COLORS.Text },\n                React.createElement(OuterWrap, null,\n                    React.createElement(OperatorAvatarWrap, null,\n                        React.createElement(\"div\", null,\n                            React.createElement(FallbackImage, { alt: operator.id, src: metadata.imageUrl || '', placeholder: React.createElement(Identicon, { id: operator.id, size: 400 }) }))),\n                    React.createElement(OperatorMetadataWrap, null,\n                        React.createElement(InnerWrap, { \"$noDesc\": !metadata.description },\n                            React.createElement(\"h2\", null, metadata.name || operator.id),\n                            React.createElement(\"div\", null,\n                                React.createElement(\"p\", null, metadata.description)),\n                            React.createElement(PropertyDropdownList, null,\n                                metadata.url && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"web\" }), displayValue: metadata.url\n                                        .replace(/^https?:\\/\\//, '')\n                                        .replace(/\\/+$/, ''), href: metadata.url })),\n                                metadata.email && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"email\" }), displayValue: metadata.email, href: `mailto:${metadata.email}` })),\n                                metadata.twitter && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": \"#1da1f2\" }), href: metadata.twitter })),\n                                metadata.x && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"xCom\", \"$color\": \"#ffffff\" }), href: metadata.x })),\n                                metadata.telegram && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": \"#2aabee\" }), href: metadata.telegram })),\n                                metadata.reddit && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": \"#ff5700\" }), href: metadata.reddit })),\n                                metadata.linkedIn && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": \"#0077b5\" }), href: metadata.linkedIn })))),\n                        React.createElement(Addresses, null,\n                            React.createElement(AddressDisplay, { label: \"Owner wallet\", value: operator.owner }),\n                            React.createElement(Separator, null),\n                            React.createElement(AddressDisplay, { label: React.createElement(React.Fragment, null,\n                                    React.createElement(\"div\", null, \"Operator contract\"),\n                                    React.createElement(OperatorVersionBadge, null,\n                                        \"v\",\n                                        operator.contractVersion)), value: operator.id })))),\n                React.createElement(Actions, null,\n                    React.createElement(CtaWrap, null, canEdit && (React.createElement(Buttonesque, { onClick: () => {\n                            saveOperator(chainId, operator);\n                        }, \"$css\": css `\n                                        --border: 1px solid currentColor;\n                                        --borderRadius: 4px;\n                                        --hoverBorder: 1px solid #ffffff;\n                                        --color: #a3a3a3;\n                                        --hoverColor: #ffffff;\n\n                                        display: flex;\n                                        padding: 0 10px;\n                                    ` }, \"Edit operator\"))),\n                    React.createElement(\"div\", null,\n                        React.createElement(Tooltip, { content: React.createElement(\"p\", null,\n                                \"Operators run Streamr nodes that contribute bandwidth to\\u00A0the Streamr Network. Operators earn \",\n                                React.createElement(SponsorshipPaymentTokenName, null),\n                                \" tokens by\\u00A0staking on Sponsorships.\") },\n                            React.createElement(InfoWrap, null,\n                                React.createElement(\"svg\", { width: \"20\", height: \"21\", viewBox: \"0 0 20 21\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n                                    React.createElement(\"path\", { \n                                        // eslint-disable-next-line max-len\n                                        d: \"M10 0.958009C4.47715 0.958009 -1.35705e-06 5.43516 -8.74228e-07 10.958C-3.91405e-07 16.4809 4.47715 20.958 10 20.958C15.5228 20.958 20 16.4809 20 10.958C20 5.43516 15.5228 0.958008 10 0.958009Z\", fill: \"#525252\" }),\n                                    React.createElement(\"path\", { d: \"M10 9.39648L10 15.958\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                                    React.createElement(\"path\", { d: \"M10 6.39648L10 6.44763\", stroke: \"white\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))))))))));\n}\nconst InfoWrap = styled.div.withConfig({ displayName: \"InfoWrap\", componentId: \"sc-15c53x4\" }) `\n    padding: 4px;\n    pointer-events: auto;\n`;\nconst Actions = styled.div.withConfig({ displayName: \"Actions\", componentId: \"sc-el76ha\" }) `\n    align-items: center;\n    border-top: 1px solid #525252;\n    box-sizing: content-box;\n    display: flex;\n    height: 32px;\n    padding: 16px;\n    pointer-events: none;\n\n    @media ${DESKTOP} {\n        border: 0;\n        padding: 24px;\n        position: absolute;\n        right: 0;\n        flex-direction: column;\n        top: 0;\n        align-items: end;\n        height: 100%;\n        box-sizing: border-box;\n    }\n`;\nconst CtaWrap = styled.div.withConfig({ displayName: \"CtaWrap\", componentId: \"sc-mj8f4b\" }) `\n    flex-grow: 1;\n\n    ${Buttonesque} {\n        pointer-events: auto;\n    }\n`;\nconst OperatorDetailsRoot = styled.div.withConfig({ displayName: \"OperatorDetailsRoot\", componentId: \"sc-1hqn9ht\" }) `\n    background: ${COLORS.Background};\n    padding-top: 32px;\n\n    ${ColoredBox} {\n        color: ${COLORS.Background};\n        position: relative;\n    }\n`;\nconst SideImageMq = '(min-width: 660px)';\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-tdbgo\" }) `\n    padding: 20px;\n    margin: 0 auto;\n\n    @media ${SideImageMq} {\n        display: flex;\n        gap: 20px;\n        max-width: none;\n    }\n\n    @media ${TABLET} {\n        padding: 24px;\n        gap: 24px;\n    }\n\n    @media ${DESKTOP} {\n        padding: 40px;\n        gap: 40px;\n    }\n`;\nconst OperatorAvatarWrap = styled.div.withConfig({ displayName: \"OperatorAvatarWrap\", componentId: \"sc-14vxxmi\" }) `\n    flex-shrink: 0;\n    margin: 0 auto;\n\n    @media ${SideImageMq} {\n        margin: 0;\n        max-width: 348px;\n        width: 30%;\n    }\n\n    > div {\n        align-items: center;\n        display: flex;\n        justify-content: center;\n        aspect-ratio: 1 / 1;\n        background: #000000;\n        border-radius: 10px;\n        overflow: hidden;\n    }\n\n    img {\n        max-width: 100%;\n        display: block;\n    }\n`;\nconst OperatorMetadataWrap = styled.div.withConfig({ displayName: \"OperatorMetadataWrap\", componentId: \"sc-ukvcpq\" }) `\n    display: flex;\n    flex-direction: column;\n    gap: 32px;\n    margin-top: 24px;\n    min-width: 0;\n\n    @media ${SideImageMq} {\n        margin: 0;\n    }\n`;\nconst InnerWrap = styled.div.withConfig({ displayName: \"InnerWrap\", componentId: \"sc-1omiqyu\" }) `\n    flex-grow: 1;\n\n    h2 {\n        font-size: 24px;\n        font-weight: ${MEDIUM};\n        letter-spacing: 0.01em;\n        line-height: 30px;\n        margin-bottom: 16px;\n    }\n\n    ${PropertyDropdownList} {\n        margin-top: 16px;\n    }\n\n    @media ${SideImageMq} {\n        h2 + div {\n            padding-right: 112px;\n        }\n    }\n\n    h2 {\n        display: none;\n    }\n\n    p {\n        margin: 0;\n        line-height: 1.5em;\n        word-wrap: break-word;\n    }\n\n    ${({ $noDesc = false }) => $noDesc &&\n    css `\n            display: none;\n        `}\n\n    @media ${TABLET} {\n        display: block;\n\n        h2 {\n            display: block;\n        }\n    }\n`;\nconst InlineAddressesMq = '(min-width: 832px)';\nconst Addresses = styled.div.withConfig({ displayName: \"Addresses\", componentId: \"sc-bl6nym\" }) `\n    display: flex;\n    flex-direction: column;\n    gap: 24px;\n\n    ${Separator} {\n        background: #525252;\n        display: none;\n        height: 48px;\n        width: 1px;\n    }\n\n    @media ${InlineAddressesMq} {\n        align-items: center;\n        flex-direction: row;\n        gap: 48px;\n\n        ${Separator} {\n            display: block;\n        }\n    }\n`;\nconst AddressDisplayRoot = styled.div.withConfig({ displayName: \"AddressDisplayRoot\", componentId: \"sc-19o3537\" }) ``;\nconst AddressDisplayLabel = styled.div.withConfig({ displayName: \"AddressDisplayLabel\", componentId: \"sc-1xnzbaz\" }) `\n    align-items: center;\n    color: #a3a3a3;\n    display: flex;\n    font-size: 14px;\n    gap: 6px;\n    letter-spacing: 0.01em;\n    line-height: normal;\n`;\nconst AddressDisplayValue = styled.div.withConfig({ displayName: \"AddressDisplayValue\", componentId: \"sc-dkw7lt\" }) `\n    align-items: center;\n    display: flex;\n    font-size: 20px;\n    gap: 12px;\n    letter-spacing: 0.01em;\n    line-height: normal;\n    margin-top: 6px;\n`;\nfunction AddressDisplay({ label, value }) {\n    return (React.createElement(AddressDisplayRoot, null,\n        React.createElement(AddressDisplayLabel, null, label),\n        React.createElement(AddressDisplayValue, null,\n            React.createElement(\"div\", null, truncate(value)),\n            React.createElement(CopyButton, { value: value }))));\n}\nconst OperatorVersionBadge = styled.div.withConfig({ displayName: \"OperatorVersionBadge\", componentId: \"sc-xc683f\" }) `\n    background: #525252;\n    color: ${COLORS.Background};\n    font-size: 11px;\n    font-weight: ${MEDIUM};\n    padding: 1px 5px;\n    border-radius: 6px;\n`;\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { Hint } from '~/components/Hint';\nimport { LayoutColumn } from '~/components/Layout';\nimport Spinner from '~/components/Spinner';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { StatCell, StatGrid } from '~/components/StatGrid';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { getSelfDelegationFraction, getSpotApy } from '~/getters';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport useOperatorLiveNodes from '~/hooks/useOperatorLiveNodes';\nimport { COLORS } from '~/shared/utils/styled';\nexport function OperatorSummary({ operator }) {\n    const ownerDelegationPercentage = useMemo(() => getSelfDelegationFraction(operator).multipliedBy(100), [operator]);\n    const heartbeats = useInterceptHeartbeats(operator.id);\n    const { count: liveNodeCount, isLoading: liveNodeCountIsLoading } = useOperatorLiveNodes(heartbeats);\n    return (React.createElement(OperatorSummaryRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(StatGrid, null,\n                React.createElement(StatCell, { label: \"Total stake\", tip: React.createElement(React.Fragment, null, operator.valueWithoutEarnings === 0n ? (React.createElement(Tooltip, { content: React.createElement(\"p\", null,\n                            \"The owner must fund the Operator with\",\n                            ' ',\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens before it can be used for staking on sponsorships or receiving delegations.\") },\n                        React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                            React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))) : (React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The total amount of\",\n                            ' ',\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that are staked on the Operator, including deployed and undeployed tokens.\")))) },\n                    React.createElement(\"div\", null,\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: operator.valueWithoutEarnings }))),\n                React.createElement(StatCell, { label: \"Deployed stake\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The amount of \",\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that the Operator has staked on Sponsorships.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: operator.totalStakeInSponsorshipsWei })),\n                React.createElement(StatCell, { label: \"Owner's stake\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The percentage of stake supplied from the owner of the Operator.\")) },\n                    ownerDelegationPercentage.toFixed(0),\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Node redundancy\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The amount of duplicated work when running a fleet of multiple nodes.\"),\n                        React.createElement(\"p\", null, \"Doing redundant work protects against slashing in case some of your nodes experience failures. For example,\"),\n                        React.createElement(\"ul\", null,\n                            React.createElement(\"li\", null,\n                                React.createElement(\"strong\", null, \"A Redundancy Factor of 1\"),\n                                \" means that no duplication of work occurs (the feature is off),\"),\n                            React.createElement(\"li\", null,\n                                React.createElement(\"strong\", null, \"A Redundancy Factor of 2\"),\n                                \" means that each stream assignment will be worked on by 2 nodes in the fleet.\"))) }, operator.metadata.redundancyFactor || 1),\n                React.createElement(StatCell, { label: \"Owner's cut\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The fee that the owner of the Operator takes from all earnings.\"),\n                        React.createElement(\"p\", null, \"The remaining earnings are distributed among all stakeholders in the Operator, which includes delegators and the owner, in proportion to the size of their respective stakes.\")) },\n                    operator.operatorsCut,\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Spot APY\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The annualized yield that this Operator is earning right now, calculated from the\\u00A0present payout rates of the Sponsorships the Operator is currently\\u00A0staked in.\")) },\n                    (getSpotApy(operator) * 100).toFixed(0),\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Cumulative earnings\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The total earnings that this Operator has accumulated over its whole\\u00A0lifetime.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: operator.cumulativeProfitsWei +\n                            operator.cumulativeOperatorsCutWei })),\n                React.createElement(StatCell, { label: \"Live nodes\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The number of online nodes detected that are doing work for this Operator.\")) }, liveNodeCountIsLoading ? (React.createElement(Spinner, { color: \"blue\" })) : (liveNodeCount.toString()))))));\n}\nconst OperatorSummaryRoot = styled.div.withConfig({ displayName: \"OperatorSummaryRoot\", componentId: \"sc-8804st\" }) `\n    background: ${COLORS.Background};\n    padding: 24px 0;\n`;\n","import moment from 'moment';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport Spinner from '~/components/Spinner';\nimport { FundedUntilCell, StreamIdCell } from '~/components/Table';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { useCollectEarnings } from '~/hooks/operators';\nimport { useEditSponsorshipFunding } from '~/hooks/sponsorships';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useCanCollectEarningsCallback, useUncollectedEarnings, } from '~/shared/stores/uncollectedEarnings';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function SponsorshipTable({ operator, isController, }) {\n    const canCollect = useCanCollectEarningsCallback();\n    const editSponsorshipFunding = useEditSponsorshipFunding();\n    const collectEarnings = useCollectEarnings();\n    const currentChainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const allSponsorshipIds = operator.stakes.map(({ sponsorshipId }) => sponsorshipId);\n    const canCollectAllEarnings = allSponsorshipIds.every((sponsorshipId) => canCollect(operator.id, sponsorshipId));\n    return (React.createElement(ScrollTable, { elements: operator.stakes, columns: [\n            {\n                displayName: 'Stream ID',\n                valueMapper: ({ streamId }) => React.createElement(StreamIdCell, { streamId: streamId }),\n                align: 'start',\n                isSticky: true,\n                key: 'streamId',\n            },\n            {\n                displayName: 'Staked',\n                valueMapper: (element) => {\n                    const minimumStakeReachTime = moment(element.joinedAt.getTime() +\n                        element.minimumStakingPeriodSeconds * 1000);\n                    return (React.createElement(React.Fragment, null,\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: element.amountWei }),\n                        minimumStakeReachTime.isAfter(Date.now()) && (React.createElement(Tooltip, { content: React.createElement(React.Fragment, null,\n                                \"Minimum stake period:\",\n                                ' ',\n                                minimumStakeReachTime.fromNow(true),\n                                \" left\") },\n                            React.createElement(TooltipIconWrap, { className: \"ml-1\", \"$color\": \"#ADADAD\", \"$svgSize\": {\n                                    width: '18px',\n                                    height: '18px',\n                                } },\n                                React.createElement(SvgIcon, { name: \"lockClosed\" }))))));\n                },\n                align: 'start',\n                isSticky: false,\n                key: 'staked',\n            },\n            {\n                displayName: 'APY',\n                valueMapper: (element) => `${element.spotAPY.multipliedBy(100).toFixed(0)}%`,\n                align: 'start',\n                isSticky: false,\n                key: 'apy',\n            },\n            {\n                displayName: 'Funded until',\n                valueMapper: (element) => (React.createElement(FundedUntilCell, { projectedInsolvencyAt: element.projectedInsolvencyAt, remainingBalance: element.remainingWei })),\n                align: 'start',\n                isSticky: false,\n                key: 'fundedUntil',\n            },\n            {\n                displayName: 'Uncollected earnings',\n                valueMapper: (element) => (React.createElement(UncollectedEarnings, { operatorId: operator.id, sponsorshipId: element.sponsorshipId })),\n                align: 'end',\n                isSticky: false,\n                key: 'earnings',\n            },\n        ], linkMapper: ({ sponsorshipId: id }) => R.sponsorship(id, routeOptions(chainKey)), actions: [\n            (element) => ({\n                displayName: 'Edit',\n                disabled: !isController,\n                async callback() {\n                    if (!operator) {\n                        return;\n                    }\n                    editSponsorshipFunding({\n                        chainId: currentChainId,\n                        sponsorshipOrSponsorshipId: element.sponsorshipId,\n                        operator,\n                    });\n                },\n            }),\n            (element) => ({\n                displayName: 'Collect earnings',\n                callback() {\n                    if (!operator.id) {\n                        return;\n                    }\n                    collectEarnings({\n                        chainId: currentChainId,\n                        operatorId: operator.id,\n                        sponsorshipIds: [element.sponsorshipId],\n                    });\n                },\n                disabled: !canCollect(operator.id, element.sponsorshipId),\n            }),\n        ], footerComponent: allSponsorshipIds.length > 0 &&\n            canCollectAllEarnings && (React.createElement(Footer, null,\n            React.createElement(Button, { kind: \"secondary\", onClick: async () => {\n                    collectEarnings({\n                        chainId: currentChainId,\n                        operatorId: operator.id,\n                        sponsorshipIds: allSponsorshipIds,\n                    });\n                } }, \"Collect all\"))) }));\n}\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-nke2vt\" }) `\n    display: flex;\n    justify-content: right;\n    padding: 32px;\n    gap: 10px;\n`;\nfunction UncollectedEarnings({ operatorId, sponsorshipId, }) {\n    const value = useUncollectedEarnings(operatorId, sponsorshipId);\n    return typeof value !== 'undefined' ? (React.createElement(SponsorshipDecimals, { abbr: true, amount: value?.uncollectedEarnings || 0n })) : (React.createElement(Spinner, { color: \"blue\" }));\n}\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport moment from 'moment';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { calculateUndelegationQueueSize, getDelegatedAmountForWallet } from '~/getters';\nimport { useConfigValueFromChain } from '~/hooks';\nimport { useForceUndelegate, useOperatorByIdQuery, useProcessUndelegationQueue, } from '~/hooks/operators';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { useCurrentChainId } from '~/utils/chains';\nfunction getUndelegationExpirationDate(queuedAt, maxUndelegationQueueSeconds = 0) {\n    return moment(queuedAt.getTime() + maxUndelegationQueueSeconds * 1000);\n}\nexport function UndelegationQueue({ operatorId }) {\n    const currentChainId = useCurrentChainId();\n    const operatorQuery = useOperatorByIdQuery(operatorId);\n    const operator = operatorQuery.data || null;\n    const walletAddress = useWalletAccount();\n    const maxUndelegationQueueSeconds = useConfigValueFromChain('maxQueueSeconds', Number);\n    const forceUndelegate = useForceUndelegate();\n    const processUndelegationQueue = useProcessUndelegationQueue();\n    const freeFunds = operator?.dataTokenBalanceWei;\n    const undelegationQueueSize = operator != null ? calculateUndelegationQueueSize(operator) : undefined;\n    const isProcessButtonDisabled = freeFunds != null &&\n        undelegationQueueSize != null &&\n        freeFunds < undelegationQueueSize;\n    const ProcessQueueButton = () => (React.createElement(Button, { kind: \"secondary\", disabled: isProcessButtonDisabled, onClick: () => {\n            if (operatorId == null) {\n                return;\n            }\n            processUndelegationQueue(currentChainId, operatorId);\n        } }, \"Process queue\"));\n    if (operator == null) {\n        return null;\n    }\n    return (React.createElement(ScrollTable, { elements: operator.queueEntries, columns: [\n            {\n                displayName: 'Delegator address',\n                valueMapper: (element) => (React.createElement(React.Fragment, null,\n                    truncate(element.delegator),\n                    element.delegator === walletAddress?.toLowerCase() && (React.createElement(Badge, null, \"You\")))),\n                align: 'start',\n                isSticky: true,\n                key: 'id',\n            },\n            {\n                displayName: 'Amount',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: ((a, b) => (a < b ? a : b))(getDelegatedAmountForWallet(element.delegator, operator), element.amount) })),\n                align: 'end',\n                isSticky: false,\n                key: 'amount',\n            },\n            {\n                displayName: 'Expiration date',\n                valueMapper: (element) => {\n                    const expirationDate = getUndelegationExpirationDate(element.queuedAt, maxUndelegationQueueSeconds);\n                    return (React.createElement(WarningCell, null,\n                        expirationDate.format('YYYY-MM-DD'),\n                        expirationDate.isBefore(Date.now()) && (React.createElement(Tooltip, { content: React.createElement(\"p\", null, \"Payout time exceeded. You can force unstake now.\") },\n                            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" }))))));\n                },\n                align: 'start',\n                isSticky: false,\n                key: 'date',\n            },\n            {\n                displayName: 'Request date',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, moment(element.queuedAt).format('YYYY-MM-DD'))),\n                align: 'end',\n                isSticky: false,\n                key: 'requestDate',\n            },\n            {\n                displayName: 'Request time',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, moment(element.queuedAt).format('HH:mm'))),\n                align: 'end',\n                isSticky: false,\n                key: 'requestTime',\n            },\n            {\n                displayName: '',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, getUndelegationExpirationDate(element.queuedAt, maxUndelegationQueueSeconds).isBefore(Date.now()) && (React.createElement(Button, { type: \"button\", kind: \"secondary\", onClick: () => {\n                        forceUndelegate(currentChainId, operator, element.amount);\n                    } }, \"Force unstake\")))),\n                align: 'end',\n                isSticky: false,\n                key: 'actions',\n            },\n        ], footerComponent: operator.queueEntries.length > 0 ? (React.createElement(Footer, null, isProcessButtonDisabled ? (React.createElement(Tooltip, { content: \"The Operator needs to unstake to free up funds to pay out the queue\" },\n            React.createElement(ProcessQueueButton, null))) : (React.createElement(ProcessQueueButton, null)))) : null }));\n}\nconst Badge = styled.div.withConfig({ displayName: \"Badge\", componentId: \"sc-1hze28r\" }) `\n    border-radius: 8px;\n    background: ${COLORS.secondary};\n    color: ${COLORS.primaryLight};\n    font-size: 14px;\n    font-weight: ${MEDIUM};\n    line-height: 30px;\n    letter-spacing: 0.14px;\n    padding: 0px 10px;\n    margin-left: 12px;\n`;\nconst WarningCell = styled.div.withConfig({ displayName: \"WarningCell\", componentId: \"sc-d942ha\" }) `\n    align-items: center;\n    display: grid;\n    gap: 8px;\n    grid-template-columns: auto auto;\n\n    ${TooltipIconWrap} svg {\n        width: 18px;\n        height: 18px;\n    }\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-e7rhuc\" }) `\n    display: flex;\n    justify-content: right;\n    padding: 32px;\n    gap: 10px;\n`;\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport { useQuery } from '@tanstack/react-query';\nimport moment from 'moment';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { AddressTable, AddressType, useSubmitControllerAddressesCallback, useSubmitNodeAddressesCallback, } from '~/components/AddressTable';\nimport { BehindBlockErrorDisplay } from '~/components/BehindBlockErrorDisplay';\nimport { ChartPeriodTabs } from '~/components/ChartPeriodTabs';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport { Hint } from '~/components/Hint';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkChartDisplay from '~/components/NetworkChartDisplay';\nimport NetworkPageSegment, { Pad, SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport { Separator } from '~/components/Separator';\nimport { StatCellContent, StatCellLabel } from '~/components/StatGrid';\nimport { StreamIdCell } from '~/components/Table';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { getDelegatedAmountForWallet, getDelegationFractionForWallet } from '~/getters';\nimport { getOperatorStats } from '~/getters/getOperatorStats';\nimport { useConfigValueFromChain, useInitialBehindIndexError, useLatestBehindBlockError, useRefetchQueryBehindIndexEffect, } from '~/hooks';\nimport { invalidateActiveOperatorByIdQueries, useOperatorByIdQuery, } from '~/hooks/operators';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport { LiveNodesTable } from '~/pages/OperatorPage/LiveNodesTable';\nimport { OperatorActionBar } from '~/pages/OperatorPage/OperatorActionBar';\nimport { OperatorChecklist } from '~/pages/OperatorPage/OperatorChecklist';\nimport { OperatorDetails } from '~/pages/OperatorPage/OperatorDetails';\nimport { OperatorSummary } from '~/pages/OperatorPage/OperatorSummary';\nimport { SponsorshipTable } from '~/pages/OperatorPage/SponsorshipTable';\nimport { UndelegationQueue } from '~/pages/OperatorPage/UndelegationQueue';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { NoData } from '~/shared/components/NoData';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { NetworkChart } from '~/shared/components/TimeSeriesGraph';\nimport { formatLongDate, formatShortDate, } from '~/shared/components/TimeSeriesGraph/chartUtils';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { LAPTOP, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nimport { useSetBlockDependency } from '~/stores/blockNumberDependencies';\nimport { ChartPeriod } from '~/types';\nimport { abbr } from '~/utils';\nimport { onIndexedBlock } from '~/utils/blocks';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { useCurrentChainFullName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nconst defaultChartData = [];\nconst defaultPersistedNodes = [];\nconst defaultPersistedControllers = [];\nexport const OperatorPage = () => {\n    const operatorId = useParams().id;\n    const operatorQuery = useOperatorByIdQuery(operatorId);\n    const operator = operatorQuery.data || null;\n    const initialBehindBlockError = useInitialBehindIndexError(operatorQuery, [\n        operatorId,\n    ]);\n    useRefetchQueryBehindIndexEffect(operatorQuery);\n    const behindBlockError = useLatestBehindBlockError(operatorQuery);\n    const isFetching = operatorQuery.isLoading || operatorQuery.isFetching || !!behindBlockError;\n    const walletAddress = useWalletAccount();\n    const slashingFraction = useConfigValueFromChain('slashingFraction', (value) => toFloat(value, 18n)) ??\n        null;\n    const minimumStakeWei = useConfigValueFromChain('minimumStakeWei');\n    const isOwner = walletAddress != null &&\n        operator != null &&\n        walletAddress.toLowerCase() === operator.owner.toLowerCase();\n    const isController = walletAddress != null &&\n        operator != null &&\n        operator.controllers.some((c) => c.address.toLowerCase() === walletAddress.toLowerCase());\n    const { symbol: tokenSymbol = 'DATA' } = useSponsorshipTokenInfo() || {};\n    const [selectedDataSource, setSelectedDataSource] = useState('cumulativeEarnings');\n    const currentChainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const earliestUndelegationTimestamp = operator?.delegations.find((d) => d.delegator.toLowerCase() === walletAddress?.toLowerCase())?.earliestUndelegationTimestamp;\n    const [selectedPeriod, setSelectedPeriod] = useState(ChartPeriod.ThreeMonths);\n    const chartQuery = useQuery({\n        queryKey: [\n            'operatorChartQuery',\n            currentChainId,\n            operatorId,\n            selectedPeriod,\n            selectedDataSource,\n        ],\n        queryFn: async () => {\n            try {\n                if (!operatorId) {\n                    return [];\n                }\n                return await getOperatorStats(currentChainId, operatorId, selectedPeriod, selectedDataSource, { force: true, ignoreToday: false });\n            }\n            catch (_) {\n                errorToast({ title: 'Could not load operator chart data' });\n                return [];\n            }\n        },\n    });\n    const { data: chartData = defaultChartData } = chartQuery;\n    const myDelegationAmount = useMemo(() => {\n        if (!walletAddress || !operator) {\n            return 0n;\n        }\n        return getDelegatedAmountForWallet(walletAddress, operator);\n    }, [operator, walletAddress]);\n    const myDelegationPercentage = useMemo(() => {\n        if (!walletAddress || !operator) {\n            return toBN(0);\n        }\n        return getDelegationFractionForWallet(walletAddress, operator).multipliedBy(100);\n    }, [walletAddress, operator]);\n    const chartLabel = selectedDataSource === 'cumulativeEarnings'\n        ? 'Cumulative earnings'\n        : 'Total stake';\n    const { nodes: persistedNodes = defaultPersistedNodes } = operator || {};\n    const [nodes, setNodes] = useState(persistedNodes);\n    useEffect(() => void setNodes(persistedNodes), [persistedNodes]);\n    const [saveNodeAddresses, isSavingNodeAddresses] = useSubmitNodeAddressesCallback();\n    const { controllers: persistedControllers = defaultPersistedControllers } = operator || {};\n    const [controllers, setControllers] = useState(persistedControllers);\n    useEffect(() => void setControllers(persistedControllers), [persistedControllers]);\n    const [saveControllers, isSavingControllerAddresses] = useSubmitControllerAddressesCallback();\n    const setBlockDependency = useSetBlockDependency();\n    const heartbeats = useInterceptHeartbeats(operator?.id);\n    const saveNodeAddressesCb = useCallback(async (addresses) => {\n        if (!operatorId) {\n            return;\n        }\n        const chainId = currentChainId;\n        try {\n            await saveNodeAddresses(chainId, operatorId, addresses, {\n                onSuccess(blockNumber) {\n                    setNodes((current) => {\n                        const newAddresses = [];\n                        current.forEach((node) => {\n                            if (node.enabled) {\n                                newAddresses.push({\n                                    ...node,\n                                    persisted: true,\n                                });\n                            }\n                        });\n                        return newAddresses;\n                    });\n                    setBlockDependency(chainId, blockNumber, [\n                        'operatorNodes',\n                        operatorId,\n                    ]);\n                    onIndexedBlock(chainId, blockNumber, () => {\n                        invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                    });\n                },\n                onReject() {\n                    // Undo changes\n                    setNodes((current) => current\n                        .filter((val) => val.persisted === true)\n                        .map((n) => ({\n                        ...n,\n                        enabled: true,\n                    })));\n                },\n                onError() {\n                    errorToast({\n                        title: 'Failed to save the new node addresses',\n                    });\n                },\n            });\n        }\n        catch (_) { }\n    }, [currentChainId, operatorId, saveNodeAddresses, setBlockDependency]);\n    const saveControllerAddressesCb = useCallback(async (address, isNew) => {\n        if (!operatorId) {\n            return;\n        }\n        const chainId = currentChainId;\n        try {\n            await saveControllers(chainId, operatorId, address, isNew, {\n                onSuccess(blockNumber) {\n                    setControllers((current) => {\n                        const newAddresses = [];\n                        current.forEach((node) => {\n                            if (node.enabled) {\n                                newAddresses.push({\n                                    ...node,\n                                    persisted: true,\n                                });\n                            }\n                        });\n                        return newAddresses;\n                    });\n                    setBlockDependency(chainId, blockNumber, [\n                        'operatorNodes',\n                        operatorId,\n                    ]);\n                    onIndexedBlock(chainId, blockNumber, () => {\n                        invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                    });\n                },\n                onReject() {\n                    // Undo changes\n                    setControllers((current) => current\n                        .filter((val) => val.persisted === true)\n                        .map((n) => ({\n                        ...n,\n                        enabled: true,\n                    })));\n                },\n                onError() {\n                    errorToast({\n                        title: 'Failed to save the new controllers',\n                    });\n                },\n            });\n        }\n        catch (_) { }\n    }, [currentChainId, operatorId, saveControllers, setBlockDependency]);\n    const fullChainName = useCurrentChainFullName();\n    const placeholder = behindBlockError ? (React.createElement(BehindBlockErrorDisplay, { latest: behindBlockError, initial: initialBehindBlockError || undefined })) : !isFetching ? (React.createElement(NoData, { firstLine: `Operator not found on the ${fullChainName} chain.` })) : null;\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Operator\" }),\n        React.createElement(LoadingIndicator, { loading: isFetching }),\n        !!operator && (React.createElement(React.Fragment, null,\n            React.createElement(OperatorActionBar, { operator: operator }),\n            React.createElement(OperatorDetails, { operator: operator }),\n            React.createElement(OperatorSummary, { operator: operator }),\n            React.createElement(OperatorVersionNotice, { version: operator.contractVersion }))),\n        React.createElement(LayoutColumn, null, operator == null ? (placeholder) : (React.createElement(SegmentGrid, null,\n            React.createElement(ChartGrid, null,\n                React.createElement(NetworkPageSegment, { title: \"Overview charts\" },\n                    React.createElement(Pad, null,\n                        React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: selectedPeriod, onChange: setSelectedPeriod }), sourceTabs: React.createElement(Tabs, { selection: selectedDataSource, onSelectionChange: (dataSource) => {\n                                    if (dataSource !== 'totalValue' &&\n                                        dataSource !==\n                                            'cumulativeEarnings') {\n                                        return;\n                                    }\n                                    setSelectedDataSource(dataSource);\n                                } },\n                                React.createElement(Tab, { id: \"cumulativeEarnings\" }, \"Cumulative earnings\"),\n                                React.createElement(Tab, { id: \"totalValue\" }, \"Total stake\")) },\n                            React.createElement(NetworkChart, { isLoading: chartQuery.isLoading ||\n                                    chartQuery.isFetching, tooltipValuePrefix: chartLabel, graphData: chartData, xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: abbr, tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: (value) => tooltipValueFormatter(value, tokenSymbol) })))),\n                React.createElement(\"div\", null,\n                    React.createElement(SegmentGrid, null,\n                        React.createElement(NetworkPageSegment, { title: isOwner ? 'My stake' : 'My delegation' }, walletAddress ? (React.createElement(React.Fragment, null,\n                            React.createElement(DelegationCell, null,\n                                React.createElement(Pad, null,\n                                    React.createElement(StatCellLabel, null,\n                                        \"Current stake\",\n                                        operator.contractVersion >\n                                            0 &&\n                                            earliestUndelegationTimestamp !=\n                                                null &&\n                                            earliestUndelegationTimestamp *\n                                                1000 >\n                                                Date.now() && (React.createElement(Tooltip, { content: React.createElement(React.Fragment, null,\n                                                \"You can not undelegate because your minimum delegation period is still active. It will expire on\",\n                                                ' ',\n                                                moment(earliestUndelegationTimestamp *\n                                                    1000).format('YYYY-MM-DD HH:mm'),\n                                                \".\") },\n                                            React.createElement(TooltipIconWrap, { className: \"ml-1\", \"$color\": \"#ADADAD\", \"$svgSize\": {\n                                                    width: '18px',\n                                                    height: '18px',\n                                                } },\n                                                React.createElement(SvgIcon, { name: \"lockClosed\" }))))),\n                                    React.createElement(StatCellContent, null,\n                                        React.createElement(SponsorshipDecimals, { abbr: true, amount: myDelegationAmount })))),\n                            React.createElement(Separator, null),\n                            React.createElement(DelegationCell, null,\n                                React.createElement(Pad, null,\n                                    React.createElement(StatCellLabel, null, \"Share of Operator's total stake\"),\n                                    React.createElement(StatCellContent, null,\n                                        myDelegationPercentage.toFixed(0),\n                                        \"%\"))))) : (React.createElement(Pad, null, \"Connect your wallet to show your delegation.\"))),\n                        React.createElement(NetworkPageSegment, { title: \"Operator status\" },\n                            React.createElement(OperatorChecklist, { operatorId: operatorId }))))),\n            React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(TitleBar, { label: operator.stakes.length }, \"Sponsorships\") },\n                React.createElement(SponsorshipTable, { operator: operator, isController: isController })),\n            React.createElement(NetworkPageSegment, { title: \"Undelegation queue\" },\n                React.createElement(UndelegationQueue, { operatorId: operatorId })),\n            React.createElement(NetworkPageSegment, { foot: true, title: \"Slashing history\" },\n                React.createElement(SlashingHistoryTableContainer, null,\n                    React.createElement(ScrollTable, { elements: operator.slashingEvents.sort((a, b) => b.date - a.date), columns: [\n                            {\n                                displayName: 'Stream ID',\n                                valueMapper: ({ streamId }) => (React.createElement(StreamIdCell, { streamId: streamId })),\n                                align: 'start',\n                                isSticky: true,\n                                key: 'id',\n                            },\n                            {\n                                displayName: 'Date',\n                                valueMapper: (element) => moment(element.date * 1000).format('YYYY-MM-DD HH:mm'),\n                                align: 'start',\n                                isSticky: false,\n                                key: 'date',\n                            },\n                            {\n                                displayName: 'Slashed',\n                                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.amount })),\n                                align: 'start',\n                                isSticky: false,\n                                key: 'slashed',\n                            },\n                            {\n                                displayName: 'Reason',\n                                valueMapper: (element) => {\n                                    if (slashingFraction == null ||\n                                        minimumStakeWei == null) {\n                                        return '';\n                                    }\n                                    if (element.amount <\n                                        toBigInt(slashingFraction.multipliedBy(toBN(minimumStakeWei)))) {\n                                        return 'False flag';\n                                    }\n                                    return 'Normal slashing';\n                                },\n                                align: 'start',\n                                isSticky: false,\n                                key: 'reason',\n                            },\n                        ], linkMapper: ({ sponsorshipId: id }) => R.sponsorship(id, routeOptions(chainKey)) }))),\n            isController && (React.createElement(NetworkPageSegment, { title: React.createElement(NodeAddressHeader, null,\n                    React.createElement(\"span\", null, \"Operator's node addresses\"),\n                    ' ',\n                    React.createElement(\"div\", null,\n                        React.createElement(Hint, null,\n                            React.createElement(\"p\", null, \"Your nodes need wallets for smart contract interactions. Generate Ethereum wallets using your tool of choice, add the private key to your node's config file, and add the corresponding address here. You can run multiple nodes with the same address/private\\u00A0key.\"),\n                            React.createElement(\"p\", null, \"Each node address should be supplied with some POL on Polygon chain for\\u00A0gas.\")))) },\n                React.createElement(AddressTable, { type: AddressType.Node, busy: isSavingNodeAddresses, value: nodes, onChange: setNodes, onAddAddress: async (address) => {\n                        const addresses = [\n                            ...nodes.map((n) => n.address),\n                            address,\n                        ];\n                        await saveNodeAddressesCb(addresses);\n                    }, onRemoveAddress: async (address) => {\n                        const addresses = nodes\n                            .filter((n) => n.address !== address)\n                            .map((n) => n.address);\n                        await saveNodeAddressesCb(addresses);\n                    } }))),\n            isController && (React.createElement(NetworkPageSegment, { title: React.createElement(NodeAddressHeader, null,\n                    React.createElement(\"span\", null, \"Staking agents\"),\n                    ' ',\n                    React.createElement(\"div\", null,\n                        React.createElement(Hint, null,\n                            React.createElement(\"p\", null, \"You can authorize certain addresses to stake and unstake your Operator. These addresses are not allowed to withdraw funds out of the Operator. Such addresses are useful for automation or for using a 'hotter' wallet for convenience when managing your day-to-day staking operations.\")))) },\n                React.createElement(AddressTable, { type: AddressType.Automation, busy: isSavingControllerAddresses, disableEditing: !isOwner, value: controllers.filter((c) => c.address.toLowerCase() !==\n                        operator.owner.toLowerCase()), onChange: setControllers, onAddAddress: (address) => {\n                        saveControllerAddressesCb(address, true);\n                    }, onRemoveAddress: (address) => {\n                        saveControllerAddressesCb(address, false);\n                    } }))),\n            isController && (React.createElement(NetworkPageSegment, { title: React.createElement(TitleBar, { label: Object.keys(heartbeats).length }, \"Live nodes\") },\n                React.createElement(LiveNodesTable, { heartbeats: heartbeats }))))))));\n};\nfunction tooltipValueFormatter(value, tokenSymbol) {\n    return `${abbr(value)} ${tokenSymbol}`;\n}\nconst ChartGrid = styled(SegmentGrid).withConfig({ displayName: \"ChartGrid\", componentId: \"sc-z36y26\" }) `\n    grid-template-columns: minmax(0, 1fr);\n\n    @media ${LAPTOP} {\n        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);\n    }\n`;\nconst DelegationCell = styled.div.withConfig({ displayName: \"DelegationCell\", componentId: \"sc-qvn3mt\" }) `\n    ${Pad} {\n        padding-bottom: 12px;\n        padding-top: 12px;\n    }\n\n    @media ${TABLET} {\n        ${StatCellContent} {\n            font-size: 24px;\n            line-height: 40px;\n        }\n    }\n`;\nconst NodeAddressHeader = styled.h2.withConfig({ displayName: \"NodeAddressHeader\", componentId: \"sc-1d81gc9\" }) `\n    display: flex;\n    align-items: center;\n`;\nconst NoticeBar = styled.div.withConfig({ displayName: \"NoticeBar\", componentId: \"sc-1npqfx7\" }) `\n    display: flex;\n    align-items: center;\n    width: 100%;\n    background: #fff4ee;\n    font-size: 14px;\n    line-height: 20px;\n    color: #323232;\n    padding: 8px 0;\n    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.025);\n`;\nconst NoticeWrap = styled.div.withConfig({ displayName: \"NoticeWrap\", componentId: \"sc-1dgrgm8\" }) `\n    display: grid;\n    grid-template-columns: 18px 1fr;\n    gap: 8px;\n    align-items: center;\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 24px;\n    width: 100%;\n\n    @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n        padding: 0;\n    }\n`;\nconst SlashingHistoryTableContainer = styled.div.withConfig({ displayName: \"SlashingHistoryTableContainer\", componentId: \"sc-1t1lti\" }) `\n    max-height: none;\n\n    @media ${LAPTOP} {\n        max-height: 575px;\n    }\n`;\nfunction OperatorVersionNotice(params) {\n    const { version } = params;\n    if (version >= 4) {\n        return null;\n    }\n    const notice = (React.createElement(React.Fragment, null, \"This Operator smart contract version is vulnerable and tokens may get stolen. Please withdraw all tokens.\"));\n    return (React.createElement(NoticeBar, null,\n        React.createElement(NoticeWrap, null,\n            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })),\n            React.createElement(\"div\", null, notice))));\n}\n","import moment from 'moment';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { ChartPeriod } from '~/types';\nimport { toFloat } from '~/utils/bn';\nimport { getOperatorDailyBuckets } from '.';\nexport const getOperatorStats = async (chainId, operatorId, selectedPeriod, dataSource, { force = false, ignoreToday = false } = {}) => {\n    const { decimals = 18n } = await getSponsorshipTokenInfo(chainId);\n    const start = ignoreToday ? moment().utc().startOf('day') : moment().utc();\n    let result;\n    switch (selectedPeriod) {\n        case ChartPeriod.SevenDays:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(7, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneMonth:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(30, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.ThreeMonths:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(90, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneYear:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(365, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.YearToDate:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().startOf('year').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.All:\n            const maxAmount = 999;\n            const maxIterations = 5;\n            const endDate = start.clone().subtract(maxIterations * maxAmount, 'days');\n            const elements = [];\n            // yeah - I'm guessing we will not have a history longer than 5 thousand days :)\n            for (let i = 0; i < maxIterations; i++) {\n                const partialResult = await getOperatorDailyBuckets(chainId, operatorId, {\n                    dateGreaterEqualThan: endDate.unix(),\n                    dateLowerThan: start.unix(),\n                    batchSize: maxAmount,\n                    skip: maxAmount * i,\n                    force,\n                });\n                elements.push(...partialResult);\n                if (partialResult.length < maxAmount) {\n                    break; // we're breaking the FOR loop here\n                }\n            }\n            result = elements;\n            break;\n        default:\n            result = [];\n    }\n    return result.map((bucket) => {\n        const yValue = dataSource === 'totalValue'\n            ? toFloat(bucket.valueWithoutEarnings, decimals).toNumber()\n            : dataSource === 'cumulativeEarnings'\n                ? toFloat(bucket.cumulativeEarningsWei, decimals).toNumber()\n                : 0;\n        return {\n            x: Number(bucket.date) * 1000,\n            y: yValue,\n        };\n    });\n};\n","import React, { useEffect, useState, } from 'react';\nimport styled from 'styled-components';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { COLORS, DESKTOP, MD, PHONE, TABLET } from '~/shared/utils/styled';\nimport searchIcon from './SearchIcon.svg';\nimport closeIcon from './CloseIcon.svg';\nconst SearchBar = ({ onChange, value, debounceTime = 250, placeholder = 'Search', autoFocus = false, disabled = false, }) => {\n    const [focused, setFocused] = useState();\n    const [inputValue, setInputValue] = useState('');\n    useEffect(() => {\n        if (value != null) {\n            setInputValue(value);\n        }\n    }, [value]);\n    const debouncedChangeHandler = useDebouncedCallback((searchValue) => {\n        if (typeof onChange === 'function') {\n            return onChange(searchValue);\n        }\n    }, debounceTime);\n    const handleChange = (event) => {\n        setInputValue(event.target.value);\n        debouncedChangeHandler(event.target.value);\n    };\n    const clearSearch = (event) => {\n        event.preventDefault();\n        setInputValue('');\n        if (typeof onChange === 'function') {\n            onChange('');\n        }\n    };\n    return (React.createElement(FormWrapper, { onSubmit: (event) => event.preventDefault() },\n        React.createElement(SearchIcon, { src: searchIcon, className: focused ? 'hidden' : '' }),\n        React.createElement(SearchInput, { disabled: disabled, placeholder: placeholder, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onChange: handleChange, value: inputValue, autoFocus: autoFocus }),\n        React.createElement(ClearButton, { disabled: disabled, onClick: clearSearch, className: !inputValue ? 'hidden' : '', type: \"button\" },\n            React.createElement(\"img\", { src: closeIcon, alt: \"Clear search\" }))));\n};\nconst transitionTime = 150;\nconst FormWrapper = styled.form.withConfig({ displayName: \"FormWrapper\", componentId: \"sc-1eoqkq\" }) `\n    display: flex;\n    width: 100%;\n    background-color: ${COLORS.secondary};\n    border-radius: 200px;\n    position: relative;\n`;\nconst SearchInput = styled.input.withConfig({ displayName: \"SearchInput\", componentId: \"sc-1lxxfit\" }) `\n    background-color: transparent;\n    border: none;\n    border-radius: 200px;\n    width: 100%;\n    line-height: 40px;\n    height: 40px;\n    font-size: 14px;\n    padding: 0 20px 0 45px;\n    color: ${COLORS.primary};\n    outline: 2px solid transparent;\n    transition: all ${transitionTime}ms ease-in;\n\n    :focus {\n        outline-color: ${COLORS.focus};\n        padding-left: 20px;\n    }\n\n    ::placeholder {\n        color: ${COLORS.primaryLight};\n        opacity: 1;\n    }\n\n    ::selection {\n        background-color: ${COLORS.selection};\n        opacity: 1;\n        color: ${COLORS.primary};\n    }\n\n    @media ${PHONE} {\n        line-height: 50px;\n        height: 50px;\n    }\n\n    @media (min-width: ${MD}px) {\n        line-height: 60px;\n        height: 60px;\n    }\n`;\nconst SearchIcon = styled.img.withConfig({ displayName: \"SearchIcon\", componentId: \"sc-1t5an7t\" }) `\n    position: absolute;\n    width: 16px;\n    top: 12px;\n    left: 20px;\n    transition: opacity ${transitionTime}ms ease-in, left 1ms linear;\n    opacity: 1;\n\n    &.hidden {\n        transition: opacity ${transitionTime}ms ease-in,\n            left 1ms linear ${transitionTime}ms;\n        opacity: 0;\n        left: 0;\n    }\n\n    @media ${PHONE} {\n        top: 17px;\n    }\n\n    @media (min-width: ${MD}px) {\n        top: 22px;\n    }\n`;\nconst ClearButton = styled.button.withConfig({ displayName: \"ClearButton\", componentId: \"sc-uairft\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border: none;\n    width: 40px;\n    height: 40px;\n    position: absolute;\n    right: 0;\n    top: 50%;\n    transform: translateY(-50%);\n    background-color: transparent;\n    border-radius: 100%;\n    transition: opacity ${transitionTime}ms ease-in,\n        background-color ${transitionTime}ms ease-in;\n    opacity: 1;\n\n    &.hidden {\n        opacity: 0;\n    }\n\n    :hover {\n        background-color: ${COLORS.secondaryHover};\n    }\n\n    @media ${PHONE} {\n        width: 50px;\n        height: 50px;\n    }\n\n    @media (min-width: ${MD}px) {\n        width: 60px;\n        height: 60px;\n    }\n`;\nexport default SearchBar;\nexport const SearchBarWrap = styled.div.withConfig({ displayName: \"SearchBarWrap\", componentId: \"sc-cwrhc5\" }) `\n    display: flex;\n    justify-content: center;\n    padding: 30px 0 50px;\n\n    ${FormWrapper} {\n        margin: 0 24px;\n        max-width: 770px;\n    }\n\n    @media ${TABLET} {\n        padding: 40px 0 80px;\n\n        ${FormWrapper} {\n            margin: 0 72px;\n        }\n    }\n\n    @media ${DESKTOP} {\n        ${FormWrapper} {\n            margin: 0;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport SearchBar from '~/shared/components/SearchBar';\nimport { COLORS, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nconst NetworkActionBarWrap = styled.div.withConfig({ displayName: \"NetworkActionBarWrap\", componentId: \"sc-dzbejj\" }) `\n    background-color: ${COLORS.primaryContrast};\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n\n    .search-bar-wrap {\n        padding: 30px 24px;\n        max-width: 770px;\n        margin: 0 auto;\n        width: 100%;\n        @media (${TABLET}) {\n            padding: 40px 72px 80px;\n        }\n        &.search-disabled {\n            > * {\n                visibility: hidden;\n            }\n        }\n    }\n\n    .action-content-wrap {\n        display: flex;\n        align-items: center;\n        justify-content: space-between;\n        padding: 0 24px 28px;\n        width: 100%;\n        max-width: ${MAX_BODY_WIDTH}px;\n        @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n            padding: 0 0 28px;\n        }\n    }\n\n    .left-side-content {\n        width: 100%;\n        @media (${TABLET}) {\n            width: auto;\n        }\n    }\n\n    .right-side-content {\n        display: none;\n        @media (${TABLET}) {\n            display: block;\n        }\n    }\n`;\nexport const NetworkActionBar = ({ searchEnabled, onSearch, searchValue, placeholder, leftSideContent, rightSideContent, }) => {\n    return (React.createElement(NetworkActionBarWrap, null,\n        React.createElement(\"div\", { className: 'search-bar-wrap ' + (!searchEnabled ? 'search-disabled' : '') },\n            React.createElement(SearchBar, { onChange: onSearch, placeholder: placeholder, value: searchValue })),\n        (leftSideContent || rightSideContent) && (React.createElement(\"div\", { className: \"action-content-wrap\" },\n            React.createElement(\"div\", { className: \"left-side-content\" }, leftSideContent),\n            React.createElement(\"div\", { className: \"right-side-content\" }, rightSideContent)))));\n};\n","import { useCallback, useState } from 'react';\nexport function useTableOrder({ orderBy, orderDirection, } = {}) {\n    const [order, setOrder] = useState(orderBy && orderDirection\n        ? {\n            orderBy,\n            orderDirection,\n        }\n        : { orderBy: undefined, orderDirection: undefined });\n    const handleOrderChange = useCallback((column, direction) => {\n        if (!direction) {\n            setOrder((currentOrder) => {\n                return getNextSortingParameters(currentOrder.orderBy, column, currentOrder.orderDirection);\n            });\n            return;\n        }\n        setOrder({\n            orderBy: column,\n            orderDirection: direction,\n        });\n    }, []);\n    return {\n        ...order,\n        setOrder: handleOrderChange,\n    };\n}\nfunction getNextSortingParameters(currentOrderBy, newOrderBy, currentOrderDirection) {\n    if (currentOrderBy !== newOrderBy) {\n        return {\n            orderBy: newOrderBy,\n            orderDirection: 'asc',\n        };\n    }\n    const newDirection = !currentOrderDirection\n        ? 'asc'\n        : currentOrderDirection === 'asc'\n            ? 'desc'\n            : undefined;\n    if (newDirection == null) {\n        return {\n            orderBy: undefined,\n            orderDirection: undefined,\n        };\n    }\n    return {\n        orderBy: newOrderBy,\n        orderDirection: newDirection,\n    };\n}\n","import { useSearchParams } from 'react-router-dom';\nimport { useEffect } from 'react';\nexport function useUrlParams(params) {\n    const [searchParams, setSearchParams] = useSearchParams();\n    useEffect(() => {\n        // Check if current params are different from desired params\n        let needsUpdate = false;\n        const currentParams = new URLSearchParams(searchParams);\n        params.forEach(({ param, value, defaultValue }) => {\n            const currentValue = currentParams.get(param);\n            const targetValue = value !== defaultValue ? value || defaultValue : null;\n            if (targetValue === null && currentValue !== null) {\n                needsUpdate = true;\n            }\n            else if (targetValue !== null && targetValue !== currentValue) {\n                needsUpdate = true;\n            }\n        });\n        // Only update if necessary\n        if (needsUpdate) {\n            setSearchParams((prevParams) => {\n                const newParams = new URLSearchParams(prevParams);\n                params.forEach(({ param, value, defaultValue }) => {\n                    if (value === '' || value === undefined) {\n                        newParams.delete(param);\n                    }\n                    else if (value !== defaultValue) {\n                        newParams.set(param, value);\n                    }\n                    else {\n                        newParams.delete(param);\n                    }\n                });\n                return newParams;\n            });\n        }\n    }, [params, searchParams, setSearchParams]);\n}\n","import React, { useEffect, useState } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { NetworkActionBar } from '~/components/ActionBars/NetworkActionBar';\nimport { Button } from '~/components/Button';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport NetworkPageSegment, { SegmentGrid } from '~/components/NetworkPageSegment';\nimport { OperatorIdCell } from '~/components/Table';\nimport { getSpotApy } from '~/getters';\nimport { useAllOperatorsQuery, useDelegationsForWalletQuery, useOperatorForWalletQuery, } from '~/hooks/operators';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useIsWalletLoading, useWalletAccount } from '~/shared/stores/wallet';\nimport { saveOperator } from '~/utils';\nimport { useCurrentChainFullName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nvar TabOption;\n(function (TabOption) {\n    TabOption[\"AllOperators\"] = \"all\";\n    TabOption[\"MyDelegations\"] = \"my\";\n})(TabOption || (TabOption = {}));\nconst PAGE_SIZE = 20;\nconst DEFAULT_ORDER_BY = 'totalValue';\nconst DEFAULT_ORDER_DIRECTION = 'desc';\nconst DEFAULT_TAB = TabOption.AllOperators;\nfunction isTabOption(value) {\n    return value === TabOption.AllOperators || value === TabOption.MyDelegations;\n}\nexport const OperatorsPage = () => {\n    const wallet = useWalletAccount();\n    const isWalletLoading = useIsWalletLoading();\n    const [params] = useSearchParams();\n    const tab = params.get('tab');\n    const selectedTab = isTabOption(tab) ? tab : DEFAULT_TAB;\n    const [searchQuery, setSearchQuery] = useState(params.get('search') || '');\n    const { orderBy, orderDirection, setOrder } = useTableOrder({\n        orderBy: params.get('orderBy') || DEFAULT_ORDER_BY,\n        orderDirection: params.get('orderDir') || DEFAULT_ORDER_DIRECTION,\n    });\n    useUrlParams([\n        {\n            param: 'tab',\n            value: selectedTab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'orderBy',\n            value: orderBy,\n            defaultValue: DEFAULT_ORDER_BY,\n        },\n        {\n            param: 'orderDir',\n            value: orderDirection,\n            defaultValue: DEFAULT_ORDER_DIRECTION,\n        },\n        {\n            param: 'search',\n            value: searchQuery,\n            defaultValue: '',\n        },\n    ]);\n    const allOperatorsQuery = useAllOperatorsQuery({\n        batchSize: PAGE_SIZE,\n        searchQuery,\n        orderBy,\n        orderDirection,\n    });\n    const myDelegationsQuery = useDelegationsForWalletQuery({\n        address: wallet,\n        pageSize: PAGE_SIZE,\n        searchQuery,\n    });\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const operatorQuery = useOperatorForWalletQuery(wallet);\n    const { data: operator = null } = operatorQuery;\n    const currentQuery = selectedTab === TabOption.AllOperators ? allOperatorsQuery : myDelegationsQuery;\n    const navigate = useNavigate();\n    useEffect(() => {\n        if (!wallet && !isWalletLoading) {\n            navigate(R.operators(routeOptions(chainKey, {\n                tab: TabOption.AllOperators,\n            })));\n        }\n    }, [wallet, isWalletLoading, navigate, chainKey]);\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Operators\" }),\n        React.createElement(NetworkActionBar, { searchEnabled: true, searchValue: searchQuery, onSearch: setSearchQuery, leftSideContent: React.createElement(Tabs, { onSelectionChange: (value) => {\n                    navigate(R.operators(routeOptions(chainKey, { tab: value })));\n                }, selection: selectedTab, fullWidthOnMobile: true },\n                React.createElement(Tab, { id: TabOption.AllOperators }, \"All Operators\"),\n                React.createElement(Tab, { id: TabOption.MyDelegations, disabled: !wallet }, \"My Delegations\")), rightSideContent: operator ? (React.createElement(Button, { as: Link, to: R.operator(operator.id, routeOptions(chainKey)) }, \"View my Operator\")) : (React.createElement(Button, { onClick: () => {\n                    saveOperator(chainId, undefined, {\n                        onDone(id, blockNumber) {\n                            navigate(R.operator(id, routeOptions(chainId, {\n                                b: blockNumber,\n                            })));\n                        },\n                    });\n                }, disabled: !wallet || !!operator || operatorQuery.isFetching }, \"Become an Operator\")) }),\n        React.createElement(LayoutColumn, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(\"h2\", null, selectedTab === TabOption.AllOperators ? (React.createElement(React.Fragment, null, \"All Operators\")) : (React.createElement(React.Fragment, null, \"My Delegations\"))) },\n                    selectedTab === TabOption.AllOperators ? (React.createElement(OperatorsTable, { query: allOperatorsQuery, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: setOrder })) : (React.createElement(DelegationsTable, { query: myDelegationsQuery })),\n                    currentQuery.hasNextPage && (React.createElement(LoadMoreButton, { disabled: currentQuery.isLoading || currentQuery.isFetching, onClick: () => void currentQuery.fetchNextPage(), kind: \"primary2\" }, \"Load more\")))))));\n};\nfunction DelegationsTable({ query, }) {\n    // We want to hide delegations to broken operator contract version 1\n    // as we cannot get rid of them otherwise\n    const elements = query.data?.pages\n        .flatMap((page) => page.elements)\n        .filter((d) => d.contractVersion !== 1) || [];\n    const chainKey = useCurrentChainKey();\n    const chainFullName = useCurrentChainFullName();\n    const wallet = useWalletAccount();\n    return (React.createElement(ScrollTableCore, { elements: elements, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, columns: [\n            {\n                displayName: 'Operator',\n                valueMapper: ({ id, metadata: { name, imageUrl } }) => (React.createElement(OperatorIdCell, { operatorId: id, operatorName: name, imageUrl: imageUrl, truncate: !!name })),\n                align: 'start',\n                isSticky: true,\n                key: 'operatorId',\n            },\n            {\n                displayName: 'My delegation',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: wallet ? element.share(wallet) : 0n })),\n                align: 'start',\n                isSticky: false,\n                key: 'myShare',\n            },\n            {\n                displayName: 'Total stake',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.valueWithoutEarnings })),\n                align: 'end',\n                isSticky: false,\n                key: 'totalStake',\n            },\n            {\n                displayName: \"Owner's cut\",\n                valueMapper: (element) => `${element.operatorsCut}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'operatorsCut',\n            },\n            {\n                displayName: 'APY',\n                valueMapper: (element) => `${(element.apy * 100).toFixed(0)}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'apy',\n            },\n            {\n                displayName: 'Sponsorships',\n                valueMapper: (element) => element.stakes.length,\n                align: 'end',\n                isSticky: false,\n                key: 'sponsorships',\n            },\n        ], noDataFirstLine: `You have not delegated to any operator on the ${chainFullName} chain.`, linkMapper: (element) => R.operator(element.id, routeOptions(chainKey)) }));\n}\nfunction OperatorsTable({ query, orderBy, orderDirection, onOrderChange, }) {\n    const elements = query.data?.pages.flatMap((page) => page.elements) || [];\n    const chainKey = useCurrentChainKey();\n    const chainFullName = useCurrentChainFullName();\n    return (React.createElement(ScrollTableCore, { elements: elements, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, orderDirection: orderDirection, orderBy: orderBy, onOrderChange: onOrderChange, columns: [\n            {\n                displayName: 'Operator',\n                valueMapper: ({ id, metadata: { name, imageUrl } }) => (React.createElement(OperatorIdCell, { operatorId: id, operatorName: name, imageUrl: imageUrl, truncate: !!name })),\n                align: 'start',\n                isSticky: true,\n                key: 'operatorId',\n            },\n            {\n                displayName: 'Total stake',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.valueWithoutEarnings })),\n                align: 'start',\n                isSticky: false,\n                key: 'totalValue',\n                sortable: true,\n            },\n            {\n                displayName: 'Deployed stake',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.totalStakeInSponsorshipsWei })),\n                align: 'end',\n                isSticky: false,\n                key: 'deployed',\n                sortable: true,\n            },\n            {\n                displayName: \"Owner's cut\",\n                valueMapper: (element) => `${element.operatorsCut}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'operatorCut',\n                sortable: true,\n            },\n            {\n                displayName: 'APY',\n                valueMapper: (element) => `${(getSpotApy(element) * 100).toFixed(0)}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'apy',\n            },\n            {\n                displayName: 'Sponsorships',\n                valueMapper: (element) => element.stakes.length,\n                align: 'end',\n                isSticky: false,\n                key: 'sponsorshipCount',\n            },\n        ], noDataFirstLine: `No operators found on the ${chainFullName} chain.`, linkMapper: (element) => R.operator(element.id, routeOptions(chainKey)) }));\n}\n","import styled from 'styled-components';\nimport { COLORS, DESKTOP, MEDIUM, TABLET, MAX_BODY_WIDTH } from '~/shared/utils/styled';\nimport { Button } from '~/components/Button';\nexport const FiltersBar = styled.div.withConfig({ displayName: \"FiltersBar\", componentId: \"sc-12qmyua\" }) `\n    display: flex;\n    justify-content: space-between;\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 30px 30px;\n\n    @media ${DESKTOP} {\n        padding: 0 0 30px;\n    }\n`;\nexport const FiltersWrap = styled.div.withConfig({ displayName: \"FiltersWrap\", componentId: \"sc-tbepbb\" }) `\n    align-items: center;\n    display: flex;\n    width: 100%;\n\n    @media ${TABLET} {\n        align-items: unset;\n        width: auto;\n    }\n`;\nexport const DropdownFilters = styled.div.withConfig({ displayName: \"DropdownFilters\", componentId: \"sc-17tltbs\" }) `\n    display: none;\n    align-items: center;\n    margin-left: 40px;\n    span {\n        color: ${COLORS.primary};\n        font-weight: ${MEDIUM};\n        margin-right: 15px;\n        font-size: 14px;\n    }\n\n    @media (${DESKTOP}) {\n        display: flex;\n    }\n`;\nexport const SelectFieldWrap = styled.div.withConfig({ displayName: \"SelectFieldWrap\", componentId: \"sc-14wczrv\" }) `\n    margin-right: 10px;\n`;\nexport const MobileFilterWrap = styled.div.withConfig({ displayName: \"MobileFilterWrap\", componentId: \"sc-11b0azj\" }) `\n    display: block;\n    color: ${COLORS.primary};\n    margin-left: 20px;\n\n    @media (${DESKTOP}) {\n        display: none;\n    }\n`;\nexport const MobileFilterText = styled.span.withConfig({ displayName: \"MobileFilterText\", componentId: \"sc-1csnotb\" }) `\n    margin-right: 15px;\n    display: none;\n    @media (${TABLET}) {\n        display: inline;\n    }\n`;\nexport const CreateProjectButton = styled(Button).withConfig({ displayName: \"CreateProjectButton\", componentId: \"sc-16puz4w\" }) `\n    display: none !important;\n\n    @media ${TABLET} {\n        display: inherit !important;\n    }\n`;\nexport const ActionBarContainer = styled.div.withConfig({ displayName: \"ActionBarContainer\", componentId: \"sc-6z7scv\" }) `\n    background-color: ${COLORS.primaryContrast};\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { isAddress } from 'web3-validator';\nimport { Button } from '~/components/Button';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport TextInput from '~/shared/components/Ui/Text/StyledInput';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { usePersistProjectCallback } from '~/stores/projectDraft';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { getContractAddress } from '~/utils/contracts';\nimport { errorToast } from '~/utils/toast';\nimport { getCachedTokenInfo, getTokenInfo, useTokenInfo } from '~/utils/tokens';\nconst TimeUnitOptions = Object.values(timeUnits).map((unit) => ({\n    label: `Per ${unit}`,\n    value: unit,\n}));\nfunction isTokenInfoCached(tokenAddress, chainId) {\n    return typeof getCachedTokenInfo(tokenAddress, chainId) !== 'undefined';\n}\nexport default function SalePointTokenSelector({ disabled = false, salePoint, onSalePointChange, }) {\n    const { pricingTokenAddress: tokenAddress, chainId, price } = salePoint;\n    const dataTokenAddress = getContractAddress('data', chainId).toLowerCase();\n    const [useDataToken, setUseDataToken] = useState(tokenAddress === dataTokenAddress);\n    const tokenInfo = useTokenInfo(tokenAddress, chainId);\n    const isLoadingTokenInfo = typeof tokenInfo === 'undefined';\n    const { symbol: tokenSymbol, decimals = 18n } = tokenInfo || {};\n    const [rawPrice, setRawPrice] = useState(price == null ? '' : toFloat(price, decimals).toString());\n    useEffect(function setRawPriceFromUpstream() {\n        setRawPrice(price == null ? '' : toFloat(price, decimals).toString());\n    }, [price, decimals]);\n    const [customTokenAddress, setCustomTokenAddress] = useState(useDataToken ? '' : tokenAddress);\n    useEffect(() => {\n        const data = tokenAddress === dataTokenAddress;\n        setUseDataToken(data);\n        if (!data && tokenAddress) {\n            setCustomTokenAddress(tokenAddress);\n        }\n    }, [tokenAddress, dataTokenAddress]);\n    const isCustomTokenInfoCached = isTokenInfoCached(customTokenAddress, chainId);\n    const canFetchTokenInfo = !disabled &&\n        isAddress(customTokenAddress) &&\n        !isCustomTokenInfoCached &&\n        !isLoadingTokenInfo;\n    const persist = usePersistProjectCallback();\n    function commitNewPrice(value) {\n        if (!value) {\n            onSalePointChange?.({\n                ...salePoint,\n                price: undefined,\n            });\n            return;\n        }\n        onSalePointChange?.({\n            ...salePoint,\n            price: toBigInt(value || 0, decimals),\n        });\n    }\n    return (React.createElement(Root, null,\n        React.createElement(\"ul\", null,\n            React.createElement(\"li\", null,\n                React.createElement(RadioButton, { type: \"button\", onClick: () => {\n                        onSalePointChange?.({\n                            ...salePoint,\n                            pricingTokenAddress: dataTokenAddress,\n                        });\n                    } },\n                    React.createElement(Radio, { \"$checked\": useDataToken }),\n                    React.createElement(\"span\", null, \"DATA Token\"),\n                    React.createElement(DataTokenIcon, null))),\n            React.createElement(\"li\", null,\n                React.createElement(RadioButton, { type: \"button\", onClick: () => {\n                        onSalePointChange?.({\n                            ...salePoint,\n                            pricingTokenAddress: isCustomTokenInfoCached\n                                ? customTokenAddress\n                                : '',\n                        });\n                    } },\n                    React.createElement(Radio, { \"$checked\": !useDataToken }),\n                    React.createElement(\"span\", null, \"Custom token\")),\n                React.createElement(CustomTokenAddressInputContainer, { className: \"custom-\" },\n                    React.createElement(\"label\", null, \"Token contract address\"),\n                    React.createElement(TextInput, { autoComplete: \"off\", disabled: disabled || isLoadingTokenInfo, placeholder: \"e.g 0xdac17f958d2ee523a2206206994597c13d831ec7\", value: customTokenAddress, onChange: (e) => {\n                            const { value } = e.target;\n                            setCustomTokenAddress(value);\n                            onSalePointChange?.({\n                                ...salePoint,\n                                pricingTokenAddress: isTokenInfoCached(value, chainId)\n                                    ? value\n                                    : '',\n                            });\n                        }, invalid: !!tokenAddress &&\n                            getCachedTokenInfo(tokenAddress, chainId) === null, onFocus: () => {\n                            onSalePointChange?.({\n                                ...salePoint,\n                                pricingTokenAddress: isTokenInfoCached(customTokenAddress, chainId)\n                                    ? customTokenAddress\n                                    : '',\n                            });\n                        }, onBlur: () => {\n                            if (customTokenAddress) {\n                                return;\n                            }\n                            onSalePointChange?.({\n                                ...salePoint,\n                                pricingTokenAddress: dataTokenAddress,\n                            });\n                        } }),\n                    React.createElement(SetTokenContainer, null,\n                        React.createElement(Button, { onClick: async () => {\n                                if (!canFetchTokenInfo) {\n                                    return;\n                                }\n                                onSalePointChange?.({\n                                    ...salePoint,\n                                    pricingTokenAddress: customTokenAddress,\n                                });\n                                try {\n                                    /**\n                                     * The only thing we check here: does `customTokenAddress` make\n                                     * `getTokenInfo` explode. `useTokenInfo` won't tell.\n                                     */\n                                    await getTokenInfo(customTokenAddress, chainId);\n                                }\n                                catch (_) {\n                                    errorToast({\n                                        title: 'Invalid token contract address',\n                                        desc: 'This is not an ERC-20 token contract',\n                                    });\n                                }\n                            }, disabled: !canFetchTokenInfo, waiting: isLoadingTokenInfo }, \"Set custom token\"))))),\n        React.createElement(PriceContainer, null,\n            React.createElement(PriceInputWrap, null,\n                React.createElement(TextInput, { className: \"price-input\", placeholder: \"Set your price\", onChange: (e) => {\n                        setRawPrice(e.target.value);\n                    }, onKeyDown: ({ key }) => {\n                        if (key === 'Enter') {\n                            commitNewPrice(rawPrice);\n                            persist();\n                        }\n                    }, onBlur: () => {\n                        commitNewPrice(rawPrice);\n                    }, value: rawPrice, disabled: disabled || !tokenInfo }),\n                tokenSymbol && React.createElement(TokenSymbol, null, tokenSymbol)),\n            React.createElement(SelectContainer, null,\n                React.createElement(SelectField2, { whiteVariant: true, placeholder: \"Unit\", options: TimeUnitOptions, isClearable: false, value: salePoint.timeUnit, onChange: (timeUnit) => {\n                        if (disabled || !tokenInfo) {\n                            return;\n                        }\n                        onSalePointChange?.({\n                            ...salePoint,\n                            timeUnit: timeUnit,\n                        });\n                    }, disabled: disabled || !tokenInfo })))));\n}\nexport const Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-5gt9m6\" }) `\n    background-color: ${COLORS.inputBackground};\n    border-radius: 4px;\n    padding: 24px;\n\n    ul {\n        list-style: none;\n        margin: 0;\n        padding: 0;\n    }\n\n    li {\n        background-color: #ffffff;\n        border-radius: 4px;\n    }\n\n    li + li {\n        margin-top: 16px;\n    }\n`;\nconst RadioButton = styled.button.withConfig({ displayName: \"RadioButton\", componentId: \"sc-63yqxv\" }) `\n    align-items: center;\n    appearance: none;\n    background: transparent;\n    border: 0;\n    display: flex;\n    font-size: 14px;\n    padding: 24px 20px;\n    text-align: left;\n    width: 100%;\n\n    span {\n        flex-grow: 1;\n        margin: 0 16px;\n    }\n`;\nfunction getDataTokenIconAttrs() {\n    return {\n        name: 'DATAColor',\n    };\n}\nconst DataTokenIcon = styled(SvgIcon).attrs(getDataTokenIconAttrs).withConfig({ displayName: \"DataTokenIcon\", componentId: \"sc-qlzzfv\" }) `\n    display: block;\n    height: 24px;\n    width: 24px;\n`;\nconst CustomTokenAddressInputContainer = styled.div.withConfig({ displayName: \"CustomTokenAddressInputContainer\", componentId: \"sc-rhhyh1\" }) `\n    padding: 0 20px 24px;\n\n    label {\n        font-weight: ${MEDIUM};\n        font-size: 12px;\n        line-height: 16px;\n        margin-bottom: 9px;\n    }\n`;\nconst SetTokenContainer = styled.div.withConfig({ displayName: \"SetTokenContainer\", componentId: \"sc-1tocx0l\" }) `\n    display: flex;\n    justify-content: flex-end;\n    margin-top: 16px;\n`;\nconst PriceContainer = styled.div.withConfig({ displayName: \"PriceContainer\", componentId: \"sc-177dvg7\" }) `\n    display: flex;\n    margin-top: 16px;\n`;\nconst PriceInputWrap = styled.div.withConfig({ displayName: \"PriceInputWrap\", componentId: \"sc-o5o22k\" }) `\n    position: relative;\n    flex: 1;\n    margin-right: 16px;\n\n    .price-input {\n        padding-right: 60px;\n        &:disabled {\n            background-color: white;\n            opacity: 1;\n        }\n    }\n`;\nconst TokenSymbol = styled.span.withConfig({ displayName: \"TokenSymbol\", componentId: \"sc-1026cdv\" }) `\n    position: absolute;\n    right: 12px;\n    top: 0;\n    height: 100%;\n    font-size: 14px;\n    border-left: 1px solid ${COLORS.Border};\n    padding-left: 12px;\n    color: ${COLORS.primaryLight};\n    display: flex;\n    align-items: center;\n`;\nconst SelectContainer = styled.div.withConfig({ displayName: \"SelectContainer\", componentId: \"sc-bo2zaq\" }) `\n    [class*='-control'] {\n        min-height: 40px;\n        border: none;\n        &:hover {\n            border: none;\n        }\n    }\n`;\nconst Radio = styled.div.withConfig({ displayName: \"Radio\", componentId: \"sc-v74xe7\" }) `\n    border-radius: 50%;\n    border: 2px solid ${COLORS.radioBorder};\n    height: 15px;\n    position: relative;\n    width: 15px;\n\n    ::before {\n        background-color: ${COLORS.link};\n        border-radius: 50%;\n        content: '';\n        display: block;\n        height: 7px;\n        left: 2px;\n        opacity: 0;\n        position: absolute;\n        top: 2px;\n        transform: scale(0.5);\n        transition: 120ms ease-in-out;\n        transition-property: transform, opacity;\n        width: 7px;\n    }\n\n    ${({ $checked = false }) => $checked &&\n    css `\n            border-color: ${COLORS.link};\n\n            ::before {\n                opacity: 1;\n                transform: scale(1);\n            }\n        `}\n`;\n","import { produce } from 'immer';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { getDataUnion, getDataUnionsOwnedByInChain } from '~/getters/du';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport { Tick as PrestyledTick } from '~/shared/components/Checkbox';\nimport NetworkIcon from '~/shared/components/NetworkIcon';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { getChainDisplayName } from '~/utils/chains';\nimport { Root as SalePointTokenSelectorRoot } from './SalePointTokenSelector';\nexport default function SalePointOption({ onSalePointChange, salePoint, children, multiSelect = false, }) {\n    const { chainId, enabled, readOnly } = salePoint;\n    return (React.createElement(DropdownWrap, { \"$open\": enabled },\n        React.createElement(DropdownToggle, { onClick: () => {\n                onSalePointChange?.({\n                    ...salePoint,\n                    /**\n                     * In multi select mode we don't allow to toggle. It's a click-2-enable,\n                     * always. We let the parent component decide what to do with the value.\n                     */\n                    enabled: multiSelect ? !salePoint.enabled : true,\n                });\n            } },\n            multiSelect ? (React.createElement(Tick, { \"$checked\": enabled, \"$disabled\": readOnly })) : (React.createElement(RadioCircle, { \"$checked\": enabled, \"$disabled\": readOnly })),\n            React.createElement(ChainIcon, { chainId: chainId }),\n            React.createElement(ToggleText, null, getChainDisplayName(chainId)),\n            multiSelect && React.createElement(PlusSymbol, null)),\n        React.createElement(DropdownOuter, null,\n            React.createElement(DropdownInner, null, children))));\n}\nexport const RadioCircle = styled.div.withConfig({ displayName: \"RadioCircle\", componentId: \"sc-1x2ldql\" }) `\n    border-radius: 50%;\n    border: 2px solid ${COLORS.radioBorder};\n    height: 15px;\n    transition: 0.5s border-color;\n    width: 15px;\n\n    ::before {\n        background: ${COLORS.link};\n        border-radius: 50%;\n        content: '';\n        display: block;\n        height: 7px;\n        opacity: 0;\n        transform: translate(2px, 2px) scale(0.5);\n        transition: 0.5s;\n        transition-property: transform, opacity;\n        width: 7px;\n    }\n\n    ${({ $disabled = false }) => $disabled &&\n    css `\n            opacity: 0.5;\n        `}\n\n    ${({ $checked }) => $checked &&\n    css `\n            border-color: ${COLORS.link};\n            transition-duration: 0.1s;\n\n            ::before {\n                opacity: 1;\n                transform: translate(2px, 2px) scale(1);\n                transition-duration: 0.1s;\n            }\n        `}\n`;\nconst DropdownToggle = styled.div.withConfig({ displayName: \"DropdownToggle\", componentId: \"sc-1uc9r46\" }) `\n    align-items: center;\n    cursor: pointer;\n    display: flex;\n    padding: 24px;\n\n    :hover {\n        background-color: ${COLORS.secondary};\n    }\n\n    > ${RadioCircle} {\n        margin-right: 20px;\n    }\n`;\nconst DropdownInner = styled.div.withConfig({ displayName: \"DropdownInner\", componentId: \"sc-11fyshv\" }) `\n    padding: 8px 24px 64px;\n    transition: margin-bottom 0.5s ease-in-out;\n    margin-bottom: -350%;\n\n    h4 {\n        font-weight: 400;\n        font-size: 20px;\n        margin: 0;\n    }\n\n    h4 + p {\n        font-size: 16px;\n        margin: 16px 0 28px;\n        line-height: 1.5em;\n    }\n\n    ${SalePointTokenSelectorRoot} {\n        margin-bottom: 48px;\n    }\n`;\nconst ToggleText = styled.div.withConfig({ displayName: \"ToggleText\", componentId: \"sc-112qiyv\" }) `\n    flex-grow: 1;\n`;\nfunction getPlusSymbolAttrs() {\n    return {\n        name: 'plus',\n    };\n}\nconst PlusSymbol = styled(SvgIcon).attrs(getPlusSymbolAttrs).withConfig({ displayName: \"PlusSymbol\", componentId: \"sc-1hkuv5d\" }) `\n    margin-left: auto;\n    transition: transform 0.3s ease-in-out;\n    width: 14px;\n`;\nconst DropdownWrap = styled.div.withConfig({ displayName: \"DropdownWrap\", componentId: \"sc-1uricu7\" }) `\n    overflow: hidden;\n    box-shadow: 0 1px 2px 0 #00000026, 0 0 1px 0 #00000040;\n    border-radius: 4px;\n    color: ${COLORS.primary};\n\n    & + & {\n        margin-top: 24px;\n    }\n\n    ${({ $open = false }) => $open &&\n    css `\n            ${DropdownInner} {\n                margin-bottom: 0;\n            }\n\n            ${DropdownToggle}:hover {\n                background-color: inherit;\n            }\n\n            ${PlusSymbol} {\n                transform: rotate(45deg);\n            }\n        `}\n`;\nconst DropdownOuter = styled.div.withConfig({ displayName: \"DropdownOuter\", componentId: \"sc-o12d7f\" }) `\n    overflow: hidden;\n`;\nconst Tick = styled(PrestyledTick).withConfig({ displayName: \"Tick\", componentId: \"sc-1pe3o71\" }) `\n    margin: 0 20px 0 0;\n\n    ${({ $disabled = false }) => $disabled &&\n    css `\n            opacity: 0.3;\n        `}\n`;\nconst ChainIcon = styled(NetworkIcon).withConfig({ displayName: \"ChainIcon\", componentId: \"sc-1daap6y\" }) `\n    width: 32px;\n    height: 32px;\n    margin-right: 12px;\n`;\nconst NamedMetadata = z.object({\n    name: z.string(),\n});\nfunction isNamedMetadata(metadata) {\n    return NamedMetadata.safeParse(metadata).success;\n}\nexport function DataUnionOption({ salePoint, onSalePointChange }) {\n    const [dataUnionId, setDataUnionId] = useState('');\n    const { chainId } = salePoint;\n    const [deployNew, setDeployNew] = useState(true);\n    const [dataUnions, setDataUnions] = useState();\n    const isLoadingDataUnions = typeof dataUnions === 'undefined';\n    const canUseExisting = !!dataUnions?.length;\n    const account = useWalletAccount();\n    function updateSalePoint(updater) {\n        onSalePointChange?.(produce(salePoint, updater));\n    }\n    const updateSalePointRef = useRef(updateSalePoint);\n    updateSalePointRef.current = updateSalePoint;\n    useEffect(() => {\n        let mounted = true;\n        if (!account) {\n            return () => { };\n        }\n        /**\n         * Tell the app we're loading the Unions. See `isLoadingDataUnions`.\n         */\n        setDataUnions(undefined);\n        /**\n         * Reset the new/existing selection because it's impossible to select\n         * exisitng id from `undefined` set above.\n         */\n        setDeployNew(true);\n        updateSalePointRef.current((draft) => {\n            draft.beneficiaryAddress = '';\n        });\n        setTimeout(async () => {\n            const result = [];\n            try {\n                const foundDataUnions = await getDataUnionsOwnedByInChain(account, chainId);\n                if (!mounted) {\n                    return;\n                }\n                for (const { id } of foundDataUnions) {\n                    try {\n                        const dataUnion = await getDataUnion(id, chainId);\n                        if (!mounted) {\n                            // There's no need to carry on. The result is gonna get discarded.\n                            break;\n                        }\n                        const metadata = await dataUnion.getMetadata();\n                        if (!mounted) {\n                            // Again, there's no need to carry on. See above.\n                            break;\n                        }\n                        result.push({\n                            value: id,\n                            label: isNamedMetadata(metadata) ? metadata.name : id,\n                        });\n                    }\n                    catch (e) {\n                        console.warn(`Failed to load a Data Union: ${id}`, e);\n                    }\n                }\n            }\n            catch (e) {\n                console.warn('Failed to load Data Unions', e);\n            }\n            finally {\n                if (mounted) {\n                    setDataUnions(result);\n                }\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [chainId, account]);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(\"h4\", null, \"Deployment\"),\n        React.createElement(\"p\", null, \"You can deploy a new Data Union smart contract, or connect an existing one.\"),\n        React.createElement(DeployList, null,\n            React.createElement(\"li\", null,\n                React.createElement(\"button\", { type: \"button\", onClick: () => {\n                        setDeployNew(true);\n                        updateSalePoint((draft) => {\n                            draft.beneficiaryAddress = '';\n                        });\n                    } },\n                    React.createElement(RadioCircle, { \"$checked\": deployNew }),\n                    React.createElement(\"p\", null, \"Deploy a new Data Union\"))),\n            React.createElement(\"li\", null,\n                React.createElement(\"button\", { type: \"button\", disabled: !canUseExisting, onClick: () => {\n                        if (!canUseExisting) {\n                            return;\n                        }\n                        setDeployNew(false);\n                        updateSalePoint((draft) => {\n                            draft.beneficiaryAddress = dataUnionId;\n                        });\n                    } },\n                    React.createElement(RadioCircle, { \"$checked\": !deployNew, \"$disabled\": !canUseExisting }),\n                    React.createElement(\"p\", null, \"Connect an existing Data Union\")),\n                React.createElement(SelectWrap, null,\n                    React.createElement(SelectField2, { placeholder: isLoadingDataUnions\n                            ? 'Loading…'\n                            : canUseExisting\n                                ? 'Select a Data Union'\n                                : \"You don't have any deployed Data Unions\", options: dataUnions || [], disabled: deployNew, fullWidth: true, value: dataUnionId || undefined, isClearable: false, onChange: (newDataUnionId) => {\n                            setDataUnionId(newDataUnionId);\n                            updateSalePoint((draft) => {\n                                draft.beneficiaryAddress = newDataUnionId;\n                            });\n                        } }))))));\n}\nconst DeployList = styled.ul.withConfig({ displayName: \"DeployList\", componentId: \"sc-10wgl0g\" }) `\n    background-color: ${COLORS.inputBackground};\n    border-radius: 4px;\n    list-style: none;\n    margin: 0;\n    padding: 24px;\n\n    li {\n        background: #ffffff;\n        border-radius: 4px;\n    }\n\n    li > button {\n        align-items: center;\n        appearance: none;\n        background: none;\n        border: 0;\n        display: flex;\n        padding: 24px;\n        text-align: left;\n        width: 100%;\n    }\n\n    li + li {\n        margin-top: 16px;\n    }\n\n    p {\n        flex-grow: 1;\n        font-size: 14px;\n        margin: 0;\n    }\n\n    ${RadioCircle} {\n        margin-right: 12px;\n    }\n`;\nconst SelectWrap = styled.div.withConfig({ displayName: \"SelectWrap\", componentId: \"sc-tvsugl\" }) `\n    padding: 0 24px 24px;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { RadioCircle } from '~/components/SalePointSelector/SalePointOption';\nimport FormModal from '~/modals/FormModal';\nimport { TheGraph } from '~/shared/types';\nimport { Layer } from '~/utils/Layer';\nfunction ProjectTypeFilterModal({ onResolve, value, ...props }) {\n    const [localValue, setLocalValue] = useState(value);\n    return (React.createElement(FormModal, { title: \"Filter\", submitLabel: \"Save\", ...props, onSubmit: () => {\n            onResolve?.(localValue);\n        } },\n        React.createElement(Body, null,\n            React.createElement(\"h4\", null, \"By project type\"),\n            React.createElement(\"ul\", null,\n                React.createElement(\"li\", null,\n                    React.createElement(\"button\", { type: \"button\", onClick: () => {\n                            setLocalValue(undefined);\n                        } },\n                        React.createElement(RadioCircle, { \"$checked\": !localValue }),\n                        \"Any\")),\n                productTypeOptions.map(({ value, label }) => (React.createElement(\"li\", { key: value },\n                    React.createElement(\"button\", { type: \"button\", onClick: () => {\n                            setLocalValue(value);\n                        } },\n                        React.createElement(RadioCircle, { \"$checked\": localValue === value }),\n                        label))))))));\n}\nexport const projectTypeFilterModal = toaster(ProjectTypeFilterModal, Layer.Modal);\nconst productTypeOptions = [\n    {\n        value: TheGraph.ProjectType.Open,\n        label: 'Open data',\n    },\n    {\n        value: TheGraph.ProjectType.Paid,\n        label: 'Paid data',\n    },\n    {\n        value: TheGraph.ProjectType.DataUnion,\n        label: 'Data union',\n    },\n];\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-zuqmj1\" }) `\n    font-size: 16px;\n\n    button {\n        appearance: none;\n        align-items: center;\n        display: flex;\n        border: 0;\n        background: none;\n        padding: 0;\n        gap: 8px;\n    }\n\n    ul {\n        list-style: none;\n        padding: 0;\n        margin: 0;\n    }\n\n    li + li {\n        margin-top: 8px;\n    }\n\n    h4 {\n        font-size: 22px;\n        font-weight: 400;\n        margin: 0 0 20px;\n    }\n`;\n","import React from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport Faders from '~/assets/Faders.svg';\nimport { ActionBarContainer, CreateProjectButton, DropdownFilters, FiltersBar, FiltersWrap, MobileFilterText, MobileFilterWrap, SelectFieldWrap, } from '~/components/ActionBar.styles';\nimport { Button } from '~/components/Button';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport { projectTypeFilterModal } from '~/modals/ProjectTypeFilter';\nimport SearchBar, { SearchBarWrap } from '~/shared/components/SearchBar';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { TheGraph } from '~/shared/types';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport var TabOption;\n(function (TabOption) {\n    TabOption[\"Any\"] = \"all\";\n    TabOption[\"Owned\"] = \"my\";\n})(TabOption || (TabOption = {}));\nexport function isOwnedTabOption(value) {\n    return value === TabOption.Owned;\n}\nexport function isTabOption(value) {\n    return value === TabOption.Any || value === TabOption.Owned;\n}\nconst productTypeOptions = [\n    {\n        value: TheGraph.ProjectType.Open,\n        label: 'Open data',\n    },\n    {\n        value: TheGraph.ProjectType.Paid,\n        label: 'Paid data',\n    },\n    {\n        value: TheGraph.ProjectType.DataUnion,\n        label: 'Data union',\n    },\n];\nconst UnstyledActionBar = ({ filter, onCreateProject, onFilterChange, ...props }) => {\n    const [params] = useSearchParams();\n    const tab = params.get('tab');\n    const scope = isTabOption(tab) ? tab : TabOption.Any;\n    const walletAccount = useWalletAccount();\n    const navigate = useNavigate();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(ActionBarContainer, { ...props },\n        React.createElement(SearchBarWrap, null,\n            React.createElement(SearchBar, { value: filter.search, onChange: (search) => {\n                    onFilterChange?.({\n                        ...filter,\n                        search,\n                    });\n                } })),\n        React.createElement(FiltersBar, null,\n            React.createElement(FiltersWrap, null,\n                React.createElement(Tabs, { selection: scope, onSelectionChange: (id) => {\n                        navigate(R.projects(routeOptions(chainKey, { tab: id })));\n                    } },\n                    React.createElement(Tab, { id: TabOption.Any }, \"All projects\"),\n                    React.createElement(Tab, { id: TabOption.Owned, disabled: !walletAccount, title: walletAccount\n                            ? undefined\n                            : 'You need to be connected in to view your projects' }, \"Your projects\")),\n                React.createElement(DropdownFilters, null,\n                    React.createElement(\"span\", null, \"Filter by\"),\n                    React.createElement(SelectFieldWrap, null,\n                        React.createElement(SelectField2, { placeholder: \"Project type\", options: productTypeOptions, value: filter.type, onChange: (type) => {\n                                onFilterChange?.({\n                                    ...filter,\n                                    type: type === null\n                                        ? undefined\n                                        : type,\n                                });\n                            } }))),\n                React.createElement(MobileFilterWrap, null,\n                    React.createElement(MobileFilterTrigger, { onClick: async () => {\n                            try {\n                                const type = await projectTypeFilterModal.pop({\n                                    value: filter.type,\n                                });\n                                onFilterChange?.({\n                                    ...filter,\n                                    type,\n                                });\n                            }\n                            catch (_) { }\n                        }, kind: \"secondary\" },\n                        React.createElement(MobileFilterText, null,\n                            \"Filter\",\n                            filter.type != null && '*'),\n                        React.createElement(\"img\", { src: Faders })))),\n            React.createElement(CreateProjectButton, { kind: \"primary\", type: \"button\", onClick: onCreateProject }, \"Create project\"))));\n};\nconst ActionBar = styled(UnstyledActionBar).withConfig({ displayName: \"ActionBar\", componentId: \"sc-41ii1q\" }) ``;\nexport default ActionBar;\nconst MobileFilterTrigger = styled(Button).withConfig({ displayName: \"MobileFilterTrigger\", componentId: \"sc-1rnrcxg\" }) `\n    padding: 0 10px !important;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nconst UnstyledRect = ({ ratio = '1:1', height, ...props }) => (React.createElement(\"svg\", { ...props, height: height, viewBox: ratio == null ? undefined : `0 0 ${ratio.split(/[:x]/).join(' ')}`, width: height == null ? undefined : '100%', xmlns: \"http://www.w3.org/2000/svg\" }));\nconst Rect = styled(UnstyledRect).withConfig({ displayName: \"Rect\", componentId: \"sc-jr8ct1\" }) `\n    display: block;\n`;\nexport default Rect;\n","import React from 'react';\nimport styled, { keyframes, css } from 'styled-components';\nconst UnstyledSkeleton = ({ disabled, children, width: _width, block: _block, ...props }) => (disabled ? children || null : (React.createElement(\"span\", { ...props }, \"\\u200C\")));\nconst animation = keyframes `\n    0% {\n        background-position: -200px 0;\n    }\n\n    100% {\n        background-position: calc(200px + 100%) 0;\n    }\n`;\nconst Skeleton = styled(UnstyledSkeleton).withConfig({ displayName: \"Skeleton\", componentId: \"sc-19ir9xb\" }) `\n    animation: ${animation} 1.2s ease-in-out infinite;\n    background-color: #eeeeee;\n    background-image: linear-gradient(90deg, #eeeeee, #f5f5f5, #eeeeee);\n    background-repeat: no-repeat;\n    background-size: 200px 100%;\n    border-radius: 2px;\n    display: inline-block;\n    line-height: 1;\n    width: 100%;\n\n    ${({ width }) => width != null &&\n    css `\n            width: ${width};\n        `}\n\n    ${({ block }) => !!block &&\n    css `\n            border-radius: 0;\n            display: block;\n        `}\n`;\nexport default Skeleton;\n","import { getIndexerClient } from '~/getters/getGraphClient';\nimport { GetStreamsDocument, } from '../generated/gql/indexer';\nimport { getNeighbors } from './getNeighbors';\nexport const defaultStreamStats = {\n    latency: undefined,\n    messagesPerSecond: undefined,\n    peerCount: undefined,\n};\nexport const getStreamStats = async (streamId) => {\n    const client = getIndexerClient(137);\n    if (!client) {\n        return defaultStreamStats;\n    }\n    const { data: { streams }, } = await client.query({\n        query: GetStreamsDocument,\n        variables: {\n            streamIds: [streamId],\n            first: 1,\n        },\n    });\n    const [stream = undefined] = streams.items;\n    if (!stream) {\n        return null;\n    }\n    const { messagesPerSecond, peerCount } = stream;\n    const latency = await calculateLatencyForStream(streamId, 137);\n    return {\n        latency,\n        messagesPerSecond,\n        peerCount,\n    };\n};\nexport async function calculateLatencyForStream(streamId, chainId) {\n    const neighbors = await getNeighbors({\n        streamId,\n        chainId,\n    });\n    const validRTTs = neighbors\n        .map((n) => n.rtt)\n        .filter((rtt) => typeof rtt === 'number' && rtt > 0);\n    // Calculate average one-way latency from neighbors with valid RTT.\n    // Latency is the average RTT of neighbors in the stream, divided by 2.\n    const latency = validRTTs.length > 0\n        ? validRTTs.reduce((sum, rtt) => sum + rtt, 0) / validRTTs.length / 2\n        : undefined;\n    return latency;\n}\n","import { getIndexerClient } from '~/getters/getGraphClient';\nimport { GetNeighborsDocument, } from '../generated/gql/indexer';\nexport async function getNeighbors(params) {\n    const pageSize = 1000;\n    const { node, streamId, streamPartitionId, chainId } = params;\n    const items = [];\n    const uniquenessGate = {};\n    let cursor = '0';\n    for (;;) {\n        const client = getIndexerClient(chainId);\n        if (!client) {\n            console.error('Could not get indexer client for chainId', chainId);\n            break;\n        }\n        const { data: { neighbors }, } = await client.query({\n            fetchPolicy: 'network-only',\n            query: GetNeighborsDocument,\n            variables: {\n                cursor,\n                node,\n                pageSize,\n                streamId,\n                streamPart: streamPartitionId,\n            },\n        });\n        for (const { nodeId1: a, nodeId2: b, streamPartId: finalStreamPartitionId, rtt, } of neighbors.items) {\n            const pair = [a, b].sort();\n            const key = pair.join('-');\n            if (uniquenessGate[key]) {\n                continue;\n            }\n            uniquenessGate[key] = true;\n            const [nodeId0, nodeId1] = pair;\n            items.push({\n                nodeId0,\n                nodeId1,\n                streamPartitionId: finalStreamPartitionId,\n                rtt: rtt ?? undefined,\n            });\n        }\n        if (!neighbors.cursor || neighbors.cursor === cursor) {\n            break;\n        }\n        cursor = neighbors.cursor;\n    }\n    return items;\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport Link from '~/shared/components/Link';\nimport { useMultipleStreamStatsQuery } from '~/hooks/useStreamStats';\nconst SingleBadge = styled.div.withConfig({ displayName: \"SingleBadge\", componentId: \"sc-1uo2220\" }) `\n    display: flex;\n    align-items: center;\n    font-size: 10px;\n    height: 15px;\n    line-height: 12px;\n    padding: 0 4px;\n    background-color: #0324ff;\n    background-color: ${({ theme }) => theme.backgroundColor};\n    color: white !important;\n\n    a,\n    a:link,\n    a:active,\n    a:focus,\n    a:hover,\n    a:visited {\n        color: white !important;\n    }\n\n    > * + * {\n        margin-left: 8px;\n    }\n`;\nconst BadgeContainer = styled.div.withConfig({ displayName: \"BadgeContainer\", componentId: \"sc-1cauijy\" }) `\n    align-items: center;\n    color: white !important;\n    display: flex;\n    cursor: default;\n    pointer-events: none;\n    user-select: none;\n    margin: 0.5em;\n\n    a& {\n        cursor: pointer;\n        pointer-events: auto;\n        text-decoration: none !important;\n    }\n\n    ${({ top, left, right, bottom }) => !!(top || left || right || bottom) &&\n    css `\n            position: absolute;\n        `}\n\n    ${({ bottom, top }) => !!bottom &&\n    !top &&\n    css `\n            bottom: 0;\n        `}\n\n    ${({ left }) => !!left &&\n    css `\n            left: 0;\n        `}\n\n    ${({ right, left }) => !!right &&\n    !left &&\n    css `\n            right: 0;\n        `}\n\n    ${({ top }) => !!top &&\n    css `\n            top: 0;\n        `}\n\n    > ${SingleBadge} {\n        margin-left: 1px;\n    }\n\n    ${SingleBadge}:first-child {\n        border-top-right-radius: 0;\n        border-bottom-right-radius: 0;\n        border-top-left-radius: 4px;\n        border-bottom-left-radius: 4px;\n    }\n\n    ${SingleBadge}:last-child {\n        border-top-right-radius: 4px;\n        border-bottom-right-radius: 4px;\n        border-top-left-radius: 0;\n        border-bottom-left-radius: 0;\n    }\n\n    ${SingleBadge}:only-child {\n        border-top-right-radius: 4px;\n        border-bottom-right-radius: 4px;\n        border-top-left-radius: 4px;\n        border-bottom-left-radius: 4px;\n    }\n`;\nconst DataUnionBadge = ({ memberCount, linkTo, linkHref, ...props }) => (React.createElement(BadgeContainer, { ...props },\n    React.createElement(SingleBadge, null, \"Data Union\"),\n    memberCount != null && (React.createElement(SingleBadge, null,\n        React.createElement(BadgeLink, { to: linkTo, href: linkHref }, memberCount),\n        \"\\u00A0 members\"))));\nconst BadgeLink = ({ ...props }) => React.createElement(Link, { ...props });\nconst StatsBadge = styled.div.withConfig({ displayName: \"StatsBadge\", componentId: \"sc-413ty4\" }) `\n    display: flex;\n    align-items: center;\n    padding: 4px 8px;\n    gap: 10px;\n    background: rgba(245, 245, 247, 0.6);\n    backdrop-filter: blur(13.3871px);\n    border-radius: 8px;\n\n    font-weight: 500;\n    font-size: 16px;\n    line-height: 24px;\n    color: #323232;\n\n    a,\n    a:link,\n    a:active,\n    a:focus,\n    a:hover,\n    a:visited {\n        color: white !important;\n    }\n\n    > * + * {\n        margin-left: 8px;\n    }\n`;\nconst StreamStatsBadge = ({ streamIds, ...props }) => {\n    const { data: stats, isLoading, error } = useMultipleStreamStatsQuery(streamIds);\n    if (error || isLoading) {\n        return null;\n    }\n    const messagesPerSecond = stats?.messagesPerSecond;\n    const formattedMsgRate = typeof messagesPerSecond === 'number' ? messagesPerSecond.toFixed(1) : 'N/A';\n    return (React.createElement(BadgeContainer, { ...props },\n        React.createElement(StatsBadge, null,\n            React.createElement(\"span\", null,\n                streamIds.length,\n                \" \",\n                streamIds.length === 1 ? 'Stream' : 'Streams'),\n            React.createElement(\"span\", null,\n                formattedMsgRate,\n                \" Msg/s\"))));\n};\nexport { DataUnionBadge, StreamStatsBadge };\n","import { useQuery } from '@tanstack/react-query';\nimport { getStreamStats } from '~/getters/getStreamStats';\nexport function useStreamStatsQuery(streamId) {\n    return useQuery({\n        queryKey: ['useStreamStatsQuery', streamId],\n        queryFn: async () => {\n            return getStreamStats(streamId);\n        },\n    });\n}\nexport function useMultipleStreamStatsQuery(streamIds) {\n    return useQuery({\n        queryKey: ['useMultipleStreamStatsQuery', streamIds],\n        queryFn: async () => {\n            const stats = (await Promise.all(streamIds.map(getStreamStats)));\n            return stats.reduce((acc, curr) => ({\n                // Take the maximum latency among all streams\n                latency: Math.max(acc.latency ?? -Infinity, curr.latency ?? -Infinity) === -Infinity ? undefined : Math.max(acc.latency ?? -Infinity, curr.latency ?? -Infinity),\n                messagesPerSecond: acc.messagesPerSecond + curr.messagesPerSecond,\n                peerCount: acc.peerCount + curr.peerCount,\n            }), {\n                latency: undefined,\n                messagesPerSecond: 0,\n                peerCount: 0,\n            });\n        },\n    });\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport Skeleton from '~/shared/components/Skeleton';\nimport { MEDIUM, REGULAR, MD } from '~/shared/utils/styled';\nconst Name = styled.div.withConfig({ displayName: \"Name\", componentId: \"sc-1dfjvw\" }) ``;\nconst Secondary = styled.div.withConfig({ displayName: \"Secondary\", componentId: \"sc-yjzfhu\" }) `\n    font-size: 16px;\n    font-weight: ${REGULAR};\n`;\nconst Description = styled(Secondary).withConfig({ displayName: \"Description\", componentId: \"sc-josvxj\" }) `\n    color: #323232;\n    overflow-x: hidden;\n    text-overflow: ellipsis;\n    font-weight: ${REGULAR};\n    padding-top: 8px;\n`;\nconst Label = styled(Secondary).withConfig({ displayName: \"Label\", componentId: \"sc-3e4eol\" }) `\n    text-align: right;\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-2xtpek\" }) `\n    color: #323232;\n    font-size: 18px;\n    font-weight: ${MEDIUM};\n    line-height: 24px;\n    padding-top: 16px;\n\n    ${({ label }) => label &&\n    css `\n            display: grid;\n            grid-template-columns: auto auto;\n            grid-gap: 0.5em;\n        `};\n\n    @media (min-width: ${MD}px) {\n        padding-top: 24px;\n    }\n`;\nconst Summary = ({ name, description, label, skeletonize, ...props }) => (React.createElement(Root, { ...props, label: label },\n    React.createElement(\"div\", null,\n        React.createElement(Name, null,\n            React.createElement(Skeleton, { disabled: !skeletonize }, name)),\n        !!description && (React.createElement(Description, null,\n            React.createElement(Skeleton, { disabled: !skeletonize, width: \"45%\" }, description)))),\n    !!label && (React.createElement(Label, null,\n        React.createElement(Skeleton, { disabled: !skeletonize, width: \"30%\" }, label)))));\nexport default Summary;\n","import React from 'react';\nimport { Img } from 'react-image';\nimport styled, { css } from 'styled-components';\nimport { getProjectImageUrl } from '~/getters';\nimport Link from '~/shared/components/Link';\nimport Logo from '~/shared/components/Logo';\nimport Rect from '~/shared/components/Rect';\nimport Skeleton from '~/shared/components/Skeleton';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { getImageCrossOrigin } from '~/utils/ipfs';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { DataUnionBadge, StreamStatsBadge } from './Badge';\nimport Summary from './Summary';\nconst Image = styled(Img).withConfig({ displayName: \"Image\", componentId: \"sc-1ne1cyd\" }) `\n    img& {\n        display: block;\n        object-fit: cover;\n    }\n`;\nconst Placeholder = styled.div.withConfig({ displayName: \"Placeholder\", componentId: \"sc-87kf1o\" }) `\n    background-image: linear-gradient(135deg, #0045ff 0%, #7200ee 100%);\n\n    ${Logo} {\n        height: auto;\n        left: 50%;\n        max-width: 32%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 80px;\n    }\n`;\nconst UnstyledThumbnail = ({ src, skeletonize, alt, ...props }) => !!src &&\n    (skeletonize ? (React.createElement(Image, { ...props, as: Skeleton, block: true })) : (React.createElement(Image, { ...props, alt: alt || undefined, src: src, \n        /**\n         * See `FallbackImage` for why both spellings are needed.\n         */\n        crossorigin: getImageCrossOrigin(src), crossOrigin: getImageCrossOrigin(src), loader: React.createElement(Image, { ...props, as: Skeleton, block: true }), unloader: React.createElement(Image, { ...props, as: Placeholder },\n            React.createElement(Logo, { color: \"black\", opacity: \"0.15\" })) })));\nconst TileThumbnail = styled(UnstyledThumbnail).withConfig({ displayName: \"TileThumbnail\", componentId: \"sc-1mq1rii\" }) `\n    height: 100%;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 100%;\n`;\nconst Tile = styled.div.withConfig({ displayName: \"Tile\", componentId: \"sc-1gj0bx5\" }) `\n    position: relative;\n\n    ${({ suppressHover }) => !suppressHover &&\n    css `\n            ${TileThumbnail} {\n                filter: brightness(100%);\n                transition: 240ms ease-out filter;\n            }\n\n            :hover ${TileThumbnail} {\n                filter: brightness(70%);\n                transition-duration: 40ms;\n            }\n        `}\n`;\nconst EditButton = styled(Link).withConfig({ displayName: \"EditButton\", componentId: \"sc-1qdvtvh\" }) `\n    border: none;\n    border-radius: 100%;\n    background-color: white;\n    position: absolute;\n    bottom: 15px;\n    right: 15px;\n    width: 40px;\n    height: 40px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    opacity: 0;\n    svg {\n        color: ${COLORS.primary};\n    }\n`;\nconst UnstyledTileImageContainer = ({ children, height, autoSize: autoSizeProp, ...props }) => {\n    const autoSize = autoSizeProp === true || height != null;\n    return (React.createElement(\"div\", { ...props },\n        children,\n        !!autoSize && React.createElement(Rect, { height: height })));\n};\nconst TileImageContainer = styled(UnstyledTileImageContainer).withConfig({ displayName: \"TileImageContainer\", componentId: \"sc-1a3zut4\" }) `\n    border-radius: 16px;\n    overflow: hidden;\n    position: relative;\n\n    & & {\n        border-radius: 0;\n        overflow: visible;\n    }\n\n    &.no-border-radius {\n        border-radius: 0;\n    }\n\n    &:hover {\n        ${EditButton} {\n            opacity: 1;\n        }\n    }\n`;\nconst ImageTile = ({ alt, height, showDataUnionBadge, src, noBorderRadius, ...props }) => (React.createElement(Tile, { ...props, suppressHover: true },\n    React.createElement(TileImageContainer, { autoSize: true, height: height, className: noBorderRadius ? 'no-border-radius' : '' },\n        React.createElement(TileThumbnail, { alt: alt || '', src: src || '' }),\n        !!showDataUnionBadge && React.createElement(DataUnionBadge, { top: true, left: true }))));\nfunction MarketplaceProductTile({ product, showDataUnionBadge, showEditButton, ...props }) {\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Tile, { ...props },\n        React.createElement(TileImageContainer, null,\n            React.createElement(Link, { to: R.projectOverview(product.id, routeOptions(chainKey)) },\n                React.createElement(TileImageContainer, { autoSize: true },\n                    React.createElement(TileThumbnail, { src: getProjectImageUrl({\n                            ...product.metadata,\n                            imageIpfsCid: product.metadata.imageIpfsCid || undefined,\n                        }) || '' }))),\n            React.createElement(StreamStatsBadge, { top: true, left: true, streamIds: product.streams }),\n            !!showDataUnionBadge && (React.createElement(DataUnionBadge, { top: true, right: true, linkTo: R.projectOverview(product.id, routeOptions(chainKey, undefined, 'stats')) })),\n            showEditButton && (React.createElement(EditButton, { to: R.projectEdit(product.id, routeOptions(chainKey)) },\n                React.createElement(SvgIcon, { name: 'pencilFull' })))),\n        React.createElement(Link, { to: R.projectOverview(product.id, routeOptions(chainKey)) },\n            React.createElement(Summary, { name: (product.metadata && product.metadata.name) || 'Untitled project', description: (product.metadata && product.metadata.creator) || '' }))));\n}\nexport { ImageTile, MarketplaceProductTile };\n","import React from 'react';\nimport styled, { keyframes } from 'styled-components';\nexport function DottedLoadingIndicator() {\n    return (React.createElement(DottedLoadingIndicatorRoot, null,\n        React.createElement(Left, null),\n        React.createElement(Dot, null),\n        React.createElement(Right, null)));\n}\nconst animation = keyframes `\n    0% {\n        transform: scale(1);\n    }\n\n    100% {\n        transform: scale(0);\n    }\n`;\nexport const DottedLoadingIndicatorRoot = styled.div.withConfig({ displayName: \"DottedLoadingIndicatorRoot\", componentId: \"sc-4z9k0y\" }) `\n    display: grid;\n    gap: 8px;\n    grid-template-columns: 16px 16px 16px;\n    margin: 0 auto;\n    width: max-content;\n`;\nconst Dot = styled.div.withConfig({ displayName: \"Dot\", componentId: \"sc-67n4hr\" }) `\n    animation: ${animation} 1s ease alternate infinite;\n    animation-delay: 0.2s;\n    background: #0052ec;\n    border-radius: 50%;\n    height: 16px;\n    width: 16px;\n`;\nconst Left = styled(Dot).withConfig({ displayName: \"Left\", componentId: \"sc-1e5uytz\" }) `\n    animation-delay: 0s;\n`;\nconst Right = styled(Dot).withConfig({ displayName: \"Right\", componentId: \"sc-1o30h4i\" }) `\n    animation-delay: 0.4s;\n`;\n","import React from 'react';\nimport { EmptyState } from '~/components/EmptyState';\nimport emptyStateIcon from '~/shared/assets/images/empty_state_icon.png';\nimport emptyStateIcon2x from '~/shared/assets/images/empty_state_icon@2x.png';\nimport { useCurrentChainFullName } from '~/utils/chains';\nexport default function NoProductsView({ noOwnProjects = false }) {\n    const fullChainName = useCurrentChainFullName();\n    return (React.createElement(EmptyState, { image: React.createElement(\"img\", { src: emptyStateIcon, srcSet: `${emptyStateIcon2x} 2x`, alt: \"Not found\" }) }, noOwnProjects ? (React.createElement(\"p\", null,\n        React.createElement(\"span\", null,\n            \"You haven't created any projects on the \",\n            fullChainName,\n            \" chain yet\"))) : (React.createElement(\"p\", null,\n        React.createElement(\"span\", null, \"We couldn't find anything to match your search\"),\n        React.createElement(\"small\", null,\n            \"You are on the \",\n            fullChainName,\n            \" chain. Please try some different keywords or switch chains.\")))));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { MarketplaceProductTile } from '~/shared/components/Tile';\nimport { DESKTOP, COLORS, TABLET, MAX_BODY_WIDTH, LAPTOP } from '~/shared/utils/styled';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { DottedLoadingIndicator, DottedLoadingIndicatorRoot, } from '~/components/DottedLoadingIndicator';\nimport NoProductsView from './NoProductsView';\nconst MarketplaceProjectRow = styled.div.withConfig({ displayName: \"MarketplaceProjectRow\", componentId: \"sc-264ptu\" }) `\n    display: grid;\n    grid-gap: 36px;\n    grid-template-columns: 1fr;\n    margin: 0;\n    min-height: 100px;\n\n    @media ${TABLET} {\n        grid-template-columns: 1fr 1fr;\n    }\n\n    @media ${LAPTOP} {\n        grid-template-columns: 1fr 1fr 1fr 1fr;\n    }\n\n    ${({ $fetching = false }) => $fetching &&\n    css `\n            opacity: 0.5;\n        `}\n`;\nconst listProjects = (projects, currentUserAddress, isFetching) => {\n    const isEditable = (projectId) => {\n        if (!currentUserAddress) {\n            return false;\n        }\n        const project = projects.find((p) => p.id === projectId);\n        if (project != null) {\n            const perm = project.permissions.find((permission) => permission.userAddress.toLowerCase() ===\n                currentUserAddress.toLowerCase());\n            if (perm != null) {\n                return perm.canEdit;\n            }\n            return false;\n        }\n        return false;\n    };\n    return (React.createElement(MarketplaceProjectRow, { \"$fetching\": isFetching }, projects.map((project) => (React.createElement(MarketplaceProductTile, { key: project.id, product: project, showDataUnionBadge: !!project.isDataUnion, showEditButton: isEditable(project.id) })))));\n};\nexport const ProjectsContainer = styled.div.withConfig({ displayName: \"ProjectsContainer\", componentId: \"sc-i8qn2b\" }) `\n    padding: 40px 30px 3.5em 30px;\n    background-color: ${COLORS.secondary};\n    max-width: ${MAX_BODY_WIDTH}px;\n    margin: 0 auto;\n\n    @media ${DESKTOP} {\n        padding: 72px 0 7em 0;\n    }\n`;\nexport function Projects({ projects, error, isFetching, loadProducts, hasMoreSearchResults, currentUserAddress, noOwnProjects = false, ...props }) {\n    return (React.createElement(Root, { ...props },\n        error ? React.createElement(Error, null, error.message) : null,\n        isFetching || projects.length > 0 ? (listProjects(projects, currentUserAddress, isFetching)) : (React.createElement(NoProductsView, { noOwnProjects: noOwnProjects })),\n        loadProducts && !isFetching && hasMoreSearchResults && (React.createElement(LoadMoreButton, { onClick: loadProducts, kind: \"primary2\" }, \"Load more\")),\n        isFetching && React.createElement(DottedLoadingIndicator, null)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1qmlimh\" }) `\n    ${DottedLoadingIndicatorRoot} {\n        margin-top: 1.5rem;\n    }\n`;\nconst Error = styled.div.withConfig({ displayName: \"Error\", componentId: \"sc-rjgtxr\" }) `\n    background: rgba(255, 25, 0, 0.4);\n    border-radius: 2px;\n    font-size: 0.9em;\n    padding: 1em 2em;\n`;\n","import React, { useState, useCallback, useMemo, useEffect } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nconst ModalContext = React.createContext({\n    closeModal: () => { },\n    modals: {},\n    openModal: async () => { },\n});\nfunction useModalContext(path) {\n    const [modals, setModals] = useState({});\n    const isMounted = useIsMounted();\n    const openModal = useCallback((modalId, value = true) => {\n        if (!isMounted()) {\n            return Promise.resolve();\n        }\n        if (modals[modalId] && typeof modals[modalId].reject === 'function') {\n            modals[modalId].reject();\n        }\n        return new Promise((resolve, reject) => {\n            setModals(({ modals: prevModals }) => ({\n                ...prevModals,\n                [modalId]: {\n                    resolve,\n                    reject,\n                    value,\n                },\n            }));\n        });\n    }, [modals, isMounted]);\n    const closeModal = useCallback((modalId, value = undefined) => {\n        if (!isMounted()) {\n            return;\n        }\n        if (modals[modalId] && typeof modals[modalId].resolve === 'function') {\n            modals[modalId].resolve(value);\n        }\n        setModals(({ modals: prevModals }) => {\n            const nextModals = { ...prevModals };\n            delete nextModals[modalId];\n            return nextModals;\n        });\n    }, [modals, isMounted]);\n    // close all modals on route change\n    useEffect(() => () => {\n        if (!isMounted()) {\n            return;\n        }\n        setModals((prevModals) => {\n            Object.keys(prevModals).forEach((modalId) => {\n                if (prevModals[modalId].reject &&\n                    typeof prevModals[modalId].reject === 'function') {\n                    prevModals[modalId].reject();\n                }\n            });\n            return {};\n        });\n    }, [isMounted, path]);\n    return useMemo(() => ({\n        modals,\n        openModal,\n        closeModal,\n    }), [modals, openModal, closeModal]);\n}\nconst ModalContextProvider = ({ children }) => {\n    const { pathname } = useLocation();\n    return (React.createElement(ModalContext.Provider, { value: useModalContext(pathname) }, children || null));\n};\nexport { ModalContextProvider as Provider, ModalContext as Context };\n","import { useContext, useMemo } from 'react';\nimport { Context as ModalContext } from '~/shared/contexts/ModalApi';\nexport default function useModal(modalId) {\n    const { modals, openModal, closeModal } = useContext(ModalContext);\n    const isOpen = !!modals[modalId];\n    const value = isOpen && modals[modalId].value;\n    const api = useMemo(() => ({\n        open: (values) => openModal(modalId, values),\n        close: (values) => closeModal(modalId, values),\n    }), [openModal, closeModal, modalId]);\n    return useMemo(() => ({\n        modalId,\n        isOpen,\n        api,\n        value,\n    }), [value, modalId, isOpen, api]);\n}\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useMemo, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport openDataImage from '~/marketplace/assets/open-data.png';\nimport openDataImage2x from '~/marketplace/assets/open-data@2x.png';\nimport paidDataImage from '~/marketplace/assets/paid-data.png';\nimport paidDataImage2x from '~/marketplace/assets/paid-data@2x.png';\nimport dataUnionImage from '~/marketplace/assets/product_dataunion.png';\nimport dataUnionImage2x from '~/marketplace/assets/product_dataunion@2x.png';\nimport { getPagedStreams } from '~/services/streams';\nimport { Radio } from '~/shared/components/Radio';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType } from '~/shared/types';\nimport { COLORS, DESKTOP, REGULAR } from '~/shared/utils/styled';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1k01pp0\" }) `\n    color: #323232;\n    background-color: white;\n    padding: 60px;\n`;\nconst PageTitleContainer = styled.div.withConfig({ displayName: \"PageTitleContainer\", componentId: \"sc-1a4ta78\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n`;\nconst PageTitle = styled.div.withConfig({ displayName: \"PageTitle\", componentId: \"sc-1fkakxa\" }) `\n    font-size: 24px;\n    letter-spacing: 0;\n    line-height: 24px;\n`;\nconst ProductChoices = styled.div.withConfig({ displayName: \"ProductChoices\", componentId: \"sc-5wjmgj\" }) `\n    margin-top: 6.25em;\n    display: grid;\n    grid-template-columns: auto;\n    grid-template-rows: auto;\n    grid-row-gap: 24px;\n    min-width: 600px;\n    @media (${DESKTOP}) {\n        grid-template-columns: 308px 308px 308px;\n        grid-template-rows: auto;\n        grid-column-gap: 24px;\n    }\n`;\nconst Product = styled.button.withConfig({ displayName: \"Product\", componentId: \"sc-qolz2u\" }) `\n    display: grid;\n    grid-row-gap: 1px;\n    box-shadow: 0 0 10px 0 #00000026;\n    cursor: pointer;\n    border: none;\n    background-color: transparent;\n    border-radius: 8px;\n    grid-template-columns: 20px auto 50px;\n    grid-template-rows: auto;\n    padding: 10px 20px;\n    align-items: center;\n    @media (${DESKTOP}) {\n        padding: 0;\n        grid-template-columns: auto;\n        grid-template-rows: auto auto auto;\n    }\n\n    &:disabled {\n        opacity: 0.6;\n        cursor: default;\n    }\n`;\nconst ProductTitle = styled.div.withConfig({ displayName: \"ProductTitle\", componentId: \"sc-36ndzh\" }) `\n    line-height: 16px;\n    font-size: 18px;\n    letter-spacing: 0;\n    font-weight: ${REGULAR};\n    color: ${COLORS.primary};\n    margin: 24px 0 20px 20px;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    text-align: left;\n    @media (${DESKTOP}) {\n        margin: 30px 0 40px;\n        text-align: center;\n        grid-column-start: 1;\n        grid-column-end: 1;\n        height: 40px;\n        align-items: center;\n        display: flex;\n        justify-content: center;\n    }\n`;\nconst ProductImage = styled.div.withConfig({ displayName: \"ProductImage\", componentId: \"sc-5tnxw6\" }) `\n    height: 50px;\n    grid-column-start: 3;\n    grid-column-end: 3;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    @media (${DESKTOP}) {\n        height: 160px;\n        margin: 27px 0;\n        grid-column-start: 1;\n        grid-column-end: 1;\n        grid-row-start: 2;\n        grid-row-end: 2;\n    }\n\n    > img {\n        margin: 0 auto;\n        height: 50px;\n        width: auto;\n        @media (${DESKTOP}) {\n            height: 140px;\n        }\n    }\n`;\nconst RadioWrap = styled.div.withConfig({ displayName: \"RadioWrap\", componentId: \"sc-1o987iy\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin: 20px auto;\n    grid-column-start: 1;\n    grid-column-end: 1;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    @media (${DESKTOP}) {\n        grid-row-start: 3;\n        grid-row-end: 3;\n        margin: 40px auto;\n    }\n`;\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-fkm3ae\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 0.5rem;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n\n    &:disabled {\n        opacity: 0.2;\n        cursor: not-allowed;\n    }\n\n    & > svg {\n        width: 14px;\n        height: 14px;\n    }\n`;\nconst NoStreamsWarningBox = styled.div.withConfig({ displayName: \"NoStreamsWarningBox\", componentId: \"sc-age1ag\" }) `\n    background-color: ${COLORS.warning};\n    padding: 12px;\n    color: ${COLORS.primaryLight};\n    margin-top: 24px;\n`;\nconst ButtonContainer = styled.div.withConfig({ displayName: \"ButtonContainer\", componentId: \"sc-t2ye67\" }) `\n    display: flex;\n    justify-content: flex-end;\n    margin-top: 40px;\n`;\nexport const ProjectTypeChooser = ({ className, onClose }) => {\n    const [selectedProductType, setSelectedProductType] = useState();\n    const chainKey = useCurrentChainKey();\n    const link = useMemo(() => {\n        if (!selectedProductType) {\n            return null;\n        }\n        return R.project('new', routeOptions(chainKey, { type: selectedProductType }));\n    }, [selectedProductType, chainKey]);\n    const gotAnyStreams = useGotAnyStreams();\n    return (React.createElement(Root, { className: className },\n        React.createElement(PageTitleContainer, null,\n            React.createElement(PageTitle, null, \"Choose your project type\"),\n            React.createElement(CloseButton, { type: \"button\", onClick: onClose },\n                React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n        React.createElement(ProductChoices, null,\n            React.createElement(Product, { onClick: () => setSelectedProductType(ProjectType.OpenData) },\n                React.createElement(ProductTitle, null, \"Open data\"),\n                React.createElement(ProductImage, null,\n                    React.createElement(\"img\", { src: openDataImage, srcSet: `${openDataImage2x} 2x`, alt: \"Open Data\" })),\n                React.createElement(RadioWrap, null,\n                    React.createElement(Radio, { id: 'openData', name: 'productType', size: 'large', label: '', value: ProjectType.OpenData, onChange: setSelectedProductType, checked: selectedProductType === ProjectType.OpenData }))),\n            React.createElement(Product, { onClick: () => setSelectedProductType(ProjectType.PaidData) },\n                React.createElement(ProductTitle, null, \"Paid data\"),\n                React.createElement(ProductImage, null,\n                    React.createElement(\"img\", { src: paidDataImage, srcSet: `${paidDataImage2x} 2x`, alt: \"Paid Data\" })),\n                React.createElement(RadioWrap, null,\n                    React.createElement(Radio, { id: 'paidData', name: 'productType', size: 'large', label: '', value: ProjectType.PaidData, onChange: setSelectedProductType, checked: selectedProductType === ProjectType.PaidData }))),\n            React.createElement(Product, { disabled: true, onClick: () => setSelectedProductType(ProjectType.DataUnion), title: 'Data Union' },\n                React.createElement(ProductTitle, null, \"Data Union\"),\n                React.createElement(ProductImage, null,\n                    React.createElement(\"img\", { src: dataUnionImage, srcSet: `${dataUnionImage2x} 2x`, alt: \"Data Union\" })),\n                React.createElement(RadioWrap, null,\n                    React.createElement(Radio, { id: 'dataUnion', name: 'productType', size: 'large', label: '', value: ProjectType.DataUnion, onChange: setSelectedProductType, checked: selectedProductType === ProjectType.DataUnion })))),\n        gotAnyStreams === false && (React.createElement(NoStreamsWarningBox, null,\n            \"You have not created any streams yet. Please\",\n            ' ',\n            React.createElement(Link, { onClick: onClose, to: R.stream('new', routeOptions(chainKey)) }, \"create a stream\"),\n            ' ',\n            \"to get started. For help creating streams, see the\",\n            ' ',\n            React.createElement(\"a\", { href: R.docs() }, \"docs\"),\n            \".\")),\n        React.createElement(ButtonContainer, null, gotAnyStreams === false || !link ? (React.createElement(Button, { disabled: true }, \"Start building\")) : (React.createElement(Button, { as: Link, to: link, onClick: onClose }, \"Start building\")))));\n};\nfunction useGotAnyStreams() {\n    const wallet = useWalletAccount() || '';\n    const currentChainId = useCurrentChainId();\n    const { data: result = false, isLoading } = useQuery({\n        queryKey: ['useGotAnyStreams', currentChainId, wallet],\n        async queryFn() {\n            if (!wallet) {\n                return false;\n            }\n            try {\n                return ((await getPagedStreams(currentChainId, 1, undefined, wallet, undefined, undefined, undefined, { force: true })).streams.length > 0);\n            }\n            catch (_) { }\n            return false;\n        },\n    });\n    return isLoading ? void 0 : result;\n}\n","import React from 'react';\nconst defaultContext = {\n    isModalOpen: false,\n    registerModal: undefined,\n    unregisterModal: undefined,\n};\nconst ModalPortalContext = React.createContext(defaultContext);\nclass ModalPortalProvider extends React.Component {\n    constructor() {\n        super(...arguments);\n        this.state = {\n            isModalOpen: false,\n            registerModal: this.registerModal.bind(this),\n            unregisterModal: this.unregisterModal.bind(this),\n        };\n        this.count = 0;\n    }\n    registerModal() {\n        this.count = this.count + 1;\n        this.setState({\n            isModalOpen: true,\n        });\n    }\n    unregisterModal() {\n        this.count = this.count - 1;\n        if (this.count < 0) {\n            throw new Error('Negative number of open modals. Something went surprisingly wrong.');\n        }\n        this.setState({\n            isModalOpen: this.count !== 0,\n        });\n    }\n    render() {\n        const { children } = this.props;\n        const { isModalOpen, registerModal, unregisterModal } = this.state;\n        return (React.createElement(\"div\", { id: \"app\" },\n            React.createElement(ModalPortalContext.Provider, { value: {\n                    isModalOpen,\n                    registerModal,\n                    unregisterModal,\n                } }, children)));\n    }\n}\nexport { ModalPortalContext as Context, ModalPortalProvider as Provider };\n","export default class NoModalRootError extends Error {\n    constructor() {\n        super('Root element for modals is missing.');\n        this.__proto__ = NoModalRootError.prototype; // eslint-disable-line no-proto\n    }\n}\n","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport { Context } from '~/shared/contexts/ModalPortal';\nimport NoModalRootError from '~/shared/errors/NoModalRootError';\nclass ModalPortal extends React.Component {\n    constructor() {\n        super(...arguments);\n        this.root = document.createElement('div');\n    }\n    componentDidMount() {\n        this.modalRoot = document.getElementById('modal-root');\n        const { registerModal } = this.context || {};\n        if (!this.modalRoot) {\n            throw new NoModalRootError();\n        }\n        this.modalRoot.appendChild(this.root);\n        registerModal?.();\n    }\n    componentWillUnmount() {\n        const { unregisterModal } = this.context || {};\n        const { modalRoot, root } = this;\n        modalRoot?.removeChild(root);\n        unregisterModal?.();\n    }\n    render() {\n        return createPortal(this.props.children, this.root);\n    }\n}\nModalPortal.contextType = Context;\nexport default ModalPortal;\n","import ReactModal2 from 'react-modal2';\n// See: https://github.com/cloudflare/react-modal2#accessibility\nReactModal2.getApplicationElement = () => document.getElementById('app');\n","import React from 'react';\nimport styled, { createGlobalStyle, css } from 'styled-components';\nimport ReactModal2 from 'react-modal2';\nimport './accessibility';\nconst Fullpage = styled.div.withConfig({ displayName: \"Fullpage\", componentId: \"sc-cv5ic5\" }) `\n    position: fixed;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    background-color: rgba(239, 239, 239, 0.98);\n    z-index: 10;\n\n    ${({ noScroll }) => !noScroll &&\n    css `\n            overflow-y: scroll;\n        `}\n`;\nconst NoScrollStyles = createGlobalStyle `\n    body {\n        overflow: hidden !important;\n        overflow-y: hidden !important;\n        overflow-x: hidden !important;\n    }\n`;\nconst ModalDialog = ({ onClose, children, className, backdropClassName, fullpage, noScroll = false, ...otherProps }) => (React.createElement(ReactModal2, { onClose: onClose, backdropClassName: backdropClassName, modalClassName: className, ...otherProps },\n    React.createElement(NoScrollStyles, null),\n    fullpage ? React.createElement(Fullpage, { noScroll: noScroll }, children) : children));\nexport default ModalDialog;\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport useModal from '~/shared/hooks/useModal';\nimport { ProjectTypeChooser } from '~/marketplace/components/ProjectTypeChooser';\nimport ModalPortal from '~/shared/components/ModalPortal';\nimport ModalDialog from '~/shared/components/ModalDialog';\nconst StyledProjectTypeChooser = styled(ProjectTypeChooser).withConfig({ displayName: \"StyledProjectTypeChooser\", componentId: \"sc-wgfmea\" }) `\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n`;\nconst CreateProjectModal = ({ api }) => {\n    const onClose = useCallback(() => {\n        api.close();\n    }, [api]);\n    return (React.createElement(ModalPortal, null,\n        React.createElement(ModalDialog, { onClose: onClose, fullpage: true },\n            React.createElement(StyledProjectTypeChooser, { onClose: onClose }))));\n};\nconst CreateProjectModalWrap = () => {\n    const { api, isOpen } = useModal('marketplace.createProduct');\n    if (!isOpen) {\n        return null;\n    }\n    return React.createElement(CreateProjectModal, { api: api });\n};\nexport default CreateProjectModalWrap;\n","import { keepPreviousData, useInfiniteQuery } from '@tanstack/react-query';\nimport isEqual from 'lodash/isEqual';\nimport React, { useReducer } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport ActionBar, { isOwnedTabOption, isTabOption, TabOption, } from '~/components/ActionBar';\nimport Layout from '~/components/Layout';\nimport { MaxSearchPhraseLength, Minute } from '~/consts';\nimport { Projects, ProjectsContainer } from '~/marketplace/components/Projects';\nimport CreateProjectModal from '~/marketplace/containers/CreateProjectModal';\nimport { getProjects, getProjectsByText } from '~/services/projects';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport useModal from '~/shared/hooks/useModal';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nconst PAGE_SIZE = 20;\nconst DEFAULT_TAB = TabOption.Any;\nconst DEFAULT_SEARCH = '';\nconst DEFAULT_TYPE = '';\nfunction filterReducer(state, partial) {\n    const proposalState = { ...state, ...partial };\n    proposalState.search = proposalState.search.slice(0, MaxSearchPhraseLength);\n    return isEqual(state, proposalState) ? state : proposalState;\n}\nexport default function ProjectListingPage() {\n    const [params] = useSearchParams();\n    const DefaultFilter = {\n        search: params.get('search') || DEFAULT_SEARCH,\n        type: params.get('type') || DEFAULT_TYPE,\n    };\n    const [filter, setFilter] = useReducer(filterReducer, DefaultFilter);\n    const account = useWalletAccount();\n    const tab = params.get('tab');\n    const selectedTab = isTabOption(tab) ? tab : DEFAULT_TAB;\n    const owner = isOwnedTabOption(selectedTab) ? account : undefined;\n    useUrlParams([\n        {\n            param: 'tab',\n            value: selectedTab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'search',\n            value: filter.search,\n            defaultValue: DEFAULT_SEARCH,\n        },\n        {\n            param: 'type',\n            value: filter.type,\n            defaultValue: DEFAULT_TYPE,\n        },\n    ]);\n    const { api: createProductModal } = useModal('marketplace.createProduct');\n    const currentChainId = useCurrentChainId();\n    const query = useInfiniteQuery({\n        queryKey: ['projects', currentChainId, owner, filter.search, filter.type],\n        queryFn({ pageParam: skip }) {\n            const { search, type: projectType } = filter;\n            const params = {\n                chainId: currentChainId,\n                first: PAGE_SIZE,\n                owner,\n                projectType,\n                skip,\n            };\n            if (search) {\n                return getProjectsByText(search, params);\n            }\n            return getProjects(params);\n        },\n        initialPageParam: 0,\n        getNextPageParam(lastPage, pages) {\n            return lastPage.hasNextPage ? pages.flatMap((p) => p.projects).length : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n    const noOwnProjects = !!owner && !filter.search && !filter.type;\n    return (React.createElement(Layout, { pageTitle: \"Projects\" },\n        React.createElement(ActionBar, { filter: filter, onFilterChange: setFilter, onCreateProject: () => void createProductModal.open() }),\n        React.createElement(LoadingIndicator, { loading: query.isLoading || query.isFetching || query.isFetchingNextPage }),\n        React.createElement(CreateProjectModal, null),\n        React.createElement(ProjectsContainer, null,\n            React.createElement(Projects, { projects: query.data?.pages.flatMap((d) => d.projects) ?? [], currentUserAddress: account, error: query.error, isFetching: query.status === 'pending', loadProducts: () => void query.fetchNextPage(), hasMoreSearchResults: query.hasNextPage, noOwnProjects: noOwnProjects }))));\n}\n","import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport uniqueId from 'lodash/uniqueId';\nimport { Minute, address0 } from '~/consts';\nimport { GetGlobalStreamsStatsDocument, GetStreamsDocument as GetIndexerStreamsDocument, StreamOrderBy as IndexerOrderBy, OrderDirection as IndexerOrderDirection, } from '~/generated/gql/indexer';\nimport { GetPagedStreamsDocument, OrderDirection as GraphOrderDirection, Stream_OrderBy, } from '~/generated/gql/network';\nimport { getDescription } from '~/getters';\nimport { getGraphClient, getIndexerClient } from '~/getters/getGraphClient';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { getChainConfigExtension, useCurrentChainId } from '~/utils/chains';\nexport var StreamsTabOption;\n(function (StreamsTabOption) {\n    StreamsTabOption[\"All\"] = \"all\";\n    StreamsTabOption[\"Your\"] = \"your\";\n})(StreamsTabOption || (StreamsTabOption = {}));\nexport function isStreamsTabOption(value) {\n    return value === StreamsTabOption.All || value === StreamsTabOption.Your;\n}\nexport async function getStreamsFromIndexer(chainId, options = {}) {\n    const { force = false, orderBy, orderDirection, owner, pageParam: cursor, pageSize, search, streamIds: streamIdsOption, } = options;\n    const client = getIndexerClient(chainId);\n    if (!client) {\n        return {\n            hasNextPage: false,\n            nextPageParam: null,\n            pageId: uniqueId('StreamsPage-'),\n            source: 'indexer',\n            streams: [],\n        };\n    }\n    const streamIds = !owner || owner === address0\n        ? streamIdsOption\n        : await (async () => {\n            /**\n             * Indexer keeps track of stream owners but have no information on secondary\n             * permissions. Here we ask the regular graph for stream ids for the current\n             * address and use them to query the indexer. Hacky.\n             */\n            try {\n                const where = {\n                    permissions_: {\n                        stream_contains_nocase: search,\n                        userId: owner,\n                    },\n                };\n                if (!where.permissions_?.stream_contains_nocase) {\n                    delete where.permissions_?.stream_contains_nocase;\n                }\n                const { data: { streams: result }, } = await getGraphClient(chainId).query({\n                    query: GetPagedStreamsDocument,\n                    variables: {\n                        first: 1000,\n                        where,\n                    },\n                    fetchPolicy: 'network-only',\n                });\n                return result.map(({ id }) => id);\n            }\n            catch (_) {\n                return [];\n            }\n        })();\n    const { data: { streams: result }, } = await client.query({\n        fetchPolicy: force ? 'network-only' : undefined,\n        query: GetIndexerStreamsDocument,\n        variables: {\n            streamIds,\n            first: pageSize,\n            orderBy: orderBy === 'mps'\n                ? IndexerOrderBy.MessagesPerSecond\n                : orderBy === 'peerCount'\n                    ? IndexerOrderBy.PeerCount\n                    : orderBy === 'bps'\n                        ? IndexerOrderBy.BytesPerSecond\n                        : undefined,\n            orderDirection: orderDirection === 'asc'\n                ? IndexerOrderDirection.Asc\n                : orderDirection === 'desc'\n                    ? IndexerOrderDirection.Desc\n                    : undefined,\n            search,\n            owner: undefined,\n            cursor,\n        },\n    });\n    const streams = result.items.map(({ id, bytesPerSecond, messagesPerSecond, peerCount, ...s }) => ({\n        bytesPerSecond,\n        description: s.description || '',\n        id,\n        messagesPerSecond,\n        peerCount,\n        publisherCount: s.publisherCount || undefined,\n        subscriberCount: s.subscriberCount || undefined,\n    }));\n    return {\n        hasNextPage: result.cursor != null,\n        nextPageParam: result.cursor || null,\n        pageId: uniqueId('StreamsPage-'),\n        source: 'indexer',\n        streams,\n    };\n}\nasync function getStreamsFromGraph(chainId, options = {}) {\n    const { force = false, orderBy, orderDirection: orderDirectionParam, owner, pageParam: lastId, pageSize = 10, search, streamIds, } = options;\n    const orderOperator = orderDirectionParam === 'asc' ? 'gt' : 'lt';\n    const orderDirection = orderDirectionParam === 'asc'\n        ? GraphOrderDirection.Asc\n        : orderDirectionParam === 'desc'\n            ? GraphOrderDirection.Desc\n            : undefined;\n    const where = {\n        permissions_: {\n            stream_contains_nocase: search,\n            userId: owner,\n        },\n        [`id_${orderOperator}`]: lastId,\n        id_in: streamIds,\n    };\n    if (!where.permissions_?.stream_contains_nocase) {\n        delete where.permissions_?.stream_contains_nocase;\n    }\n    if (!where.permissions_?.userId) {\n        delete where.permissions_?.userId;\n    }\n    if (Object.keys(where.permissions_ || {}).length === 0) {\n        delete where.permissions_;\n    }\n    if (where[`id_${orderOperator}`] == null) {\n        delete where[`id_${orderOperator}`];\n    }\n    if (where.id_lt === '0') {\n        delete where.id_lt;\n    }\n    if (!where.id_in) {\n        delete where.id_in;\n    }\n    const { data: { streams: result }, } = await getGraphClient(chainId).query({\n        query: GetPagedStreamsDocument,\n        variables: {\n            first: pageSize + 1,\n            orderBy: orderBy === 'id' ? Stream_OrderBy.Id : undefined,\n            orderDirection,\n            where,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    const streams = result.map((s) => {\n        const { publisherCount, subscriberCount } = getStatsFromPermissions(s.permissions?.map((p) => ({\n            ...p,\n            userAddress: p.userId, // We need to add this deprecated field for now\n        })) || []);\n        return {\n            bytesPerSecond: undefined,\n            description: getDescription(s),\n            id: s.id,\n            messagesPerSecond: undefined,\n            peerCount: undefined,\n            publisherCount,\n            subscriberCount,\n        };\n    });\n    return {\n        hasNextPage: streams.length > pageSize,\n        nextPageParam: streams.length ? streams[streams.length - 1].id : null,\n        pageId: uniqueId('StreamsPage-'),\n        source: 'graph',\n        streams,\n    };\n}\nexport function useStreamsQuery(options) {\n    const { orderBy, orderDirection, pageSize = 10, search, tab, streamIds } = options;\n    const account = useWalletAccount();\n    const chainId = useCurrentChainId();\n    return useInfiniteQuery({\n        queryKey: [\n            'useStreamsQuery',\n            chainId,\n            account,\n            orderBy,\n            orderDirection,\n            pageSize,\n            search,\n            tab,\n            ...(streamIds || []),\n        ],\n        queryFn: async ({ pageParam }) => {\n            const owner = tab === StreamsTabOption.Your ? account || address0 : undefined;\n            const getter = isIndexerColumn(chainId, orderBy)\n                ? getStreamsFromIndexer\n                : getStreamsFromGraph;\n            const { streams, nextPageParam, hasNextPage, source, pageId } = await getter(chainId, {\n                force: true,\n                orderBy,\n                orderDirection,\n                owner: owner?.toLowerCase(),\n                pageParam,\n                pageSize,\n                search: search?.toLowerCase() || undefined,\n                streamIds,\n            });\n            return {\n                hasNextPage,\n                nextPageParam,\n                pageId,\n                source,\n                streams,\n            };\n        },\n        initialPageParam: '0',\n        getNextPageParam: ({ hasNextPage, nextPageParam }) => hasNextPage ? nextPageParam : null,\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nexport function isIndexerColumn(chainId, orderBy) {\n    if (!getChainConfigExtension(chainId).streamIndexerUrl) {\n        return false;\n    }\n    return orderBy === 'mps' || orderBy === 'peerCount' || orderBy === 'bps';\n}\nfunction getStatsFromPermissions(permissions) {\n    let subscriberCount = 0;\n    let publisherCount = 0;\n    permissions.forEach((perm) => {\n        if (perm.userId === address0) {\n            /**\n             * If stream has public permissions (zero address), return `undefined`\n             * for counts. It means anyone can publish and subscribe.\n             */\n            if (perm.subscribeExpiration >= Math.round(Date.now() / 1000)) {\n                subscriberCount = undefined;\n            }\n            if (perm.publishExpiration >= Math.round(Date.now() / 1000)) {\n                publisherCount = undefined;\n            }\n        }\n        if (perm.subscribeExpiration >= Math.round(Date.now() / 1000) &&\n            subscriberCount != null) {\n            subscriberCount += 1;\n        }\n        if (perm.publishExpiration >= Math.round(Date.now() / 1000) &&\n            publisherCount != null) {\n            publisherCount += 1;\n        }\n    });\n    return {\n        subscriberCount,\n        publisherCount,\n    };\n}\nexport function useGlobalStreamStatsQuery() {\n    const chainId = useCurrentChainId();\n    return useQuery({\n        queryKey: ['useGlobalStreamStatsQuery', chainId],\n        queryFn: async () => {\n            const client = getIndexerClient(chainId);\n            if (!client) {\n                return null;\n            }\n            try {\n                const result = await client.query({\n                    query: GetGlobalStreamsStatsDocument,\n                });\n                const { bytesPerSecond, messagesPerSecond, streamCount } = result.data.summary;\n                return {\n                    bytesPerSecond,\n                    messagesPerSecond,\n                    streamCount,\n                };\n            }\n            catch (e) {\n                console.warn('Fetching global streams stats failed', e);\n            }\n            return null;\n        },\n    });\n}\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { StreamIdCell } from '~/components/Table';\nimport { Minute } from '~/consts';\nimport { getStreamsFromIndexer, isIndexerColumn, } from '~/hooks/streams';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function QueriedStreamsTable({ noDataFirstLine, noDataSecondLine, onOrderChange, orderBy = 'mps', orderDirection, query, }) {\n    const pages = query.data?.pages || [];\n    const streams = pages.flatMap((d) => d.streams) || [];\n    const [streamStats, setStreamStats] = useState({});\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const indexerQueryErrored = query.isError && isIndexerColumn(chainId, orderBy);\n    const onOrderChangeRef = useRef(onOrderChange);\n    if (onOrderChangeRef.current !== onOrderChange) {\n        onOrderChangeRef.current = onOrderChange;\n    }\n    useEffect(function fallbackToGraphOnIndexerError() {\n        if (!indexerQueryErrored) {\n            return;\n        }\n        onOrderChangeRef.current?.('id', 'asc');\n    }, [indexerQueryErrored]);\n    return (React.createElement(React.Fragment, null,\n        pages.map((page) => (React.createElement(StreamStatsLoader, { key: page.pageId, page: page, onStats: (stats) => {\n                setStreamStats((current) => ({\n                    ...current,\n                    ...stats,\n                }));\n            } }))),\n        React.createElement(ScrollTableCore, { noDataFirstLine: noDataFirstLine, noDataSecondLine: noDataSecondLine, elements: streams, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: (orderBy) => {\n                onOrderChange?.(orderBy);\n            }, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, columns: [\n                {\n                    key: 'id',\n                    displayName: 'Stream ID',\n                    isSticky: true,\n                    sortable: true,\n                    valueMapper: ({ id, description }) => (React.createElement(StreamIdCell, { streamId: id, description: description || '' })),\n                },\n                {\n                    key: 'peerCount',\n                    displayName: 'Nodes',\n                    sortable: true,\n                    valueMapper: ({ id, peerCount = streamStats[id]?.peerCount }) => peerCount ?? '-',\n                },\n                {\n                    key: 'mps',\n                    displayName: 'Msg/s',\n                    sortable: true,\n                    valueMapper: ({ id, messagesPerSecond: mps = streamStats[id]?.messagesPerSecond, }) => mps ?? '-',\n                },\n                {\n                    key: 'bps',\n                    displayName: 'KB/s',\n                    sortable: true,\n                    valueMapper: ({ id, bytesPerSecond: bps = streamStats[id]?.bytesPerSecond, }) => (bps == null ? '-' : (bps / 1024).toFixed(2)),\n                },\n                {\n                    key: 'access',\n                    displayName: 'Access',\n                    valueMapper: ({ subscriberCount }) => subscriberCount == null ? 'Public' : 'Private',\n                },\n                {\n                    key: 'publishers',\n                    displayName: 'Publishers',\n                    valueMapper: ({ publisherCount = '∞' }) => publisherCount,\n                },\n                {\n                    key: 'subscribers',\n                    displayName: 'Subscribers',\n                    valueMapper: ({ subscriberCount = '∞' }) => subscriberCount,\n                },\n            ], linkMapper: (element) => R.stream(element.id, routeOptions(chainKey)) }),\n        query.hasNextPage && (React.createElement(LoadMoreButton, { disabled: query.isLoading || query.isFetching, onClick: () => {\n                query.fetchNextPage();\n            }, kind: \"primary2\" }, \"Load more\"))));\n}\nfunction StreamStatsLoader({ onStats, page }) {\n    const chainId = useCurrentChainId();\n    const streamIdsRef = useRef(page.streams.map(({ id }) => id));\n    const { data: result } = useQuery({\n        queryKey: ['StreamStatsLoader.statsQuery', chainId, page.pageId, page.source],\n        queryFn: async () => {\n            if (page.source === 'indexer') {\n                return {};\n            }\n            try {\n                const { streams } = await getStreamsFromIndexer(chainId, {\n                    force: true,\n                    pageSize: Math.min(1000, streamIdsRef.current.length),\n                    streamIds: streamIdsRef.current,\n                });\n                const stats = {};\n                for (const { bytesPerSecond, id, messagesPerSecond, peerCount, } of streams) {\n                    stats[id] = {\n                        bytesPerSecond,\n                        messagesPerSecond,\n                        peerCount,\n                    };\n                }\n                return stats;\n            }\n            catch (_) {\n                // ¯\\_(ツ)_/¯\n            }\n            return {};\n        },\n        staleTime: 5 * Minute,\n    });\n    const onStatsRef = useRef(onStats);\n    if (onStatsRef.current !== onStats) {\n        onStatsRef.current = onStats;\n    }\n    useEffect(function triggerOnStatsOnNonFalsyResult() {\n        if (result) {\n            onStatsRef.current?.(result);\n        }\n    }, [result]);\n    return React.createElement(React.Fragment, null);\n}\n","import React, { useMemo } from 'react';\nexport function TermsOfUse({ termsUrl, termsName, ...flags }) {\n    const entries = Object.entries(flags);\n    const permitted = entries.filter(([, flag]) => flag).map(([name]) => name);\n    const notPermitted = entries.filter(([, flag]) => !flag).map(([name]) => name);\n    const permittedStr = useMemo(() => getTermStrings(permitted), [permitted]);\n    const notPermittedStr = useMemo(() => getTermStrings(notPermitted), [notPermitted]);\n    return (React.createElement(React.Fragment, null,\n        (permitted.length > 0 || notPermitted.length > 0) && (React.createElement(\"p\", null,\n            React.createElement(\"strong\", null, \"Basic terms\"),\n            ' ',\n            permitted.length > 0 && (React.createElement(React.Fragment, null,\n                permittedStr,\n                permitted.length === 1\n                    ? ' is permitted.'\n                    : ' are permitted.',\n                ' ')),\n            notPermitted.length > 0 && (React.createElement(React.Fragment, null,\n                notPermittedStr,\n                notPermitted.length === 1 ? ' is not' : ' are not')),\n            permitted.length === 0 && ' permitted',\n            notPermitted.length > 0 && '.')),\n        !!termsUrl && (React.createElement(\"p\", null,\n            React.createElement(\"strong\", null, \"Detailed terms\"),\n            ' ',\n            React.createElement(\"strong\", null,\n                React.createElement(\"a\", { href: termsUrl, target: \"_blank\", rel: \"noopener noreferrer\" }, termsName != null && termsName.length > 0\n                    ? termsName\n                    : termsUrl))))));\n}\nconst termNames = {\n    redistribution: 'Redistribution',\n    commercialUse: 'Commercial use',\n    reselling: 'Reselling',\n    storage: 'Storage',\n};\nfunction getTermStrings(ids) {\n    const names = ids.map((id) => termNames[id]);\n    return [...names.slice(0, -2), names.slice(-2).join(' & ')].join(', ');\n}\n","import styled, { css } from 'styled-components';\nimport { ImageTile } from '~/shared/components/Tile';\nimport { COLORS, LAPTOP, TABLET } from '~/shared/utils/styled';\nconst mobileSpacing = '24px';\nconst tabletSpacing = '40px';\nconst desktopSpacing = '50px';\nexport const ProjectHeroContainer = styled.div.withConfig({ displayName: \"ProjectHeroContainer\", componentId: \"sc-896duw\" }) `\n    display: grid;\n    grid-template-columns: 100%;\n    grid-template-rows: auto auto auto auto;\n    background-color: white;\n    padding: ${mobileSpacing};\n    border-radius: 16px;\n    overflow: hidden;\n\n    ${(props) => (props.overflowVisible ? 'overflow: visible;' : '')}\n\n    @media ${TABLET} {\n        padding: ${tabletSpacing};\n    }\n\n    @media ${LAPTOP} {\n        grid-template-columns: auto 1fr;\n        grid-template-rows: auto 1fr auto;\n        padding: 0;\n    }\n`;\nconst ProjectHeroImageStyles = css `\n    grid-column-start: 1;\n    grid-column-end: 2;\n    grid-row-start: 2;\n    grid-row-end: 2;\n    border-radius: 16px;\n    overflow: hidden;\n    margin-bottom: ${mobileSpacing};\n    @media (${TABLET}) {\n        margin-bottom: ${tabletSpacing};\n    }\n    @media (${LAPTOP}) {\n        border-radius: 0;\n        margin-bottom: 0;\n        grid-column-start: 1;\n        grid-column-end: 1;\n        grid-row-start: 1;\n        grid-row-end: 4;\n        width: 500px;\n        padding: ${tabletSpacing};\n    }\n`;\nexport const ProjectHeroImage = styled(ImageTile).withConfig({ displayName: \"ProjectHeroImage\", componentId: \"sc-1j6sr46\" }) `\n    ${ProjectHeroImageStyles}\n    img {\n        border-radius: 16px;\n        border: 1px solid #f5f5f5;\n    }\n`;\nconst ProjectHeroTitleStyles = css `\n    grid-column-start: 1;\n    grid-column-end: 2;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    font-size: 28px;\n    font-weight: 400;\n    color: ${COLORS.primary};\n    line-height: 44px;\n    margin-bottom: ${mobileSpacing};\n\n    @media (${TABLET}) {\n        margin-bottom: ${tabletSpacing};\n        font-size: 34px;\n    }\n    @media (${LAPTOP}) {\n        grid-column-start: 2;\n        grid-column-end: 2;\n        grid-row-start: 1;\n        grid-row-end: 1;\n        margin: ${desktopSpacing} ${desktopSpacing} ${mobileSpacing} 0;\n        height: fit-content;\n    }\n`;\nexport const ProjectHeroTitle = styled.h1.withConfig({ displayName: \"ProjectHeroTitle\", componentId: \"sc-howjgf\" }) `\n    ${ProjectHeroTitleStyles}\n`;\nexport const ProjectHeroDescriptionStyles = css `\n    grid-column-start: 1;\n    grid-column-end: 2;\n    grid-row-start: 3;\n    grid-row-end: 3;\n    /*margin-bottom: ${mobileSpacing}; TODO uncomment when enabling Signalling feature */\n    @media (${TABLET}) {\n        /*margin-bottom: ${tabletSpacing}; TODO uncomment when enabling Signalling feature */\n    }\n    @media (${LAPTOP}) {\n        grid-column-start: 2;\n        grid-column-end: 2;\n        grid-row-start: 2;\n        grid-row-end: 2;\n        margin: 0 ${desktopSpacing} 24px 0;\n    }\n`;\nexport const ProjectHeroMetadataContainer = styled.div.withConfig({ displayName: \"ProjectHeroMetadataContainer\", componentId: \"sc-1xv9i4k\" }) `\n    margin-top: ${mobileSpacing};\n    min-width: 0;\n\n    @media (${LAPTOP}) {\n        margin: ${desktopSpacing} ${desktopSpacing} ${desktopSpacing} 0;\n    }\n`;\n","import React from 'react';\nimport Markdown from 'react-markdown';\nimport styled from 'styled-components';\nimport { PropertyDisplay, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport { ProjectHeroContainer, ProjectHeroImage, ProjectHeroMetadataContainer, ProjectHeroTitle, } from '~/marketplace/containers/ProjectPage/Hero/ProjectHero2.styles';\nexport default function ProjectHero2({ name, description: descriptionProp, imageUrl, contact, }) {\n    const description = descriptionProp\n        // Remove empty paragraphs\n        .replace(/\\\\n/, '')\n        // Remove spacers (extra empty lines)\n        .replace(/^\\s*\\\\\\s*$/gm, '');\n    return (React.createElement(ProjectHeroContainer, null,\n        React.createElement(ProjectHeroImage, { src: imageUrl, alt: name, noBorderRadius: true, key: imageUrl || '' }),\n        React.createElement(ProjectHeroTitle, null, name),\n        React.createElement(MarkdownWrap, null,\n            React.createElement(Markdown, { components: {\n                    li({ children }) {\n                        return (React.createElement(\"li\", null,\n                            React.createElement(\"p\", null, children)));\n                    },\n                } }, description)),\n        React.createElement(ProjectHeroMetadataContainer, null,\n            React.createElement(PropertyDropdownList, null,\n                contact.url && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"web\" }), displayValue: contact.url\n                        .replace(/^https?:\\/\\//, '')\n                        .replace(/\\/+$/, ''), href: contact.url })),\n                contact.email && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"email\" }), displayValue: contact.email, href: `mailto:${contact.email}` })),\n                contact.twitter && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": \"#1da1f2\" }), href: contact.twitter })),\n                contact.telegram && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": \"#2aabee\" }), href: contact.telegram })),\n                contact.reddit && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": \"#ff5700\" }), href: contact.reddit })),\n                contact.linkedIn && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": \"#0077b5\" }), href: contact.linkedIn }))))));\n}\nconst MarkdownWrap = styled.div.withConfig({ displayName: \"MarkdownWrap\", componentId: \"sc-12otffe\" }) `\n    line-height: 1.75;\n    padding-right: 50px;\n\n    > * + * {\n        margin-top: 1em;\n    }\n\n    ol,\n    ul {\n        padding-left: 1.1em;\n    }\n\n    code {\n        border-radius: 4px;\n        border: 1px solid rgb(232, 235, 237);\n        background: rgb(244, 247, 250);\n        padding: 3px 4px;\n        font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier,\n            monospace;\n        font-size: 80%;\n    }\n\n    blockquote {\n        border-left: 3px solid rgb(232, 235, 237);\n        padding: 0.5em;\n        padding-left: 1em;\n        font-style: italic;\n    }\n\n    blockquote > * + * {\n        margin-top: 1em;\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { COLORS, DESKTOP, LAPTOP, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { goBack } from '~/utils';\nexport const DetailsPageHeader = ({ backButtonLink, pageTitle, rightComponent, }) => {\n    return (React.createElement(DetailsPageHeaderBackground, null,\n        React.createElement(DetailsPageHeaderContainer, null,\n            React.createElement(DetailsPageHeaderBar, null,\n                React.createElement(LeftSideContainer, null,\n                    !!backButtonLink && (React.createElement(BackLink, { to: backButtonLink, onClick: (e) => {\n                            goBack({\n                                onBeforeNavigate() {\n                                    e.preventDefault();\n                                },\n                            });\n                        } },\n                        React.createElement(BackButtonIcon, { name: \"backArrow\" }))),\n                    !!pageTitle && (React.createElement(PageTitleContainer, null, pageTitle))),\n                React.createElement(RightSideContainer, null, rightComponent)))));\n};\nconst DetailsPageHeaderBackground = styled.div.withConfig({ displayName: \"DetailsPageHeaderBackground\", componentId: \"sc-2y14kk\" }) `\n    background-color: white;\n    padding: 45px 0 22px;\n\n    @media (${DESKTOP}) {\n        padding: 130px 0 30px;\n    }\n`;\nconst DetailsPageHeaderContainer = styled.div.withConfig({ displayName: \"DetailsPageHeaderContainer\", componentId: \"sc-qodqcv\" }) `\n    max-width: ${MAX_BODY_WIDTH}px;\n    margin: 0 auto;\n    padding: 0 24px;\n\n    & & {\n        padding: 0 24px;\n    }\n\n    @media (${TABLET}) {\n        padding: 0 40px;\n\n        & & {\n            padding: 0;\n        }\n    }\n\n    @media (${DESKTOP}) {\n        padding: 0;\n    }\n`;\nconst DetailsPageHeaderBar = styled.div.withConfig({ displayName: \"DetailsPageHeaderBar\", componentId: \"sc-1y7opjf\" }) `\n    display: block;\n    @media (${LAPTOP}) {\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n    }\n`;\nconst LeftSideContainer = styled.div.withConfig({ displayName: \"LeftSideContainer\", componentId: \"sc-1ignhbj\" }) `\n    display: flex;\n    align-items: center;\n    flex-grow: 1;\n    overflow: hidden;\n`;\nconst RightSideContainer = styled.div.withConfig({ displayName: \"RightSideContainer\", componentId: \"sc-1xnp8ca\" }) `\n    display: flex;\n    align-items: center;\n    margin-top: 50px;\n    @media (${LAPTOP}) {\n        margin-top: 0;\n    }\n`;\nconst BackLink = styled(Link).withConfig({ displayName: \"BackLink\", componentId: \"sc-1mgqjh2\" }) `\n    padding: 10px;\n    line-height: 30px;\n    margin-right: 14px;\n`;\nconst BackButtonIcon = styled(SvgIcon).withConfig({ displayName: \"BackButtonIcon\", componentId: \"sc-1guex4e\" }) `\n    color: ${COLORS.primaryLight};\n`;\nconst PageTitleContainer = styled.div.withConfig({ displayName: \"PageTitleContainer\", componentId: \"sc-1v2cnf3\" }) `\n    margin-top: 3px;\n    color: ${COLORS.primary};\n    font-size: 16px;\n    line-height: 30px;\n    text-overflow: ellipsis;\n    overflow: hidden;\n    white-space: nowrap;\n    padding-right: 20px;\n`;\n","import styled, { css } from 'styled-components';\nimport { MEDIUM, MD } from '~/shared/utils/styled';\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-11gywz\" }) `\n    align-items: center;\n    background-color: #efefef;\n    color: #323232;\n    display: flex;\n    font-size: 12px;\n    font-weight: ${MEDIUM};\n    height: 64px;\n    letter-spacing: 1.17px;\n    line-height: 16px;\n    padding: 0 24px;\n    text-transform: uppercase;\n\n    @media (min-width: ${MD}px) {\n        border-radius: 2px 2px 0 0;\n        font-size: 14px;\n        height: 72px;\n        padding: 0 32px;\n    }\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-hu0u94\" }) ``;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-a0bmp3\" }) `\n    background-color: #f8f8f8;\n\n    & + & {\n        border-top: 1px solid #e7e7e7;\n    }\n\n    @media (min-width: ${MD}px) {\n        :last-child {\n            border-radius: 0 0 2px 2px;\n        }\n    }\n\n    ${({ pad = false }) => !!pad &&\n    css `\n            padding: 24px;\n\n            @media (min-width: ${MD}px) {\n                padding: 32px;\n            }\n        `}\n`;\nconst Segment = styled.div.withConfig({ displayName: \"Segment\", componentId: \"sc-93o8z4\" }) ``;\nObject.assign(Segment, {\n    Header,\n    Body,\n    Footer,\n});\nexport default Segment;\n","import { StreamPermission } from '@streamr/sdk';\nimport { useClient } from 'streamr-client-react';\nimport { useEffect } from 'react';\nimport { produce } from 'immer';\nimport { create } from 'zustand';\nimport StreamNotFoundError from '~/shared/errors/StreamNotFoundError';\nimport { isMessagedObject } from '~/utils/exceptions';\nimport { address0 } from '~/consts';\nimport { useWalletAccount } from './wallet';\nfunction accountKey(streamId, account) {\n    return JSON.stringify([streamId, account.toLowerCase()]);\n}\nfunction permissionKey(streamId, account, permission) {\n    return JSON.stringify([streamId, account.toLowerCase(), permission]);\n}\nconst useStreamAbilitiesStore = create((set, get) => {\n    function toggleFetching(streamId, account, permission, newValue) {\n        set((store) => produce(store, (draft) => {\n            if (!newValue) {\n                return void delete draft.fetching[permissionKey(streamId, account, permission)];\n            }\n            draft.fetching[permissionKey(streamId, account, permission)] = true;\n        }));\n    }\n    return {\n        permissions: {},\n        fetching: {},\n        async fetchPermission(streamId, account, permission, streamrClient) {\n            const pkey = permissionKey(streamId, account, permission);\n            if (get().fetching[pkey]) {\n                // Already fetching, skip.\n                return;\n            }\n            let result = false;\n            try {\n                toggleFetching(streamId, account, permission, true);\n                let stream;\n                try {\n                    stream = await streamrClient.getStream(streamId);\n                }\n                catch (e) {\n                    if (isMessagedObject(e) && /not_found/i.test(e.message)) {\n                        throw new StreamNotFoundError(streamId);\n                    }\n                    throw e;\n                }\n                result = await stream.hasPermission(account === address0\n                    ? {\n                        permission,\n                        public: true,\n                    }\n                    : {\n                        userId: account,\n                        permission,\n                        allowPublic: true,\n                    });\n            }\n            finally {\n                set((state) => produce(state, (draft) => {\n                    const key = accountKey(streamId, account);\n                    const group = draft.permissions[key] || {};\n                    const { cache } = group[permission] || {};\n                    group[permission] = {\n                        cache,\n                        value: result,\n                    };\n                    draft.permissions[key] = group;\n                }));\n                toggleFetching(streamId, account, permission, false);\n            }\n        },\n        invalidate(streamId, account) {\n            set((store) => produce(store, (draft) => {\n                const permissions = draft.permissions[accountKey(streamId, account)] || {};\n                const permissionKeys = Object.keys(permissions);\n                permissionKeys.forEach((permission) => {\n                    const { value, cache = 0 } = permissions[permission] || {};\n                    permissions[permission] = {\n                        value,\n                        cache: cache + 1,\n                    };\n                });\n            }));\n        },\n    };\n});\nexport function useStreamAbility(streamId, account, permission) {\n    const client = useClient();\n    const { fetchPermission } = useStreamAbilitiesStore();\n    const { value, cache = 0 } = useStreamAbilitiesStore(({ permissions }) => streamId\n        ? permissions[accountKey(streamId, account || address0)]?.[permission]\n        : undefined) || {};\n    useEffect(() => {\n        async function fetch() {\n            if (!client || !streamId) {\n                return;\n            }\n            try {\n                await fetchPermission(streamId, account || address0, permission, client);\n            }\n            catch (e) {\n                console.warn(e);\n            }\n        }\n        fetch();\n    }, [cache, fetchPermission, streamId, account, permission, client]);\n    return value;\n}\nexport function useCurrentStreamAbility(streamId, permission) {\n    const account = useWalletAccount();\n    const hasPermission = useStreamAbility(streamId, account, permission);\n    if (!streamId) {\n        return (permission === StreamPermission.EDIT || permission === StreamPermission.GRANT);\n    }\n    return hasPermission;\n}\nexport function useInvalidateStreamAbilities() {\n    return useStreamAbilitiesStore(({ invalidate }) => invalidate);\n}\n","import { StreamPermission } from '@streamr/sdk';\nimport { CodeSnippet, Tabs } from '@streamr/streamr-layout';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { address0 } from '~/consts';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { useStreamAbility } from '~/shared/stores/streamAbilities';\nimport { COLORS, DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { Route as R } from '~/utils/routes';\nfunction stripIndent(code) {\n    let minIndent = Number.POSITIVE_INFINITY;\n    (code.match(/^[ \\t]*(?=\\S)/gm) || ['']).forEach(({ length }) => {\n        if (length < minIndent) {\n            minIndent = length;\n        }\n    });\n    return code\n        .replace(new RegExp(`^[ \\\\t]{${minIndent}}`, 'gm'), '')\n        .trim()\n        .replace(/^\\s+$/gm, '');\n}\nconst Snippet = {\n    createClient(hasPermission) {\n        if (hasPermission) {\n            return `const streamr = new StreamrClient()`;\n        }\n        return `const streamr = new StreamrClient({\n                auth: {\n                    privateKey: 'ethereum-private-key' \n                }\n            })`;\n    },\n    lightNodeHeader(hasPermission) {\n        return `\n            // Run a Streamr node right inside your JS app\n            const StreamrClient = require('@streamr/sdk')\n            ${this.createClient(hasPermission)}\n        `;\n    },\n    lightNodeSubscribe(streamId, hasPermission) {\n        return `\n            ${this.lightNodeHeader(hasPermission)}\n            // Subscribe to a stream of messages\n            streamr.subscribe('${streamId}', (msg) => {\n                // Handle incoming messages\n            })\n        `;\n    },\n    lightNodePublish(streamId, hasPermission) {\n        return `\n            ${this.lightNodeHeader(hasPermission)}\n            // Publish messages to a stream\n            streamr.publish('${streamId}', {\n                hello: 'world',\n            })\n        `;\n    },\n    websocketHeader(streamId) {\n        return `\n            // You'll want to URI-encode the stream id\n            const streamId = encodeURIComponent('${streamId}')\n        `;\n    },\n    websocketPublish(streamId) {\n        return `\n            ${this.websocketHeader(streamId)}\n            // Connect to the Websocket plugin on your Streamr \n            // node and send JSON messages to publish them\n            const pub = ws.connect(\\`ws://my-streamr-node:7170/streams/\\${streamId}/publish\\`)\n            pub.send({\n                hello: 'world',\n            })\n        `;\n    },\n    websocketSubscribe(streamId) {\n        return `\n            ${this.websocketHeader(streamId)}\n            // Connect to the Websocket plugin on your Streamr \n            // node and subscribe to a stream of messages\n            const sub = ws.connect(\\`ws://my-streamr-node:7170/streams/\\${streamId}/subscribe\\`)\n            sub.onmessage = (msg) => {\n                // Handle incoming messages\n            }\n        `;\n    },\n    httpSubscribe() {\n        return `\n            // The Subscribe over HTTP is not available, as in it's not a valid selection.\n        `;\n    },\n    httpPublish(streamId) {\n        return `\n            // Use your favourite language and HTTP library!\n\n            // You'll want to URI-encode the stream id\n            const streamId = encodeURIComponent('${streamId}')\n\n            // Publish messages to a stream by POSTing JSON \n            // to the HTTP plugin on your Streamr node\n            http.post(\\`http://my-streamr-node:7171/streams/\\${streamId}\\`, {\n                hello: 'world'\n            })\n        `;\n    },\n    mqttHeader() {\n        return `\n            // Use your favourite language and MQTT library!\n\n            // Connect to MQTT plugin on your Streamr node\n            mqtt.connect('mqtt://my-streamr-node')\n        `;\n    },\n    mqttSubscribe(streamId) {\n        return `\n            ${this.mqttHeader()}\n            // Subscribe to a stream of messages\n            mqtt.subscribe('${streamId}', (msg) => {\n                // Handle incoming messages\n            })\n        `;\n    },\n    mqttPublish(streamId) {\n        return `\n            ${this.mqttHeader()}\n            // Publish a message to a stream\n            mqtt.publish('${streamId}', {\n                hello: 'world',\n            })\n        `;\n    },\n};\nexport const StreamConnect = ({ streams }) => {\n    const [streamId, setSelectedStream] = useState(streams[0]);\n    const [action, setAction] = useState('subscribe');\n    const [nodeType, setNodeType] = useState('lightNode');\n    const [currentProtocol, setCurrentProtocol] = useState('websocket');\n    const hasPublicPubPermission = useStreamAbility(streamId, address0, StreamPermission.PUBLISH);\n    const hasPublicSubPermission = useStreamAbility(streamId, address0, StreamPermission.SUBSCRIBE);\n    const lightNodeSnippet = stripIndent(action === 'publish'\n        ? Snippet.lightNodePublish(streamId, !!hasPublicPubPermission)\n        : Snippet.lightNodeSubscribe(streamId, !!hasPublicSubPermission));\n    const websocketSnippet = stripIndent(action === 'publish'\n        ? Snippet.websocketPublish(streamId)\n        : Snippet.websocketSubscribe(streamId));\n    const httpSnippet = stripIndent(action === 'subscribe' ? Snippet.httpSubscribe() : Snippet.httpPublish(streamId));\n    const mqttSnippet = stripIndent(action === 'publish'\n        ? Snippet.mqttPublish(streamId)\n        : Snippet.mqttSubscribe(streamId));\n    const { copy } = useCopy();\n    const currentBrokerSnippet = (() => {\n        switch (currentProtocol) {\n            case 'websocket':\n                return websocketSnippet;\n            case 'http':\n                return httpSnippet;\n            case 'mqtt':\n                return mqttSnippet;\n        }\n    })();\n    return (React.createElement(Grid, null,\n        React.createElement(\"div\", null,\n            React.createElement(StreamConnectHeader, null, \"Connect\"),\n            React.createElement(StreamConnectText, null, \"Here are the code snippets to connect to this stream with the Streamr SDK or through a separately running Streamr node:\"),\n            React.createElement(SnippetSelectorContainer, null,\n                React.createElement(SelectContainer, null,\n                    React.createElement(SelectField2, { placeholder: '', options: [\n                            { label: 'Subscribe', value: 'subscribe' },\n                            { label: 'Publish', value: 'publish' },\n                        ], value: action, isClearable: false, onChange: (action) => {\n                            if (action === 'subscribe' || action === 'publish') {\n                                setAction(action);\n                            }\n                        }, noShrink: true, fullWidth: true })),\n                React.createElement(\"span\", null, \"to\"),\n                React.createElement(SelectContainer, null,\n                    React.createElement(SelectField2, { placeholder: '', options: streams.map((streamId) => ({\n                            value: streamId,\n                            label: truncateStreamName(streamId),\n                        })), value: streamId, isClearable: false, onChange: (streamId) => {\n                            setSelectedStream(streamId);\n                        }, fullWidth: true })),\n                React.createElement(\"span\", null, \"using\"),\n                React.createElement(SelectContainer, null,\n                    React.createElement(SelectField2, { placeholder: '', options: [\n                            { label: 'Streamr SDK', value: 'lightNode' },\n                            { label: 'Streamr node', value: 'brokerNode' },\n                        ], value: nodeType, isClearable: false, onChange: (nodeType) => {\n                            if (nodeType === 'lightNode' ||\n                                nodeType === 'brokerNode') {\n                                setNodeType(nodeType);\n                            }\n                        }, noShrink: true, fullWidth: true }))),\n            nodeType === 'lightNode' && (React.createElement(React.Fragment, null,\n                React.createElement(StreamConnectLightNodeSnippetContainer, null,\n                    React.createElement(CodeSnippet, { language: 'javascript' }, lightNodeSnippet)),\n                React.createElement(StreamConnectSnippetCopyContainer, null,\n                    React.createElement(Button, { kind: \"secondary\", onClick: () => void copy(lightNodeSnippet) }, \"Copy\")))),\n            nodeType === 'brokerNode' && (React.createElement(BrokerNodeSnippetContainer, null,\n                React.createElement(Tabs, { selected: currentProtocol, onSelect: (tab) => setCurrentProtocol(tab) },\n                    React.createElement(Tabs.Item, { label: 'Websocket', value: 'websocket', key: 0 },\n                        React.createElement(CodeSnippet, { language: 'javascript' }, websocketSnippet)),\n                    React.createElement(Tabs.Item, { label: 'HTTP', value: 'http', key: 1 },\n                        React.createElement(CodeSnippet, { language: 'javascript' }, httpSnippet)),\n                    React.createElement(Tabs.Item, { label: 'MQTT', value: 'mqtt', key: 2 },\n                        React.createElement(CodeSnippet, { language: 'javascript' }, mqttSnippet))),\n                React.createElement(StreamConnectSnippetCopyContainer, null,\n                    React.createElement(Button, { kind: \"secondary\", onClick: () => void copy(currentBrokerSnippet) }, \"Copy\"))))),\n        React.createElement(RightColumn, null,\n            React.createElement(StreamConnectLink, { href: R.docs('/guides/nodejs'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"Pub/Sub in NodeJS\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })),\n            React.createElement(StreamConnectLink, { href: R.docs('/guides/web-app-frameworks'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"Use Streamr in your web app\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })),\n            React.createElement(StreamConnectLink, { href: R.docs('/usage/cli-tool'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"The Streamr CLI tool\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })),\n            React.createElement(StreamConnectLink, { href: R.docs('/usage/connect-apps-and-iot/streamr-node-interface'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"Interfacing with a Streamr node\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })))));\n};\nconst Grid = styled.div.withConfig({ displayName: \"Grid\", componentId: \"sc-1oaf2o7\" }) `\n    display: grid;\n    grid-template-columns: initial;\n    grid-auto-flow: row;\n    gap: 32px;\n\n    @media ${DESKTOP} {\n        grid-template-columns: 65% auto;\n        grid-auto-flow: column;\n        gap: 88px;\n    }\n`;\nconst RightColumn = styled.div.withConfig({ displayName: \"RightColumn\", componentId: \"sc-izi0z2\" }) `\n    padding-top: 0px;\n\n    @media ${DESKTOP} {\n        padding-top: 88px;\n    }\n`;\nconst StreamConnectHeader = styled.p.withConfig({ displayName: \"StreamConnectHeader\", componentId: \"sc-ps0tf8\" }) `\n    font-size: 24px;\n    color: ${COLORS.primary};\n    line-height: 64px;\n    margin-bottom: 24px;\n`;\nconst StreamConnectText = styled.p.withConfig({ displayName: \"StreamConnectText\", componentId: \"sc-y6nrjd\" }) `\n    font-size: 16px;\n    color: ${COLORS.primary};\n`;\nconst StreamConnectLightNodeSnippetContainer = styled.div.withConfig({ displayName: \"StreamConnectLightNodeSnippetContainer\", componentId: \"sc-1759ut4\" }) `\n    border: 1px solid ${COLORS.Border};\n    background-color: white;\n    margin-top: 30px;\n    max-width: calc(100vw - 100px);\n    @media ${TABLET} {\n        max-width: calc(100vw - 160px);\n    }\n`;\nconst StreamConnectSnippetCopyContainer = styled.div.withConfig({ displayName: \"StreamConnectSnippetCopyContainer\", componentId: \"sc-1ozil41\" }) `\n    border: 1px solid ${COLORS.Border};\n    border-top: none;\n    background-color: white;\n    padding: 16px;\n    display: flex;\n    align-items: center;\n    justify-content: flex-end;\n`;\nconst StreamConnectLink = styled.a.withConfig({ displayName: \"StreamConnectLink\", componentId: \"sc-9e5sid\" }) `\n    font-size: 16px;\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    background-color: ${COLORS.secondaryLight};\n    padding: 10px 16px;\n    margin-bottom: 8px;\n    border-radius: 4px;\n    span {\n        color: ${COLORS.primary};\n    }\n    svg {\n        color: ${COLORS.primary};\n    }\n`;\nconst SnippetSelectorContainer = styled.div.withConfig({ displayName: \"SnippetSelectorContainer\", componentId: \"sc-1ac352p\" }) `\n    display: flex;\n    flex-wrap: nowrap;\n    margin-top: 20px;\n    align-items: left;\n    flex-direction: column;\n\n    @media ${TABLET} {\n        flex-direction: row;\n        align-items: center;\n\n        > * {\n            margin-right: 10px;\n            &:last-child {\n                margin-right: 0;\n            }\n        }\n    }\n`;\nconst BrokerNodeSnippetContainer = styled.div.withConfig({ displayName: \"BrokerNodeSnippetContainer\", componentId: \"sc-1u2nq6z\" }) `\n    margin-top: 30px;\n    max-width: calc(100vw - 100px);\n    @media ${TABLET} {\n        max-width: calc(100vw - 160px);\n    }\n`;\nconst SelectContainer = styled.div.withConfig({ displayName: \"SelectContainer\", componentId: \"sc-1pckr2p\" }) `\n    height: 100%;\n    min-width: 140px;\n`;\n","import React, { Fragment } from 'react';\nimport styled, { css } from 'styled-components';\nimport { ERROR } from '~/shared/components/Ui/StateColors';\nexport const MarketplaceTheme = {\n    color: '#ff5c00',\n};\nconst DefaultTheme = {\n    color: ERROR,\n};\nconst UnstyledErrors = ({ children, theme: _theme, overlap: _overlap, ...props }) => React.createElement(\"div\", { ...props }, children || React.createElement(Fragment, null, \"\\u200C\"));\nconst Errors = styled(UnstyledErrors).withConfig({ displayName: \"Errors\", componentId: \"sc-1hrs8wo\" }) `\n    color: ${({ theme }) => theme.color};\n    font-size: 12px;\n    line-height: 1.5em;\n    margin-top: 6px;\n    word-break: break-word;\n\n    ${({ overlap }) => !!overlap &&\n    css `\n            position: absolute;\n        `}\n`;\nErrors.defaultProps = {\n    theme: DefaultTheme,\n};\nexport default Errors;\n","import styled from 'styled-components';\nconst Cell = styled.span.withConfig({ displayName: \"Cell\", componentId: \"sc-kvo0f3\" }) `\n    display: block;\n    max-width: 100%;\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport default Cell;\n","import styled, { css, createGlobalStyle } from 'styled-components';\nimport { MD, XL, PHONE } from '~/shared/utils/styled';\nconst Layout = createGlobalStyle `\n    :root {\n        --LiveDataInspectorMinWidth: 375px;\n        --LiveDataMinLhsWidth: 248px;\n        --LiveDataMinMargin: 8px;\n        --LiveDataTimestampColumnMaxWidth: 224px;\n    }\n\n    @media ${PHONE} {\n        :root {\n            --LiveDataInspectorMinWidth: 375px;\n            --LiveDataMinLhsWidth: 248px;\n            --LiveDataMinMargin: 8px;\n            --LiveDataTimestampColumnMaxWidth: 224px;\n        }\n    }\n\n    @media (min-width: ${MD}px) {\n        :root {\n            --LiveDataInspectorMinWidth: 488px;\n            --LiveDataMinLhsWidth: 264px;\n            --LiveDataMinMargin: 24px;\n            --LiveDataTimestampColumnMaxWidth: 224px;\n        }\n    }\n\n    @media (min-width: ${XL}px) {\n        :root {\n            --LiveDataInspectorMinWidth: 488px;\n            --LiveDataMinLhsWidth: 332px;\n            --LiveDataMinMargin: 92px;\n            --LiveDataTimestampColumnMaxWidth: 224px;\n        }\n    }\n\n    ${({ inspectorWidth }) => css `\n        :root {\n            --LiveDataInspectorWidth: 100vw;\n        }\n\n        @media ${PHONE} {\n            :root {\n                --LiveDataInspectorWidth: ${inspectorWidth || 375}px;\n            }\n        }\n\n        @media (min-width: ${XL}px) {\n            :root {\n                --LiveDataInspectorWidth: ${inspectorWidth || 488}px;\n            }\n        }\n    `}\n`;\nconst Pusher = styled.div.withConfig({ displayName: \"Pusher\", componentId: \"sc-sae8h3\" }) `\n    //min-width: var(--LiveDataMinMargin);\n    //max-width: calc((100vw - 1108px - var(--LiveDataInspectorMinWidth) - 32px) * 0.5);\n    //width: calc((100vw - 1108px - var(--LiveDataInspectorWidth) - 32px) * 0.5);\n`;\nconst FinalExport = Object.assign(Layout, {\n    Pusher,\n});\nexport default FinalExport;\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport ModalDialog from '~/shared/components/ModalDialog';\nimport ModalPortal from '~/shared/components/ModalPortal';\nimport useModal from '~/shared/hooks/useModal';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport SvgIcon from '../SvgIcon';\nconst ModalContainer = styled.div.withConfig({ displayName: \"ModalContainer\", componentId: \"sc-lz82e0\" }) `\n    background: white;\n    color: ${COLORS.primary};\n    height: 100%;\n    width: 100%;\n    display: flex;\n    flex-direction: column;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-10bafn3\" }) `\n    padding: 44px 24px;\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n`;\nconst HeaderTitle = styled.p.withConfig({ displayName: \"HeaderTitle\", componentId: \"sc-sgi4re\" }) `\n    font-size: 24px;\n    margin: 0;\n`;\nconst StreamsList = styled.ul.withConfig({ displayName: \"StreamsList\", componentId: \"sc-1n7ig57\" }) `\n    width: 100%;\n    list-style-type: none;\n    padding: 0;\n\n    li {\n        font-size: 16px;\n        padding: 8px 26px;\n        display: flex;\n        align-items: center;\n        justify-content: space-between;\n        border-top: 1px solid ${COLORS.Border};\n        &:last-of-type {\n            border-bottom: 1px solid ${COLORS.Border};\n        }\n\n        &.active {\n            background-color: ${COLORS.primaryLight};\n            color: white;\n        }\n    }\n`;\nconst StreamName = styled.div.withConfig({ displayName: \"StreamName\", componentId: \"sc-1m8vjt1\" }) `\n    background-color: white;\n    font-size: 16px;\n    font-weight: ${MEDIUM};\n    line-height: 40px;\n    padding: 0 12px;\n`;\nconst SelectorWrapper = styled.div.withConfig({ displayName: \"SelectorWrapper\", componentId: \"sc-ghebql\" }) `\n    display: flex;\n    align-items: center;\n`;\nexport const ModalStreamSelector = (props) => {\n    const { api, isOpen } = useModal('streamSelectorModal');\n    const openModal = useCallback(() => {\n        api.open();\n    }, [api]);\n    return (React.createElement(\"div\", null,\n        React.createElement(SelectorWrapper, null,\n            React.createElement(StreamName, { onClick: openModal }, props.selectedStream && truncateStreamName(props.selectedStream))),\n        isOpen && React.createElement(StreamSelectorModal, { api: api, ...props })));\n};\nconst StreamSelectorModal = ({ api, streamIds, selectedStream, onChange, }) => {\n    const onClose = useCallback(() => {\n        api.close();\n    }, [api]);\n    return (React.createElement(ModalPortal, null,\n        React.createElement(ModalDialog, { onClose: onClose, fullpage: true, noScroll: false, closeOnEsc: true },\n            React.createElement(ModalContainer, null,\n                React.createElement(Header, null,\n                    React.createElement(HeaderTitle, null, \"Select a stream\"),\n                    React.createElement(Button, { onClick: onClose, kind: 'secondary' }, \"Done\")),\n                React.createElement(StreamsList, null, streamIds.map((streamId, index) => {\n                    return (React.createElement(\"li\", { key: index, className: streamId === selectedStream ? 'active' : '', onClick: () => {\n                            onChange(streamId);\n                            onClose();\n                        } },\n                        React.createElement(\"span\", null, truncateStreamName(streamId)),\n                        streamId === selectedStream && (React.createElement(SvgIcon, { name: 'checkMarkMono' }))));\n                }))))));\n};\n","import styled from 'styled-components';\nconst IconButton = styled.button.withConfig({ displayName: \"IconButton\", componentId: \"sc-t8r6jx\" }) `\n    appearance: none;\n    background: none;\n    border-radius: 2px;\n    border: 0;\n    height: 32px;\n    outline: 0 !important;\n    position: relative;\n    text-align: center;\n    width: 32px;\n\n    :hover,\n    :focus {\n        background-color: #efefef;\n    }\n\n    :active {\n        background: #d8d8d8;\n        color: #525252;\n    }\n\n    :disabled {\n        background: none;\n        color: inherit;\n    }\n\n    svg {\n        display: block;\n        height: 20px;\n        left: 50%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 20px;\n    }\n`;\nexport default IconButton;\n","import React from 'react';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport IconButton from './IconButton';\nconst Button = styled(IconButton).withConfig({ displayName: \"Button\", componentId: \"sc-1bfec7h\" }) `\n    :not(:last-child) {\n        margin-left: 16px;\n    }\n\n    + div {\n        margin: 0 12px;\n        white-space: nowrap;\n    }\n\n    svg {\n        width: 8px;\n        height: 14px;\n    }\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-b73oup\" }) `\n    font-weight: ${MEDIUM};\n`;\nfunction UnstyledSelector({ active, onChange, options = [], title, ...props }) {\n    const current = options.indexOf(active);\n    const prevOption = options[Math.max(0, current - 1)];\n    const nextOption = options[Math.min(current + 1, options.length)];\n    if (options.length <= 1) {\n        return null;\n    }\n    return (React.createElement(\"div\", { ...props },\n        React.createElement(Title, null, title),\n        React.createElement(Button, { disabled: current <= 0, onClick: () => {\n                if (prevOption) {\n                    onChange?.(prevOption);\n                }\n            }, type: \"button\" },\n            React.createElement(SvgIcon, { name: \"back\" })),\n        React.createElement(\"div\", null,\n            React.createElement(\"strong\", null, current + 1),\n            \" of \",\n            React.createElement(\"strong\", null, options.length)),\n        React.createElement(Button, { disabled: current >= options.length - 1, onClick: () => {\n                if (nextOption) {\n                    onChange?.(nextOption);\n                }\n            }, type: \"button\" },\n            React.createElement(SvgIcon, { name: \"forward\" }))));\n}\nconst Selector = styled(UnstyledSelector).withConfig({ displayName: \"Selector\", componentId: \"sc-uw3yor\" }) `\n    align-items: center;\n    color: ${COLORS.primary};\n    display: flex;\n    button {\n        color: ${COLORS.primary};\n    }\n`;\nexport default Selector;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Button as PrestyledButton } from '~/components/Button';\nimport { LG, PHONE } from '~/shared/utils/styled';\nimport Selector from './Selector';\nimport Layout from './Layout';\nconst Button = styled(PrestyledButton).withConfig({ displayName: \"Button\", componentId: \"sc-cofyda\" }) `\n    && {\n        font-size: 12px;\n        height: 32px;\n        min-width: 80px;\n    }\n\n    @media ${PHONE} {\n        && {\n            min-width: 125px;\n        }\n    }\n`;\nconst SettingsButton = styled(Button).withConfig({ displayName: \"SettingsButton\", componentId: \"sc-pzpbv0\" }) `\n    @media (max-width: ${LG - 1}px) {\n        && {\n            display: none;\n        }\n    }\n`;\nconst Lhs = styled.div.withConfig({ displayName: \"Lhs\", componentId: \"sc-148ap5i\" }) `\n    flex-grow: 1;\n    display: grid;\n    grid-template-columns: auto 1fr;\n`;\nconst Rhs = styled.div.withConfig({ displayName: \"Rhs\", componentId: \"sc-p3ihd5\" }) `\n    display: flex;\n\n    button + button {\n        margin-left: 16px;\n    }\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-1e57e6x\" }) `\n    display: flex;\n    min-width: 0;\n    padding: 0 16px;\n\n    > div:first-child {\n        min-width: calc(var(--LiveDataMinLhsWidth) - var(--LiveDataMinMargin) - 16px);\n        max-width: calc(var(--LiveDataTimestampColumnMaxWidth));\n        width: calc(\n            100vw - var(--LiveDataInspectorWidth) - var(--LiveDataMinMargin) - 16px\n        );\n    }\n`;\nconst UnstyledToolbar = ({ className, onPartitionChange, onSettingsButtonClick, partition, partitions = [], streamId, }) => {\n    return (React.createElement(\"div\", { className: className },\n        React.createElement(Lhs, null,\n            React.createElement(Layout.Pusher, null),\n            React.createElement(Inner, null,\n                React.createElement(Selector, { title: \"Stream partitions\", options: partitions, active: partition, onChange: onPartitionChange }))),\n        React.createElement(Rhs, null,\n            React.createElement(\"div\", null, typeof onSettingsButtonClick === 'function' && (React.createElement(SettingsButton, { kind: \"secondary\", type: \"button\", onClick: () => onSettingsButtonClick(streamId) }, \"Stream Settings\"))))));\n};\nconst Toolbar = styled(UnstyledToolbar).withConfig({ displayName: \"Toolbar\", componentId: \"sc-1qf8mm1\" }) `\n    align-items: center;\n    display: flex;\n    padding-top: ${(props) => {\n    return props.partitions.length > 1 ? '30px ' : '0';\n}};\n    padding-bottom: ${(props) => {\n    return props.partitions.length > 1 ? '16px ' : '0';\n}};\n`;\nObject.assign(Toolbar, {\n    Lhs,\n    Rhs,\n});\nexport default Toolbar;\n","import { Tooltip } from '@streamr/streamr-layout';\nimport moment from 'moment-timezone';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport stringifyObject from 'stringify-object';\nimport styled, { css } from 'styled-components';\nimport { CopyButton } from '~/components/CopyButton';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport { formatDateTime } from '~/marketplace/utils/time';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { COLORS, MAX_BODY_WIDTH, MEDIUM, TABLET } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport Cell from './Cell';\nimport Layout from './Layout';\nimport { ModalStreamSelector } from './ModalStreamSelector';\nimport Toolbar from './Toolbar';\nconst formatValue = (data) => typeof data === 'object'\n    ? stringifyObject(data, {\n        inlineCharacterLimit: Number.POSITIVE_INFINITY,\n    })\n    : data.toString();\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1090h5n\" }) `\n    display: grid;\n    transition: 0.2s grid-template-columns;\n    grid-template-columns: auto 248px 1fr auto;\n\n    ${({ inspectorFocused }) => !!inspectorFocused &&\n    css `\n            grid-template-columns: auto 0px 1fr auto;\n        `}\n\n    @media ${TABLET} {\n        grid-template-columns: auto 1fr 1fr auto;\n    }\n\n    @media (min-width: ${MAX_BODY_WIDTH}px) {\n        grid-template-columns: auto ${MAX_BODY_WIDTH - 560}px 560px auto;\n    }\n`;\nconst LeftFiller = styled.div.withConfig({ displayName: \"LeftFiller\", componentId: \"sc-v7o9iu\" }) `\n    background: #ffffff;\n`;\nconst RightFiller = styled.div.withConfig({ displayName: \"RightFiller\", componentId: \"sc-13pv0xv\" }) `\n    background: #fafafa;\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-vvc8jb\" }) `\n    display: grid;\n    line-height: 28px;\n    padding: 14px 16px;\n\n    > div {\n        min-width: 0;\n    }\n`;\nconst Row = styled.div.withConfig({ displayName: \"Row\", componentId: \"sc-ghpn4d\" }) ``;\nconst Viewport = styled.div.withConfig({ displayName: \"Viewport\", componentId: \"sc-2nzh0p\" }) `\n    height: 100%;\n    overflow: auto;\n\n    ${Inner} {\n        transition: 250ms background-color;\n    }\n\n    ${Inner}:hover {\n        transition-duration: 25ms;\n    }\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-vgmvys\" }) `\n    height: 54px;\n    width: 100%;\n`;\nconst Side = styled.div.withConfig({ displayName: \"Side\", componentId: \"sc-1rw0mcb\" }) `\n    height: 100%;\n    overflow: hidden;\n    &.no-overflow-desktop {\n        @media (${TABLET}) {\n            overflow: initial;\n        }\n    }\n`;\nconst Lhs = styled(Side).withConfig({ displayName: \"Lhs\", componentId: \"sc-1n0stjt\" }) `\n    ${Row} {\n        display: grid;\n        grid-template-columns: auto 1fr;\n        border-bottom: 1px solid ${COLORS.Border};\n    }\n\n    ${Inner} {\n        grid-template-columns: 224px 1fr;\n    }\n\n    ${Viewport} ${Inner}:hover {\n        background: #fafafa;\n    }\n\n    ${Inner} > div {\n        min-width: 0;\n    }\n`;\nconst Rhs = styled(Side).withConfig({ displayName: \"Rhs\", componentId: \"sc-1wo4mr7\" }) `\n    background: #fafafa;\n    border-left: 1px solid #efefef;\n\n    ${Inner} {\n        grid-template-columns: 128px 1fr;\n        column-gap: 8px;\n        margin: 0 24px;\n    }\n\n    ${Viewport} ${Inner}:hover {\n        background: #f3f3f3;\n    }\n\n    ${Viewport} ${Inner} > div:first-child {\n        color: #a3a3a3;\n        text-transform: uppercase;\n    }\n\n    ${Viewport} ${Inner} {\n        border-bottom: 1px solid #efefef;\n    }\n\n    @media (${TABLET}) {\n        transition: none;\n\n        ${Inner} {\n            grid-template-columns: 164px 1fr;\n        }\n    }\n`;\nconst ToolbarContainer = styled.div.withConfig({ displayName: \"ToolbarContainer\", componentId: \"sc-1c2086x\" }) `\n    border-bottom: 1px solid ${COLORS.Border};\n`;\nconst tz = moment.tz.guess();\nconst TooltipTheme = Object.assign({}, Tooltip.BottomTheme, {\n    left: 0,\n    top: 'auto',\n    transform: 'none',\n});\nconst StreamSelectorContainer = styled.div.withConfig({ displayName: \"StreamSelectorContainer\", componentId: \"sc-14hinhh\" }) `\n    padding: 14px 16px;\n    .select-stream-label {\n        margin-bottom: 8px;\n        font-weight: ${MEDIUM};\n    }\n`;\nconst StreamSelector = styled.div.withConfig({ displayName: \"StreamSelector\", componentId: \"sc-vellg2\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n`;\nconst DesktopStreamSelector = styled.div.withConfig({ displayName: \"DesktopStreamSelector\", componentId: \"sc-13j4mo1\" }) `\n    display: none;\n    @media (${TABLET}) {\n        display: block;\n    }\n`;\nconst MobileStreamSelector = styled.div.withConfig({ displayName: \"MobileStreamSelector\", componentId: \"sc-1q4kx4s\" }) `\n    background-color: ${COLORS.secondary};\n    padding: 24px;\n    @media (${TABLET}) {\n        display: none;\n    }\n    .label {\n        font-weight: ${MEDIUM};\n        margin-bottom: 8px;\n    }\n    .selector {\n        align-items: center;\n        display: flex;\n        gap: 8px;\n        margin-bottom: 5px;\n    }\n`;\nconst DesktopToolbar = styled(Toolbar).withConfig({ displayName: \"DesktopToolbar\", componentId: \"sc-1f8le16\" }) `\n    display: none;\n    @media (${TABLET}) {\n        display: block;\n    }\n`;\nconst UnstyledFeed = ({ className, errorComponent = null, inspectorFocused = false, streamData, streamLoaded, onPartitionChange, onSettingsButtonClick, onStreamChange, partition, partitions = [], streamId, streamIds = [streamId], }) => {\n    const [datapoint, setDatapoint] = useState();\n    useEffect(() => {\n        setDatapoint(undefined);\n    }, [streamId]);\n    const { metadata, data } = datapoint || { metadata: null, data: null };\n    const selectedMsgId = metadata && JSON.stringify(metadata.messageId);\n    const selectedTimestamp = metadata && metadata.timestamp;\n    const selection = Object.entries(data || {});\n    const { copy } = useCopy();\n    const rowRef = useRef(null);\n    const copyText = 'ontouchstart' in window ? 'Tap to copy' : 'Copy';\n    const streamOptions = useMemo(() => streamIds.map((id) => ({ value: id, label: truncateStreamName(id) })), [streamIds]);\n    const onCopyClick = (value) => (e) => {\n        const prevRow = rowRef.current;\n        rowRef.current = e.currentTarget;\n        // Using touch screen and \"focused\" row does not much current row? Do nothing.\n        if ('ontouchstart' in window && prevRow !== e.currentTarget) {\n            return;\n        }\n        // Value is not a string? Do nothing.\n        if (typeof value !== 'string') {\n            return;\n        }\n        copy(value, {\n            toastMessage: 'Field data copied to clipboard',\n        });\n    };\n    return (React.createElement(\"div\", { className: className },\n        streamOptions.length > 1 && (React.createElement(MobileStreamSelector, null,\n            React.createElement(\"p\", { className: 'label' }, \"Select a Stream\"),\n            React.createElement(\"div\", { className: 'selector' },\n                React.createElement(ModalStreamSelector, { streamIds: streamIds, selectedStream: streamId, onChange: onStreamChange }),\n                React.createElement(CopyButton, { value: streamId })))),\n        React.createElement(Container, { inspectorFocused: inspectorFocused },\n            React.createElement(LeftFiller, null),\n            React.createElement(Lhs, { className: 'no-overflow-desktop' }, (streamOptions.length > 1 ||\n                (partitions != null && partitions.length > 1)) && (React.createElement(ToolbarContainer, null,\n                streamOptions.length > 1 && (React.createElement(DesktopStreamSelector, null,\n                    React.createElement(StreamSelectorContainer, null,\n                        React.createElement(\"p\", { className: 'select-stream-label' }, \"Select a stream\"),\n                        React.createElement(StreamSelector, null,\n                            React.createElement(SelectField2, { placeholder: 'Select Stream', options: streamOptions, onChange: onStreamChange, isClearable: false, value: streamId }),\n                            React.createElement(CopyButton, { value: streamId }))))),\n                React.createElement(DesktopToolbar, { onPartitionChange: onPartitionChange, onSettingsButtonClick: onSettingsButtonClick, partition: partition, partitions: partitions || [], streamId: streamId })))),\n            React.createElement(Rhs, null),\n            React.createElement(RightFiller, null)),\n        React.createElement(Container, { inspectorFocused: inspectorFocused },\n            React.createElement(LeftFiller, null),\n            React.createElement(Lhs, null,\n                React.createElement(Header, null,\n                    React.createElement(Row, null,\n                        React.createElement(Layout.Pusher, null),\n                        React.createElement(Inner, null,\n                            React.createElement(Cell, { as: \"strong\" }, \"Timestamp\"),\n                            React.createElement(Cell, { as: \"strong\" }, \"Data\")))),\n                React.createElement(Viewport, null, !!streamLoaded &&\n                    (streamData || []).map((d) => {\n                        if (!d) {\n                            return null;\n                        }\n                        const msgId = JSON.stringify(d.metadata.messageId);\n                        const Tag = selectedMsgId === msgId ? 'strong' : 'span';\n                        return (React.createElement(Row, { key: msgId, onClick: () => setDatapoint((current) => (d === current ? undefined : d)) },\n                            React.createElement(Layout.Pusher, null),\n                            React.createElement(Inner, null,\n                                React.createElement(Cell, { as: Tag }, formatDateTime(d.metadata && d.metadata.timestamp, tz)),\n                                React.createElement(Cell, { as: Tag }, JSON.stringify(d.data)))));\n                    }))),\n            React.createElement(Rhs, null,\n                React.createElement(Header, null,\n                    React.createElement(Row, null,\n                        React.createElement(Inner, null,\n                            React.createElement(\"div\", null,\n                                React.createElement(\"strong\", null,\n                                    React.createElement(Cell, null, \"Inspector\")))))),\n                React.createElement(Viewport, null,\n                    !!selectedTimestamp && (React.createElement(Row, null,\n                        React.createElement(Inner, { as: Tooltip.Parent, onClick: onCopyClick(formatDateTime(selectedTimestamp, tz)) },\n                            React.createElement(\"div\", null, \"Timestamp\"),\n                            React.createElement(\"div\", null,\n                                React.createElement(Tooltip, { value: copyText, placement: TooltipTheme },\n                                    React.createElement(Cell, null, formatDateTime(selectedTimestamp, tz))))))),\n                    selection.map(([k, v]) => {\n                        const value = formatValue(v);\n                        return (React.createElement(Row, { key: `${k}${value}` },\n                            React.createElement(Inner, { as: Tooltip.Parent, onClick: onCopyClick(value) },\n                                React.createElement(\"div\", null,\n                                    React.createElement(Cell, null, k)),\n                                React.createElement(\"div\", null,\n                                    React.createElement(Tooltip, { value: copyText, placement: TooltipTheme },\n                                        React.createElement(Cell, null, value))))));\n                    }),\n                    errorComponent)),\n            React.createElement(RightFiller, null))));\n};\nconst Feed = styled(UnstyledFeed).withConfig({ displayName: \"Feed\", componentId: \"sc-yri3o2\" }) `\n    flex-grow: 1;\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    padding-bottom: 80px;\n    @media (${TABLET}) {\n        padding-bottom: 0;\n    }\n\n    ${Tooltip.Root} {\n        display: inline;\n        line-height: inherit;\n    }\n`;\nObject.assign(Feed, {\n    Cell,\n    Lhs,\n    Rhs,\n    Row,\n});\nexport default Feed;\n","import styled from 'styled-components';\nimport { TABLET } from '~/shared/utils/styled';\nconst Foot = styled.div.withConfig({ displayName: \"Foot\", componentId: \"sc-ky51qf\" }) `\n    align-items: center;\n    background: #ffffff;\n    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);\n    display: flex;\n    height: 80px;\n    padding: 0 24px;\n    position: fixed;\n    bottom: 0px;\n    width: 100%;\n\n    > div + div {\n        margin-left: 32px;\n    }\n\n    @media (${TABLET}) {\n        display: none;\n    }\n`;\nexport default Foot;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { useClient } from 'streamr-client-react';\nimport styled, { css } from 'styled-components';\nimport { EmptyState } from '~/components/EmptyState';\nimport emptyStateIcon from '~/shared/assets/images/empty_state_icon.png';\nimport emptyStateIcon2x from '~/shared/assets/images/empty_state_icon@2x.png';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Errors from '~/shared/components/Ui/Errors';\nimport useStreamData from '~/shared/hooks/useStreamData';\nimport { COLORS } from '~/shared/utils/styled';\nimport Feed from './Feed';\nimport Foot from './Foot';\nimport IconButton from './IconButton';\nimport Selector from './Selector';\nconst InspectorButton = styled(IconButton).withConfig({ displayName: \"InspectorButton\", componentId: \"sc-1ukkj7x\" }) `\n    width: 32px;\n    height: 32px;\n    text-align: center;\n    position: relative;\n    border: none;\n    background: none;\n    appearance: none;\n    border-radius: 2px;\n    color: #cdcdcd;\n\n    &:hover,\n    &:active,\n    &:focus {\n        background-color: #efefef;\n        color: #525252;\n    }\n\n    ${({ active }) => !!active &&\n    css `\n            background-color: #efefef;\n            color: #525252;\n        `}\n`;\nconst UnstyledStreamPreview = ({ streamsList, activePartition = 0, className, preselectedStreamId, previewDisabled = false, }) => {\n    const client = useClient();\n    const [inspectorFocused, setInspectorFocused] = useState(false);\n    const [selectedStreamId, setSelectedStreamId] = useState(!!preselectedStreamId && streamsList.includes(preselectedStreamId)\n        ? preselectedStreamId\n        : streamsList[0]);\n    const [partition, setPartition] = useState(activePartition);\n    const [loading, setIsLoading] = useState();\n    const [_, setStream] = useState();\n    const [partitions, setPartitions] = useState();\n    const streamData = useStreamData(selectedStreamId, {\n        tail: 20,\n        partition,\n    });\n    useEffect(() => {\n        const loadStreamData = async () => {\n            if (client) {\n                setIsLoading(true);\n                try {\n                    const result = await client.getStream(selectedStreamId);\n                    setStream(result);\n                    const metadata = await result.getMetadata();\n                    const partitionCount = metadata.partitions;\n                    setPartitions(partitionCount);\n                }\n                finally {\n                    setIsLoading(false);\n                }\n            }\n        };\n        loadStreamData();\n    }, [selectedStreamId, client]);\n    const partitionOptions = useMemo(() => partitions ? [...new Array(partitions)].map((_, index) => index) : undefined, [partitions]);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, { loading: loading }),\n        previewDisabled && (React.createElement(EmptyState, { image: React.createElement(\"img\", { src: emptyStateIcon, srcSet: `${emptyStateIcon2x} 2x`, alt: \"No permission to subscribe\" }) },\n            React.createElement(\"p\", null,\n                React.createElement(\"span\", null,\n                    \"You do not have permission to\",\n                    React.createElement(\"br\", null),\n                    \"subscribe to the stream.\")))),\n        !loading && (React.createElement(React.Fragment, null,\n            !previewDisabled && (React.createElement(Feed, { className: className, inspectorFocused: inspectorFocused, streamData: streamData, streamLoaded: !loading, \n                // errorComponent={\n                //     <Fragment>\n                //         {!!dataError && <Errors>{dataError}</Errors>}\n                //     </Fragment>\n                // }\n                onPartitionChange: setPartition, onSettingsButtonClick: undefined, onStreamChange: setSelectedStreamId, partition: partition, partitions: partitionOptions || [], streamId: selectedStreamId, streamIds: streamsList })),\n            React.createElement(Foot, null,\n                React.createElement(\"div\", null,\n                    React.createElement(InspectorButton, { active: !inspectorFocused, onClick: () => setInspectorFocused(false), type: \"button\" },\n                        React.createElement(SvgIcon, { name: \"list\" }))),\n                React.createElement(\"div\", null,\n                    React.createElement(InspectorButton, { active: !!inspectorFocused, onClick: () => setInspectorFocused(true), type: \"button\" },\n                        React.createElement(SvgIcon, { name: \"listInspect\" }))),\n                !inspectorFocused && !loading && (React.createElement(\"div\", null,\n                    React.createElement(Selector, { title: \"Partitions\", options: partitionOptions || [], active: partition, onChange: setPartition }))))))));\n};\nexport const StreamPreview = styled(UnstyledStreamPreview).withConfig({ displayName: \"StreamPreview\", componentId: \"sc-mmbziw\" }) `\n    background: #ffffff;\n    color: #323232;\n    font-size: 14px;\n    border-top: 1px solid ${COLORS.Border};\n    height: 100%;\n\n    ${Errors} {\n        margin: 20px 40px 0;\n    }\n\n    ${Errors} + ${Errors} {\n        margin-top: 1em;\n    }\n\n    ${Errors}:last-child {\n        padding-bottom: 20px;\n    }\n`;\n","import { useState, useRef, useEffect } from 'react';\nimport { useSubscribe } from 'streamr-client-react';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nfunction getEmptyData() {\n    return [];\n}\nfunction areMessagesSame(a, b) {\n    return a.toMessageRef().compareTo(b.toMessageRef()) === 0;\n}\nexport default function useStreamData(streamId, { partition = 0, activeFn: activeFnProp, onError: onErrorProp, tail = Number.POSITIVE_INFINITY, } = {}) {\n    const isMounted = useIsMounted();\n    const cacheRef = useRef(getEmptyData());\n    const [data, setData] = useState(getEmptyData());\n    const activeFn = typeof activeFnProp === 'function' ? activeFnProp : () => streamId;\n    const onErrorRef = useRef(onErrorProp);\n    useEffect(() => {\n        onErrorRef.current = onErrorProp;\n    }, [onErrorProp]);\n    useSubscribe({ id: streamId, partition: partition }, {\n        disabled: !activeFn(),\n        onError: (e) => {\n            console.warn(e);\n            if (typeof onErrorRef.current === 'function') {\n                onErrorRef.current();\n            }\n        },\n        onMessage(msg) {\n            if (!isMounted()) {\n                return;\n            }\n            const dataPoint = {\n                data: msg.getParsedContent(),\n                metadata: {\n                    messageId: msg.messageId,\n                    timestamp: msg.getTimestamp(),\n                },\n            };\n            const { current: cache } = cacheRef;\n            const existingMessage = cache.find((d) => areMessagesSame(d.metadata.messageId, dataPoint.metadata.messageId));\n            if (existingMessage) {\n                // Duplicate message -> skip it\n                return;\n            }\n            cache.unshift(dataPoint);\n            cache.length = Math.min(cache.length, tail);\n            setData([...cache]);\n        },\n    });\n    const firstRunRef = useRef(true);\n    useEffect(() => {\n        if (firstRunRef.current) {\n            firstRunRef.current = false;\n            return;\n        }\n        setData(getEmptyData());\n        cacheRef.current = getEmptyData();\n    }, [streamId, partition]);\n    return data;\n}\n","import { useEffect } from 'react';\nimport { produce } from 'immer';\nimport { create } from 'zustand';\nimport { getProjectPermissions } from '~/getters';\nimport { ProjectDraft } from '~/stores/projectDraft';\nimport { address0 } from '~/consts';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useWalletAccount } from './wallet';\nexport var ProjectPermission;\n(function (ProjectPermission) {\n    ProjectPermission[ProjectPermission[\"Buy\"] = 0] = \"Buy\";\n    ProjectPermission[ProjectPermission[\"Delete\"] = 1] = \"Delete\";\n    ProjectPermission[ProjectPermission[\"Edit\"] = 2] = \"Edit\";\n    ProjectPermission[ProjectPermission[\"Grant\"] = 3] = \"Grant\";\n})(ProjectPermission || (ProjectPermission = {}));\nfunction key(chainId, projectId, account) {\n    return JSON.stringify([chainId, projectId, account.toLowerCase()]);\n}\nconst useProjectAbilitiesStore = create((set) => {\n    const fetching = {};\n    return {\n        permissions: {},\n        async fetchPermissions(chainId, projectId, account) {\n            const pkey = key(chainId, projectId, account);\n            const { [pkey]: isFetching = false } = fetching;\n            if (isFetching) {\n                return;\n            }\n            try {\n                fetching[pkey] = true;\n                const permissions = await getProjectPermissions(chainId, projectId, account);\n                set((current) => produce(current, (next) => {\n                    const { cache } = next.permissions[pkey] || {};\n                    next.permissions[pkey] = {\n                        cache,\n                        value: permissions,\n                    };\n                }));\n            }\n            finally {\n                delete fetching[pkey];\n            }\n        },\n        invalidate(chainId, projectId, account) {\n            set((current) => produce(current, (next) => {\n                const pkay = key(chainId, projectId, account);\n                const { cache = 0 } = next.permissions[pkay] || {};\n                next.permissions[pkay] = {\n                    cache: cache + 1,\n                };\n            }));\n        },\n    };\n});\nfunction useProjectAbility(chainId, projectId, account, permission) {\n    const { fetchPermissions, permissions } = useProjectAbilitiesStore();\n    const address = account || address0;\n    const { value, cache = 0 } = (projectId ? permissions[key(chainId, projectId, address)] : undefined) || {};\n    useEffect(() => {\n        async function fn() {\n            if (!projectId) {\n                return;\n            }\n            try {\n                await fetchPermissions(chainId, projectId, address);\n            }\n            catch (e) {\n                console.warn('Could not fetch permissions', chainId, projectId, address, e);\n            }\n        }\n        fn();\n    }, [fetchPermissions, chainId, projectId, address, cache]);\n    switch (permission) {\n        case ProjectPermission.Buy:\n            return value?.canBuy;\n        case ProjectPermission.Delete:\n            return value?.canDelete;\n        case ProjectPermission.Edit:\n            return value?.canEdit;\n        case ProjectPermission.Grant:\n            return value?.canGrant;\n        default:\n            throw new Error('Invalid permission');\n    }\n}\nexport function useCurrentProjectAbility(permission) {\n    const chainId = useCurrentChainId();\n    return useProjectAbility(chainId, ProjectDraft.useEntity()?.id, useWalletAccount(), permission);\n}\n","import React from 'react';\nimport { formatPrice } from '~/marketplace/utils/price';\nimport { contractCurrencies as currencies } from '~/shared/utils/constants';\nimport { useTokenInfo } from '~/utils/tokens';\nexport default function FormattedPaymentRate({ amount = 0n, pricingTokenAddress, chainId, timeUnit, }) {\n    const { symbol = currencies.DATA, decimals = 18n } = useTokenInfo(pricingTokenAddress, chainId) || {};\n    return (React.createElement(React.Fragment, null, formatPrice(amount, currencies.PRODUCT_DEFINED, decimals, timeUnit, symbol)));\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport FormattedPaymentRate from '~/components/FormattedPaymentRate';\nimport { getProjectTypeName } from '~/getters';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport { useIsProjectBeingPurchased, usePurchaseCallback, } from '~/shared/stores/purchases';\nimport { ProjectType } from '~/shared/types';\nimport { REGULAR, TABLET } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { useIsAccessibleByCurrentWallet } from '~/stores/projectDraft';\nimport { getChainDisplayName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nexport function AccessManifest({ projectId, projectType, firstSalePoint, otherSalePoints, }) {\n    const prefix = `The streams in this ${getProjectTypeName(projectType)}`;\n    const count = otherSalePoints.length;\n    const purchase = usePurchaseCallback();\n    const projectChainId = useCurrentChainId();\n    const hasAccess = useIsAccessibleByCurrentWallet();\n    const isBeingPurchased = useIsProjectBeingPurchased(projectId);\n    const { pricePerSecond, chainId, pricingTokenAddress } = firstSalePoint;\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Root, null,\n        projectType === ProjectType.OpenData ? (React.createElement(\"p\", null,\n            prefix,\n            \" are public and can be accessed for \",\n            React.createElement(\"strong\", null, \"free\"),\n            \".\")) : (React.createElement(\"p\", null,\n            prefix,\n            \" can be accessed for\",\n            ' ',\n            React.createElement(\"strong\", null,\n                ' ',\n                React.createElement(FormattedPaymentRate, { amount: pricePerSecond, chainId: chainId, pricingTokenAddress: pricingTokenAddress, timeUnit: timeUnits.hour })),\n            ' ',\n            \"on \",\n            React.createElement(\"strong\", null, getChainDisplayName(chainId)),\n            count > 0 && (React.createElement(React.Fragment, null,\n                ' ',\n                \"and on \",\n                count,\n                \" other chain\",\n                count > 1 && 's')),\n            \".\")),\n        hasAccess === true && (React.createElement(Button, { as: Link, to: R.projectConnect(projectId, routeOptions(chainKey)) }, \"Connect\")),\n        hasAccess === false && (React.createElement(Button, { type: \"button\", waiting: isBeingPurchased, onClick: async () => {\n                try {\n                    await purchase(projectChainId, projectId);\n                }\n                catch (e) {\n                    if (isAbandonment(e)) {\n                        return;\n                    }\n                    console.warn('Purchase failed', e);\n                    errorToast({\n                        title: 'Purchase failed',\n                    });\n                }\n            } }, \"Get access\")),\n        typeof hasAccess === 'undefined' && (React.createElement(Button, { type: \"button\", waiting: true }, \"Loading\\u2026\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1y2ll9e\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    font-size: 18px;\n    font-weight: ${REGULAR};\n    flex-direction: column;\n\n    p {\n        margin: 0;\n    }\n\n    a {\n        width: 100%;\n        margin-top: 20px;\n    }\n\n    @media ${TABLET} {\n        flex-direction: row;\n\n        a {\n            width: auto;\n            margin-top: 0;\n            margin-left: 20px;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport FormattedPaymentRate from '~/components/FormattedPaymentRate';\nimport { getProjectTypeName } from '~/getters';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport ProjectPng from '~/shared/assets/images/project.png';\nimport { useIsProjectBeingPurchased, usePurchaseCallback, } from '~/shared/stores/purchases';\nimport { MEDIUM } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { getChainDisplayName, useCurrentChainId } from '~/utils/chains';\nimport { errorToast } from '~/utils/toast';\nconst GetAccessContainer = styled.div.withConfig({ displayName: \"GetAccessContainer\", componentId: \"sc-1v6qavr\" }) `\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    max-width: 488px;\n    margin: 0 auto;\n    padding: 15px 0 100px;\n\n    img {\n        display: block;\n    }\n\n    h1 {\n        font-weight: ${MEDIUM};\n        font-size: 34px;\n        line-height: 44px;\n        margin-bottom: 19px;\n        text-align: center;\n    }\n\n    p {\n        font-size: 18px;\n        line-height: 30px;\n        margin-bottom: 50px;\n        text-align: center;\n    }\n`;\nexport default function GetAccess({ projectId, projectName, projectType, salePoints, }) {\n    const [firstSalePoint, ...otherSalePoints] = salePoints;\n    const count = otherSalePoints.length;\n    const purchase = usePurchaseCallback();\n    const projectChainId = useCurrentChainId();\n    const isBeingPurchased = useIsProjectBeingPurchased(projectId);\n    if (!firstSalePoint) {\n        return null;\n    }\n    const { pricePerSecond, chainId, pricingTokenAddress } = firstSalePoint;\n    return (React.createElement(React.Fragment, null,\n        React.createElement(GetAccessContainer, null,\n            React.createElement(\"img\", { src: ProjectPng, alt: \"Get access\", width: \"290\", height: \"265\" }),\n            React.createElement(\"h1\", null,\n                \"Get access to \",\n                projectName),\n            React.createElement(\"p\", null,\n                \"The streams in this \",\n                getProjectTypeName(projectType),\n                \" can be accessed for\",\n                React.createElement(\"br\", null),\n                React.createElement(\"strong\", null,\n                    React.createElement(FormattedPaymentRate, { amount: pricePerSecond, chainId: chainId, pricingTokenAddress: pricingTokenAddress, timeUnit: timeUnits.hour })),\n                ' ',\n                \"on \",\n                React.createElement(\"strong\", null, getChainDisplayName(chainId)),\n                count > 0 && (React.createElement(React.Fragment, null,\n                    \"and on \",\n                    count,\n                    \" other chain\",\n                    count > 1 && 's'))),\n            React.createElement(Button, { type: \"button\", waiting: isBeingPurchased, onClick: async () => {\n                    try {\n                        await purchase(projectChainId, projectId);\n                    }\n                    catch (e) {\n                        if (isAbandonment(e)) {\n                            return;\n                        }\n                        console.warn('Purchase failed', e);\n                        errorToast({\n                            title: 'Purchase failed',\n                        });\n                    }\n                } }, \"Get access\"))));\n}\n","import React from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport isPreventable from '~/utils/isPreventable';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport default function ProjectLinkTabs({ projectId, disabled = false, }) {\n    const { pathname } = useLocation();\n    const chainKey = useCurrentChainKey();\n    if (!projectId || disabled) {\n        return (React.createElement(Tabs, null,\n            React.createElement(Tab, { id: \"overview\", tag: Link, selected: true, to: pathname, onClick: (e) => {\n                    if (isPreventable(e)) {\n                        e.preventDefault();\n                    }\n                } }, \"Project overview\"),\n            React.createElement(Tab, { id: \"connect\", disabled: true }, \"Connect\"),\n            React.createElement(Tab, { id: \"liveData\", disabled: true }, \"Live data\")));\n    }\n    return (React.createElement(Tabs, null,\n        React.createElement(Tab, { id: \"overview\", tag: Link, to: R.projectOverview(projectId, routeOptions(chainKey)), selected: pathname.startsWith(R.projectOverview(projectId)) }, \"Project overview\"),\n        React.createElement(Tab, { id: \"connect\", tag: Link, to: R.projectConnect(projectId, routeOptions(chainKey)), selected: pathname.startsWith(R.projectConnect(projectId)) }, \"Connect\"),\n        React.createElement(Tab, { id: \"liveData\", tag: Link, to: R.projectLiveData(projectId, routeOptions(chainKey)), selected: pathname.startsWith(R.projectLiveData(projectId)) }, \"Live data\")));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { z } from 'zod';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport { Tick } from '~/shared/components/Checkbox';\nimport Label from '~/shared/components/Ui/Label';\nimport Input from '~/shared/components/Ui/Text/StyledInput';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft, usePersistProjectCallback } from '~/stores/projectDraft';\nimport { OpenDataPayload } from '~/types/projects';\nexport default function TermsOfUse() {\n    const update = ProjectDraft.useUpdateEntity();\n    const { termsOfUse: { redistribution = false, commercialUse = false, reselling = false, storage = false, termsUrl, termsName, }, } = ProjectDraft.useEntity({ hot: true }) ||\n        getEmptyParsedProject({ type: ProjectType.OpenData });\n    const { 'termsOfUse.termsUrl': termsUrlError } = ProjectDraft.useDraft()?.errors || {};\n    const setErrors = ProjectDraft.useSetDraftErrors();\n    const persist = usePersistProjectCallback();\n    const busy = ProjectDraft.useIsDraftBusy();\n    return (React.createElement(React.Fragment, null,\n        React.createElement(Checkboxes, null,\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.redistribution = !termsOfUse.redistribution;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": redistribution }),\n                React.createElement(\"span\", null, \"Redistribution\")),\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.commercialUse = !termsOfUse.commercialUse;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": commercialUse }),\n                React.createElement(\"span\", null, \"Commercial use\")),\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.reselling = !termsOfUse.reselling;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": reselling }),\n                React.createElement(\"span\", null, \"Reselling\")),\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.storage = !termsOfUse.storage;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": storage }),\n                React.createElement(\"span\", null, \"Storage\"))),\n        React.createElement(Links, null,\n            React.createElement(\"div\", null,\n                React.createElement(Label, null, \"Link to detailed terms\"),\n                React.createElement(Input, { disabled: busy, invalid: !!termsUrlError, type: \"text\", placeholder: \"Add a URL\", value: termsUrl, onChange: (e) => {\n                        update(({ termsOfUse }) => {\n                            termsOfUse.termsUrl = e.target.value;\n                        });\n                        if (!termsUrlError) {\n                            /**\n                             * Only revalidate the URL if we're already in the red. This will prevent\n                             * on-the-fly validation before hitting submit assuming the user\n                             * knows what a URL is.\n                             */\n                            return;\n                        }\n                        try {\n                            OpenDataPayload.pick({\n                                termsOfUse: true,\n                            }).parse({\n                                termsOfUse: {\n                                    termsUrl: e.target.value,\n                                },\n                            });\n                            setErrors((errors) => {\n                                delete errors['termsOfUse.termsUrl'];\n                            });\n                        }\n                        catch (e) {\n                            if (e instanceof z.ZodError) {\n                                return;\n                            }\n                            console.warn('Failed to validate terms of use', e);\n                        }\n                    }, onKeyDown: ({ key }) => {\n                        if (key === 'Enter') {\n                            persist();\n                        }\n                    } })),\n            React.createElement(\"div\", null,\n                React.createElement(Label, null, \"Display name for link\"),\n                React.createElement(Input, { disabled: busy, type: \"text\", placeholder: \"Add a display name\", value: termsName, onChange: (e) => {\n                        update(({ termsOfUse }) => {\n                            termsOfUse.termsName = e.target.value;\n                        });\n                    }, onKeyDown: ({ key }) => {\n                        if (key === 'Enter') {\n                            persist();\n                        }\n                    } })))));\n}\nconst Checkboxes = styled.div.withConfig({ displayName: \"Checkboxes\", componentId: \"sc-178w5da\" }) `\n    background: #f1f1f1;\n    border-radius: 4px;\n    display: grid;\n    gap: 32px;\n    grid-template-columns: repeat(auto-fit, 146px);\n    padding: 24px;\n`;\nconst TickButton = styled.button.withConfig({ displayName: \"TickButton\", componentId: \"sc-gijhji\" }) `\n    align-items: center;\n    appearance: none;\n    background: transparent;\n    border: 0;\n    display: flex;\n    line-height: normal;\n    padding: 0;\n    white-space: nowrap;\n\n    ${Tick} {\n        flex-shrink: 0;\n        height: 24px;\n        margin-right: 12px;\n        width: 24px;\n    }\n`;\nconst Links = styled.div.withConfig({ displayName: \"Links\", componentId: \"sc-1mp7o93\" }) `\n    display: grid;\n    gap: 32px;\n    grid-template-columns: 1fr 1fr;\n    margin-top: 40px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport TextField from '~/shared/components/Ui/Text/StyledInput';\nimport { ProjectDraft } from '~/stores/projectDraft';\nimport { ProjectType } from '~/shared/types';\nimport { COLORS } from '~/shared/utils/styled';\nexport default function DataUnionFee({ disabled = false }) {\n    const update = ProjectDraft.useUpdateEntity();\n    const emptyProject = getEmptyParsedProject({ type: ProjectType.OpenData });\n    const project = ProjectDraft.useEntity({ hot: true }) || emptyProject;\n    const coldProject = ProjectDraft.useEntity() || emptyProject;\n    const isDataUnion = project.type === ProjectType.DataUnion;\n    return (React.createElement(Root, null,\n        React.createElement(\"p\", null, \"Set the fee you receive from this Data Union (% of total\\u00A0sales)\"),\n        React.createElement(InputWrap, null,\n            React.createElement(TextField, { placeholder: \"0\", value: (isDataUnion && project.adminFee) || '', readOnly: !isDataUnion, disabled: disabled, onChange: (e) => {\n                    update((draft) => {\n                        if (draft.type !== ProjectType.DataUnion) {\n                            return;\n                        }\n                        if (coldProject.type !== draft.type) {\n                            throw new Error('Cold and hot projects have different type, lol. Code much?');\n                        }\n                        draft.adminFee = e.target.value;\n                    });\n                } }),\n            React.createElement(Appendix, null, \"%\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-rzk10a\" }) `\n    align-items: center;\n    background-color: ${COLORS.inputBackground};\n    border-radius: 4px;\n    display: flex;\n    padding: 24px;\n\n    p {\n        flex-grow: 1;\n        margin: 0 56px 0 0;\n    }\n`;\nconst InputWrap = styled.div.withConfig({ displayName: \"InputWrap\", componentId: \"sc-sig4ws\" }) `\n    flex: 1;\n    min-width: 120px;\n    position: relative;\n\n    ${TextField} {\n        padding-right: 48px;\n    }\n`;\nconst Appendix = styled.div.withConfig({ displayName: \"Appendix\", componentId: \"sc-z0n4bi\" }) `\n    align-items: center;\n    border-left: 1px solid #efefef;\n    color: #525252;\n    display: flex;\n    height: 38px;\n    justify-content: center;\n    line-height: normal;\n    pointer-events: none;\n    position: absolute;\n    right: 1px;\n    top: 1px;\n    width: 36px;\n`;\n","import { ProjectDraft } from '~/stores/projectDraft';\nexport default function DataUnionPayment({ children, }) {\n    const { salePoints = {} } = ProjectDraft.useEntity({ hot: true }) || {};\n    const salePoint = Object.values(salePoints).find((salePoint) => salePoint?.enabled);\n    return children?.(salePoint) || null;\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport UnstyledRichMarkdownEditor from 'rich-markdown-editor';\nimport light from 'rich-markdown-editor/dist/styles/theme';\nimport { COLORS } from '~/shared/utils/styled';\nconst RichMarkdownEditor = styled(UnstyledRichMarkdownEditor).withConfig({ displayName: \"RichMarkdownEditor\", componentId: \"sc-1u4fry0\" }) `\n    justify-content: flex-start;\n\n    .block-menu-trigger {\n        align-items: center;\n        display: flex;\n        justify-content: center;\n    }\n`;\nconst defaultTheme = {\n    ...light,\n    toolbarBackground: COLORS.primaryContrast,\n    toolbarHoverBackground: COLORS.primaryDisabled,\n    toolbarItem: COLORS.primaryLight,\n    placeholder: COLORS.primaryDisabled,\n    link: COLORS.link,\n};\nconst defaultDisabledExtensions = [\n    'table',\n    'td',\n    'th',\n    'tr',\n    'emoji',\n    'container_notice',\n    'image',\n    'hr',\n    'embed',\n    'checkbox_item',\n    'checkbox_list',\n    'heading',\n    'placeholder',\n    'highlight',\n];\nexport default function RichTextEditor({ theme = defaultTheme, disableExtensions = defaultDisabledExtensions, onChange, ...props }) {\n    return (React.createElement(RichMarkdownEditor, { ...props, disableExtensions: disableExtensions, onChange: (getValue) => {\n            onChange?.(getValue().replace(/\\\\$/gm, '').trim());\n        }, theme: theme }));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useDropzone } from 'react-dropzone';\nimport { maxFileSizeForImageUpload, maxFileSizeForImageUpload as maxSize, } from '~/shared/utils/constants';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { errorToast } from '~/utils/toast';\nexport default function ImageFilePicker({ children, disabled = false, onDrop, onReject, ...props }) {\n    const isMounted = useIsMounted();\n    const { getRootProps, getInputProps, isDragActive } = useDropzone({\n        accept: {\n            'image/jpeg': ['.jpg', '.jpeg'],\n            'image/png': ['.png'],\n        },\n        maxSize,\n        maxFiles: 1,\n        async onDropAccepted([file]) {\n            onDrop?.(file);\n        },\n        onDropRejected([{ file }]) {\n            if (onReject) {\n                return void onReject(file);\n            }\n            if (!isMounted()) {\n                return;\n            }\n            if (file.size > maxFileSizeForImageUpload) {\n                errorToast({\n                    title: `Image file size must be less than ${0 | (maxFileSizeForImageUpload / 1e6)}MB`,\n                });\n            }\n        },\n        disabled,\n    });\n    return (React.createElement(ImageFilePickerRoot, { ...getRootProps(props), \"area-disabled\": disabled, \"$isDragActive\": isDragActive },\n        React.createElement(\"input\", { ...getInputProps() }),\n        children));\n}\nconst ImageFilePickerRoot = styled.div.withConfig({ displayName: \"ImageFilePickerRoot\", componentId: \"sc-15rcf6j\" }) `\n    cursor: pointer;\n    overflow: hidden;\n    position: relative;\n\n    &[area-disabled] {\n        opacity: 0.5;\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ImageFilePicker from '~/components/ImageFilePicker';\nimport { COLORS, DESKTOP } from '~/shared/utils/styled';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { getImageCrossOrigin } from '~/utils/ipfs';\nconst Radius = 16;\nexport const Wide = 1100;\nexport default function CoverImage({ disabled = false, onChange, src, }) {\n    return (React.createElement(Root, null,\n        React.createElement(ImageFilePicker, { disabled: disabled, onDrop: onChange },\n            React.createElement(Dropzone, null,\n                React.createElement(Placeholder, null,\n                    React.createElement(PngIcon, { name: \"imageUpload\", alt: \"\" }),\n                    React.createElement(Mobile, null, \"Tap to take a photo or browse for one\"),\n                    React.createElement(Desktop, null, src ? (React.createElement(React.Fragment, null, \"Drag & drop to replace your cover image or\\u00A0click to browse for one\")) : (React.createElement(React.Fragment, null, \"Drag & drop to upload a cover image or\\u00A0click to browse for one\")))),\n                src && (React.createElement(React.Fragment, null,\n                    React.createElement(Preview, { as: \"div\" }),\n                    React.createElement(Preview, { src: src, alt: \"New image\", crossOrigin: getImageCrossOrigin(src) })))))));\n}\nconst Mobile = styled.p.withConfig({ displayName: \"Mobile\", componentId: \"sc-893nzg\" }) `\n    @media ${DESKTOP} {\n        display: none;\n    }\n`;\nconst Desktop = styled.p.withConfig({ displayName: \"Desktop\", componentId: \"sc-1kdnjsy\" }) `\n    display: none;\n\n    @media ${DESKTOP} {\n        display: block;\n    }\n`;\nexport const Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1y009fx\" }) `\n    max-width: 100%;\n    position: relative;\n\n    @media (min-width: ${Wide}px) {\n        width: 400px;\n    }\n`;\nconst Preview = styled.img.withConfig({ displayName: \"Preview\", componentId: \"sc-h0ffq8\" }) `\n    display: block;\n    background: white;\n    height: 100%;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 100%;\n    visibility: visible;\n    opacity: 1;\n    transition: 0.5s;\n    transition-property: visibility, opacity;\n\n    & + & {\n        border-radius: ${Radius}px;\n    }\n`;\nconst Dropzone = styled.div.withConfig({ displayName: \"Dropzone\", componentId: \"sc-1gioxoy\" }) `\n    align-items: center;\n    aspect-ratio: 1 / 1;\n    background-color: ${COLORS.primaryLight};\n    border-radius: ${Radius}px;\n    color: #a3a3a3;\n    display: flex;\n    flex-direction: row;\n    font-weight: 500;\n    justify-content: center;\n    padding: 0 3em;\n    text-align: center;\n    width: 100%;\n\n    :hover ${Preview} {\n        opacity: 0;\n        transition-delay: 0.05s, 0s;\n        transition-duration: 0.05s;\n        visibility: hidden;\n    }\n`;\nconst Placeholder = styled.div.withConfig({ displayName: \"Placeholder\", componentId: \"sc-1f80nxl\" }) `\n    transform: translateY(3%);\n\n    > img {\n        margin: 0 auto;\n    }\n\n    p {\n        line-height: 1.75em;\n        margin: 2em 0 0;\n        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n    }\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport CropImageModal from '~/components/CropImageModal/CropImageModal';\nimport { PropertyDropdown, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport RichTextEditor from '~/components/RichTextEditor';\nimport { getBase64ForFile } from '~/getters';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport { ProjectType } from '~/shared/types';\nimport { COLORS } from '~/shared/utils/styled';\nimport { ProjectDraft, usePersistProjectCallback } from '~/stores/projectDraft';\nimport { OpenDataPayload } from '~/types/projects';\nimport { Layer } from '~/utils/Layer';\nimport CoverImage, { Root as CoverImageRoot, Wide } from './CoverImage';\nconst cropModal = toaster(CropImageModal, Layer.Modal);\nexport default function EditorHero() {\n    const { creator, contact, name, description, imageUrl } = ProjectDraft.useEntity({ hot: true }) ||\n        getEmptyParsedProject({\n            type: ProjectType.OpenData,\n        });\n    const [newImageUrl, setNewImageUrl] = useState();\n    const update = ProjectDraft.useUpdateEntity();\n    const errors = ProjectDraft.useDraft()?.errors || {};\n    const setErrors = ProjectDraft.useSetDraftErrors();\n    const busy = ProjectDraft.useIsDraftBusy();\n    const imageAbortControllerRef = useRef();\n    useEffect(() => {\n        const { current: abortController } = imageAbortControllerRef;\n        return () => {\n            abortController?.abort();\n        };\n    }, []);\n    const persist = usePersistProjectCallback();\n    function validate(fn) {\n        try {\n            fn();\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                const errors = {};\n                e.issues.forEach(({ path, message }) => {\n                    errors[path.join('.')] = message;\n                });\n                setErrors((existingErrors) => {\n                    Object.assign(existingErrors, errors);\n                });\n            }\n            throw e;\n        }\n    }\n    function resetError(key) {\n        setErrors((errors) => {\n            delete errors[key];\n        });\n    }\n    return (React.createElement(HeroContainer, null,\n        React.createElement(ImageWrap, null,\n            React.createElement(NameInput, { disabled: busy, type: \"text\", placeholder: \"Project name\", value: name, onChange: (e) => {\n                    update((project) => {\n                        project.name = e.target.value;\n                    });\n                }, onKeyDown: ({ key }) => {\n                    if (key === 'Enter') {\n                        persist();\n                    }\n                } }),\n            React.createElement(CoverImage, { disabled: busy, src: newImageUrl || imageUrl, onChange: async (file) => {\n                    imageAbortControllerRef.current?.abort();\n                    const abortController = new AbortController();\n                    imageAbortControllerRef.current = abortController;\n                    const { signal } = abortController;\n                    const croppedFile = await cropModal.pop({\n                        imageUrl: URL.createObjectURL(file),\n                    });\n                    if (signal.aborted) {\n                        return;\n                    }\n                    update((draft) => {\n                        draft.newImageToUpload = croppedFile;\n                    });\n                    const url = await getBase64ForFile(croppedFile);\n                    if (signal.aborted) {\n                        return;\n                    }\n                    setNewImageUrl(url);\n                } })),\n        React.createElement(DetailsWrap, null,\n            React.createElement(NameInput, { disabled: busy, type: \"text\", placeholder: \"Project name\", value: name, onChange: (e) => {\n                    update((project) => {\n                        project.name = e.target.value;\n                    });\n                }, onKeyDown: ({ key }) => {\n                    if (key === 'Enter') {\n                        persist();\n                    }\n                } }),\n            React.createElement(Desc, null,\n                React.createElement(RichTextEditor, { readOnly: busy, placeholder: \"Type something great about your project\\u2026\", defaultValue: description, onChange: (newDescription) => {\n                        update((project) => {\n                            project.description = newDescription;\n                        });\n                    } })),\n            React.createElement(PropertyDropdownList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors.creator, onChange: () => {\n                            resetError('creator');\n                        }, onDismiss: () => {\n                            resetError('creator');\n                        }, onSubmit: (value) => {\n                            resetError('creator');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    creator: true,\n                                }).parse({\n                                    creator: value,\n                                });\n                            });\n                            update((project) => {\n                                project.creator = value;\n                            });\n                        }, required: true, submitLabel: \"Add creator's name\", title: \"Please provide your name\", toggleIcon: React.createElement(PropertyIcon, { name: \"userFull\" }), value: creator, valuePlaceholder: \"Creator's name\" })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.url'], onChange: () => {\n                            resetError('contact.url');\n                        }, onDismiss: () => {\n                            resetError('contact.url');\n                        }, onSubmit: (value) => {\n                            resetError('contact.url');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { url: value },\n                                });\n                            });\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: {\n                                        url: value,\n                                    },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.url = value;\n                            });\n                        }, submitLabel: \"Add site URL\", title: \"Please add a site URL\", toggleIcon: React.createElement(PropertyIcon, { name: \"web\" }), value: contact.url, valuePlaceholder: \"Site URL\", placeholder: \"https://siteinfo.com\" })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.email'], onChange: () => {\n                            resetError('contact.email');\n                        }, onDismiss: () => {\n                            resetError('contact.email');\n                        }, onSubmit: (value) => {\n                            resetError('contact.email');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { email: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.email = value;\n                            });\n                        }, submitLabel: \"Add contact email\", title: \"Please add a contact email\", toggleIcon: React.createElement(PropertyIcon, { name: \"email\" }), value: contact.email, valuePlaceholder: \"Contact email\", placeholder: \"owner@example.com\" })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.twitter'], onChange: () => {\n                            resetError('contact.twitter');\n                        }, onDismiss: () => {\n                            resetError('contact.twitter');\n                        }, onSubmit: (value) => {\n                            resetError('contact.twitter');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { twitter: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.twitter = value;\n                            });\n                        }, submitLabel: \"Add Twitter link\", title: \"Please add Twitter link\", toggleIcon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": contact.twitter ? '#1da1f2' : undefined }), value: contact.twitter })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.telegram'], onChange: () => {\n                            resetError('contact.telegram');\n                        }, onDismiss: () => {\n                            resetError('contact.telegram');\n                        }, onSubmit: (value) => {\n                            resetError('contact.telegram');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { telegram: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.telegram = value;\n                            });\n                        }, submitLabel: \"Add Telegram link\", title: \"Please add Telegram link\", toggleIcon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": contact.telegram ? '#2aabee' : void 0 }), value: contact.telegram })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.reddit'], onChange: () => {\n                            resetError('contact.reddit');\n                        }, onDismiss: () => {\n                            resetError('contact.reddit');\n                        }, onSubmit: (value) => {\n                            resetError('contact.reddit');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { reddit: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.reddit = value;\n                            });\n                        }, submitLabel: \"Add Reddit link\", title: \"Please add Reddit link\", toggleIcon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": contact.reddit ? '#ff5700' : void 0 }), value: contact.reddit })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.linkedIn'], onChange: () => {\n                            resetError('contact.linkedIn');\n                        }, onDismiss: () => {\n                            resetError('contact.linkedIn');\n                        }, onSubmit: (value) => {\n                            resetError('contact.linkedIn');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { linkedIn: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.linkedIn = value;\n                            });\n                        }, submitLabel: \"Add LinkedIn link\", title: \"Please add LinkedIn link\", toggleIcon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": contact.linkedIn ? '#0077b5' : void 0 }), value: contact.linkedIn }))))));\n}\nconst NameInput = styled.input.withConfig({ displayName: \"NameInput\", componentId: \"sc-8a0jd8\" }) `\n    border: 0 !important;\n    display: block;\n    font-size: 34px;\n    line-height: 44px;\n    margin: 0 0 24px;\n    outline: 0 !important;\n    padding: 0;\n    width: 100%;\n\n    ::placeholder {\n        color: ${COLORS.primaryDisabled};\n    }\n\n    :disabled {\n        background: none;\n    }\n\n    @media (min-width: ${Wide}px) {\n        margin-top: 10px;\n    }\n`;\nconst ImageWrap = styled.div.withConfig({ displayName: \"ImageWrap\", componentId: \"sc-1aj19eq\" }) `\n    @media (min-width: ${Wide}px) {\n        ${NameInput} {\n            display: none;\n        }\n    }\n`;\nconst DetailsWrap = styled.div.withConfig({ displayName: \"DetailsWrap\", componentId: \"sc-o5xp98\" }) `\n    display: flex;\n    flex-direction: column;\n    flex-grow: 1;\n    min-width: 0;\n\n    ${NameInput} {\n        display: none;\n    }\n\n    @media (min-width: ${Wide}px) {\n        ${NameInput} {\n            display: block;\n        }\n    }\n`;\nconst Desc = styled.div.withConfig({ displayName: \"Desc\", componentId: \"sc-9950k8\" }) `\n    flex-grow: 1;\n    margin: 32px 0;\n\n    @media (min-width: ${Wide}px) {\n        margin: 0 0 48px;\n    }\n`;\nconst HeroContainer = styled.div.withConfig({ displayName: \"HeroContainer\", componentId: \"sc-19cpqte\" }) `\n    background-color: white;\n    border-radius: 16px;\n    padding: 24px;\n\n    @media (min-width: ${Wide}px) {\n        display: flex;\n        padding: 40px;\n\n        ${CoverImageRoot} {\n            flex-shrink: 0;\n            margin-right: 40px;\n        }\n    }\n`;\n","import styled, { css } from 'styled-components';\nimport { DESKTOP } from '~/shared/utils/styled';\nexport const FloatingToolbar = styled.div.withConfig({ displayName: \"FloatingToolbar\", componentId: \"sc-5u1pq0\" }) `\n    align-items: center;\n    backdrop-filter: blur(8px);\n    background: rgba(255, 255, 255, 0.9);\n    box-shadow: 0 0 30px rgba(0, 0, 0, 0.02), 0 0 2px rgba(0, 0, 0, 0.03);\n    display: flex;\n    height: 60px;\n    justify-content: flex-end;\n    left: 0;\n    opacity: 0;\n    padding: 0 24px;\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 9;\n    visiblity: hidden;\n    transform: translateY(-100%);\n    transition: 100ms;\n    transition-delay: 100ms, 0s, 0s;\n    transition-property: visibility, opacity, transform;\n\n    @media ${DESKTOP} {\n        padding: 0 40px;\n    }\n\n    ${({ $active = false }) => $active &&\n    css `\n            opacity: 1;\n            visibility: visible;\n            transform: translateY(0);\n            transition-delay: 0s;\n        `}\n`;\n","import { useEffect, useRef, useState } from 'react';\nconst isSSR = typeof IntersectionObserver === 'undefined';\nexport function useInViewport() {\n    const [target, setTarget] = useState(null);\n    const targetRef = useRef(null);\n    const [inViewport, setInViewport] = useState(false);\n    const observerRef = useRef(isSSR\n        ? undefined\n        : new IntersectionObserver((entries) => {\n            entries.forEach((entry) => {\n                if (entry.target === targetRef.current) {\n                    setInViewport(entry.isIntersecting);\n                }\n            });\n        }));\n    useEffect(() => {\n        const { current: observer } = observerRef;\n        targetRef.current = target;\n        if (target) {\n            observer?.observe(target);\n        }\n        else {\n            setInViewport(false);\n        }\n        return () => {\n            if (target) {\n                observer?.unobserve(target);\n            }\n        };\n    }, [target]);\n    useEffect(() => {\n        const { current: observer } = observerRef;\n        return () => {\n            observer?.disconnect();\n        };\n    }, []);\n    useEffect(() => {\n        if (isSSR) {\n            // Fallback for when `IntersectionObserver` isn't there. We do it in `useEffect` to\n            // cover non-SSR environments that don't give us `IntersectionObserver`.\n            setInViewport(true);\n        }\n    }, []);\n    return [setTarget, inViewport];\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { FloatingToolbar } from '~/components/FloatingToolbar';\nimport { NavContainer } from '~/components/Nav';\nimport { LogoLink, Navbar, NavbarItem } from '~/components/Nav/Nav.styles';\nimport { useInViewport } from '~/hooks/useInViewport';\nimport Logo from '~/shared/components/Logo';\nimport { REGULAR } from '~/shared/utils/styled';\nimport { ProjectDraft, usePersistProjectCallback } from '~/stores/projectDraft';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst FlexNavbar = styled(Navbar).withConfig({ displayName: \"FlexNavbar\", componentId: \"sc-9eby5k\" }) `\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n`;\nconst FlexNavbarItem = styled(NavbarItem).withConfig({ displayName: \"FlexNavbarItem\", componentId: \"sc-qze8rp\" }) `\n    display: flex;\n    align-items: center;\n\n    button {\n        margin-left: 10px;\n    }\n\n    h1 {\n        font-size: 18px;\n        font-weight: ${REGULAR};\n        margin: 0;\n        padding-left: 16px;\n    }\n`;\nexport default function EditorNav() {\n    const busy = ProjectDraft.useIsDraftBusy();\n    const clean = ProjectDraft.useIsDraftClean();\n    const { id: projectId } = ProjectDraft.useEntity() || {};\n    const persist = usePersistProjectCallback();\n    const [attach, isSaveButtonVisible] = useInViewport();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NavContainer, null,\n        React.createElement(FloatingToolbar, { \"$active\": !isSaveButtonVisible },\n            React.createElement(FlexNavbarItem, null,\n                React.createElement(Button, { as: Link, to: R.projects(routeOptions(chainKey)), kind: \"transparent\" }, \"Exit\"),\n                React.createElement(Button, { type: \"button\", disabled: busy || clean, onClick: () => void persist() }, \"Publish\"))),\n        React.createElement(FlexNavbar, null,\n            React.createElement(FlexNavbarItem, null,\n                React.createElement(LogoLink, { href: R.root() },\n                    React.createElement(Logo, null)),\n                React.createElement(\"h1\", null, projectId ? React.createElement(React.Fragment, null, \"Edit a project\") : React.createElement(React.Fragment, null, \"Create a project\"))),\n            React.createElement(FlexNavbarItem, null,\n                React.createElement(Button, { as: Link, to: R.projects(routeOptions(chainKey)), kind: \"transparent\" }, \"Exit\"),\n                React.createElement(Button, { disabled: busy || clean, onClick: () => void persist(), ref: attach, type: \"button\" }, \"Publish\")))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { LoadMoreButton } from '~/components/LoadMore';\nconst StyledContainer = styled.div.withConfig({ displayName: \"StyledContainer\", componentId: \"sc-wg5uct\" }) `\n    display: flex;\n    justify-content: center;\n`;\nconst LoadMore = ({ onClick, hasMoreSearchResults, preserveSpace, className }) => {\n    if (!hasMoreSearchResults) {\n        return preserveSpace ? React.createElement(StyledContainer, { className: className }) : null;\n    }\n    return (React.createElement(StyledContainer, { className: className },\n        React.createElement(LoadMoreButton, { onClick: onClick, kind: \"primary2\" }, \"Load more\")));\n};\nexport default LoadMore;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport LoadMore from '~/marketplace/components/LoadMore';\nimport Checkbox from '~/shared/components/Checkbox';\nimport { COLORS, DESKTOP, MEDIUM, REGULAR, TABLET } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst ROW_HEIGHT = 88;\nconst Row = styled.div.withConfig({ displayName: \"Row\", componentId: \"sc-3gj1eq\" }) `\n    align-items: center;\n    padding-left: 24px;\n`;\nconst TableGrid = styled(Row).withConfig({ displayName: \"TableGrid\", componentId: \"sc-mr4qn2\" }) `\n    display: grid;\n    gap: 8px;\n    grid-template-columns: minmax(0, 1fr) 18px;\n\n    @media ${TABLET} {\n        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 18px;\n    }\n\n    @media ${DESKTOP} {\n        grid-template-columns: minmax(0, 3fr) repeat(5, minmax(0, 1fr)) 18px;\n    }\n`;\nconst Table = styled.div.withConfig({ displayName: \"Table\", componentId: \"sc-1ag8w8i\" }) `\n    overflow: auto;\n`;\nconst TableHeader = styled(TableGrid).withConfig({ displayName: \"TableHeader\", componentId: \"sc-1azielj\" }) `\n    font-weight: ${MEDIUM};\n    height: ${ROW_HEIGHT}px;\n    font-size: 15px;\n    line-height: 26px;\n    color: ${COLORS.primaryLight};\n    border-bottom: 1px solid #f8f8f8;\n    position: sticky;\n    top: 0;\n    z-index: 1;\n`;\nconst TableRows = styled.div.withConfig({ displayName: \"TableRows\", componentId: \"sc-1ubwdc7\" }) `\n    height: ${({ rowCount }) => Math.max(rowCount, 1) * (ROW_HEIGHT + 1)}px;\n`;\nconst TableRow = styled(TableGrid).withConfig({ displayName: \"TableRow\", componentId: \"sc-bdllnd\" }) `\n    font-size: 16px;\n    line-height: 26px;\n    height: ${ROW_HEIGHT}px;\n    max-height: ${ROW_HEIGHT}px;\n    box-sizing: content-box;\n    color: ${COLORS.primaryLight};\n\n    &:not(:last-child) {\n        border-bottom: 1px solid #f8f8f8;\n    }\n`;\nconst GridCell = styled.span.withConfig({ displayName: \"GridCell\", componentId: \"sc-qlr3kn\" }) `\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    ${({ onlyDesktop }) => onlyDesktop &&\n    css `\n            display: none;\n\n            @media ${DESKTOP} {\n                display: block;\n            }\n        `}\n\n    ${({ onlyTablet }) => onlyTablet &&\n    css `\n            display: none;\n\n            @media ${TABLET} {\n                display: block;\n            }\n\n            @media ${DESKTOP} {\n                display: none;\n            }\n        `}\n\n  ${({ notOnTablet }) => notOnTablet &&\n    css `\n            display: block;\n\n            @media ${TABLET} {\n                display: none;\n            }\n\n            @media ${DESKTOP} {\n                display: block;\n            }\n        `}\n\n  ${({ flex }) => flex\n    ? css `\n                  display: flex;\n              `\n    : ''}\n`;\nconst NoStreams = styled.div.withConfig({ displayName: \"NoStreams\", componentId: \"sc-ieoway\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    height: 100%;\n    font-size: 14px;\n    line-height: 18px;\n    color: ${COLORS.primaryLight};\n`;\nconst StreamDetails = styled(Link).withConfig({ displayName: \"StreamDetails\", componentId: \"sc-tgyfu6\" }) `\n    font-size: 16px;\n    line-height: 26px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n\n    &:active,\n    &:link,\n    &:visited,\n    &:hover {\n        color: ${COLORS.primaryLight};\n    }\n`;\nconst StreamId = styled(GridCell).withConfig({ displayName: \"StreamId\", componentId: \"sc-n9fbro\" }) `\n    font-weight: ${MEDIUM};\n`;\nconst StreamDescription = styled(GridCell).withConfig({ displayName: \"StreamDescription\", componentId: \"sc-7m5ho1\" }) `\n    font-weight: ${REGULAR};\n`;\nexport const StreamSelectTable = ({ streams, streamStats, loadMore, hasMoreResults, onSelectionChange, selected, disabled = false, }) => {\n    const [selectedStreams, setSelectedStreams] = useState({});\n    const [allSelected, setAllSelected] = useState(false);\n    const emitSelectedStreamsChange = useCallback((streams) => {\n        if (onSelectionChange) {\n            const selectedStreamsArray = Object.entries(streams)\n                .filter(([, isSelected]) => isSelected)\n                .map(([streamId]) => streamId);\n            onSelectionChange(selectedStreamsArray);\n        }\n    }, [onSelectionChange]);\n    const handleSelectChange = useCallback((streamId) => {\n        const newSelectedStreams = {\n            ...selectedStreams,\n            [streamId]: !selectedStreams[streamId],\n        };\n        setSelectedStreams(newSelectedStreams);\n        emitSelectedStreamsChange(newSelectedStreams);\n    }, [selectedStreams, emitSelectedStreamsChange]);\n    const handleSelectAllChange = useCallback(() => {\n        const shouldAllBeChecked = !allSelected;\n        const newSelectedStreams = {};\n        streams.forEach((stream) => {\n            newSelectedStreams[stream.id] = shouldAllBeChecked;\n        });\n        setSelectedStreams(newSelectedStreams);\n        setAllSelected(shouldAllBeChecked);\n        emitSelectedStreamsChange(newSelectedStreams);\n    }, [allSelected, streams, emitSelectedStreamsChange]);\n    useEffect(() => {\n        const selectedStreamsArray = Object.entries(selectedStreams)\n            .filter(([, isSelected]) => isSelected)\n            .map(([streamId]) => streamId);\n        if (streams.length > 0 &&\n            selectedStreamsArray.length === streams.length &&\n            !allSelected) {\n            setAllSelected(true);\n        }\n        if (selectedStreamsArray.length !== streams.length && allSelected) {\n            setAllSelected(false);\n        }\n    }, [selectedStreams, streams, allSelected]);\n    useEffect(() => {\n        if (selected && selected.length) {\n            const newSelectedStreams = {};\n            selected.forEach((streamId) => {\n                newSelectedStreams[streamId] = true;\n            });\n            setSelectedStreams(newSelectedStreams);\n        }\n    }, [selected]);\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(\"div\", null,\n        React.createElement(Table, null,\n            React.createElement(TableHeader, null,\n                React.createElement(GridCell, null, \"Stream ID\"),\n                React.createElement(GridCell, { onlyTablet: true }, \"Description\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Live peers\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Msg/s\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Access\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Publishers\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Subscribers\"),\n                React.createElement(GridCell, { flex: true },\n                    React.createElement(Checkbox, { value: allSelected, onChange: handleSelectAllChange, disabled: disabled }))),\n            React.createElement(TableRows, { rowCount: streams.length },\n                streams.map((s) => {\n                    const stats = streamStats ? streamStats[s.id] : null;\n                    return (React.createElement(TableRow, { key: s.id },\n                        React.createElement(StreamDetails, { to: R.stream(s.id, routeOptions(chainKey)) },\n                            React.createElement(StreamId, { title: s.id }, truncateStreamName(s.id, 40)),\n                            '\\n',\n                            React.createElement(StreamDescription, { notOnTablet: true }, s.metadata?.description ?? '')),\n                        React.createElement(GridCell, { onlyTablet: true }, s.metadata?.description ?? ''),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats?.peerCount ?? '-'),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats?.messagesPerSecond ?? '-'),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats == null\n                            ? '-'\n                            : stats.subscriberCount == null\n                                ? 'Public'\n                                : 'Private'),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats == null\n                            ? '-'\n                            : stats.publisherCount == null\n                                ? '∞'\n                                : stats.publisherCount),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats == null\n                            ? '-'\n                            : stats.subscriberCount == null\n                                ? '∞'\n                                : stats.subscriberCount),\n                        React.createElement(GridCell, { flex: true },\n                            React.createElement(Checkbox, { value: selectedStreams[s.id], onChange: () => {\n                                    handleSelectChange(s.id);\n                                }, disabled: disabled }))));\n                }),\n                streams.length === 0 && (React.createElement(NoStreams, null, \"No streams that match your query\")))),\n        loadMore != null && (React.createElement(LoadMore, { hasMoreSearchResults: !!hasMoreResults, onClick: loadMore, preserveSpace: false }))));\n};\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { address0 } from '~/consts';\nimport { getStreamsFromIndexer } from '~/hooks/streams';\nimport { getStreamsOwnedBy } from '~/services/streams';\nimport SearchBar from '~/shared/components/SearchBar';\nimport { StreamSelectTable } from '~/shared/components/StreamSelectTable';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft } from '~/stores/projectDraft';\nconst PageSize = 10;\nconst EmptyStreams = [];\nexport default function EditorStreams() {\n    const { type: projectType = ProjectType.OpenData, streams: projectStreams = EmptyStreams, } = ProjectDraft.useEntity({ hot: true }) || {};\n    const busy = ProjectDraft.useIsDraftBusy();\n    const [searchValue, setSearchValue] = useState('');\n    const account = useWalletAccount() || address0;\n    const [foundStreams, setFoundStreams] = useState([]);\n    const [page, setPage] = useState(0);\n    const streams = foundStreams.slice(0, (page + 1) * PageSize);\n    const [streamStats, setStreamStats] = useState({});\n    const hasMore = foundStreams.length > streams.length;\n    const abortControllerRef = useRef();\n    const update = ProjectDraft.useUpdateEntity();\n    const chainId = useCurrentChainId();\n    /**\n     * @todo Refactor to use `useInfiniteQuery`\n     */\n    const search = useCallback((phrase) => {\n        abortControllerRef.current?.abort();\n        const abortController = new AbortController();\n        abortControllerRef.current = abortController;\n        setTimeout(async () => {\n            try {\n                const foundStreams = await getStreamsOwnedBy(chainId, account, phrase, projectType === ProjectType.OpenData);\n                /**\n                 * If the signal got aborted we ignore the rest of the\n                 * flow. Aborting happens in a couple of reasonable places\n                 * throughout this components.\n                 */\n                if (abortController.signal.aborted) {\n                    return;\n                }\n                setFoundStreams(foundStreams);\n                setPage(0);\n            }\n            catch (e) {\n                console.warn('Faild to load streams', e);\n            }\n        });\n        return () => {\n            abortController.abort();\n        };\n    }, [account, projectType, chainId]);\n    /**\n     * Keep a ref for the search value to avoid triggering the below \"auto-search\"\n     * `useEffect`. Searching directly associated with the search value changes gets\n     * triggered from within SearchBar's `onChange` callback. See below.\n     */\n    const searchValueRef = useRef(searchValue);\n    useEffect(() => {\n        /**\n         * `search` returns a cancel/abort callback which we use as the teardown\n         * callback of this effect. It's important.\n         */\n        return search(searchValueRef.current);\n    }, [search]);\n    useEffect(() => {\n        /**\n         * This effect aborts the ongoing search on unmount. We aim mainly at the searches\n         * initiated by the `SearchBar`. Searches initiated by the \"auto-search\" `useEffect`\n         * above get aborted automatically by the hook.\n         */\n        const { current: abortController } = abortControllerRef;\n        return () => {\n            abortController?.abort();\n        };\n    }, []);\n    useEffect(() => {\n        let mounted = true;\n        const startAt = page * PageSize;\n        const streamIds = foundStreams\n            .slice(startAt, startAt + PageSize)\n            .map(({ id }) => id);\n        setTimeout(async () => {\n            try {\n                const { streams: stats } = await getStreamsFromIndexer(chainId, {\n                    pageSize: Math.min(1000, streamIds.length),\n                    streamIds,\n                });\n                if (!mounted || !stats.length) {\n                    return;\n                }\n                setStreamStats((prev) => ({\n                    ...prev,\n                    ...Object.fromEntries(stats.map((is) => [is.id, is])),\n                }));\n            }\n            catch (e) {\n                console.warn('Fetching stream stats failed', e);\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [page, foundStreams, chainId]);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(SearchBar, { disabled: busy, placeholder: \"Search stream\", value: searchValue, onChange: (value) => {\n                setSearchValue(value);\n                searchValueRef.current = value;\n                /**\n                 * Each new value triggers a search. Previous searches are\n                 * cancelled via the `abortControllerRef`.\n                 */\n                search(value);\n            } }),\n        React.createElement(StreamSelectTable, { disabled: busy, streams: streams, streamStats: streamStats, loadMore: () => {\n                setPage((p) => p + 1);\n            }, hasMoreResults: hasMore, onSelectionChange: (streamIds) => {\n                update((project) => {\n                    project.streams = streamIds.sort();\n                });\n            }, selected: projectStreams })));\n}\n","import React, { useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { Button } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport Layout, { LayoutColumn, LayoutInner as PrestyledLayoutInner, } from '~/components/Layout';\nimport { SegmentGrid } from '~/components/NetworkPageSegment';\nimport BeneficiaryAddressEditor from '~/components/SalePointSelector/BeneficiaryAddressEditor';\nimport SalePointOption, { DataUnionOption, } from '~/components/SalePointSelector/SalePointOption';\nimport SalePointTokenSelector from '~/components/SalePointSelector/SalePointTokenSelector';\nimport { getProjectTypeTitle } from '~/getters';\nimport ProjectLinkTabs from '~/pages/ProjectPage/ProjectLinkTabs';\nimport TermsOfUse from '~/pages/ProjectPage/TermsOfUse';\nimport { deleteProject } from '~/services/projects';\nimport { DetailsPageHeader } from '~/shared/components/DetailsPageHeader';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft } from '~/stores/projectDraft';\nimport { SalePointsPayload } from '~/types/projects';\nimport { getChainDisplayName, getChainKey, getMarketplaceChainConfigs, useCurrentChainId, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { toastedOperation } from '~/utils/toastedOperation';\nimport DataUnionFee from './DataUnionFee';\nimport DataUnionPayment from './DataUnionPayment';\nimport EditorHero from './EditorHero';\nimport EditorNav from './EditorNav';\nimport EditorStreams from './EditorStreams';\nconst EmptySalePoints = {};\nconst EmptyErrors = {};\nexport default function ProjectEditorPage() {\n    const { id: projectId, type = ProjectType.OpenData, creator = '', salePoints: existingSalePoints = EmptySalePoints, } = ProjectDraft.useEntity({ hot: true }) || {};\n    const busy = ProjectDraft.useIsDraftBusy();\n    const { fetching = false, errors = EmptyErrors } = ProjectDraft.useDraft() || {};\n    const update = ProjectDraft.useUpdateEntity();\n    const chainId = useCurrentChainId();\n    const availableChainConfigs = useMemo(() => getMarketplaceChainConfigs(chainId), [chainId]);\n    const salePoints = availableChainConfigs\n        .map(({ id }) => existingSalePoints[getChainKey(id)])\n        .filter(Boolean);\n    function onSalePointChange(value) {\n        if (busy) {\n            return;\n        }\n        update((draft) => {\n            const chainKey = getChainKey(value.chainId);\n            if (draft.salePoints[chainKey]?.readOnly) {\n                /**\n                 * Read-only sale point must not be updated.\n                 */\n                return;\n            }\n            draft.salePoints[chainKey] = value;\n            if (draft.type !== ProjectType.DataUnion) {\n                return;\n            }\n            if (value.enabled) {\n                /**\n                 * Disable all other sale points making the current one the sole\n                 * selection. We're mimicing radio's behaviour here.\n                 */\n                Object.values(draft.salePoints).forEach((salePoint) => {\n                    if (!salePoint?.enabled || salePoint.chainId === value.chainId) {\n                        return;\n                    }\n                    salePoint.enabled = false;\n                });\n            }\n        });\n    }\n    const setErrors = ProjectDraft.useSetDraftErrors();\n    const isMounted = useIsMounted();\n    const navigate = useNavigate();\n    return (React.createElement(Layout, { innerComponent: LayoutInner, nav: React.createElement(EditorNav, null), pageTitle: projectId ? 'Edit project' : 'Create a new project' },\n        React.createElement(DetailsPageHeader, { pageTitle: !!creator && (React.createElement(React.Fragment, null,\n                getProjectTypeTitle(type),\n                \" by\",\n                React.createElement(\"strong\", null,\n                    \"\\u00A0\",\n                    creator))), rightComponent: React.createElement(ProjectLinkTabs, null) }),\n        React.createElement(LoadingIndicator, { loading: busy }),\n        React.createElement(LayoutColumn, null, !fetching && (React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null,\n                React.createElement(EditorHero, null)),\n            type === ProjectType.PaidData && (React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Select chains\"),\n                        React.createElement(\"p\", null, \"Access to the project data can be purchased on the selected chains. You can set the payment token, price, and beneficiary address on each chain separately.\")),\n                    React.createElement(Content, { \"$desktopMaxWidth\": 728 }, salePoints.map((salePoint) => {\n                        const chainKey = getChainKey(salePoint.chainId);\n                        const chainName = getChainDisplayName(salePoint.chainId);\n                        const beneficiaryErrorKey = `salePoints.${chainKey}.beneficiaryAddress`;\n                        const beneficiaryInvalid = !!errors[beneficiaryErrorKey];\n                        return (React.createElement(SalePointOption, { key: salePoint.chainId, multiSelect: true, onSalePointChange: onSalePointChange, salePoint: salePoint },\n                            React.createElement(\"h4\", null,\n                                \"Set the payment token and price on the \",\n                                chainName,\n                                \" chain\"),\n                            React.createElement(\"p\", null, \"You can set a price for others to access the streams in your project. The price can be set in DATA or any other ERC-20 token.\"),\n                            React.createElement(SalePointTokenSelector, { disabled: salePoint.readOnly, onSalePointChange: onSalePointChange, salePoint: salePoint }),\n                            React.createElement(\"h4\", null, \"Set beneficiary\"),\n                            React.createElement(\"p\", null,\n                                \"This wallet address receives the payments for this product on\",\n                                ' ',\n                                chainName,\n                                \" chain.\"),\n                            React.createElement(BeneficiaryAddressEditor, { invalid: beneficiaryInvalid, disabled: busy || salePoint.readOnly, value: salePoint.beneficiaryAddress, onChange: (beneficiaryAddress) => {\n                                    const newSalePoint = {\n                                        ...salePoint,\n                                        beneficiaryAddress,\n                                    };\n                                    onSalePointChange?.(newSalePoint);\n                                    /**\n                                     * If the field is valid we skip on-the-fly validation assuming\n                                     * correct user input at first.\n                                     */\n                                    if (!beneficiaryInvalid) {\n                                        return;\n                                    }\n                                    try {\n                                        try {\n                                            SalePointsPayload.parse({\n                                                [chainName]: newSalePoint,\n                                            });\n                                        }\n                                        catch (e) {\n                                            if (!(e instanceof\n                                                z.ZodError)) {\n                                                throw e;\n                                            }\n                                            const issues = e.issues.filter(({ path }) => path.slice(-1)[0] ===\n                                                'beneficiaryAddress');\n                                            if (issues.length) {\n                                                throw new z.ZodError(issues);\n                                            }\n                                        }\n                                        setErrors((errors0) => {\n                                            delete errors0[beneficiaryErrorKey];\n                                        });\n                                    }\n                                    catch (e) {\n                                        if (e instanceof\n                                            z.ZodError) {\n                                            return;\n                                        }\n                                        console.warn('Failed to validate beneficiary address', e);\n                                    }\n                                } })));\n                    }))))),\n            type === ProjectType.DataUnion && (React.createElement(DataUnionPayment, null, (salePoint) => (React.createElement(React.Fragment, null,\n                !projectId && (React.createElement(Segment, null,\n                    React.createElement(ColoredBox, { \"$pad\": true },\n                        React.createElement(Content, null,\n                            React.createElement(\"h2\", null, \"Select chain\"),\n                            React.createElement(\"p\", null, \"Select the chain for your Data Union.\")),\n                        React.createElement(Content, { \"$desktopMaxWidth\": 728 }, salePoints.map((salePoint) => (React.createElement(SalePointOption, { key: salePoint.chainId, onSalePointChange: onSalePointChange, salePoint: salePoint },\n                            React.createElement(DataUnionOption, { salePoint: salePoint, onSalePointChange: onSalePointChange })))))))),\n                React.createElement(Segment, null,\n                    React.createElement(ColoredBox, { \"$pad\": true },\n                        React.createElement(Content, null,\n                            React.createElement(\"h2\", null, salePoint ? (React.createElement(React.Fragment, null,\n                                \"Set the payment token and price on\\u00A0the\\u00A0\",\n                                getChainDisplayName(salePoint.chainId),\n                                ' ',\n                                \"chain\")) : (React.createElement(React.Fragment, null, \"Set the payment token and price\"))),\n                            React.createElement(\"p\", null, \"You can set a price for others to access the streams in your project. The price can be set in DATA or any other ERC-20 token.\")),\n                        salePoint ? (React.createElement(Content, { \"$desktopMaxWidth\": 728 },\n                            React.createElement(SalePointTokenSelector, { disabled: salePoint.readOnly, salePoint: salePoint, onSalePointChange: onSalePointChange }))) : (React.createElement(React.Fragment, null, \"Select a chain first!\")))),\n                !projectId && salePoint?.beneficiaryAddress ? (React.createElement(React.Fragment, null)) : (React.createElement(Segment, null,\n                    React.createElement(ColoredBox, { \"$pad\": true },\n                        React.createElement(Content, null,\n                            React.createElement(\"h2\", null, \"Data Union admin fee\")),\n                        React.createElement(Content, { \"$desktopMaxWidth\": 728 },\n                            React.createElement(DataUnionFee, null))))))))),\n            React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Add streams\")),\n                    React.createElement(EditorStreams, null))),\n            React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Set terms of use\"),\n                        React.createElement(\"p\", null, \"Indicate the terms of use you prefer, either simply, by checking the appropriate boxes below to\\u00A0show usage types are permitted, or optionally, give more detail by providing a link to your own terms of use document.\")),\n                    React.createElement(Content, { \"$desktopMaxWidth\": 728 },\n                        React.createElement(TermsOfUse, null)))),\n            projectId && (React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$borderColor\": \"#cdcdcd\", \"$backgroundColor\": \"transparent\", \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Delete project\"),\n                        React.createElement(\"p\", null, \"Delete this project forever. You can't undo this.\")),\n                    React.createElement(Button, { kind: \"destructive\", onClick: async () => {\n                            try {\n                                await toastedOperation('Delete project', () => deleteProject(chainId, projectId));\n                                if (!isMounted()) {\n                                    return;\n                                }\n                                navigate(R.projects(routeOptions(chainId)));\n                            }\n                            catch (e) {\n                                console.warn('Failed to delete a project', e);\n                            }\n                        } }, \"Delete\")))))))));\n}\nconst Segment = styled.div.withConfig({ displayName: \"Segment\", componentId: \"sc-13rxivr\" }) `\n    h2 {\n        font-size: 34px;\n        font-weight: 400;\n        line-height: 1.5em;\n        margin: 0 0 28px;\n    }\n\n    h2 + p {\n        font-size: 16px;\n        margin-bottom: 40px;\n    }\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-185oicp\" }) `\n    ${({ $desktopMaxWidth = 678 }) => css `\n        @media (min-width: ${$desktopMaxWidth + 64}px) {\n            max-width: ${$desktopMaxWidth}px;\n        }\n    `}\n`;\nconst LayoutInner = styled(PrestyledLayoutInner).withConfig({ displayName: \"LayoutInner\", componentId: \"sc-1vp5ld7\" }) `\n    width: 100%;\n    overflow: hidden;\n`;\n","import React, { useEffect, useMemo } from 'react';\nimport { Link, Navigate, Outlet, useParams, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { BehindBlockErrorDisplay } from '~/components/BehindBlockErrorDisplay';\nimport { Button } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkPageSegment, { Pad, SegmentGrid } from '~/components/NetworkPageSegment';\nimport { QueriedStreamsTable } from '~/components/QueriedStreamsTable';\nimport { TermsOfUse } from '~/components/TermsOfUse';\nimport { useInitialBehindIndexError, useLatestBehindBlockError, useRefetchQueryBehindIndexEffect, } from '~/hooks';\nimport { useProjectByIdQuery } from '~/hooks/projects';\nimport { useStreamsQuery } from '~/hooks/streams';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport ProjectHero from '~/marketplace/containers/ProjectPage/Hero/ProjectHero2';\nimport NotFoundPage from '~/pages/NotFoundPage';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport { DetailsPageHeader } from '~/shared/components/DetailsPageHeader';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport Segment from '~/shared/components/Segment';\nimport { StreamConnect } from '~/shared/components/StreamConnect';\nimport { StreamPreview } from '~/shared/components/StreamPreview';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { ProjectPermission, useCurrentProjectAbility, } from '~/shared/stores/projectAbilities';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft, preselectSalePoint, useIsAccessibleByCurrentWallet, } from '~/stores/projectDraft';\nimport { isProjectType } from '~/utils';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { AccessManifest } from './AccessManifest';\nimport GetAccess from './GetAccess';\nimport ProjectEditorPage from './ProjectEditorPage';\nimport ProjectLinkTabs from './ProjectLinkTabs';\nexport function ProjectDraftPage() {\n    const { id: projectId } = useParams();\n    const draftId = ProjectDraft.useInitDraft(projectId);\n    return (React.createElement(ProjectDraft.DraftContext.Provider, { value: draftId },\n        React.createElement(Outlet, null)));\n}\nexport function NewProjectPage() {\n    const type = useSearchParams()[0].get('type');\n    const projectType = isProjectType(type) ? type : ProjectType.OpenData;\n    const project = useMemo(() => {\n        const project = getEmptyParsedProject({\n            type: projectType,\n        });\n        preselectSalePoint(project);\n        return project;\n    }, [projectType]);\n    const draftId = ProjectDraft.useDraftId();\n    const { assign } = ProjectDraft.useDraftStore();\n    const initialized = ProjectDraft.useDraft()?.initialized || false;\n    useEffect(function assignProjectToDraft() {\n        if (initialized) {\n            assign(draftId, project);\n        }\n    }, [assign, draftId, initialized, project]);\n    return React.createElement(ProjectEditorPage, null);\n}\nexport function ExistingProjectPageWrap() {\n    const { id: projectId } = useParams();\n    const projectQuery = useProjectByIdQuery(projectId);\n    const initialBehindBlockError = useInitialBehindIndexError(projectQuery, [projectId]);\n    useRefetchQueryBehindIndexEffect(projectQuery);\n    const behindBlockError = useLatestBehindBlockError(projectQuery);\n    const { data: project = null } = projectQuery;\n    const isFetching = projectQuery.isLoading || projectQuery.isFetching || !!behindBlockError;\n    const draftId = ProjectDraft.useDraftId();\n    const { assign } = ProjectDraft.useDraftStore();\n    const initialized = ProjectDraft.useDraft()?.initialized || false;\n    useEffect(function assignProjectToDraft() {\n        if (initialized) {\n            assign(draftId, project);\n        }\n    }, [assign, draftId, initialized, project]);\n    const placeholder = behindBlockError ? (React.createElement(Layout, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(BehindBlockErrorDisplay, { latest: behindBlockError, initial: initialBehindBlockError || undefined })))) : isFetching ? (React.createElement(Layout, null,\n        React.createElement(LoadingIndicator, { loading: true }))) : (React.createElement(NotFoundPage, null));\n    if (!project) {\n        return placeholder;\n    }\n    return React.createElement(Outlet, null);\n}\nexport function ProjectOverviewPage() {\n    const project = ProjectDraft.useEntity();\n    if (!project) {\n        return null;\n    }\n    const { id, name, description, termsOfUse, imageUrl, streams, type, contact, salePoints, } = project;\n    if (!id) {\n        return null;\n    }\n    const [firstSalePoint = undefined, ...otherSalePoints] = Object.values(salePoints).filter((salePoint) => salePoint?.enabled);\n    return (React.createElement(LayoutColumn, null,\n        React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null,\n                React.createElement(ProjectHero, { contact: contact, description: description, imageUrl: imageUrl || undefined, name: name })),\n            firstSalePoint && (React.createElement(Segment, null,\n                React.createElement(ColoredBox, null,\n                    React.createElement(Pad, null,\n                        React.createElement(AccessManifest, { projectId: id, projectType: type, firstSalePoint: firstSalePoint, otherSalePoints: otherSalePoints }))))),\n            React.createElement(NetworkPageSegment, { title: \"Streams\" },\n                React.createElement(StreamTable, { streamIds: streams })),\n            React.createElement(NetworkPageSegment, { title: \"Terms and conditions\" },\n                React.createElement(Pad, null,\n                    React.createElement(TermsOfUse, { ...termsOfUse }))))));\n}\nexport function ProjectConnectPage() {\n    const hasAccess = useIsAccessibleByCurrentWallet();\n    const project = ProjectDraft.useEntity();\n    if (!project) {\n        return null;\n    }\n    const { id, name, type, streams, salePoints } = project;\n    if (!id) {\n        return null;\n    }\n    return (React.createElement(LayoutColumn, null,\n        React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null, hasAccess ? (React.createElement(ColoredBox, null,\n                React.createElement(Pad, null,\n                    React.createElement(StreamConnect, { streams: streams })))) : (React.createElement(GetAccess, { projectId: id, projectName: name, projectType: type, salePoints: Object.values(salePoints).filter((salePoint) => salePoint?.enabled) }))))));\n}\nexport function ProjectLiveDataPage() {\n    const hasAccess = useIsAccessibleByCurrentWallet();\n    const project = ProjectDraft.useEntity();\n    if (!project) {\n        return null;\n    }\n    const { id, name, type, streams, salePoints } = project;\n    if (!id) {\n        return null;\n    }\n    return hasAccess ? (React.createElement(StreamPreview, { streamsList: streams })) : (React.createElement(LayoutColumn, null,\n        React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null,\n                React.createElement(GetAccess, { projectId: id, projectName: name, projectType: type, salePoints: Object.values(salePoints).filter((salePoint) => salePoint?.enabled) })))));\n}\nexport function ProjectTabbedPage() {\n    const { id = '', name = '', creator = '' } = ProjectDraft.useEntity() || {};\n    const busy = ProjectDraft.useIsDraftBusy();\n    const canEdit = useCurrentProjectAbility(ProjectPermission.Edit);\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Layout, { pageTitle: name },\n        React.createElement(DetailsPageHeader, { backButtonLink: R.projects(routeOptions(chainKey)), pageTitle: React.createElement(PageTitleContainer, null,\n                React.createElement(ProjectTitle, null,\n                    name,\n                    !!creator && (React.createElement(React.Fragment, null,\n                        React.createElement(Separator, null, \" by \"),\n                        React.createElement(\"strong\", null, creator)))),\n                canEdit && (React.createElement(EditButton, { as: Link, to: R.projectEdit(id, routeOptions(chainKey)), kind: \"secondary\", size: \"mini\" },\n                    React.createElement(SvgIcon, { name: \"pencilFull\" })))), rightComponent: React.createElement(ProjectLinkTabs, { projectId: id }) }),\n        React.createElement(LoadingIndicator, { loading: busy }),\n        React.createElement(Outlet, null)));\n}\n/**\n * @todo Taken care of in `app`, no? Double-check & remove.\n */\nexport function ProjectIndexRedirect() {\n    const { id = '' } = useParams();\n    return (React.createElement(Navigate, { to: {\n            pathname: R.project(id),\n            search: window.location.search,\n        }, replace: true }));\n}\nfunction StreamTable({ streamIds }) {\n    const { orderBy = 'mps', orderDirection = 'desc', setOrder, } = useTableOrder();\n    const streamsQuery = useStreamsQuery({\n        orderBy,\n        orderDirection,\n        streamIds,\n    });\n    return (React.createElement(QueriedStreamsTable, { onOrderChange: setOrder, orderBy: orderBy, orderDirection: orderDirection, query: streamsQuery }));\n}\nconst PageTitleContainer = styled.div.withConfig({ displayName: \"PageTitleContainer\", componentId: \"sc-1j4hr77\" }) `\n    align-items: center;\n    display: flex;\n`;\nconst EditButton = styled(Button).withConfig({ displayName: \"EditButton\", componentId: \"sc-1qgaeso\" }) `\n    border-radius: 100%;\n    height: 32px;\n    margin-left: 10px;\n    width: 32px;\n`;\nconst ProjectTitle = styled.span.withConfig({ displayName: \"ProjectTitle\", componentId: \"sc-12msef4\" }) `\n    text-overflow: ellipsis;\n    overflow: hidden;\n    white-space: nowrap;\n`;\nconst Separator = styled.span.withConfig({ displayName: \"Separator\", componentId: \"sc-1rrqbi7\" }) `\n    white-space: pre-wrap;\n`;\n","import { useQuery } from '@tanstack/react-query';\nimport { getParsedProjectById } from '~/getters/hub';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useRequestedBlockNumber } from '.';\nexport function useProjectByIdQuery(projectId) {\n    const chainId = useCurrentChainId();\n    const minBlockNumber = useRequestedBlockNumber();\n    return useQuery({\n        queryKey: [\n            'useProjectByIdQuery',\n            chainId,\n            projectId?.toLowerCase(),\n            minBlockNumber,\n        ],\n        queryFn: async () => {\n            if (!projectId) {\n                return null;\n            }\n            const result = await getParsedProjectById(chainId, projectId, {\n                force: true,\n                minBlockNumber,\n            });\n            if (!result) {\n                throw new Error('Project could not be found or is invalid');\n            }\n            return result;\n        },\n        staleTime: Infinity,\n        gcTime: 0,\n        retry: false,\n    });\n}\n","import styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport const Address = styled.div.withConfig({ displayName: \"Address\", componentId: \"sc-525xn6\" }) `\n    align-items: center;\n    color: ${COLORS.primaryLight};\n    display: grid;\n    font-size: 14px;\n    gap: 4px;\n    grid-template-columns: 1fr;\n    line-height: 20px;\n\n    p + & {\n        margin-top: 8px;\n    }\n\n    strong {\n        color: ${COLORS.primary};\n    }\n\n    svg {\n        display: block;\n    }\n\n    @media (min-width: 400px) {\n        grid-template-columns: max-content max-content;\n    }\n`;\nexport const AddressLabel = styled.div.withConfig({ displayName: \"AddressLabel\", componentId: \"sc-vfe0wz\" }) ``;\nexport const AddressContent = styled.div.withConfig({ displayName: \"AddressContent\", componentId: \"sc-1eirsmw\" }) `\n    align-items: center;\n    display: grid;\n    gap: 4px;\n    grid-template-columns: max-content max-content;\n`;\nexport const Banner = styled.div.withConfig({ displayName: \"Banner\", componentId: \"sc-1r3oqd7\" }) `\n    background: ${COLORS.secondaryLight};\n    border-radius: 6px;\n    padding: 12px;\n    display: grid;\n    gap: 10px;\n    grid-template-columns: 24px 1fr;\n\n    * + & {\n        margin-top: 20px;\n    }\n\n    span[role='img'] {\n        color: ${COLORS.primaryDisabled};\n    }\n\n    svg,\n    span[role='img'] {\n        display: block;\n        width: 20px;\n        height: 20px;\n    }\n`;\nexport const IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1yovopn\" }) `\n    align-items: center;\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    width: 24px;\n`;\n","import InfoIcon from '@atlaskit/icon/glyph/info';\nimport React from 'react';\nimport { Link as PrestyledLink } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Address, AddressContent, AddressLabel, Banner, IconWrap, } from '~/components/ActionBars/AboutEntity';\nimport { DefaultSimpleDropdownMenu } from '~/components/SimpleDropdown';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { ExternalLinkIcon } from '~/icons';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function AboutSponsorship({ sponsorship }) {\n    const { streamId } = sponsorship;\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(DefaultSimpleDropdownMenu, null,\n        streamId && (React.createElement(Address, null,\n            React.createElement(AddressLabel, null, \"Sponsored stream:\"),\n            React.createElement(AddressContent, null,\n                React.createElement(\"strong\", null, truncateStreamName(streamId)),\n                React.createElement(\"div\", null,\n                    React.createElement(Link, { to: R.stream(streamId, routeOptions(chainKey)), target: \"_blank\" },\n                        React.createElement(ExternalLinkIcon, null)))))),\n        React.createElement(Banner, null,\n            React.createElement(IconWrap, null,\n                React.createElement(InfoIcon, { label: \"Info\" })),\n            React.createElement(\"div\", null,\n                React.createElement(\"p\", null,\n                    \"Sponsorships payout \",\n                    React.createElement(SponsorshipPaymentTokenName, null),\n                    \" tokens to staked Operators that relay data in the sponsored stream. Anyone can fund or extend a Sponsorship.\"),\n                React.createElement(\"p\", null,\n                    React.createElement(\"a\", { href: R.docs('/streamr-network/network-incentives'), target: \"_blank\", rel: \"noreferrer noopener\" }, \"Learn more\"))))));\n}\nconst Link = styled(PrestyledLink).withConfig({ displayName: \"Link\", componentId: \"sc-ri9tjx\" }) `\n    display: block;\n\n    :active {\n        transform: translateY(1px);\n    }\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nimport { ExternalLinkIcon } from '~/icons';\nimport { Tooltip } from '~/components/Tooltip';\nimport { truncate } from '~/shared/utils/text';\nimport { CopyButton } from '~/components/CopyButton';\nimport { getChainConfig, useCurrentChainId } from '~/utils/chains';\nexport const ActionBarButtonBody = styled.div.withConfig({ displayName: \"ActionBarButtonBody\", componentId: \"sc-8l5xq2\" }) `\n    align-items: center;\n    border-radius: 8px;\n    display: grid;\n    font-size: 14px;\n    gap: 12px;\n    grid-template-columns: repeat(\n        ${({ children }) => React.Children.toArray(children).filter(Boolean).length},\n        max-content\n    );\n    height: 40px;\n    padding: 0 12px;\n    transition: 250ms background;\n\n    ${({ $background = COLORS.secondary, $color = COLORS.primary }) => css `\n        background: ${$background};\n        color: ${$color};\n    `}\n`;\nconst ActionBarButtonRoot = styled.button.withConfig({ displayName: \"ActionBarButtonRoot\", componentId: \"sc-e5t7kd\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    display: block;\n    padding: 0;\n\n    :hover ${ActionBarButtonBody} {\n        background: ${COLORS.secondaryLight};\n    }\n\n    :active ${ActionBarButtonBody} {\n        background: ${COLORS.secondaryHover};\n        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.03);\n    }\n\n    ${({ $active = false }) => $active &&\n    css `\n            :hover ${ActionBarButtonBody}, ${ActionBarButtonBody} {\n                background: ${COLORS.secondaryHover};\n                box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.01);\n            }\n        `}\n`;\nexport function ActionBarButton({ active = false, children, ...props }) {\n    return (React.createElement(ActionBarButtonRoot, { type: \"button\", ...props, \"$active\": active },\n        React.createElement(ActionBarButtonBody, null, children)));\n}\nexport const ActionBarButtonInnerBody = styled.div.withConfig({ displayName: \"ActionBarButtonInnerBody\", componentId: \"sc-9ckhfi\" }) `\n    ${({ children }) => {\n    const count = React.Children.count(children);\n    return (count > 1 &&\n        css `\n                align-items: center;\n                display: grid;\n                gap: 6px;\n                grid-template-columns: repeat(${count}, max-content);\n            `);\n}}\n`;\nfunction getActionBarButtonCaretAttrs() {\n    return {\n        name: 'caretDown',\n    };\n}\nexport const ActionBarButtonCaret = styled(SvgIcon).attrs(getActionBarButtonCaretAttrs).withConfig({ displayName: \"ActionBarButtonCaret\", componentId: \"sc-4laj10\" }) `\n    color: ${COLORS.primaryDisabled};\n    width: 12px;\n    transition: 150ms transform;\n\n    ${({ $invert = false }) => $invert &&\n    css `\n            transform: rotate(180deg);\n        `}\n`;\nexport function ActionBarWalletDisplay({ address, label = 'Wallet', }) {\n    const chainId = useCurrentChainId();\n    const { blockExplorerUrl } = getChainConfig(chainId);\n    return (React.createElement(ActionBarButtonBody, null,\n        React.createElement(\"div\", null,\n            label,\n            \": \",\n            React.createElement(\"strong\", null, truncate(address))),\n        React.createElement(Tooltip, { content: \"Copy address\" },\n            React.createElement(CopyButton, { value: address })),\n        blockExplorerUrl && (React.createElement(Tooltip, { content: \"View on explorer\" },\n            React.createElement(\"a\", { href: `${blockExplorerUrl}/address/${address}`, target: \"_blank\", rel: \"noreferrer\" },\n                React.createElement(ExternalLinkIcon, null))))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { NetworkActionBarBackButtonIcon, NetworkActionBarBackLink, NetworkActionBarStatsTitle, NetworkActionBarTitle, } from '~/components/ActionBars/NetworkActionBar.styles';\nimport { Separator } from '~/components/Separator';\nimport { COLORS, LAPTOP, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nimport { goBack } from '~/utils';\nexport function AbstractActionBar({ fallbackBackButtonUrl, title, buttons = React.createElement(React.Fragment, null), ctas = React.createElement(React.Fragment, null), summaryTitle, summary, }) {\n    return (React.createElement(Root, null,\n        React.createElement(OuterWrap, null,\n            React.createElement(InnerWrap, null,\n                React.createElement(NetworkActionBarBackLink, { to: fallbackBackButtonUrl, onClick: (e) => {\n                        goBack({\n                            onBeforeNavigate() {\n                                e.preventDefault();\n                            },\n                        });\n                    } },\n                    React.createElement(NetworkActionBarBackButtonIcon, { name: \"backArrow\" })),\n                React.createElement(NetworkActionBarTitle, null, title)),\n            React.createElement(ActionsOuterWrap, null,\n                React.createElement(Buttons, null, buttons),\n                React.createElement(Ctas, null, ctas)),\n            summary && (React.createElement(React.Fragment, null,\n                summaryTitle && (React.createElement(NetworkActionBarStatsTitle, null, summaryTitle)),\n                React.createElement(Separator, null),\n                summary)))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1dydze1\" }) `\n    background: #fff;\n    color: ${COLORS.primary};\n    padding-top: 34px;\n\n    @media ${TABLET} {\n        padding-top: 60px;\n    }\n\n    @media ${LAPTOP} {\n        padding-top: 108px;\n    }\n`;\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-ucv31y\" }) `\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 24px 28px;\n    width: 100%;\n\n    @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n        padding: 0;\n    }\n`;\nconst InnerWrap = styled.div.withConfig({ displayName: \"InnerWrap\", componentId: \"sc-1cawsc3\" }) `\n    align-items: center;\n    display: flex;\n`;\nconst ActionsOuterWrap = styled(InnerWrap).withConfig({ displayName: \"ActionsOuterWrap\", componentId: \"sc-5zelr\" }) `\n    gap: 40px;\n    flex-wrap: wrap;\n    margin-top: 10px;\n\n    @media ${LAPTOP} {\n        padding-left: 40px;\n    }\n`;\nconst Buttons = styled(InnerWrap).withConfig({ displayName: \"Buttons\", componentId: \"sc-19if7x7\" }) `\n    flex-grow: 1;\n    flex-wrap: wrap;\n    gap: 8px;\n`;\nconst Ctas = styled.div.withConfig({ displayName: \"Ctas\", componentId: \"sc-lz5lvo\" }) `\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 8px;\n    width: 100%;\n    max-width: 480px;\n\n    button {\n        width: 100%;\n    }\n\n    @media ${TABLET} {\n        max-width: none;\n        width: auto;\n    }\n`;\n","import moment from 'moment';\nimport React, { useMemo } from 'react';\nimport { AboutSponsorship } from '~/components/ActionBars/AboutSponsorship';\nimport { ActionBarButton, ActionBarButtonBody, ActionBarButtonCaret, ActionBarButtonInnerBody, ActionBarWalletDisplay, } from '~/components/ActionBars/ActionBarButton';\nimport { Button } from '~/components/Button';\nimport { SimpleDropdown } from '~/components/SimpleDropdown';\nimport { Tooltip } from '~/components/Tooltip';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { useEditSponsorshipFunding, useFundSponsorshipCallback, useIsEditingSponsorshipFunding, useIsFundingSponsorship, useIsJoiningSponsorshipAsOperator, useJoinSponsorshipAsOperator, } from '~/hooks/sponsorships';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { truncate, truncateStreamName } from '~/shared/utils/text';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { isSponsorshipFundedByOperator } from '~/utils/sponsorships';\nimport { AbstractActionBar } from './AbstractActionBar';\nexport function SponsorshipActionBar({ sponsorship }) {\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    const canEditStake = isSponsorshipFundedByOperator(sponsorship, operator);\n    const { projectedInsolvencyAt, isRunning } = sponsorship;\n    const isPaying = isRunning && sponsorship.timeCorrectedRemainingBalanceWeiAt(Date.now()) > 0n;\n    const [fundedUntil, detailedFundedUntil] = useMemo(() => projectedInsolvencyAt == null\n        ? [null, null]\n        : [\n            moment(projectedInsolvencyAt).format('D MMM YYYY'),\n            moment(projectedInsolvencyAt).format('D MMM YYYY, HH:mm'),\n        ], [projectedInsolvencyAt]);\n    const fundSponsorship = useFundSponsorshipCallback();\n    const isFundingSponsorship = useIsFundingSponsorship(sponsorship.id, wallet);\n    const editSponsorshipFunding = useEditSponsorshipFunding();\n    const isEditingSponsorshipFunding = useIsEditingSponsorshipFunding(sponsorship.id, operator?.id);\n    const { streamId } = sponsorship;\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(AbstractActionBar, { fallbackBackButtonUrl: R.sponsorships(routeOptions(chainKey)), title: streamId ? (truncateStreamName(streamId, 30)) : (React.createElement(React.Fragment, null,\n            \"Sponsorship \",\n            truncate(sponsorship.id))), buttons: React.createElement(React.Fragment, null,\n            React.createElement(ActionBarButtonBody, { \"$background\": isPaying ? COLORS.activeBackground : COLORS.radioBorder, \"$color\": isPaying ? COLORS.active : COLORS.primary },\n                React.createElement(\"strong\", null, isPaying ? 'Paying' : 'Inactive')),\n            React.createElement(SimpleDropdown, { menu: React.createElement(AboutSponsorship, { sponsorship: sponsorship }) }, (toggle, isOpen) => (React.createElement(ActionBarButton, { active: isOpen, onClick: () => void toggle((c) => !c) },\n                React.createElement(ActionBarButtonInnerBody, null,\n                    React.createElement(SvgIcon, { name: \"page\" }),\n                    React.createElement(\"strong\", null, \"About Sponsorship\")),\n                React.createElement(ActionBarButtonCaret, { \"$invert\": isOpen })))),\n            fundedUntil && (React.createElement(ActionBarButtonBody, null,\n                React.createElement(\"div\", null,\n                    \"Funded until:\",\n                    ' ',\n                    React.createElement(\"strong\", null,\n                        React.createElement(Tooltip, { anchorDisplay: \"inline\", content: detailedFundedUntil || '' }, fundedUntil))))),\n            React.createElement(ActionBarWalletDisplay, { address: sponsorship.id, label: \"Contract\" })), ctas: React.createElement(React.Fragment, null,\n            canEditStake ? (React.createElement(Button, { disabled: !operator, waiting: isEditingSponsorshipFunding, onClick: async () => {\n                    if (!operator) {\n                        return;\n                    }\n                    editSponsorshipFunding({\n                        chainId,\n                        sponsorshipOrSponsorshipId: sponsorship,\n                        operator,\n                    });\n                } }, \"Edit stake\")) : (React.createElement(JoinAsOperatorButton, { sponsorship: sponsorship, operator: operator })),\n            React.createElement(Button\n            // We decided to disable sponsoring for now as users don't know what it does.\n            // https://streamr-team.slack.com/archives/C9QB9RJ48/p1701774490263629\n            , { \n                // We decided to disable sponsoring for now as users don't know what it does.\n                // https://streamr-team.slack.com/archives/C9QB9RJ48/p1701774490263629\n                disabled: !streamId || true, kind: \"secondary\", waiting: isFundingSponsorship, onClick: () => {\n                    fundSponsorship(chainId, sponsorship);\n                } }, \"Sponsor\")) }));\n}\nfunction JoinAsOperatorButton({ sponsorship, operator }) {\n    const walletLocked = !useWalletAccount();\n    const { streamId, operatorCount, maxOperators } = sponsorship;\n    const isJoiningSponsorshipAsOperator = useIsJoiningSponsorshipAsOperator(sponsorship.id, operator?.id);\n    const chainId = useCurrentChainId();\n    const joinSponsorshipAsOperator = useJoinSponsorshipAsOperator();\n    const maxOperatorsReached = operatorCount >= maxOperators;\n    const tip = walletLocked ? ('Unlock your wallet first') : !operator ? ('You need an Operator to join a Sponsorship') : !streamId ? ('Sponsored stream does not exist') : maxOperatorsReached ? (React.createElement(React.Fragment, null, \"This Sponsorship does not allow more\\u00A0Operators\")) : undefined;\n    if (tip) {\n        return (React.createElement(Tooltip, { content: tip },\n            React.createElement(Button, { disabled: true }, \"Join as operator\")));\n    }\n    return (React.createElement(Button, { waiting: isJoiningSponsorshipAsOperator, onClick: () => {\n            if (!operator) {\n                return;\n            }\n            joinSponsorshipAsOperator({\n                chainId,\n                sponsorship,\n                operator,\n            });\n        } }, \"Join as operator\"));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { Hint } from '~/components/Hint';\nimport { LayoutColumn } from '~/components/Layout';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { StatCell, StatGrid } from '~/components/StatGrid';\nimport { DayInSeconds } from '~/consts';\nimport { COLORS } from '~/shared/utils/styled';\nexport function SponsorshipSummary({ sponsorship }) {\n    const minimumStakingDays = sponsorship.minimumStakingPeriodSeconds / DayInSeconds;\n    return (React.createElement(SponsorshipSummaryRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(StatGrid, { \"$desktopColumnCount\": 3 },\n                React.createElement(StatCell, { label: \"Payout rate\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The rate of \",\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that are distributed to Operators that have staked on this Sponsorship.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.payoutPerDay, unitSuffix: \"/day\" })),\n                React.createElement(StatCell, { label: \"Remaining balance\" },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.timeCorrectedRemainingBalanceWeiAt(Date.now()) })),\n                React.createElement(StatCell, { label: \"Total staked\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The total amount of \",\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            ' ',\n                            \"tokens that has been staked on this Sponsorship by\\u00A0Operators.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.totalStakedWei })),\n                React.createElement(StatCell, { label: \"APY\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The annualized yield that the staked Operators are currently earning from this Sponsorship.\")) },\n                    (sponsorship.spotApy * 100).toFixed(0),\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Total sponsored\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The cumulative amount of\",\n                            ' ',\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that Sponsors have funded this Sponsorship with.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.cumulativeSponsoring })),\n                React.createElement(StatCell, { label: \"Minimum stake duration\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The minimum time that Operators must stay staked in this Sponsorship before they are able to fully unstake without a penalty. Stake reduction is always allowed and only limited by minimum\\u00A0stake.\")) },\n                    minimumStakingDays.toFixed(0),\n                    \" day\",\n                    minimumStakingDays !== 1 && 's')))));\n}\nconst SponsorshipSummaryRoot = styled.div.withConfig({ displayName: \"SponsorshipSummaryRoot\", componentId: \"sc-mfyvrj\" }) `\n    background: ${COLORS.Background};\n    padding: 24px 0;\n`;\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { Link, useParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { SponsorshipActionBar } from '~/components/ActionBars/SponsorshipActionBar';\nimport { BehindBlockErrorDisplay } from '~/components/BehindBlockErrorDisplay';\nimport { ChartPeriodTabs } from '~/components/ChartPeriodTabs';\nimport { Decimals, SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkChartDisplay from '~/components/NetworkChartDisplay';\nimport NetworkPageSegment, { Pad, SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport Spinner from '~/components/Spinner';\nimport { OperatorIdCell } from '~/components/Table';\nimport { useInitialBehindIndexError, useLatestBehindBlockError, useRefetchQueryBehindIndexEffect, } from '~/hooks';\nimport { useSponsorshipByIdQuery, useSponsorshipDailyBucketsQuery, useSponsorshipTokenInfo, } from '~/hooks/sponsorships';\nimport { useSponsorshipFundingHistoryQuery } from '~/hooks/useSponsorshipFundingHistoryQuery';\nimport { SponsorshipSummary } from '~/pages/SponsorshipPage/SponsorshipSummary';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { NoData } from '~/shared/components/NoData';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { NoDataWrap } from '~/shared/components/ScrollTable/ScrollTable.styles';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { NetworkChart } from '~/shared/components/TimeSeriesGraph';\nimport { formatLongDate, formatShortDate, } from '~/shared/components/TimeSeriesGraph/chartUtils';\nimport { COLORS, LAPTOP, TABLET } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { ChartPeriod } from '~/types';\nimport { abbr } from '~/utils';\nimport { useCurrentChainFullName, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst EmptyArray = [];\nexport const SingleSponsorshipPage = () => {\n    const sponsorshipId = useParams().id || '';\n    const sponsorshipQuery = useSponsorshipByIdQuery(sponsorshipId);\n    const initialBehindBlockError = useInitialBehindIndexError(sponsorshipQuery, [\n        sponsorshipId,\n    ]);\n    useRefetchQueryBehindIndexEffect(sponsorshipQuery);\n    const behindBlockError = useLatestBehindBlockError(sponsorshipQuery);\n    const isFetching = sponsorshipQuery.isFetching || sponsorshipQuery.isLoading || !!behindBlockError;\n    const sponsorship = sponsorshipQuery.data || null;\n    const { symbol: tokenSymbol = 'DATA', decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const [selectedDataSource, setSelectedDataSource] = useState('amountStaked');\n    const [selectedPeriod, setSelectedPeriod] = useState(ChartPeriod.ThreeMonths);\n    const chartQuery = useSponsorshipDailyBucketsQuery({\n        sponsorshipId,\n        period: selectedPeriod,\n        dataSource: selectedDataSource,\n    });\n    const { data: chartData = [] } = chartQuery;\n    const tooltipPrefix = useMemo(() => {\n        switch (selectedDataSource) {\n            case 'amountStaked':\n                return 'Amount Staked';\n            case 'numberOfOperators':\n                return 'Number of Operators';\n            case 'apy':\n                return 'APY';\n            default:\n                return '';\n        }\n    }, [selectedDataSource]);\n    const formatTooltipValue = useCallback((value) => {\n        switch (selectedDataSource) {\n            case 'amountStaked':\n                return `${abbr(value)} ${tokenSymbol}`;\n            case 'numberOfOperators':\n                return value.toString();\n            case 'apy':\n                return `${value.toFixed(2)}%`;\n            default:\n                return '';\n        }\n    }, [selectedDataSource, tokenSymbol]);\n    const formatYAxisValue = useCallback((value) => {\n        switch (selectedDataSource) {\n            case 'amountStaked':\n                return abbr(value);\n            case 'numberOfOperators':\n                return value.toString();\n            case 'apy':\n                return `${value.toFixed(2)}%`;\n            default:\n                return '';\n        }\n    }, [selectedDataSource]);\n    const fundingEventsQuery = useSponsorshipFundingHistoryQuery(sponsorshipId);\n    const { operatorCount = 0, minOperators } = sponsorship || {};\n    const operational = minOperators == null || operatorCount >= minOperators;\n    const fullChainName = useCurrentChainFullName();\n    const placeholder = behindBlockError ? (React.createElement(BehindBlockErrorDisplay, { latest: behindBlockError, initial: initialBehindBlockError || undefined })) : !isFetching ? (React.createElement(NoData, { firstLine: `Sponsorship not found on the ${fullChainName} chain.` })) : null;\n    const chainKey = useCurrentChainKey();\n    const rawFundingEvents = fundingEventsQuery.data?.pages || EmptyArray;\n    const fundingEvents = useMemo(() => rawFundingEvents.map((page) => page.events).flat() || EmptyArray, [rawFundingEvents]);\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Sponsorship\" }),\n        React.createElement(LoadingIndicator, { loading: isFetching }),\n        !!sponsorship && (React.createElement(React.Fragment, null,\n            React.createElement(SponsorshipActionBar, { sponsorship: sponsorship }),\n            React.createElement(SponsorshipSummary, { sponsorship: sponsorship }))),\n        React.createElement(LayoutColumn, null, sponsorship == null ? (placeholder) : (React.createElement(SegmentGrid, null,\n            React.createElement(ChartGrid, null,\n                React.createElement(NetworkPageSegment, { title: \"Overview charts\" },\n                    React.createElement(Pad, null,\n                        React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: selectedPeriod, onChange: setSelectedPeriod }), sourceTabs: React.createElement(Tabs, { selection: selectedDataSource, onSelectionChange: (dataSource) => {\n                                    if (dataSource !== 'amountStaked' &&\n                                        dataSource !==\n                                            'numberOfOperators' &&\n                                        dataSource !== 'apy') {\n                                        return;\n                                    }\n                                    setSelectedDataSource(dataSource);\n                                } },\n                                React.createElement(Tab, { id: \"amountStaked\" }, \"Amount Staked\"),\n                                React.createElement(Tab, { id: \"numberOfOperators\" }, \"Number of Operators\"),\n                                React.createElement(Tab, { id: \"apy\" }, \"APY\")) },\n                            React.createElement(NetworkChart, { isLoading: chartQuery.isLoading ||\n                                    chartQuery.isFetching, tooltipValuePrefix: tooltipPrefix, graphData: chartData, xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: formatYAxisValue, tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: formatTooltipValue })))),\n                React.createElement(NetworkPageSegment, { title: React.createElement(TitleBar, { aux: operational ? undefined : (React.createElement(MinOperatorCountNotReached, null,\n                            sponsorship.operatorCount,\n                            \"/\",\n                            sponsorship.minOperators,\n                            React.createElement(OperatorSpinner, { color: \"green\", strokeWidth: 3, size: 20, fixed: true, coverage: Math.max(0.01, sponsorship.operatorCount /\n                                    sponsorship.minOperators) }))), label: operational\n                            ? sponsorship.operatorCount\n                            : undefined }, \"Operators\"), foot: true },\n                    React.createElement(OperatorListWrap, null,\n                        React.createElement(OperatorList, null,\n                            React.createElement(OperatorListHeader, null,\n                                React.createElement(\"div\", null,\n                                    React.createElement(\"strong\", null, \"Operator\")),\n                                React.createElement(\"div\", null,\n                                    React.createElement(\"strong\", null, \"Staked\"))),\n                            sponsorship.stakes.map((stake) => (React.createElement(OperatorListItem, { key: stake.operatorId },\n                                React.createElement(Link, { to: R.operator(stake.operatorId, routeOptions(chainKey)) },\n                                    React.createElement(\"div\", null,\n                                        React.createElement(OperatorIdCell, { truncate: true, operatorId: stake.operatorId, imageUrl: stake.metadata.imageUrl, operatorName: stake.metadata.name })),\n                                    React.createElement(\"strong\", null,\n                                        React.createElement(Decimals, { abbr: true, amount: stake.amountWei, decimals: decimals })))))),\n                            !sponsorship.stakes.length && (React.createElement(\"li\", null,\n                                React.createElement(NoDataWrap, null,\n                                    React.createElement(NoData, { firstLine: \"No operators\", compact: true })))))))),\n            React.createElement(NetworkPageSegment, { foot: true, title: \"Funding history\" },\n                React.createElement(ScrollTable, { hasMoreResults: fundingEventsQuery.hasNextPage, onLoadMore: () => fundingEventsQuery.fetchNextPage(), elements: fundingEvents, isLoading: fundingEventsQuery.isLoading ||\n                        fundingEventsQuery.isFetching, columns: [\n                        {\n                            displayName: 'Date',\n                            valueMapper: (element) => element.date,\n                            align: 'start',\n                            isSticky: true,\n                            key: 'date',\n                        },\n                        {\n                            displayName: 'Amount',\n                            valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.amount })),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'amount',\n                        },\n                        {\n                            displayName: 'Sponsor',\n                            valueMapper: (element) => truncate(element.sponsor),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'sponsor',\n                        },\n                    ] })))))));\n};\nconst ChartGrid = styled(SegmentGrid).withConfig({ displayName: \"ChartGrid\", componentId: \"sc-18g5mqj\" }) `\n    grid-template-columns: minmax(0, 1fr);\n\n    @media ${LAPTOP} {\n        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);\n    }\n`;\nconst OperatorList = styled.ul.withConfig({ displayName: \"OperatorList\", componentId: \"sc-1rt3be3\" }) `\n    font-size: 14px;\n    list-style: none;\n    line-height: 1.5em;\n    margin: 0;\n    padding: 0;\n\n    li {\n        background: #ffffff;\n    }\n\n    li + li {\n        border-top: 1px solid ${COLORS.Border};\n    }\n`;\nconst OperatorListHeader = styled.li.withConfig({ displayName: \"OperatorListHeader\", componentId: \"sc-13lv7x6\" }) `\n    background: rgba(255, 255, 255, 0.9) !important;\n    backdrop-filter: blur(8px);\n    box-shadow: 0 1px 0 ${COLORS.Border};\n    display: flex;\n    padding: 16px 24px;\n    position: sticky;\n    top: 0;\n    z-index: 1;\n\n    > div:first-child {\n        flex-grow: 1;\n    }\n\n    @media ${TABLET} {\n        padding: 24px 40px;\n    }\n`;\nconst OperatorListItem = styled.li.withConfig({ displayName: \"OperatorListItem\", componentId: \"sc-1r8m12v\" }) `\n    > a {\n        align-items: center;\n        color: inherit !important;\n        display: flex;\n        padding: 16px 24px;\n    }\n\n    > a:hover {\n        background-color: ${COLORS.secondaryLight};\n    }\n\n    > a > div:first-child {\n        flex-grow: 1;\n        margin-right: 12px;\n        min-width: 0;\n    }\n\n    @media ${TABLET} {\n        > a {\n            padding: 24px 40px;\n        }\n    }\n`;\nconst OperatorListWrap = styled.div.withConfig({ displayName: \"OperatorListWrap\", componentId: \"sc-1efyfsa\" }) `\n    max-height: 538px;\n    overflow: auto;\n`;\nconst MinOperatorCountNotReached = styled.div.withConfig({ displayName: \"MinOperatorCountNotReached\", componentId: \"sc-hj6vbc\" }) `\n    align-items: center;\n    display: flex;\n    color: #525252;\n    font-size: 14px;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 30px;\n    letter-spacing: 0.14px;\n    justify-self: right;\n`;\nconst OperatorSpinner = styled(Spinner).withConfig({ displayName: \"OperatorSpinner\", componentId: \"sc-14jinxi\" }) `\n    margin-left: 8px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport function Toggle({ id, value, onChange, ...rest }) {\n    return (React.createElement(Root, { ...rest },\n        React.createElement(Input, { type: \"checkbox\", id: id, checked: value, onChange: (e) => {\n                onChange(e.target.checked);\n            } }),\n        React.createElement(Label, { htmlFor: id })));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1yx1atx\" }) `\n    display: flex;\n`;\nconst Label = styled.label.withConfig({ displayName: \"Label\", componentId: \"sc-1coaev5\" }) `\n    display: inline-block;\n    width: 32px;\n    height: 20px;\n    background-color: #78788029;\n    border-radius: 10px;\n    position: relative;\n    cursor: pointer;\n\n    &::before {\n        content: '';\n        position: absolute;\n        top: 2px;\n        left: 2px;\n        width: 16px;\n        height: 16px;\n        background-color: white;\n        border-radius: 50%;\n        transition: transform 0.3s;\n    }\n`;\nconst Input = styled.input.withConfig({ displayName: \"Input\", componentId: \"sc-1vc78pc\" }) `\n    display: none;\n\n    &:checked + ${Label} {\n        background-color: ${COLORS.link};\n    }\n\n    &:checked + ${Label}::before {\n        transform: translateX(12px);\n    }\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '~/components/SimpleDropdown';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { Toggle } from '~/shared/components/Toggle';\nimport { COLORS } from '~/shared/utils/styled';\nexport const defaultFilters = {\n    inactive: true,\n    noFunding: true,\n    expired: true,\n    my: false,\n};\nexport const SponsorshipFilterButton = ({ filter = defaultFilters, onFilterChange, }) => {\n    return (React.createElement(SimpleDropdown, { menu: React.createElement(Menu, { value: filter, onChange: onFilterChange }), align: \"right\" }, (toggle, isOpen) => (React.createElement(Button, { type: \"button\", onClick: () => void toggle((c) => !c), \"$active\": isOpen },\n        React.createElement(SvgIcon, { name: \"faders\" }),\n        \"Display\"))));\n};\nconst ToggleOption = ({ id, label, value, onChange }) => {\n    return (React.createElement(Option, null,\n        React.createElement(ToggleLabel, { htmlFor: id }, label),\n        React.createElement(Toggle, { id: id, value: value, onChange: onChange })));\n};\nconst Menu = ({ value, onChange }) => {\n    return (React.createElement(DropdownMenu, null,\n        React.createElement(Title, null, \"Showing\"),\n        React.createElement(ToggleContainer, null,\n            React.createElement(ToggleOption, { id: 'inactive', label: \"Inactive sponsorships\", value: value.inactive, onChange: (val) => {\n                    onChange?.({ ...value, inactive: val });\n                } }),\n            React.createElement(ToggleOption, { id: 'noFunding', label: \"Without funding sponsorships\", value: value.noFunding, onChange: (val) => {\n                    onChange?.({ ...value, noFunding: val });\n                } }),\n            React.createElement(ToggleOption, { id: 'expired', label: \"Expired funding sponsorships\", value: value.expired, onChange: (val) => {\n                    onChange?.({ ...value, expired: val });\n                } }),\n            React.createElement(ToggleOption, { id: 'my', label: \"Sponsorships with my Operator\", value: value.my, onChange: (val) => {\n                    onChange?.({ ...value, my: val });\n                } }))));\n};\nconst DropdownMenu = styled(SimpleListDropdownMenu).withConfig({ displayName: \"DropdownMenu\", componentId: \"sc-ry9m2u\" }) `\n    padding: 16px;\n    color: ${COLORS.primary};\n`;\nconst Button = styled.button.withConfig({ displayName: \"Button\", componentId: \"sc-5ms2sw\" }) `\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    padding: 4px 8px;\n    gap: 6px;\n    color: ${COLORS.primaryLight};\n    background-color: ${COLORS.secondaryLight};\n    border-radius: 8px;\n    border: none;\n    cursor: pointer;\n\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 18.2px;\n\n    ${({ $active = false }) => $active &&\n    css `\n            color: ${COLORS.primaryContrast};\n            background-color: ${COLORS.primary};\n        `}\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-94zcw0\" }) `\n    font-size: 16px;\n    font-weight: 500;\n    line-height: 20px;\n    margin-bottom: 16px;\n`;\nconst ToggleContainer = styled.div.withConfig({ displayName: \"ToggleContainer\", componentId: \"sc-6da4qk\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto;\n    min-width: 377px;\n    gap: 16px;\n`;\nconst Option = styled.div.withConfig({ displayName: \"Option\", componentId: \"sc-13iygz\" }) `\n    display: grid;\n    grid-template-columns: subgrid;\n    grid-column: span 2;\n`;\nconst ToggleLabel = styled.label.withConfig({ displayName: \"ToggleLabel\", componentId: \"sc-161gwty\" }) `\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 20px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { NetworkActionBar } from '~/components/ActionBars/NetworkActionBar';\nimport { Button } from '~/components/Button';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkPageSegment, { SegmentGrid } from '~/components/NetworkPageSegment';\nimport { QueriedSponsorshipsTable } from '~/components/QueriedSponsorshipsTable';\nimport { SponsorshipFilterButton, defaultFilters, } from '~/components/SponsorshipFilterButton';\nimport { useAllSponsorshipsQuery, useCreateSponsorship, useIsCreatingSponsorshipForWallet, useSponsorshipsForCreatorQuery, } from '~/hooks/sponsorships';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useIsWalletLoading, useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainFullName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nvar TabOption;\n(function (TabOption) {\n    TabOption[\"AllSponsorships\"] = \"all\";\n    TabOption[\"MySponsorships\"] = \"my\";\n})(TabOption || (TabOption = {}));\nconst PAGE_SIZE = 20;\nconst DEFAULT_ORDER_BY = 'remainingWei';\nconst DEFAULT_ORDER_DIRECTION = 'desc';\nconst DEFAULT_TAB = TabOption.AllSponsorships;\nfunction isTabOption(value) {\n    return value === TabOption.AllSponsorships || value === TabOption.MySponsorships;\n}\nexport const SponsorshipsPage = () => {\n    const [params] = useSearchParams();\n    const initialFilters = {\n        ...defaultFilters,\n        ...Object.keys(defaultFilters).reduce((acc, key) => {\n            if (params.has(key)) {\n                return { ...acc, [key]: params.get(key) === 'true' };\n            }\n            return acc;\n        }, {}),\n    };\n    const [filters, setFilters] = useState(initialFilters);\n    const wallet = useWalletAccount();\n    const isWalletLoading = useIsWalletLoading();\n    const { orderBy, orderDirection, setOrder } = useTableOrder({\n        orderBy: params.get('orderBy') || DEFAULT_ORDER_BY,\n        orderDirection: params.get('orderDir') || DEFAULT_ORDER_DIRECTION,\n    });\n    const tab = params.get('tab');\n    const selectedTab = isTabOption(tab) ? tab : DEFAULT_TAB;\n    const [searchQuery, setSearchQuery] = useState(params.get('search') || '');\n    useUrlParams([\n        {\n            param: 'tab',\n            value: selectedTab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'orderBy',\n            value: orderBy,\n            defaultValue: DEFAULT_ORDER_BY,\n        },\n        {\n            param: 'orderDir',\n            value: orderDirection,\n            defaultValue: DEFAULT_ORDER_DIRECTION,\n        },\n        {\n            param: 'search',\n            value: searchQuery,\n            defaultValue: '',\n        },\n        ...Object.entries(defaultFilters).map(([key, value]) => ({\n            param: key,\n            value: filters[key].toString(),\n            defaultValue: value.toString(),\n        })),\n    ]);\n    const allSponsorshipsQuery = useAllSponsorshipsQuery({\n        pageSize: PAGE_SIZE,\n        searchQuery,\n        orderBy,\n        orderDirection,\n        filters,\n    });\n    const mySponsorshipsQuery = useSponsorshipsForCreatorQuery(wallet, {\n        pageSize: PAGE_SIZE,\n        searchQuery,\n        orderBy,\n        orderDirection,\n        filters,\n    });\n    const navigate = useNavigate();\n    const chainKey = useCurrentChainKey();\n    useEffect(() => {\n        if (!wallet && !isWalletLoading) {\n            navigate(R.sponsorships(routeOptions(chainKey, {\n                tab: TabOption.AllSponsorships,\n            })));\n        }\n    }, [wallet, navigate, chainKey, isWalletLoading]);\n    const createSponsorship = useCreateSponsorship();\n    const isCreatingSponsorship = useIsCreatingSponsorshipForWallet(wallet);\n    const chainId = useCurrentChainId();\n    const chainFullName = useCurrentChainFullName();\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Sponsorships\" }),\n        React.createElement(NetworkActionBar, { searchEnabled: true, searchValue: searchQuery, onSearch: setSearchQuery, leftSideContent: React.createElement(Tabs, { onSelectionChange: (value) => {\n                    navigate(R.sponsorships(routeOptions(chainKey, { tab: value })));\n                }, selection: selectedTab, fullWidthOnMobile: true },\n                React.createElement(Tab, { id: TabOption.AllSponsorships }, \"All sponsorships\"),\n                React.createElement(Tab, { id: TabOption.MySponsorships, disabled: !wallet }, \"My sponsorships\")), rightSideContent: React.createElement(Button, { waiting: isCreatingSponsorship, onClick: () => {\n                    createSponsorship(chainId, wallet, {\n                        onDone(id, blockNumber) {\n                            navigate(R.sponsorship(id, routeOptions(chainId, {\n                                b: blockNumber,\n                            })));\n                        },\n                    });\n                }, disabled: !wallet }, \"Create sponsorship\") }),\n        React.createElement(LayoutColumn, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(Title, null,\n                        React.createElement(\"h2\", null, selectedTab === TabOption.AllSponsorships ? (React.createElement(React.Fragment, null, \"All sponsorships\")) : (React.createElement(React.Fragment, null, \"My sponsorships\"))),\n                        React.createElement(SponsorshipFilterButton, { filter: filters, onFilterChange: setFilters })) },\n                    React.createElement(QueriedSponsorshipsTable, { query: selectedTab === TabOption.AllSponsorships\n                            ? allSponsorshipsQuery\n                            : mySponsorshipsQuery, noDataFirstLine: selectedTab === TabOption.AllSponsorships\n                            ? `No sponsorships found on the ${chainFullName} chain.`\n                            : `You do not have any sponsorships on the ${chainFullName} chain yet.`, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: setOrder }))))));\n};\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-1ds6rh1\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { defaultStreamStats } from '~/getters/getStreamStats';\nimport { useStreamStatsQuery } from '~/hooks/useStreamStats';\nfunction Stat({ label, value, unit, ...props }) {\n    return (React.createElement(StatRoot, { type: \"button\", ...props },\n        React.createElement(StatName, null, label),\n        React.createElement(StatValue, null,\n            value !== undefined && value,\n            value === undefined && React.createElement(Dimm, null, \"\\u221E\"),\n            value !== undefined && unit)));\n}\nconst StatName = styled.div.withConfig({ displayName: \"StatName\", componentId: \"sc-1r7jdwi\" }) `\n    font-size: 10px;\n    font-weight: 500;\n    line-height: normal;\n    letter-spacing: 0.05em;\n    color: #adadad;\n    text-transform: uppercase;\n`;\nconst StatValue = styled.div.withConfig({ displayName: \"StatValue\", componentId: \"sc-bwcph1\" }) `\n    font-size: 16px;\n    line-height: normal;\n    margin-top: 0.25em;\n    color: #323232;\n\n    svg {\n        width: 13px;\n        height: 13px;\n        color: #adadad;\n    }\n`;\nconst Dimm = styled.span.withConfig({ displayName: \"Dimm\", componentId: \"sc-1vylgji\" }) `\n    color: #adadad;\n`;\nexport const StatRoot = styled.button.withConfig({ displayName: \"StatRoot\", componentId: \"sc-1lapg84\" }) `\n    background: transparent;\n    border: 0;\n    appearance: none;\n    text-align: center;\n    user-select: none;\n    position: relative;\n    font-family: inherit;\n    outline: none;\n\n    &:focus {\n        outline: none;\n    }\n\n    ${StatName} {\n        transition: color 300ms ease-in-out;\n    }\n`;\nconst ButtonGrid = styled.div.withConfig({ displayName: \"ButtonGrid\", componentId: \"sc-1a3ch8s\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);\n    display: flex;\n    flex-direction: row;\n    padding: 16px 0;\n    pointer-events: auto;\n\n    > ${StatRoot} {\n        flex-grow: 1;\n        flex-basis: 0;\n    }\n`;\nexport function StreamStats({ streamId }) {\n    const { data: stats } = useStreamStatsQuery(streamId);\n    const { messagesPerSecond, peerCount, latency } = stats || defaultStreamStats;\n    return (React.createElement(StreamStatsRoot, null,\n        React.createElement(ButtonGrid, null,\n            React.createElement(Stat, { id: \"streamMessagesPerSecond\", label: \"Msgs / sec\", value: messagesPerSecond }),\n            React.createElement(Stat, { id: \"peerCount\", label: \"Peers\", value: peerCount }),\n            React.createElement(Stat, { id: \"latency\", label: \"Latency ms\", value: latency == null ? undefined : latency.toFixed(0) }))));\n}\nconst StreamStatsRoot = styled.div.withConfig({ displayName: \"StreamStatsRoot\", componentId: \"sc-1wl2di2\" }) `\n    max-width: 480px;\n    padding: 24px;\n    pointer-events: none;\n    position: absolute;\n    top: 0;\n    width: 100%;\n`;\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useMemo } from 'react';\nimport Markdown from 'react-markdown';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { getStreamGptApiUrl } from '~/utils';\nimport { getImageCrossOrigin, getIpfsGatewayUrl } from '~/utils/ipfs';\nimport { LayoutColumn } from './Layout';\nimport { StreamStats } from './Stats';\nexport function StreamSummary(props) {\n    const { streamId } = props;\n    const streamSummaryQuery = useStreamSummaryQuery(streamId);\n    const { data: summary } = streamSummaryQuery;\n    const info = useMemo(() => {\n        const { about = '', usage = '', imageUrl = null, schema = {}, tags = [], } = summary || {};\n        if (!about &&\n            !usage &&\n            !imageUrl &&\n            !Object.keys(schema).length &&\n            !tags.length) {\n            return null;\n        }\n        return {\n            about,\n            usage,\n            imageUrl,\n            schema: Object.entries(schema),\n            tags,\n        };\n    }, [summary]);\n    if (!info) {\n        return null;\n    }\n    return (React.createElement(StreamSummaryRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(OuterWings, null,\n                React.createElement(Grid, null,\n                    !!(info.about || info.imageUrl || info.tags.length) && (React.createElement(StreamSummarySection, { title: \"About Stream\", ai: true },\n                        React.createElement(AboutWrap, null,\n                            info.imageUrl && (React.createElement(\"div\", null, info.imageUrl && (React.createElement(StreamImage, { src: info.imageUrl, crossOrigin: getImageCrossOrigin(info.imageUrl) })))),\n                            React.createElement(AboutWrapInner, null,\n                                info.about ? (React.createElement(\"div\", null,\n                                    React.createElement(Markdown, null, info.about))) : (React.createElement(React.Fragment, null)),\n                                info.tags.length > 0 && (React.createElement(Tags, null, info.tags.map((tag) => (React.createElement(Tag, { key: tag },\n                                    \"#\",\n                                    tag))))))))),\n                    React.createElement(InnerWings, null,\n                        info.schema.length > 0 && (React.createElement(\"div\", null,\n                            React.createElement(StreamSummarySection, { title: \"Schema\", ai: true, scrollMode: \"always\" },\n                                React.createElement(Schema, null, info.schema.map(([key, desc]) => (React.createElement(SchemaPair, { key: key },\n                                    React.createElement(SchemaKey, null, key),\n                                    desc))))))),\n                        info.usage && (React.createElement(\"div\", null,\n                            React.createElement(StreamSummarySection, { title: \"Stream usage\", ai: true },\n                                React.createElement(Markdown, null, info.usage)))))),\n                React.createElement(IFrameWrap, null,\n                    React.createElement(\"iframe\", { src: `https://streamr.network/network-explorer/streams/${encodeURIComponent(streamId)}?hud=467` }),\n                    React.createElement(StreamStats, { streamId: streamId }))))));\n}\nfunction useStreamSummaryQuery(streamId) {\n    return useQuery({\n        queryKey: ['useStreamSummaryQuery', streamId],\n        queryFn: async () => {\n            const resp = await fetch(getStreamGptApiUrl(`streams/${encodeURIComponent(streamId)}`));\n            return z\n                .object({\n                about: z.string(),\n                id: z.string(),\n                imageHash: z.string(),\n                rank: z.number(),\n                schema: z.record(z.string(), z.string()),\n                streamId: z.string(),\n                tags: z\n                    .string()\n                    .transform((value) => value.split(/\\s*,\\s*/).filter(Boolean)),\n                usage: z.string(),\n            })\n                .transform(({ imageHash, ...rest }) => ({\n                imageUrl: imageHash ? getIpfsGatewayUrl(imageHash) : null,\n                ...rest,\n            }))\n                .parse(await resp.json());\n        },\n    });\n}\nfunction StreamSummarySection(props) {\n    const { ai = false, children, title, scrollMode = 'desktopOnly' } = props;\n    return (React.createElement(StreamSummarySectionRoot, null,\n        React.createElement(StreamSummarySectionInner, { \"$scrollMode\": scrollMode },\n            React.createElement(StreamSummarySectionHeader, null,\n                React.createElement(\"h5\", null, title),\n                ai && React.createElement(AiGenerated, null)),\n            React.createElement(StreamSummarySectionBody, null, children))));\n}\nfunction AiGenerated() {\n    return (React.createElement(AiGeneratedRoot, null,\n        React.createElement(\"div\", null,\n            React.createElement(\"svg\", { width: \"11\", height: \"11\", viewBox: \"0 0 11 11\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n                React.createElement(\"path\", { \n                    // eslint-disable-next-line max-len\n                    d: \"M5.06321 0.326186C4.88824 0.794011 4.51917 1.16308 4.05134 1.33805C3.99274 1.35954 3.95367 1.41619 3.95367 1.4787C3.95367 1.54121 3.99274 1.59786 4.05134 1.61934C4.51917 1.79431 4.88824 2.16339 5.06321 2.63121C5.0847 2.68981 5.14135 2.72888 5.20386 2.72888C5.26637 2.72888 5.32302 2.68981 5.3445 2.63121C5.51947 2.16339 5.88855 1.79431 6.35637 1.61934C6.41497 1.59786 6.45404 1.54121 6.45404 1.4787C6.45404 1.41619 6.41497 1.35954 6.35637 1.33805C5.88855 1.16308 5.51947 0.794011 5.3445 0.326186C5.32302 0.267584 5.26637 0.228516 5.20386 0.228516C5.14135 0.228516 5.0847 0.267584 5.06321 0.326186ZM1.10365 7.9523C0.73836 8.31759 0.73836 8.91143 1.10365 9.27867L1.77953 9.95455C2.14482 10.3198 2.73865 10.3198 3.10589 9.95455L10.5543 2.50424C10.9195 2.13895 10.9195 1.54511 10.5543 1.17787L9.87837 0.503947C9.51308 0.138659 8.91925 0.138659 8.552 0.503947L1.10365 7.9523ZM9.44178 1.61446C9.56747 1.74015 9.56747 1.94392 9.44178 2.06961L7.84585 3.66554C7.72016 3.79123 7.51639 3.79123 7.3907 3.66554C7.26502 3.53986 7.26502 3.33608 7.3907 3.2104L8.98664 1.61446C9.11232 1.48878 9.3161 1.48878 9.44178 1.61446ZM0.349631 2.51791C0.261727 2.55112 0.203125 2.63512 0.203125 2.72888C0.203125 2.82265 0.261727 2.90664 0.349631 2.93985C1.05093 3.20299 1.60429 3.75636 1.86743 4.45765C1.90064 4.54555 1.98464 4.60416 2.0784 4.60416C2.17216 4.60416 2.25616 4.54555 2.28937 4.45765C2.55251 3.75636 3.10587 3.20299 3.80717 2.93985C3.89507 2.90664 3.95367 2.82265 3.95367 2.72888C3.95367 2.63512 3.89507 2.55112 3.80717 2.51791C3.10587 2.25477 2.55251 1.70141 2.28937 1.00011C2.25616 0.91221 2.17216 0.853607 2.0784 0.853607C1.98464 0.853607 1.90064 0.91221 1.86743 1.00011C1.60429 1.70141 1.05093 2.25477 0.349631 2.51791ZM7.22564 7.51865C7.13773 7.55185 7.07913 7.63585 7.07913 7.72961C7.07913 7.82338 7.13773 7.90737 7.22564 7.94058C7.92693 8.20372 8.4803 8.75709 8.74344 9.45838C8.77665 9.54629 8.86064 9.60489 8.95441 9.60489C9.04817 9.60489 9.13217 9.54629 9.16537 9.45838C9.42852 8.75709 9.98188 8.20372 10.6832 7.94058C10.7711 7.90737 10.8297 7.82338 10.8297 7.72961C10.8297 7.63585 10.7711 7.55185 10.6832 7.51865C9.98188 7.25551 9.42852 6.70214 9.16537 6.00085C9.13217 5.91294 9.04817 5.85434 8.95441 5.85434C8.86064 5.85434 8.77665 5.91294 8.74344 6.00085C8.4803 6.70214 7.92693 7.25551 7.22564 7.51865Z\", fill: \"url(#paint0_linear_6944_9126)\" }),\n                React.createElement(\"defs\", null,\n                    React.createElement(\"linearGradient\", { id: \"paint0_linear_6944_9126\", x1: \"0.203125\", y1: \"5.22852\", x2: \"18.4602\", y2: \"5.22852\", gradientUnits: \"userSpaceOnUse\" },\n                        React.createElement(\"stop\", { stopColor: \"#9747FF\" }),\n                        React.createElement(\"stop\", { offset: \"1\", stopColor: \"#0065FF\" }))))),\n        React.createElement(\"strong\", null, \"AI Generated\")));\n}\nconst AiGeneratedRoot = styled.div.withConfig({ displayName: \"AiGeneratedRoot\", componentId: \"sc-p83ixg\" }) `\n    align-items: center;\n    background: #faf8ff;\n    border-radius: 4px;\n    display: flex;\n    font-size: 12px;\n    gap: 6px;\n    height: 24px;\n    line-height: normal;\n    padding: 0 8px;\n    text-wrap: nowrap;\n\n    strong {\n        background: linear-gradient(90deg, #9747ff 0%, #0065ff 171.81%);\n        background-clip: text;\n        -webkit-text-fill-color: transparent;\n    }\n`;\nconst Schema = styled.ul.withConfig({ displayName: \"Schema\", componentId: \"sc-1m1kbwm\" }) `\n    list-style: none;\n    line-height: 1.5em;\n`;\nconst SchemaKey = styled.span.withConfig({ displayName: \"SchemaKey\", componentId: \"sc-1qg3vxs\" }) `\n    background: ${COLORS.secondary};\n    border-radius: 4px;\n    padding: 3px 4px;\n    font-size: 14px;\n    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n    margin-right: 8px;\n`;\nconst SchemaPair = styled.li.withConfig({ displayName: \"SchemaPair\", componentId: \"sc-7ue6xp\" }) `\n    & + & {\n        margin-top: 4px;\n    }\n`;\nconst Tags = styled.div.withConfig({ displayName: \"Tags\", componentId: \"sc-12nsarg\" }) `\n    align-items: center;\n    display: flex;\n    flex-wrap: wrap;\n    gap: 4px;\n\n    * + & {\n        margin-top: 16px;\n    }\n`;\nconst Tag = styled.div.withConfig({ displayName: \"Tag\", componentId: \"sc-kpnr8y\" }) `\n    background: ${COLORS.Border};\n    border-radius: 4px;\n    font-size: 12px;\n    font-weight: 500;\n    line-height: 24px;\n    min-width: 0;\n    overflow: hidden;\n    padding: 2px 8px;\n    text-overflow: ellipsis;\n    text-wrap: nowrap;\n    flex-shrink: 1;\n`;\nconst PictureOnSideMedia = `(min-width: 420px)`;\nconst StreamImage = styled.img.withConfig({ displayName: \"StreamImage\", componentId: \"sc-1ozutjn\" }) `\n    border-radius: 16px;\n    display: block;\n    max-width: 100%;\n\n    @media ${PictureOnSideMedia} {\n        max-width: 192px;\n        min-width: 64px;\n        width: 20vw;\n    }\n`;\nconst Grid = styled.div.withConfig({ displayName: \"Grid\", componentId: \"sc-ri6ggy\" }) `\n    display: grid;\n    gap: 20px;\n`;\nconst MapToSideMedia = `(min-width: 1200px)`;\nconst OuterWings = styled(Grid).withConfig({ displayName: \"OuterWings\", componentId: \"sc-10xg2an\" }) `\n    grid-template-columns: 1fr;\n\n    @media ${MapToSideMedia} {\n        grid-template-columns: 2fr 1fr;\n    }\n`;\nconst StreamSummaryRoot = styled.div.withConfig({ displayName: \"StreamSummaryRoot\", componentId: \"sc-176jfgf\" }) `\n    background-color: white;\n    padding-bottom: 56px;\n`;\nconst IFrameWrap = styled.div.withConfig({ displayName: \"IFrameWrap\", componentId: \"sc-kvvu9c\" }) `\n    position: relative;\n\n    iframe {\n        border-radius: 16px;\n        border: 0;\n        display: block;\n        height: 320px;\n        width: 100%;\n    }\n\n    @media ${TABLET} {\n        display: block;\n    }\n\n    @media ${MapToSideMedia} {\n        iframe {\n            height: 604px;\n        }\n    }\n`;\nconst StreamSummarySectionRoot = styled.div.withConfig({ displayName: \"StreamSummarySectionRoot\", componentId: \"sc-1bmxn94\" }) `\n    border: 1px solid ${COLORS.Border};\n    border-radius: 16px;\n    color: ${COLORS.primaryLight};\n    overflow: hidden;\n\n    h5 {\n        font-size: 14px;\n        font-weight: 500;\n        line-height: 26px;\n        margin: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        text-wrap: nowrap;\n    }\n\n    p {\n        font-size: 16px;\n        line-height: 1.5em;\n    }\n`;\nconst InnerWings = styled(Grid).withConfig({ displayName: \"InnerWings\", componentId: \"sc-15rc6bh\" }) `\n    grid-template-columns: 1fr;\n\n    &:empty {\n        display: none;\n    }\n\n    @media ${MapToSideMedia} {\n        grid-template-columns: 1fr 1fr;\n    }\n`;\nconst AboutWrap = styled(Grid).withConfig({ displayName: \"AboutWrap\", componentId: \"sc-1el2a67\" }) `\n    grid-template-columns: 1fr;\n    gap: 32px;\n\n    @media ${PictureOnSideMedia} {\n        grid-template-columns: auto 1fr;\n    }\n`;\nconst AboutWrapInner = styled.div.withConfig({ displayName: \"AboutWrapInner\", componentId: \"sc-u2o6re\" }) `\n    min-width: 0;\n`;\nconst StreamSummarySectionHeader = styled.div.withConfig({ displayName: \"StreamSummarySectionHeader\", componentId: \"sc-1nr95c9\" }) `\n    align-items: center;\n    backdrop-filter: blur(6px);\n    background: rgba(255, 255, 255, 0.9);\n    display: flex;\n    gap: 12px;\n    height: 74px;\n    padding: 0 24px;\n    position: sticky;\n    top: 0;\n`;\nconst StreamSummarySectionInner = styled.div.withConfig({ displayName: \"StreamSummarySectionInner\", componentId: \"sc-163s346\" }) `\n    height: auto;\n    overflow: auto;\n\n    ${({ $scrollMode }) => $scrollMode === 'always' &&\n    css `\n            max-height: 290px;\n        `}\n\n    @media ${MapToSideMedia} {\n        height: 290px;\n    }\n`;\nconst StreamSummarySectionBody = styled.div.withConfig({ displayName: \"StreamSummarySectionBody\", componentId: \"sc-ldh6yk\" }) `\n    padding: 0 24px 24px;\n    word-wrap: break-word;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { REGULAR, COLORS } from '~/shared/utils/styled';\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1pycplb\" }) `\n    margin-bottom: 60px;\n`;\nconst Title = styled.h3.withConfig({ displayName: \"Title\", componentId: \"sc-1hpfsa9\" }) `\n    color: ${COLORS.primary};\n    font-size: 24px;\n    font-weight: ${REGULAR};\n    letter-spacing: 0;\n    line-height: 150%;\n    margin-bottom: 16px;\n`;\nconst TitleWrapper = styled.div.withConfig({ displayName: \"TitleWrapper\", componentId: \"sc-rvlrch\" }) `\n    display: inline-flex;\n    align-items: center;\n    width: 100%;\n`;\nconst TitleText = styled.span.withConfig({ displayName: \"TitleText\", componentId: \"sc-180h2s\" }) `\n    margin-right: 16px;\n`;\nexport default function Section({ title, status, children, ...props }) {\n    return (React.createElement(Root, { ...props },\n        React.createElement(Title, null,\n            React.createElement(TitleWrapper, null,\n                React.createElement(TitleText, null, title),\n                !!status && React.createElement(\"span\", null, status))),\n        children));\n}\n","import uniqueId from 'lodash/uniqueId';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport SharedCheckbox from '~/shared/components/Checkbox';\nimport { COLORS } from '~/shared/utils/styled';\nconst Label = styled.label.withConfig({ displayName: \"Label\", componentId: \"sc-eodaqx\" }) `\n    border: 1px solid ${COLORS.Border};\n    border-radius: 4px;\n    display: grid;\n    grid-template-columns: 1fr auto;\n    align-items: center;\n    justify-items: left;\n    padding: 0px 12px 0px 18px;\n    height: 40px;\n    margin: 0;\n    cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n`;\nconst Checkbox = ({ operationName, value, publicKey, onChange, disabled, }) => {\n    const uniqueKey = useMemo(() => uniqueId(`${operationName}-${publicKey}-`), [operationName, publicKey]);\n    return (React.createElement(Label, { htmlFor: uniqueKey, disabled: disabled },\n        operationName,\n        React.createElement(SharedCheckbox, { id: uniqueKey, onChange: (ev) => onChange(ev.target.checked), value: value, disabled: disabled })));\n};\nexport default Checkbox;\n","import React from 'react';\nimport { StreamPermission } from '@streamr/sdk';\nimport styled from 'styled-components';\nimport { Bits, matchBits } from '~/parsers/StreamParser';\nimport { MEDIUM, TABLET } from '~/shared/utils/styled';\nimport Checkbox from './Checkbox';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-w3wa5g\" }) `\n    display: grid;\n    grid-template-rows: auto auto auto;\n    gap: 21px;\n    align-items: start;\n    user-select: none;\n\n    @media ${TABLET} {\n        grid-template-rows: unset;\n        grid-template-columns: 1fr 1fr 1fr;\n    }\n`;\nconst Column = styled.div.withConfig({ displayName: \"Column\", componentId: \"sc-ly5e7q\" }) `\n    display: grid;\n    grid-template-rows: auto auto auto;\n    gap: 12px;\n\n    & > span {\n        color: #000000;\n        font-weight: ${MEDIUM};\n        font-size: 12px;\n        line-height: 16px;\n        justify-self: left;\n    }\n`;\nfunction UnstyledPermissionEditor({ publicKey, permissionBits, disabled, onChange, ...props }) {\n    return (React.createElement(Container, { ...props },\n        React.createElement(Column, null,\n            React.createElement(\"span\", null, \"Read\"),\n            React.createElement(Checkbox, { operationName: \"Subscribe\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.SUBSCRIBE], permissionBits), onChange: (value) => onChange(StreamPermission.SUBSCRIBE, value), disabled: disabled })),\n        React.createElement(Column, null,\n            React.createElement(\"span\", null, \"Write\"),\n            React.createElement(Checkbox, { operationName: \"Publish\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.PUBLISH], permissionBits), onChange: (value) => onChange(StreamPermission.PUBLISH, value), disabled: disabled })),\n        React.createElement(Column, null,\n            React.createElement(\"span\", null, \"Manage\"),\n            React.createElement(Checkbox, { operationName: \"Grant\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.GRANT], permissionBits), onChange: (value) => onChange(StreamPermission.GRANT, value), disabled: disabled }),\n            React.createElement(Checkbox, { operationName: \"Edit\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.EDIT], permissionBits), onChange: (value) => onChange(StreamPermission.EDIT, value), disabled: disabled }),\n            React.createElement(Checkbox, { operationName: \"Delete\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.DELETE], permissionBits), onChange: (value) => onChange(StreamPermission.DELETE, value), disabled: disabled }))));\n}\nconst PermissionEditor = styled(UnstyledPermissionEditor).withConfig({ displayName: \"PermissionEditor\", componentId: \"sc-6r0adt\" }) ``;\nexport default PermissionEditor;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { StreamPermission } from '@streamr/sdk';\nimport PermissionEditor from '~/pages/AbstractStreamEditPage/AccessControlSection/PermissionEditor';\nimport { Bits, matchBits, setBits, unsetBits } from '~/parsers/StreamParser';\nimport UnstyledErrors, { MarketplaceTheme } from '~/shared/components/Ui/Errors';\nimport UnstyledLabel from '~/shared/components/Ui/Label';\nimport Text from '~/shared/components/Ui/Text';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { RejectionReason, isMessagedObject } from '~/utils/exceptions';\nimport FormModal from './FormModal';\nconst Separator = styled.div.withConfig({ displayName: \"Separator\", componentId: \"sc-1724o6i\" }) `\n    border-bottom: 1px solid ${COLORS.Border};\n    margin: 24px 0;\n\n    @media ${TABLET} {\n        border: 0;\n        margin: 40px 0 0;\n    }\n`;\nconst Label = styled(UnstyledLabel).withConfig({ displayName: \"Label\", componentId: \"sc-1ip35yz\" }) `\n    display: flex;\n`;\nconst Errors = styled(UnstyledErrors).withConfig({ displayName: \"Errors\", componentId: \"sc-1gjtc59\" }) `\n    display: flex;\n`;\nconst ethereumAddressRegex = /^0x[0-9a-fA-F]{40}$/;\nconst hexStringRegex = /^0x([0-9a-fA-F]{2})+$/;\nconst zeroAddressRegex = /^(0x)?0+$/;\nexport default function NewStreamPermissionsModal({ onReject, onResolve, onBeforeSubmit, ...props }) {\n    const [permissionBits, setPermissionBits] = useState(0);\n    const [publicKey, setPublicKey] = useState('');\n    const [error, setError] = useState('');\n    const cancelLabel = publicKey || permissionBits !== 0 ? 'Cancel' : undefined;\n    return (React.createElement(FormModal, { ...props, title: \"Authorize Public Key\", onReject: onReject, onBeforeAbort: (reason) => {\n            return ((permissionBits === 0 && publicKey === '') ||\n                reason !== RejectionReason.Backdrop);\n        }, onSubmit: () => {\n            const normalizedPublicKey = `${publicKey.startsWith('0x') ? '' : '0x'}${publicKey.toLowerCase()}`;\n            if (zeroAddressRegex.test(normalizedPublicKey)) {\n                return void setError('Invalid key - cannot assign to zero key');\n            }\n            if (!hexStringRegex.test(normalizedPublicKey)) {\n                return void setError('Invalid key - must be a hex string');\n            }\n            if (!ethereumAddressRegex.test(normalizedPublicKey) && (matchBits(Bits[StreamPermission.GRANT], permissionBits) ||\n                matchBits(Bits[StreamPermission.DELETE], permissionBits) ||\n                matchBits(Bits[StreamPermission.EDIT], permissionBits))) {\n                return void setError('Only Ethereum addresses can have Grant, Edit, or Delete permission');\n            }\n            const result = {\n                publicKey: normalizedPublicKey,\n                bits: permissionBits,\n            };\n            try {\n                onBeforeSubmit?.(result);\n            }\n            catch (e) {\n                if (isMessagedObject(e)) {\n                    return void setError(e.message);\n                }\n                return void setError('Something bad happened');\n            }\n            onResolve?.(result);\n        }, canSubmit: !!publicKey && permissionBits !== 0, submitLabel: \"Authorize Public Key\", cancelLabel: cancelLabel },\n        React.createElement(\"div\", null,\n            React.createElement(Label, null, \"Public Key\"),\n            React.createElement(Text, { onCommit: (value) => {\n                    setPublicKey(value);\n                    setError('');\n                }, placeholder: \"Hex public key or Ethereum address\" }),\n            !!error && (React.createElement(Errors, { theme: MarketplaceTheme, overlap: true }, error))),\n        React.createElement(Separator, null),\n        React.createElement(PermissionEditor, { publicKey: publicKey, permissionBits: permissionBits, onChange: (permission, enabled) => {\n                setPermissionBits((enabled ? setBits : unsetBits)(permissionBits, Bits[permission]));\n            } })));\n}\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Bits, matchBits, setBits, unsetBits } from '~/parsers/StreamParser';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport UnstyledPermissionEditor from './PermissionEditor';\nexport function PermissionItem(props) {\n    const { disabled = false, publicKey, permissionBits } = props;\n    const [isOpen, setIsOpen] = useState(false);\n    const account = useWalletAccount();\n    const operations = Object.keys(Bits).filter((permission) => matchBits(Bits[permission], permissionBits));\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Container, null,\n        React.createElement(Title, { \"$isOpen\": isOpen, onClick: () => {\n                setIsOpen((prev) => !prev);\n            } },\n            isOpen ? truncate(publicKey, 50, 20, 20) : truncate(publicKey),\n            isOpen ? (React.createElement(\"div\", null)) : (React.createElement(Labels, null,\n                account?.toLowerCase() === publicKey.toLowerCase() && (React.createElement(YouLabel, null, \"You\")),\n                operations.map((op) => (React.createElement(Label, { key: op }, op.replace(/^\\w/, (s) => s.toUpperCase())))))),\n            React.createElement(DropdownCaret, { name: \"caretDown\", \"$isOpen\": isOpen })),\n        isOpen && (React.createElement(PermissionEditor, { publicKey: publicKey, permissionBits: permissionBits, disabled: disabled, onChange: (permission, enabled) => {\n                update((hot, cold) => {\n                    if (cold.permissions[publicKey] == null) {\n                        cold.permissions[publicKey] = 0;\n                    }\n                    hot.permissions[publicKey] = (enabled ? setBits : unsetBits)(permissionBits, Bits[permission]);\n                });\n            } }))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1e8uvil\" }) `\n    background: #ffffff;\n    border-radius: 4px;\n    display: grid;\n    grid-template-rows: 1fr auto auto;\n    align-items: center;\n    transition: all 180ms ease-in-out;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-a1yqlc\" }) `\n    display: grid;\n    grid-template-columns: auto 1fr auto;\n    gap: 8px;\n    align-items: center;\n    border-bottom: ${({ $isOpen }) => ($isOpen ? '1px' : '0px')} solid ${COLORS.Border};\n    height: 72px;\n    padding: 21px;\n\n    &:hover {\n        cursor: pointer;\n    }\n`;\nconst Labels = styled.div.withConfig({ displayName: \"Labels\", componentId: \"sc-13s6ui5\" }) `\n    display: flex;\n    overflow: hidden;\n`;\nconst Label = styled.div.withConfig({ displayName: \"Label\", componentId: \"sc-7w5k4j\" }) `\n    color: ${COLORS.primary};\n    background-color: ${COLORS.secondary};\n    border-radius: 4px;\n    font-size: 12px;\n    line-height: 16px;\n    padding: 4px 8px;\n    margin-right: 8px;\n`;\nconst YouLabel = styled(Label).withConfig({ displayName: \"YouLabel\", componentId: \"sc-8xv30j\" }) `\n    color: white;\n    background-color: ${COLORS.primaryLight};\n`;\nconst PermissionEditor = styled(UnstyledPermissionEditor).withConfig({ displayName: \"PermissionEditor\", componentId: \"sc-1vo77d2\" }) `\n    padding: 21px;\n`;\nconst DropdownCaret = styled(SvgIcon).withConfig({ displayName: \"DropdownCaret\", componentId: \"sc-1cn26lq\" }) `\n    display: block;\n    color: ${COLORS.primaryLight};\n    width: 12px;\n    height: 12px;\n    transform: ${({ $isOpen }) => ($isOpen ? 'rotate(180deg)' : 'rotate(0deg)')};\n    transition: transform 180ms ease-in-out;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Button } from '~/components/Button';\nimport { address0 } from '~/consts';\nimport NewStreamPermissionsModal from '~/modals/NewStreamPermissionsModal';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Layer } from '~/utils/Layer';\nimport { PermissionItem } from './PermissionItem';\nexport function PermissionList({ disabled = false }) {\n    const { permissions = {} } = StreamDraft.useEntity({ hot: true }) || {};\n    const permissionList = Object.entries(permissions);\n    const count = permissionList.length - (address0 in permissions ? 1 : 0);\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Container, null,\n        permissionList.map(([key, bits]) => key !== address0 && (React.createElement(PermissionItem, { key: key, publicKey: key, permissionBits: bits || 0, disabled: disabled }))),\n        React.createElement(Footer, null,\n            React.createElement(\"span\", null,\n                count,\n                \" Public Key\",\n                count === 1 ? '' : 's'),\n            React.createElement(Button, { kind: \"primary\", type: \"button\", disabled: disabled, outline: true, onClick: async () => {\n                    try {\n                        const { publicKey, bits } = await toaster(NewStreamPermissionsModal, Layer.Modal).pop({\n                            onBeforeSubmit(payload) {\n                                if (permissions[payload.publicKey] != null) {\n                                    throw new Error('Permissions for this public key already exist');\n                                }\n                            },\n                        });\n                        update((hot, cold) => {\n                            if (cold.permissions[publicKey] == null) {\n                                cold.permissions[publicKey] = 0;\n                            }\n                            hot.permissions[publicKey] = bits;\n                        });\n                    }\n                    catch (e) {\n                        if (isAbandonment(e)) {\n                            return;\n                        }\n                        console.warn('Could not add permissions for a new public key', e);\n                    }\n                } }, \"Add Public Key\"))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1yocizz\" }) `\n    background: #f1f1f1;\n    border-radius: 4px;\n    display: grid;\n    grid-template-rows: auto;\n    grid-gap: 1em;\n    padding: 1.5em;\n    margin-top: 16px;\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-1hu9d6w\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto auto;\n    gap: 8px;\n    align-items: center;\n`;\n","import React, { useMemo } from 'react';\nimport { StreamPermission } from '@streamr/sdk';\nimport styled from 'styled-components';\nimport { address0 } from '~/consts';\nimport { Bits } from '~/parsers/StreamParser';\nimport { MEDIUM } from '~/shared/utils/styled';\nimport { StreamDraft } from '~/stores/streamDraft';\nvar StreamType;\n(function (StreamType) {\n    StreamType[\"PublicSubscribe\"] = \"publicSubscribe\";\n    StreamType[\"Private\"] = \"private\";\n    StreamType[\"PublicPubSub\"] = \"publicPubSub\";\n})(StreamType || (StreamType = {}));\nexport function StreamTypeSelector({ disabled }) {\n    const update = StreamDraft.useUpdateEntity();\n    const bits = StreamDraft.useEntity({ hot: true })?.permissions[address0] ?? null;\n    const streamType = useMemo(() => {\n        if (!bits) {\n            return StreamType.Private;\n        }\n        switch (bits) {\n            case Bits[StreamPermission.SUBSCRIBE]:\n                return StreamType.PublicSubscribe;\n            case Bits[StreamPermission.SUBSCRIBE] | Bits[StreamPermission.PUBLISH]:\n                return StreamType.PublicPubSub;\n            default:\n                return StreamType.Private;\n        }\n    }, [bits]);\n    return (React.createElement(Container, null,\n        React.createElement(Item, null,\n            React.createElement(RadioContainer, { htmlFor: \"publicSubscribe\" },\n                React.createElement(Radio, { id: \"publicSubscribe\", type: \"radio\", name: \"streamType\", checked: streamType === StreamType.PublicSubscribe, onChange: () => {\n                        update((entity) => {\n                            entity.permissions[address0] =\n                                Bits[StreamPermission.SUBSCRIBE];\n                        });\n                    }, disabled: disabled }),\n                React.createElement(\"div\", null,\n                    React.createElement(Title, null, \"Public subscribe\"),\n                    React.createElement(Description, null, \"Anyone can read/subscribe to the stream\")))),\n        React.createElement(Item, null,\n            React.createElement(RadioContainer, { htmlFor: \"private\" },\n                React.createElement(Radio, { id: \"private\", type: \"radio\", name: \"streamType\", checked: streamType === StreamType.Private, onChange: () => {\n                        update((hot, cold) => {\n                            if (cold.permissions[address0] == null) {\n                                cold.permissions[address0] = 0;\n                            }\n                            hot.permissions[address0] = 0;\n                        });\n                    }, disabled: disabled }),\n                React.createElement(\"div\", null,\n                    React.createElement(Title, null, \"Private subscribe\"),\n                    React.createElement(Description, null, \"Only the keys listed below can read/subscribe to the stream.\")))),\n        React.createElement(Item, null,\n            React.createElement(RadioContainer, { htmlFor: \"publicPubSub\" },\n                React.createElement(Radio, { id: \"publicPubSub\", type: \"radio\", name: \"streamType\", checked: streamType === StreamType.PublicPubSub, onChange: () => {\n                        update((entity) => {\n                            entity.permissions[address0] =\n                                Bits[StreamPermission.SUBSCRIBE] |\n                                    Bits[StreamPermission.PUBLISH];\n                        });\n                    }, disabled: disabled }),\n                React.createElement(\"div\", null,\n                    React.createElement(Title, null, \"Public publish & subscribe\"),\n                    React.createElement(Description, null, \"Anyone can write/publish to the stream\"))))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1n6i7ua\" }) `\n    background: #f1f1f1;\n    border-radius: 4px;\n    display: grid;\n    grid-template-rows: auto;\n    grid-gap: 1em;\n    padding: 1.5em;\n`;\nconst Item = styled.div.withConfig({ displayName: \"Item\", componentId: \"sc-e8dhrp\" }) `\n    background: #ffffff;\n    border-radius: 4px;\n    height: 100px;\n    display: flex;\n    align-items: center;\n`;\nconst Radio = styled.input.withConfig({ displayName: \"Radio\", componentId: \"sc-1dxk15b\" }) `\n    width: 16px;\n    justify-self: center;\n    align-self: center;\n`;\nconst RadioContainer = styled.label.withConfig({ displayName: \"RadioContainer\", componentId: \"sc-nmbwx0\" }) `\n    width: 100%;\n    margin: 0;\n    display: grid;\n    grid-template-columns: 48px auto 48px;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-1ux92rx\" }) `\n    font-weight: ${MEDIUM};\n    font-size: 16px;\n    line-height: 20px;\n`;\nconst Description = styled.div.withConfig({ displayName: \"Description\", componentId: \"sc-1lmeybv\" }) `\n    font-size: 14px;\n    line-height: 24px;\n`;\n","import React from 'react';\nimport { StreamPermission } from '@streamr/sdk';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Route as R } from '~/utils/routes';\nimport Section from '../Section';\nimport { PermissionList } from './PermissionList';\nimport { StreamTypeSelector } from './StreamTypeSelector';\nexport function AccessControlSection({ disabled: disabledProp = false }) {\n    const { id: streamId } = StreamDraft.useEntity() || {};\n    const canGrant = useCurrentStreamAbility(streamId, StreamPermission.GRANT);\n    const disabled = disabledProp || !canGrant;\n    return (React.createElement(Section, { title: \"Access control\" },\n        React.createElement(\"p\", null,\n            \"You can make your stream public, or grant access to holders of specific cryptographic keys. Learn more about stream access control and permissions from the\",\n            ' ',\n            React.createElement(\"a\", { href: R.docs('/usage/streams/permissions/') }, \"docs\"),\n            \".\"),\n        React.createElement(StreamTypeSelector, { disabled: disabled }),\n        React.createElement(PermissionList, { disabled: disabled })));\n}\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport dataUnionImage2x from '~/marketplace/assets/product_dataunion@2x.png';\nimport CreateProjectModal from '~/marketplace/containers/CreateProjectModal';\nimport { getProjects } from '~/services/projects';\nimport useModal from '~/shared/hooks/useModal';\nimport { DESKTOP, LAPTOP, TABLET } from '~/shared/utils/styled';\nimport { useCurrentChainId } from '~/utils/chains';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1tfmnkb\" }) `\n    padding: 76px 32px;\n    display: grid;\n    grid-template-rows: auto auto;\n    grid-template-columns: unset;\n    gap: 40px;\n\n    @media (${LAPTOP}) {\n        padding: 60px 116px;\n        grid-template-rows: unset;\n        grid-template-columns: auto auto;\n    }\n\n    @media (${DESKTOP}) {\n        padding: 165px 125px;\n        grid-template-rows: unset;\n        grid-template-columns: auto auto;\n    }\n`;\nconst TextContainer = styled.div.withConfig({ displayName: \"TextContainer\", componentId: \"sc-nt5zi9\" }) `\n    margin-left: 0;\n    display: grid;\n    grid-template-rows: auto auto;\n    gap: 40px;\n    align-content: center;\n\n    @media (${DESKTOP}) {\n        margin-left: 112px;\n    }\n`;\nconst Text = styled.div.withConfig({ displayName: \"Text\", componentId: \"sc-12ep14w\" }) `\n    display: flex;\n    font-size: 24px;\n    line-height: 150%;\n    text-align: center;\n    justify-self: center;\n\n    @media (${TABLET}) {\n        font-size: 34px;\n    }\n\n    @media (${DESKTOP}) {\n        text-align: left;\n        justify-self: left;\n    }\n`;\nconst Image = styled.img.withConfig({ displayName: \"Image\", componentId: \"sc-1g525k8\" }) `\n    width: 261px;\n    justify-self: center;\n\n    @media (${TABLET}) {\n        width: 364px;\n    }\n`;\nconst CreateButton = styled(Button).withConfig({ displayName: \"CreateButton\", componentId: \"sc-57e4sq\" }) `\n    width: fit-content;\n    justify-self: center;\n\n    @media (${DESKTOP}) {\n        justify-self: left;\n    }\n`;\nexport default function CreateProjectHint({ streamId }) {\n    const [projects, setProjects] = useState([]);\n    const { api: createProductModal } = useModal('marketplace.createProduct');\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Refactor using useQuery. #refactor\n         */\n        let mounted = true;\n        const loadProjects = async () => {\n            const result = await getProjects({\n                chainId,\n                first: 4,\n                streamId,\n            });\n            if (mounted) {\n                setProjects(result.projects);\n            }\n        };\n        if (streamId) {\n            loadProjects();\n        }\n        return () => {\n            mounted = false;\n        };\n    }, [streamId, chainId]);\n    // If the stream already has a project, show nothing\n    if (projects.length > 0) {\n        return null;\n    }\n    return (React.createElement(Container, null,\n        React.createElement(Image, { src: dataUnionImage2x, alt: \"Create a project\" }),\n        React.createElement(TextContainer, null,\n            React.createElement(Text, null, \"Make your stream more discoverable by creating a project.\"),\n            React.createElement(CreateButton, { type: \"button\", onClick: () => createProductModal.open() }, \"Create a project\")),\n        React.createElement(CreateProjectModal, null)));\n}\n","import React from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { getStreamrClientInstance } from '~/getters/getStreamrClient';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport Section from './Section';\nconst Description = styled.p.withConfig({ displayName: \"Description\", componentId: \"sc-1v03886\" }) `\n    margin-bottom: 3rem;\n`;\nexport default function DeleteSection() {\n    const navigate = useNavigate();\n    const { id: streamId } = StreamDraft.useEntity() || {};\n    const chainId = useCurrentChainId();\n    return (React.createElement(Section, { title: \"Delete stream\" },\n        React.createElement(Description, null, \"Delete this stream forever. You can't undo this.\"),\n        React.createElement(Button, { type: \"button\", kind: \"destructive\", disabled: !streamId, onClick: async () => {\n                if (!streamId) {\n                    return;\n                }\n                try {\n                    const client = await getStreamrClientInstance(chainId, {\n                        transactional: true,\n                    });\n                    await client.deleteStream(streamId);\n                    /**\n                     * @FIXME: If the user navigates away before the above transaciton is\n                     * done the app is gonna navigate to streams/index.\n                     */\n                    navigate(R.streams(routeOptions(chainId)));\n                }\n                catch (e) {\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    if (isTransactionRejection(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            } }, \"Delete\")));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Hint } from '~/components/Hint';\nimport { Tick } from '~/shared/components/Checkbox';\nimport Spinner from '~/components/Spinner';\nimport { StreamDraft } from '~/stores/streamDraft';\nfunction UnstyledStorageNodeItem({ address, className, disabled = false, children, thirdPartyUrl, }) {\n    const active = !!StreamDraft.useEntity({ hot: true })?.storage[address];\n    const busy = false;\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Root, { className: className, onClick: () => {\n            update((hot, cold) => {\n                if (cold.storage[address] == null) {\n                    cold.storage[address] = false;\n                }\n                const enabled = !hot.storage[address];\n                hot.storage[address] = enabled;\n                if (!enabled && !Object.values(hot.storage).some(Boolean)) {\n                    /**\n                     * If there are no other enabled storage nodes\n                     * revert the storage days.\n                     */\n                    hot.metadata.storageDays = cold.metadata.storageDays;\n                }\n            });\n        }, type: \"button\", \"$active\": active, disabled: disabled },\n        React.createElement(\"div\", null, children),\n        thirdPartyUrl && (React.createElement(Hint, null,\n            React.createElement(\"p\", null, \"Third-party Storage Provider\"),\n            React.createElement(\"p\", null,\n                React.createElement(\"a\", { href: thirdPartyUrl, target: '_blank', rel: \"noreferrer\" }, \"Learn more\")))),\n        !disabled && (React.createElement(Tick, { \"$checked\": active, \"data-test-hook\": active ? 'Checkbox on' : 'Checkbox off' })),\n        busy && React.createElement(Spinner, { color: \"gray\" })));\n}\nconst StorageNodeItem = styled(UnstyledStorageNodeItem).withConfig({ displayName: \"StorageNodeItem\", componentId: \"sc-tig4mx\" }) `\n    align-items: center;\n    appearance: none;\n    background: #ffffff;\n    border: 1px solid #efefef;\n    border-radius: 4px;\n    box-sizing: border-box;\n    display: flex;\n    font-size: 16px;\n    height: 40px;\n    line-height: normal;\n    padding: 0 16px;\n    text-align: left;\n    transition: color 0.1s;\n    width: 100%;\n\n    :disabled,\n    &[disabled] {\n        background: #efefef;\n        border-color: #efefef;\n    }\n\n    :focus {\n        outline: 0;\n    }\n\n    & + & {\n        margin-top: 16px;\n    }\n\n    > div:first-child {\n        flex-grow: 1;\n        min-width: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n    }\n\n    ${Tick} {\n        flex-shrink: 0;\n        margin-left: 12px;\n    }\n`;\nconst Root = styled.button.withConfig({ displayName: \"Root\", componentId: \"sc-16yvi4m\" }) `\n    color: #cdcdcd;\n    cursor: pointer;\n\n    :disabled,\n    &[disabled] {\n        cursor: not-allowed;\n    }\n\n    ${({ $active }) => !!$active &&\n    css `\n            color: #323232;\n        `}\n\n    ${({ $active }) => typeof $active === 'undefined' &&\n    css `\n            cursor: default !important;\n        `}\n`;\nexport default StorageNodeItem;\n","import React from 'react';\nimport styled from 'styled-components';\nimport Label from '~/shared/components/Ui/Label';\nimport { getChainConfigExtension, useCurrentChainId } from '~/utils/chains';\nimport StorageNodeItem from './StorageNodeItem';\nfunction UnstyledStorageNodeList({ className, disabled = false }) {\n    const chainId = useCurrentChainId();\n    const storageNodes = getChainConfigExtension(chainId).storageNodes;\n    return (React.createElement(\"div\", { className: className },\n        React.createElement(Label, null, disabled ? 'Storage nodes' : 'Choose storage nodes (one or more)'),\n        React.createElement(\"ul\", { \"data-test-hook\": \"Storage nodes\" }, storageNodes.map(({ address, name, thirdPartyUrl }) => (React.createElement(\"li\", { key: address },\n            React.createElement(StorageNodeItem, { address: address.toLowerCase(), disabled: disabled, thirdPartyUrl: thirdPartyUrl }, name)))))));\n}\nconst StorageNodes = styled(UnstyledStorageNodeList).withConfig({ displayName: \"StorageNodes\", componentId: \"sc-1djyh7y\" }) `\n    margin-bottom: 40px;\n\n    ul {\n        list-style: none;\n        margin: 0;\n        padding: 0;\n    }\n\n    ul > li + li {\n        margin-top: 6px;\n    }\n`;\nexport default StorageNodes;\n","import { StreamPermission } from '@streamr/sdk';\nimport React from 'react';\nimport styled from 'styled-components';\nimport Label from '~/shared/components/Ui/Label';\nimport TextInput from '~/shared/components/Ui/Text/StyledInput';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft, getEmptyStreamEntity } from '~/stores/streamDraft';\nimport { Route as R } from '~/utils/routes';\nimport Section from '../Section';\nimport StorageNodeList from './StorageNodeList';\nconst Desc = styled.div.withConfig({ displayName: \"Desc\", componentId: \"sc-1bimo02\" }) `\n    margin-bottom: 3.125rem;\n\n    > p {\n        margin: 0;\n    }\n\n    > p + p {\n        margin-top: 0.5em;\n    }\n`;\nexport function HistorySection({ disabled: disabledProp = false }) {\n    const { id: streamId, storage, metadata, } = StreamDraft.useEntity({ hot: true }) || getEmptyStreamEntity();\n    const { storageDays } = metadata;\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const disabled = disabledProp || !canEdit;\n    const noStorageEnabled = !Object.values(storage).some(Boolean);\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Section, { title: \"Data storage\" },\n        React.createElement(Desc, null,\n            React.createElement(\"p\", null, \"Enable data storage on your streams to retain historical messages and access them later via a resend. Choose your storage provider and set the duration for storing data before it is marked for deletion.\"),\n            React.createElement(\"p\", null,\n                \"For more details, see the\",\n                ' ',\n                React.createElement(\"a\", { target: \"_blank\", rel: \"noopener noreferrer\", href: R.docs('/usage/streams/store-and-retrieve') }, \"docs\"),\n                \".\")),\n        React.createElement(StorageNodeList, { disabled: disabled }),\n        React.createElement(Label, { htmlFor: \"storageAmount\" }, \"Store historical data for (days)\"),\n        React.createElement(TextFieldWrap, null,\n            React.createElement(TextInput, { disabled: disabled || noStorageEnabled, type: \"number\", step: 1, min: 1, value: storageDays, onChange: (e) => {\n                    update((hot) => {\n                        hot.metadata.storageDays = e.target.value;\n                    });\n                } }))));\n}\nconst TextFieldWrap = styled.div.withConfig({ displayName: \"TextFieldWrap\", componentId: \"sc-nn7s2f\" }) `\n    width: 11rem;\n`;\n","import React from 'react';\nexport default function Surround({ head, children, tail }) {\n    return (React.createElement(React.Fragment, null,\n        head,\n        children,\n        tail));\n}\n","import React from 'react';\nimport ReactSelect, { components } from 'react-select';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\n// TODO add typing\nconst customStyles = {\n    control: (provided, state) => ({\n        ...provided,\n        padding: '0',\n        '&:hover': {\n            path: {\n                stroke: '#A3A3A3',\n            },\n        },\n        backgroundColor: state.isDisabled ? '#EFEFEF' : provided.backgroundColor,\n        opacity: state.isDisabled ? 0.5 : 1,\n        backfaceVisibility: 'hidden',\n        color: state.isDisabled ? '#32323280' : '#323232',\n        border: state.isFocused ? '1px solid #0324FF' : '1px solid #EFEFEF',\n        borderRadius: '4px',\n        height: '40px',\n        boxShadow: 'none',\n        cursor: state.isDisabled ? 'not-allowed' : 'pointer',\n        pointerEvents: 'auto',\n        fontSize: '1rem',\n        letterSpacing: '0',\n        lineHeight: '2rem',\n        width: '100%',\n    }),\n    dropdownIndicator: (provided, state) => ({\n        ...provided,\n        color: state.isDisabled ? '#32323280' : '#323232',\n        marginRight: '8px',\n    }),\n    indicatorSeparator: () => ({}),\n    menu: (provided) => ({\n        ...provided,\n        marginTop: '0.5rem',\n        padding: '0',\n        zIndex: '10',\n    }),\n    menuList: (provided) => ({ ...provided, margin: '0.2rem 0', padding: '0' }),\n    option: (provided, state) => ({\n        ...provided,\n        display: 'flex',\n        textAlign: 'left',\n        padding: '0 1rem',\n        paddingLeft: '1rem',\n        color: '#323232',\n        position: 'relative',\n        backgroundColor: state.isSelected || state.isFocused ? '#f8f8f8' : null,\n        '&:active': {\n            backgroundColor: '#f8f8f8',\n        },\n        lineHeight: '2rem',\n        alignItems: 'center',\n    }),\n    placeholder: () => ({\n        color: '#CDCDCD',\n        lineHeight: '1rem',\n        position: 'absolute',\n        left: '16px',\n    }),\n    valueContainer: (provided) => ({\n        ...provided,\n        padding: '0 1rem',\n        color: '#323232',\n        lineHeight: '1rem',\n        overflow: 'visible',\n    }),\n    singleValue: (provided) => ({\n        ...provided,\n        margin: 0,\n        overflow: 'hidden',\n        display: 'flex',\n        alignItems: 'center',\n    }),\n};\nconst Control = ({ className, children, ...props }) => {\n    const { controlClassName } = props.selectProps;\n    return (React.createElement(components.Control, { ...props, className: `${className || ''} ${controlClassName || ''}`.trim() }, children));\n};\nconst EllipsisSpan = styled.span.withConfig({ displayName: \"EllipsisSpan\", componentId: \"sc-t47p98\" }) `\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n`;\nconst EllipsisSpanWithTickMargin = styled(EllipsisSpan).withConfig({ displayName: \"EllipsisSpanWithTickMargin\", componentId: \"sc-ff60bv\" }) `\n    margin-right: 18px;\n`;\nconst UnstyledTick = (props) => React.createElement(SvgIcon, { ...props, name: \"tick\" });\nconst Tick = styled(UnstyledTick).withConfig({ displayName: \"Tick\", componentId: \"sc-a51f0c\" }) `\n    height: 8px;\n    right: 12px;\n    position: absolute;\n    top: 50%;\n    transform: translate(-50%, -50%);\n    width: 10px;\n`;\nconst OptionIconWrapper = styled.div.withConfig({ displayName: \"OptionIconWrapper\", componentId: \"sc-1xxj5za\" }) `\n    width: 20px;\n    margin-right: 0.5rem;\n`;\nconst IconOption = (props) => (React.createElement(components.Option, { ...props },\n    props.isSelected && React.createElement(Tick, null),\n    props.data.icon != null && (React.createElement(OptionIconWrapper, null, props.data.icon)),\n    React.createElement(EllipsisSpanWithTickMargin, null, props.data.label)));\nconst Caret = styled(SvgIcon).withConfig({ displayName: \"Caret\", componentId: \"sc-1250yop\" }) `\n    height: 8px;\n    width: 10px;\n    transition: transform 180ms ease-in-out;\n    transform: ${({ $isOpen }) => ($isOpen ? 'rotate(180deg)' : '')};\n`;\nconst DropdownIndicator = (props) => components.DropdownIndicator && (React.createElement(components.DropdownIndicator, { ...props },\n    React.createElement(Caret, { name: \"caretDown\", \"$isOpen\": props.selectProps.menuIsOpen })));\nconst IconWrapper = styled.div.withConfig({ displayName: \"IconWrapper\", componentId: \"sc-1xs89r\" }) `\n    width: 24px;\n    margin-right: 0.5rem;\n`;\nconst SingleValue = ({ children, ...props }) => {\n    const { icon } = props.getValue()[0] || {};\n    return (React.createElement(components.SingleValue, { ...props },\n        icon != null && React.createElement(IconWrapper, null, icon),\n        React.createElement(EllipsisSpan, null, children)));\n};\nconst ClearIndicator = () => React.createElement(React.Fragment, null);\nconst UnstyledSelect = ({ controlClassName, required = false, clearable = true, disabled, ...props }) => (React.createElement(ReactSelect, { styles: customStyles, components: {\n        Control,\n        IndicatorSeparator: null,\n        Option: IconOption,\n        DropdownIndicator,\n        SingleValue,\n        ClearIndicator,\n    }, isMulti: false, className: controlClassName, required: required, isClearable: clearable, isDisabled: disabled, isSearchable: false, ...props }));\nconst Select = styled(UnstyledSelect).withConfig({ displayName: \"Select\", componentId: \"sc-r7dwwj\" }) `\n    font-size: 0.875rem;\n`;\n/**\n * @deprecated\n * Replaced by SelectField2 due to redesign of the Hub\n */\nexport default Select;\n","import { useEffect, useState } from 'react';\nimport { isAddress } from 'web3-validator';\nimport { getENSDomainsForWallet } from '~/getters';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { truncate } from '~/shared/utils/text';\nexport const ADD_ENS_DOMAIN_VALUE = '::ens/add_domain';\n/**\n * @todo Refactor using `useQuery` and bake `fetchDomains` into it (it hasn't been used anywhere else).\n * @returns an array of `OptionGroup` items, or `undefined` if entries are being loaded.\n */\nexport default function useStreamOwnerOptionGroups(domain) {\n    const [groups, setGroups] = useState();\n    const account = useWalletAccount();\n    useEffect(() => {\n        let mounted = true;\n        setGroups(undefined);\n        async function fn() {\n            if (!account) {\n                return void setGroups([]);\n            }\n            const domains = await (async () => {\n                try {\n                    return await getENSDomainsForWallet(account);\n                }\n                catch (_) {\n                    return [];\n                }\n            })();\n            if (!mounted) {\n                return;\n            }\n            const ensDomainGiven = /\\.eth$/.test(domain);\n            const ensOptions = [];\n            if (ensDomainGiven && domains.indexOf(domain) === -1) {\n                domains.push(domain);\n            }\n            domains.forEach((value) => {\n                ensOptions.push({\n                    value,\n                    label: value,\n                });\n            });\n            ensOptions.push({\n                value: ADD_ENS_DOMAIN_VALUE,\n                label: 'Add new domain',\n            });\n            const addrOptions = [\n                {\n                    value: account,\n                    label: truncate(account),\n                },\n            ];\n            if (isAddress(domain) && domain.toLowerCase() !== account.toLowerCase()) {\n                addrOptions.push({\n                    value: domain,\n                    label: truncate(domain),\n                });\n            }\n            setGroups([\n                {\n                    label: 'ENS domains',\n                    options: ensOptions,\n                },\n                {\n                    label: 'Eth Account',\n                    options: addrOptions,\n                },\n            ]);\n        }\n        fn();\n        return () => {\n            mounted = false;\n        };\n    }, [account, domain]);\n    return groups;\n}\n","import React, { useEffect, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { z } from 'zod';\nimport { Button } from '~/components/Button';\nimport { Hint } from '~/components/Hint';\nimport Spinner from '~/components/Spinner';\nimport { PathnameSchema } from '~/parsers/StreamParser';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Errors, { MarketplaceTheme } from '~/shared/components/Ui/Errors';\nimport Label from '~/shared/components/Ui/Label';\nimport Select from '~/shared/components/Ui/Select';\nimport Text from '~/shared/components/Ui/Text';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { PHONE } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Route as R } from '~/utils/routes';\nimport useStreamOwnerOptionGroups, { ADD_ENS_DOMAIN_VALUE, } from './useStreamOwnerOptionGroups';\nexport const ENS_DOMAINS_URL = 'https://ens.domains';\nexport function ReadonlyStreamId({ streamId }) {\n    const { copy, isCopied } = useCopy();\n    return (React.createElement(StreamId, null,\n        React.createElement(Pathname, null,\n            React.createElement(Label, null, \"Stream ID\"),\n            React.createElement(PathnameField, null,\n                React.createElement(Text, { readOnly: true, value: streamId, disabled: true }))),\n        React.createElement(\"div\", null,\n            React.createElement(Label, null, \"\\u200C\"),\n            React.createElement(Button, { kind: \"secondary\", onClick: () => void copy(streamId || '', {\n                    toastMessage: 'Stream ID copied',\n                }), type: \"button\" }, isCopied ? 'Copied!' : 'Copy'))));\n}\nexport function EditableStreamId({ disabled = false }) {\n    const { domain = '', pathname = '' } = StreamDraft.useEntity({ hot: true }) || {};\n    const ownerGroups = useStreamOwnerOptionGroups(domain);\n    const update = StreamDraft.useUpdateEntity();\n    const [{ pathname: validationError }, setErrors] = useState({});\n    const validate = StreamDraft.useValidateEntity((entity) => {\n        z.object({\n            pathname: PathnameSchema,\n        }).parse(entity);\n    });\n    const owners = useMemo(() => {\n        const result = [];\n        if (ownerGroups) {\n            ownerGroups.forEach(({ options }) => {\n                result.push(...options);\n            });\n        }\n        return result;\n    }, [ownerGroups]);\n    const isOwnersLoading = typeof ownerGroups === 'undefined';\n    const account = useWalletAccount();\n    useEffect(function setCurrentAccountAsDomain() {\n        /**\n         * We may wanna skip this step of delay it while we're doing\n         * something to the stream, e.g. transacting or block-awaiting.\n         */\n        /**\n         * We set the domain for both hot and cold copies of the entity\n         * here so that *just* changing the account does not cause the state\n         * to be dirty. All we care about is, after all, the pathname.\n         */\n        update((hot, cold) => {\n            if (!hot.domain) {\n                hot.domain = account || '';\n            }\n            cold.domain = hot.domain;\n        });\n    }, [update, account]);\n    return (React.createElement(StreamId, null,\n        React.createElement(Domain, null,\n            React.createElement(Label, null,\n                React.createElement(LabelInner, null, \"Domain\")),\n            disabled || isOwnersLoading || !account ? (React.createElement(DisabledDomain, null, isOwnersLoading ? (React.createElement(React.Fragment, null,\n                React.createElement(\"span\", null, \"Loading domains\\u2026\"),\n                !disabled && React.createElement(Spinner, { color: \"blue\" }))) : (React.createElement(\"span\", null, truncate(domain || account || 'No account'))))) : (React.createElement(Select, { options: ownerGroups, value: owners.find(({ value }) => value.toLowerCase() === (domain || account)), onChange: (option) => {\n                    const { value = '' } = option || {};\n                    if (value === ADD_ENS_DOMAIN_VALUE) {\n                        window.open(ENS_DOMAINS_URL, '_blank', 'noopener noreferrer');\n                        return;\n                    }\n                    /**\n                     * We set the domain for both hot and cold copies of the entity\n                     * here so that *just* changing the account does not cause the state\n                     * to be dirty. All we care about is, after all, the pathname.\n                     */\n                    update((hot, cold) => {\n                        hot.domain = value;\n                        cold.domain = value;\n                    });\n                }, disabled: disabled, name: \"domain\" }))),\n        React.createElement(\"div\", null,\n            React.createElement(Label, null,\n                React.createElement(LabelInner, null)),\n            React.createElement(Separator, null)),\n        React.createElement(Pathname, null,\n            React.createElement(Label, null,\n                React.createElement(LabelInner, null,\n                    React.createElement(\"span\", null, \"Path name\"),\n                    React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"Stream paths can be single or multi-level.\"),\n                        React.createElement(\"p\", null, \"Single\"),\n                        React.createElement(\"pre\", null, \"streamr.eth/coffeemachine\"),\n                        React.createElement(\"p\", null, \"Multi\"),\n                        React.createElement(\"pre\", null, \"streamr.eth/oracles/price\"),\n                        React.createElement(\"p\", null,\n                            \"For more information, see the \",\n                            React.createElement(\"a\", { href: R.docs() }, \"docs\"),\n                            \".\")))),\n            React.createElement(PathnameField, null,\n                React.createElement(Text, { disabled: disabled, invalid: !!validationError, onChange: ({ target }) => {\n                        update((draft) => {\n                            draft.pathname = target.value;\n                        });\n                        setErrors(validate());\n                    }, placeholder: \"Enter a unique stream path name\", value: pathname }),\n                pathname && !disabled && (React.createElement(ClearButton, { type: \"button\", onClick: () => {\n                        update((draft) => {\n                            draft.pathname = '';\n                        });\n                        setErrors(validate());\n                    } },\n                    React.createElement(SvgIcon, { name: \"clear\" })))),\n            !!validationError && (React.createElement(Errors, { overlap: true, theme: MarketplaceTheme }, validationError)))));\n}\nconst Domain = styled.div.withConfig({ displayName: \"Domain\", componentId: \"sc-j0ydgn\" }) `\n    flex-grow: 1;\n\n    @media ${PHONE} {\n        max-width: 222px;\n    }\n`;\nconst SeparatorAttrs = {\n    children: '/',\n};\nconst Separator = styled.div.attrs(SeparatorAttrs).withConfig({ displayName: \"Separator\", componentId: \"sc-1gstqu9\" }) `\n    line-height: 40px;\n`;\nconst Pathname = styled.div.withConfig({ displayName: \"Pathname\", componentId: \"sc-m9p0ie\" }) `\n    flex-grow: 1;\n\n    ${Label} {\n        flex-grow: 1;\n    }\n`;\nconst PathnameField = styled.div.withConfig({ displayName: \"PathnameField\", componentId: \"sc-zbkf0q\" }) `\n    position: relative;\n`;\nconst DisabledDomain = styled.div.withConfig({ displayName: \"DisabledDomain\", componentId: \"sc-3a5w4s\" }) `\n    align-items: center;\n    background-color: #efefef;\n    border-radius: 4px;\n    border: 1px solid #efefef;\n    color: #525252;\n    display: flex;\n    font-size: 0.875rem;\n    height: 40px;\n    padding: 0 1rem;\n    width: 100%;\n\n    > span {\n        flex: 1;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n    }\n`;\nconst ClearButton = styled.button.withConfig({ displayName: \"ClearButton\", componentId: \"sc-1jyptkc\" }) `\n    width: 40px;\n    height: 40px;\n    color: #989898;\n    position: absolute;\n    top: 0;\n    line-height: 16px;\n    right: 0;\n    border: 0;\n    background: none;\n    outline: none;\n    appearance: none;\n\n    :focus {\n        outline: none;\n    }\n\n    svg {\n        width: 16px;\n        height: 16px;\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n    }\n\n    :hover circle {\n        fill: #525252;\n        stroke: #525252;\n    }\n`;\nconst StreamId = styled.div.withConfig({ displayName: \"StreamId\", componentId: \"sc-13t8y8p\" }) `\n    display: flex;\n\n    > * + * {\n        margin-left: 16px;\n    }\n`;\nconst LabelInner = styled.div.withConfig({ displayName: \"LabelInner\", componentId: \"sc-zbslrf\" }) `\n    align-items: center;\n    display: flex;\n    min-height: 24px;\n\n    span {\n        flex-grow: 1;\n    }\n`;\n","import { StreamPermission } from '@streamr/sdk';\nimport React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport Surround from '~/shared/components/Surround';\nimport Label from '~/shared/components/Ui/Label';\nimport Text from '~/shared/components/Ui/Text';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft, getEmptyStreamEntity } from '~/stores/streamDraft';\nimport Section from '../Section';\nimport { ENS_DOMAINS_URL, EditableStreamId, ReadonlyStreamId } from './StreamId';\nexport function InfoSection({ disabled: disabledProp = false }) {\n    const { id: streamId, metadata } = StreamDraft.useEntity({ hot: true }) || getEmptyStreamEntity();\n    const { description } = metadata;\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const disabled = disabledProp || !canEdit;\n    const update = StreamDraft.useUpdateEntity();\n    const selectedChainId = useCurrentChainId();\n    useEffect(function applySelectedChainIdToNewStream() {\n        if (!streamId) {\n            /**\n             * Only allow the global chain selector changes to update\n             * chain id of *new* streams.\n             */\n            update((hot, cold) => {\n                hot.chainId = selectedChainId;\n                cold.chainId = selectedChainId;\n            });\n        }\n    }, [update, streamId, selectedChainId]);\n    return (React.createElement(Section, { title: \"Details\" },\n        React.createElement(Description, null,\n            \"All streams have a unique id in the format\",\n            ' ',\n            React.createElement(\"strong\", null, \"domain/pathname\"),\n            \".\",\n            React.createElement(Surround, { head: \" \", tail: \" \" }, \"The domain part can be your Ethereum address or an ENS name you own.\"),\n            React.createElement(Surround, null,\n                React.createElement(\"a\", { href: ENS_DOMAINS_URL, target: \"_blank\", rel: \"nofollow noopener noreferrer\" }, \"Need an ENS name?\"))),\n        React.createElement(Row, null, streamId ? (React.createElement(ReadonlyStreamId, { streamId: streamId })) : (React.createElement(EditableStreamId, { disabled: disabled }))),\n        React.createElement(Row, null,\n            React.createElement(Label, { htmlFor: \"streamDescription\" }, \"Description\"),\n            React.createElement(Text, { type: \"text\", id: \"streamDescription\", name: \"description\", placeholder: \"Add a brief description\", value: description, onChange: ({ target }) => {\n                    update((draft) => {\n                        draft.metadata.description = target.value;\n                    });\n                }, disabled: disabled, autoComplete: \"off\" }))));\n}\nconst Row = styled.div.withConfig({ displayName: \"Row\", componentId: \"sc-zfw7en\" }) `\n    & + & {\n        margin-top: 2rem;\n    }\n\n    input[disabled] {\n        background-color: #efefef;\n        color: #525252;\n        opacity: 1;\n    }\n`;\nconst Description = styled.p.withConfig({ displayName: \"Description\", componentId: \"sc-zl4txk\" }) `\n    margin-bottom: 3rem;\n`;\n","import styled from 'styled-components';\nfunction getAdvancedLabelProps() {\n    return { children: 'Advanced' };\n}\nexport const Advanced = styled.div.attrs(getAdvancedLabelProps).withConfig({ displayName: \"Advanced\", componentId: \"sc-65gz6g\" }) `\n    background-color: #a3a3a3;\n    color: #fff;\n    font-size: 0.75rem;\n    line-height: 0.75rem;\n    font-weight: var(--medium);\n    letter-spacing: 0;\n    border-radius: 2px;\n    padding: 0.375rem 0.5rem;\n    text-align: center;\n`;\n","import { StreamPermission } from '@streamr/sdk';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { z } from 'zod';\nimport { Advanced } from '~/shared/components/StatusLabel';\nimport Label from '~/shared/components/Ui/Label';\nimport TextInput from '~/shared/components/Ui/Text/StyledInput';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft, getEmptyStreamEntity } from '~/stores/streamDraft';\nimport Section from './Section';\nexport function PartitionsSection({ disabled: disabledProp = false }) {\n    const { id: streamId, metadata } = StreamDraft.useEntity({ hot: true }) || getEmptyStreamEntity();\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const disabled = disabledProp || !canEdit;\n    const { partitions } = metadata;\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Section, { title: \"Stream partitions\", status: React.createElement(Advanced, null) },\n        React.createElement(Desc, null, \"Partitioning enables high-volume streams to scale beyond what a typical node can handle. If you're not sure if your stream needs partitions, leave it set to 1.\"),\n        React.createElement(Partitions, null,\n            React.createElement(Label, null, \"Partitions\"),\n            React.createElement(TextInput, { type: \"number\", min: PartitionRange.Min, max: PartitionRange.Max, step: 1, value: partitions, onChange: (e) => {\n                    update((hot) => {\n                        hot.metadata.partitions = e.target.value;\n                    });\n                }, onBlur: () => {\n                    update((hot, cold) => {\n                        const valid = z.coerce\n                            .number()\n                            .min(PartitionRange.Min)\n                            .max(PartitionRange.Max)\n                            .safeParse(partitions).success;\n                        if (valid) {\n                            return;\n                        }\n                        hot.metadata.partitions = cold.metadata.partitions;\n                    });\n                }, disabled: disabled }))));\n}\nconst PartitionRange = {\n    Min: 1,\n    Max: 100,\n};\nconst Partitions = styled.div.withConfig({ displayName: \"Partitions\", componentId: \"sc-19bwcq\" }) `\n    max-width: 136px;\n`;\nconst Desc = styled.p.withConfig({ displayName: \"Desc\", componentId: \"sc-fy4k9b\" }) `\n    margin-bottom: 3.125rem;\n    max-width: 660px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { MarketplaceProductTile } from '~/shared/components/Tile';\nimport { TABLET, PHONE } from '~/shared/utils/styled';\nimport { getProjects } from '~/services/projects';\nimport { useCurrentChainId } from '~/utils/chains';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1k2csbv\" }) `\n    margin-top: 80px;\n    margin-bottom: 120px;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-1bb2vzg\" }) `\n    font-size: 34px;\n    line-height: 34px;\n    color: #000000;\n    padding-bottom: 40px;\n`;\nconst ProjectGrid = styled.div.withConfig({ displayName: \"ProjectGrid\", componentId: \"sc-1349zu6\" }) `\n    display: grid;\n    grid-template-columns: 1fr;\n    gap: 36px;\n\n    @media (${PHONE}) {\n        grid-template-columns: 1fr 1fr;\n    }\n\n    @media (${TABLET}) {\n        grid-template-columns: 1fr 1fr 1fr 1fr;\n    }\n`;\nexport default function RelatedProjects({ streamId }) {\n    const [projects, setProjects] = useState([]);\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Refactor using useQuery. #refactor\n         */\n        let mounted = true;\n        const loadProjects = async () => {\n            const result = await getProjects({\n                chainId,\n                first: 4,\n                streamId,\n            });\n            if (mounted) {\n                setProjects(result.projects);\n            }\n        };\n        loadProjects();\n        return () => {\n            mounted = false;\n        };\n    }, [streamId, chainId]);\n    if (projects.length === 0) {\n        return null;\n    }\n    return (React.createElement(Container, null,\n        React.createElement(Header, null, \"This stream belongs to following projects\"),\n        React.createElement(ProjectGrid, null, projects.map((project) => (React.createElement(MarketplaceProductTile, { key: project.id, product: project, showDataUnionBadge: false, showEditButton: false }))))));\n}\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport NetworkPageSegment, { TitleBar } from '~/components/NetworkPageSegment';\nimport { QueriedSponsorshipsTable } from '~/components/QueriedSponsorshipsTable';\nimport { SponsorshipFilterButton, } from '~/components/SponsorshipFilterButton';\nimport { useCreateSponsorship, useSponsorshipsByStreamIdQuery, } from '~/hooks/sponsorships';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { NoData } from '~/shared/components/NoData';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { Route as R } from '~/utils/routes';\nconst PAGE_SIZE = 5;\nexport default function SponsorshipsTable({ streamId }) {\n    const [filters, setFilters] = useState({\n        expired: false,\n        inactive: false,\n        my: false,\n        noFunding: false,\n    });\n    const { orderBy = 'remainingWei', orderDirection = 'desc', setOrder, } = useTableOrder();\n    const wallet = useWalletAccount();\n    const createSponsorship = useCreateSponsorship();\n    const chainId = useCurrentChainId();\n    const query = useSponsorshipsByStreamIdQuery({\n        pageSize: PAGE_SIZE,\n        streamId,\n        orderBy,\n        orderDirection,\n        filters,\n    });\n    const sponsorships = query.data?.pages.map((page) => page.sponsorships).flat() || [];\n    return (React.createElement(NetworkPageSegment, { foot: sponsorships.length > 0, title: React.createElement(TitleBar, { aux: React.createElement(React.Fragment, null,\n                sponsorships.length > 0 && (React.createElement(React.Fragment, null,\n                    React.createElement(CreateButton, { type: \"button\", onClick: () => createSponsorship(chainId, wallet, {\n                            streamId,\n                        }), disabled: streamId == null || wallet == null }, \"Sponsor stream\"),\n                    React.createElement(Separator, null))),\n                React.createElement(SponsorshipFilterButton, { filter: filters, onFilterChange: setFilters })) }, \"Active Stream Sponsorships\") }, sponsorships.length > 0 ? (React.createElement(QueriedSponsorshipsTable, { query: query, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: setOrder, hideStreamId: true })) : (React.createElement(NoDataContainer, null,\n        React.createElement(NoData, { firstLine: \"This stream does not have any Sponsorships matching your criteria yet.\", secondLine: React.createElement(\"span\", null,\n                React.createElement(\"a\", { href: R.docs('/streamr-network/incentives/stream-sponsorships'), rel: \"noopener noreferrer\", target: \"_blank\" }, \"Stream Sponsorships\"),\n                ' ',\n                \"incentivize node operators to relay the\",\n                React.createElement(\"br\", null),\n                \" stream's data, which enhances its connectability and robustness.\"), compact: true }),\n        React.createElement(CreateButton, { type: \"button\", onClick: () => {\n                createSponsorship(chainId, wallet, { streamId });\n            }, disabled: streamId == null || wallet == null }, \"Sponsor stream\")))));\n}\nconst NoDataContainer = styled.div.withConfig({ displayName: \"NoDataContainer\", componentId: \"sc-1qjm9p4\" }) `\n    display: grid;\n    padding: 80px;\n`;\nconst CreateButton = styled(Button).withConfig({ displayName: \"CreateButton\", componentId: \"sc-8kdyl5\" }) `\n    width: fit-content;\n    justify-self: center;\n`;\nconst Separator = styled.div.withConfig({ displayName: \"Separator\", componentId: \"sc-hiahbb\" }) `\n    width: 1px;\n    height: 1rem;\n    background: #f0f0f0;\n    margin: 0 8px;\n`;\n","import { StreamPermission } from '@streamr/sdk';\nimport React, { useEffect } from 'react';\nimport { Link, Navigate, Outlet, useLocation, useNavigate, useParams, } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport { CopyButton } from '~/components/CopyButton';\nimport { FloatingToolbar } from '~/components/FloatingToolbar';\nimport Helmet from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport { Pad, SegmentGrid } from '~/components/NetworkPageSegment';\nimport { StreamSummary } from '~/components/StreamSummary';\nimport { useInViewport } from '~/hooks/useInViewport';\nimport { GenericErrorPageContent } from '~/pages/GenericErrorPage';\nimport { NotFoundPageContent } from '~/pages/NotFoundPage';\nimport { DetailsPageHeader } from '~/shared/components/DetailsPageHeader';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { StreamConnect } from '~/shared/components/StreamConnect';\nimport { StreamPreview } from '~/shared/components/StreamPreview';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport StreamNotFoundError from '~/shared/errors/StreamNotFoundError';\nimport { useCurrentStreamAbility, useInvalidateStreamAbilities, } from '~/shared/stores/streamAbilities';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { StreamDraft, usePersistStreamDraft, useStreamEntityQuery, } from '~/stores/streamDraft';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { AccessControlSection } from '../AbstractStreamEditPage/AccessControlSection';\nimport CreateProjectHint from '../AbstractStreamEditPage/CreateProjectHint';\nimport DeleteSection from '../AbstractStreamEditPage/DeleteSection';\nimport { HistorySection } from '../AbstractStreamEditPage/HistorySection';\nimport { InfoSection } from '../AbstractStreamEditPage/InfoSection';\nimport { PartitionsSection } from '../AbstractStreamEditPage/PartitionsSection';\nimport RelatedProjects from '../AbstractStreamEditPage/RelatedProjects';\nimport SponsorshipsTable from '../AbstractStreamEditPage/SponsorshipsTable';\nexport function StreamEditPage({ saveButtonRef, }) {\n    const { fetching = false } = StreamDraft.useDraft() || {};\n    const { id: streamId } = StreamDraft.useEntity() || {};\n    const isNew = !streamId;\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const canDelete = useCurrentStreamAbility(streamId, StreamPermission.DELETE);\n    const canGrant = useCurrentStreamAbility(streamId, StreamPermission.GRANT);\n    const busy = StreamDraft.useIsDraftBusy();\n    const canSubmit = useCanSubmit();\n    const disabled = typeof canEdit === 'undefined' || busy;\n    const isLoading = typeof canEdit === 'undefined' || busy || fetching;\n    return (React.createElement(React.Fragment, null,\n        streamId ? React.createElement(StreamSummary, { streamId: streamId }) : React.createElement(React.Fragment, null),\n        React.createElement(LoadingIndicator, { loading: isLoading }),\n        React.createElement(LayoutColumn, null,\n            React.createElement(React.Fragment, null,\n                React.createElement(SegmentGrid, null,\n                    React.createElement(ColoredBox, null,\n                        React.createElement(Pad, null,\n                            React.createElement(Wings, null,\n                                React.createElement(\"div\", null,\n                                    React.createElement(InfoSection, { disabled: disabled }),\n                                    React.createElement(AccessControlSection, { disabled: disabled }),\n                                    React.createElement(HistorySection, { disabled: disabled }),\n                                    React.createElement(PartitionsSection, { disabled: disabled }),\n                                    canDelete && React.createElement(DeleteSection, null)),\n                                !isNew && (React.createElement(SaveButton, { kind: \"primary\", type: \"submit\", disabled: disabled || !canSubmit, ref: saveButtonRef }, \"Save\"))))),\n                    streamId != null && React.createElement(SponsorshipsTable, { streamId: streamId })),\n                streamId != null && (React.createElement(React.Fragment, null,\n                    React.createElement(RelatedProjects, { streamId: streamId }),\n                    canGrant && React.createElement(CreateProjectHint, { streamId: streamId })))))));\n}\nexport function StreamLiveDataPage() {\n    const { fetching = false } = StreamDraft.useDraft() || {};\n    const { id: streamId = undefined } = StreamDraft.useEntity() || {};\n    const canSubscribe = useCurrentStreamAbility(streamId, StreamPermission.SUBSCRIBE);\n    const isLoading = fetching || canSubscribe == null;\n    return (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, { loading: isLoading }),\n        streamId != null && (React.createElement(StreamPreview, { streamsList: [streamId], previewDisabled: canSubscribe === false }))));\n}\nexport function StreamConnectPage() {\n    const { fetching = false } = StreamDraft.useDraft() || {};\n    const { id: streamId = undefined } = StreamDraft.useEntity() || {};\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const isLoading = fetching || canEdit == null;\n    return (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, { loading: isLoading }),\n        React.createElement(LayoutColumn, null, streamId != null && (React.createElement(React.Fragment, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(ColoredBox, null,\n                    React.createElement(Pad, null,\n                        React.createElement(StreamConnect, { streams: [streamId] })))),\n            React.createElement(RelatedProjects, { streamId: streamId }))))));\n}\n/**\n * @todo Taken care of in `app`, no? Double-check & remove.\n */\nexport function StreamIndexRedirect() {\n    const { id } = useParams();\n    if (!id) {\n        throw new Error('Invalid context (missing stream id)');\n    }\n    return (React.createElement(Navigate, { to: {\n            pathname: R.streamOverview(id),\n            search: window.location.search,\n        }, replace: true }));\n}\nexport function StreamDraftPage() {\n    const { id: streamId } = useParams();\n    const draftId = StreamDraft.useInitDraft(streamId);\n    return (React.createElement(StreamDraft.DraftContext.Provider, { value: draftId },\n        React.createElement(Outlet, null)));\n}\nexport function StreamTabbedPage(props) {\n    const { stickySubmit = false, children = React.createElement(Outlet, null) } = props;\n    const query = useStreamEntityQuery();\n    const { data: stream = null } = query;\n    const isLoading = !stream && (query.isLoading || query.isFetching);\n    const { assign } = StreamDraft.useDraftStore();\n    const draftId = StreamDraft.useDraftId();\n    const initialized = StreamDraft.useDraft()?.initialized || false;\n    useEffect(function assignEntity() {\n        if (initialized) {\n            assign(draftId, stream);\n        }\n    }, [assign, draftId, initialized, stream]);\n    return (React.createElement(StreamEntityForm, { stickySubmit: stickySubmit }, isLoading ? (React.createElement(LoadingIndicator, { loading: true })) : query.error instanceof StreamNotFoundError ? (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, null),\n        React.createElement(NotFoundPageContent, null))) : query.error ? (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, null),\n        React.createElement(GenericErrorPageContent, null))) : (children)));\n}\nfunction StreamEntityForm(props) {\n    const { children, stickySubmit = false } = props;\n    const [attach, isSaveButtonVisible] = useInViewport();\n    const canSubmit = useCanSubmit();\n    const navigate = useNavigate();\n    const account = useWalletAccount()?.toLowerCase();\n    const invalidateAbilities = useInvalidateStreamAbilities();\n    const persist = usePersistStreamDraft({\n        onCreate(chainId, streamId, { abortSignal }) {\n            if (abortSignal?.aborted) {\n                /**\n                 * Avoid redirecting to the new stream's edit page after the stream\n                 * page has been unmounted.\n                 */\n                return;\n            }\n            navigate(R.streamOverview(streamId, routeOptions(chainId)));\n        },\n        onPermissionsChange(streamId, assignments) {\n            if (!account) {\n                return;\n            }\n            for (const assignment of assignments) {\n                /**\n                 * Detect if the new set of assignments affect the current user\n                 * and, if so, invalidate associated stream abilities.\n                 */\n                if ('userId' in assignment &&\n                    assignment.userId.toLowerCase() === account) {\n                    invalidateAbilities(streamId, account);\n                    break;\n                }\n            }\n        },\n    });\n    const ready = !!StreamDraft.useEntity({ hot: true });\n    return (React.createElement(\"form\", { onSubmit: (e) => {\n            e.preventDefault();\n            if (stickySubmit) {\n                persist();\n            }\n        } },\n        React.createElement(Layout, null,\n            React.createElement(Header, { saveButtonRef: attach }),\n            typeof children === 'function' ? children(attach, ready) : children),\n        React.createElement(FloatingToolbar, { \"$active\": !isSaveButtonVisible && stickySubmit && ready },\n            React.createElement(Button, { type: \"submit\", disabled: !canSubmit || isSaveButtonVisible }, \"Save\"))));\n}\nfunction useCanSubmit() {\n    const busy = StreamDraft.useIsDraftBusy();\n    const clean = StreamDraft.useIsDraftClean();\n    return !busy && !clean;\n}\nfunction Header({ saveButtonRef, }) {\n    const entity = StreamDraft.useEntity({ hot: true });\n    const { id: streamId, domain = '', pathname = '' } = entity || {};\n    const isNew = !streamId;\n    const transientStreamId = domain && pathname ? `${domain}/${pathname}` : undefined;\n    const location = useLocation();\n    const canSubmit = useCanSubmit();\n    const clean = StreamDraft.useIsDraftClean();\n    const ready = !!entity;\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(React.Fragment, null,\n        React.createElement(Helmet, { title: ready ? (streamId ? `Stream ${streamId}` : 'New stream') : undefined }),\n        React.createElement(DetailsPageHeader, { backButtonLink: R.streams(routeOptions(chainKey)), pageTitle: React.createElement(TitleContainer, null,\n                React.createElement(\"span\", { title: streamId }, ready ? (streamId ? (truncateStreamName(streamId, 50)) : (transientStreamId || 'New stream')) : (React.createElement(React.Fragment, null, \"\\u200C\"))),\n                streamId ? React.createElement(CopyButton, { value: streamId }) : ''), rightComponent: streamId ? (React.createElement(Tabs, null,\n                React.createElement(Tab, { id: \"overview\", tag: Link, to: R.streamOverview(streamId, routeOptions(chainKey)), selected: location.pathname.startsWith(R.streamOverview(streamId)) },\n                    \"Stream overview\",\n                    !clean && React.createElement(Asterisk, null)),\n                React.createElement(Tab, { id: \"connect\", tag: Link, to: R.streamConnect(streamId, routeOptions(chainKey)), selected: location.pathname.startsWith(R.streamConnect(streamId)) }, \"Connect\"),\n                React.createElement(Tab, { id: \"liveData\", tag: Link, to: R.streamLiveData(streamId, routeOptions(chainKey)), selected: location.pathname.startsWith(R.streamLiveData(streamId)) }, \"Live data\"))) : isNew && ready ? (React.createElement(\"div\", null,\n                React.createElement(Button, { disabled: !canSubmit, kind: \"primary\", type: \"submit\", ref: saveButtonRef }, \"Save\"))) : null })));\n}\nconst TitleContainer = styled.div.withConfig({ displayName: \"TitleContainer\", componentId: \"sc-1vf2qaf\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n`;\nconst Asterisk = styled.span.withConfig({ displayName: \"Asterisk\", componentId: \"sc-1ogoqoh\" }) `\n    :after {\n        content: '*';\n        position: absolute;\n    }\n`;\nconst SaveButton = styled(Button).withConfig({ displayName: \"SaveButton\", componentId: \"sc-12qosyl\" }) `\n    width: fit-content;\n    justify-self: right;\n`;\nconst Wings = styled.div.withConfig({ displayName: \"Wings\", componentId: \"sc-1tcavlf\" }) `\n    display: grid;\n    grid-template-columns: fit-content(680px) auto;\n\n    div:first-child {\n        min-width: 0;\n    }\n`;\n","import React, { useEffect, useState } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { ActionBarContainer, FiltersBar, FiltersWrap, } from '~/components/ActionBar.styles';\nimport { Button } from '~/components/Button';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkPageSegment, { SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport { QueriedStreamsTable } from '~/components/QueriedStreamsTable';\nimport { StreamsTabOption, isStreamsTabOption, useGlobalStreamStatsQuery, useStreamsQuery, } from '~/hooks/streams';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nimport SearchBar, { SearchBarWrap } from '~/shared/components/SearchBar';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { useCurrentChainFullName, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst DEFAULT_ORDER_BY = 'peerCount';\nconst DEFAULT_ORDER_DIRECTION = 'desc';\nconst DEFAULT_TAB = StreamsTabOption.All;\nconst DEFAULT_SEARCH = '';\nexport function StreamsPage() {\n    const [params] = useSearchParams();\n    const [search, setSearch] = useState(params.get('search') || DEFAULT_SEARCH);\n    const tabParam = params.get('tab');\n    const tab = isStreamsTabOption(tabParam) ? tabParam : DEFAULT_TAB;\n    const navigate = useNavigate();\n    const account = useWalletAccount();\n    const chainKey = useCurrentChainKey();\n    useEffect(function changeToAllTabOnWalletLock() {\n        if (account) {\n            return;\n        }\n        navigate(R.streams(routeOptions(chainKey, { tab: StreamsTabOption.All })));\n    }, [account, navigate, chainKey]);\n    const { orderBy = DEFAULT_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, setOrder, } = useTableOrder({\n        orderBy: params.get('orderBy') || DEFAULT_ORDER_BY,\n        orderDirection: params.get('orderDir') || DEFAULT_ORDER_DIRECTION,\n    });\n    useUrlParams([\n        {\n            param: 'tab',\n            value: tab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'search',\n            value: search,\n            defaultValue: DEFAULT_SEARCH,\n        },\n        {\n            param: 'orderBy',\n            value: orderBy,\n            defaultValue: DEFAULT_ORDER_BY,\n        },\n        {\n            param: 'orderDir',\n            value: orderDirection,\n            defaultValue: DEFAULT_ORDER_DIRECTION,\n        },\n    ]);\n    const streamsQuery = useStreamsQuery({\n        orderBy,\n        orderDirection,\n        search,\n        tab,\n    });\n    const globalStats = useGlobalStreamStatsQuery().data;\n    const globalStreamCount = tab === StreamsTabOption.All && globalStats ? globalStats.streamCount : undefined;\n    const [globalMps, globalBps] = tab === StreamsTabOption.All && globalStats\n        ? [globalStats.messagesPerSecond, globalStats.bytesPerSecond]\n        : [undefined, undefined];\n    const chainFullName = useCurrentChainFullName();\n    const [throughputMode, setThroughputMode] = useState('bps');\n    return (React.createElement(Layout, { pageTitle: \"Streams\" },\n        React.createElement(ActionBarContainer, null,\n            React.createElement(SearchBarWrap, null,\n                React.createElement(SearchBar, { value: search, onChange: (value) => void setSearch(value) })),\n            React.createElement(FiltersBar, null,\n                React.createElement(FiltersWrap, null,\n                    React.createElement(Tabs, { fullWidthOnMobile: true, selection: tab, onSelectionChange: (id) => {\n                            navigate(R.streams(routeOptions(chainKey, { tab: id })));\n                        } },\n                        React.createElement(Tab, { id: StreamsTabOption.All }, \"All streams\"),\n                        React.createElement(Tab, { id: StreamsTabOption.Your, disabled: !account, title: account\n                                ? undefined\n                                : 'Connect your wallet to view your streams' }, \"Your streams\"))),\n                React.createElement(CreateStreamButtonWrap, null,\n                    React.createElement(Button, { as: Link, to: R.stream('new', routeOptions(chainKey)) }, \"Create stream\")))),\n        React.createElement(LayoutColumn, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(TitleBar, { label: globalStreamCount, aux: React.createElement(React.Fragment, null,\n                            throughputMode === 'mps' &&\n                                typeof globalMps === 'number' && (React.createElement(ThroughputDisplay, { type: \"button\", onClick: () => {\n                                    if (typeof globalBps === 'number') {\n                                        setThroughputMode('bps');\n                                    }\n                                } },\n                                React.createElement(\"span\", null, \"Data rate\"),\n                                React.createElement(\"strong\", null,\n                                    Math.floor(globalMps),\n                                    \" msg/s\"))),\n                            throughputMode === 'bps' &&\n                                typeof globalBps === 'number' && (React.createElement(ThroughputDisplay, { type: \"button\", onClick: () => {\n                                    if (typeof globalMps === 'number') {\n                                        setThroughputMode('mps');\n                                    }\n                                } },\n                                React.createElement(\"span\", null, \"Data rate\"),\n                                React.createElement(\"strong\", null, formatBytes(globalBps))))) }, tab === StreamsTabOption.Your\n                        ? 'Your Streams'\n                        : 'All Streams') },\n                    React.createElement(QueriedStreamsTable, { onOrderChange: setOrder, orderBy: orderBy, orderDirection: orderDirection, query: streamsQuery, noDataFirstLine: `No streams found on the ${chainFullName} chain.` }))))));\n}\nfunction formatBytes(value) {\n    if (value > 1048576) {\n        return `${(value / 1048576).toFixed(3)} MB/s`;\n    }\n    if (value > 1024) {\n        return `${(value / 1024).toFixed(2)} KB/s`;\n    }\n    return `${value} B/s`;\n}\nconst LabelledThroughputDisplayMq = '(min-width: 430px)';\nconst VisibleThroughputDisplayMq = '(min-width: 400px)';\nconst ThroughputDisplay = styled.button.withConfig({ displayName: \"ThroughputDisplay\", componentId: \"sc-ekxsp4\" }) `\n    appearance: none;\n    border: 0;\n    align-items: center;\n    background: ${COLORS.secondary};\n    border-radius: 16px;\n    display: none;\n    font-size: 14px;\n    gap: 0.4em;\n    height: 32px;\n    min-width: 0;\n    padding: 0 12px;\n\n    span {\n        display: none;\n        min-width: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n\n    strong {\n        white-space: nowrap;\n    }\n\n    @media ${VisibleThroughputDisplayMq} {\n        display: flex;\n    }\n\n    @media ${LabelledThroughputDisplayMq} {\n        span {\n            display: inline;\n        }\n    }\n`;\nconst CreateStreamButtonWrap = styled.div.withConfig({ displayName: \"CreateStreamButtonWrap\", componentId: \"sc-1evpq0u\" }) `\n    display: none;\n\n    @media ${TABLET} {\n        display: block;\n    }\n`;\n","import { useInfoToastEffect } from '~/hooks';\nimport { useSetSentryScopeEffect } from '~/utils/sentry';\nexport default function Globals() {\n    useInfoToastEffect();\n    useSetSentryScopeEffect();\n    return null;\n}\n","import { getGlobalScope } from '@sentry/react';\nimport { useEffect } from 'react';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function useSetSentryScopeEffect() {\n    const account = useWalletAccount();\n    const chainId = useCurrentChainId();\n    useEffect(function setSentryScopeUser() {\n        getGlobalScope().setUser({ id: account });\n    }, [account]);\n    useEffect(function setSentryScopeChainId() {\n        getGlobalScope().setExtra('chainId', chainId);\n    }, [chainId]);\n}\n","import React, { useEffect, useState } from 'react';\nimport Provider from 'streamr-client-react';\nimport getClientConfig from '~/getters/getClientConfig';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getWalletProvider, useWalletAccount } from '../stores/wallet';\nexport default function StreamrClientProvider({ children }) {\n    const account = useWalletAccount();\n    const chainId = useCurrentChainId();\n    const [config, setConfig] = useState(getClientConfig(chainId));\n    useEffect(() => {\n        const newConfig = getClientConfig(chainId);\n        setConfig((current) => ({\n            ...current,\n            ...newConfig,\n        }));\n    }, [chainId]);\n    useEffect(() => {\n        let mounted = true;\n        async function fn() {\n            if (!account) {\n                return;\n            }\n            try {\n                const provider = await getWalletProvider();\n                if (!mounted) {\n                    return;\n                }\n                setConfig((current) => ({\n                    ...current,\n                    auth: {\n                        ...(current.auth || {}),\n                        ethereum: provider,\n                    },\n                }));\n            }\n            catch (e) {\n                console.warn('Failed to update config', e);\n            }\n        }\n        fn();\n        return () => {\n            mounted = false;\n        };\n    }, [account]);\n    return React.createElement(Provider, { ...config }, children);\n}\n","import { CodeSnippet } from '@streamr/streamr-layout';\nimport JavaScript from 'react-syntax-highlighter/dist/esm/languages/prism/javascript';\nimport Java from 'react-syntax-highlighter/dist/esm/languages/prism/java';\nimport Python from 'react-syntax-highlighter/dist/esm/languages/prism/python';\nimport Bash from 'react-syntax-highlighter/dist/esm/languages/prism/bash';\nCodeSnippet.registerLanguages(JavaScript, Java, Python, Bash);\n","import '@ibm/plex/css/ibm-plex.css';\nimport { NavProvider } from '@streamr/streamr-layout';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport React from 'react';\nimport { createBrowserRouter, Navigate, Route, RouterProvider, Routes, } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Container } from 'toasterhea';\nimport '~/analytics';\nimport GenericErrorPage from '~/pages/GenericErrorPage';\nimport { NetworkOverviewPage } from '~/pages/NetworkOverviewPage';\nimport NotFoundPage from '~/pages/NotFoundPage';\nimport { OperatorPage } from '~/pages/OperatorPage';\nimport { OperatorsPage } from '~/pages/OperatorsPage';\nimport ProjectListingPage from '~/pages/ProjectListingPage';\nimport { ExistingProjectPageWrap, NewProjectPage, ProjectConnectPage, ProjectDraftPage, ProjectIndexRedirect, ProjectLiveDataPage, ProjectOverviewPage, ProjectTabbedPage, } from '~/pages/ProjectPage';\nimport { SingleSponsorshipPage } from '~/pages/SingleSponsorshipPage';\nimport { SponsorshipsPage } from '~/pages/SponsorshipsPage';\nimport { StreamConnectPage, StreamDraftPage, StreamEditPage, StreamIndexRedirect, StreamLiveDataPage, StreamTabbedPage, } from '~/pages/StreamPage';\nimport { StreamsPage } from '~/pages/StreamsPage';\nimport '~/shared/assets/stylesheets';\nimport Globals from '~/shared/components/Globals';\nimport StreamrClientProvider from '~/shared/components/StreamrClientProvider';\nimport { Provider as ModalProvider } from '~/shared/contexts/ModalApi';\nimport { Provider as ModalPortalProvider } from '~/shared/contexts/ModalPortal';\nimport { getQueryClient } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { Route as R } from '~/utils/routes';\nimport '~/utils/setupSnippets';\nimport ProjectEditorPage from './pages/ProjectPage/ProjectEditorPage';\nconst Root = () => (React.createElement(Providers, null,\n    React.createElement(Globals, null),\n    React.createElement(Routes, null,\n        React.createElement(Route, { errorElement: React.createElement(GenericErrorPage, null) },\n            React.createElement(Route, { path: \"/hub/projects\" },\n                React.createElement(Route, { index: true, element: React.createElement(ProjectListingPage, null) }),\n                React.createElement(Route, { element: React.createElement(ProjectDraftPage, null) },\n                    React.createElement(Route, { path: \"new\", element: React.createElement(NewProjectPage, null) }),\n                    React.createElement(Route, { path: \":id\", element: React.createElement(ExistingProjectPageWrap, null) },\n                        React.createElement(Route, { index: true, element: React.createElement(ProjectIndexRedirect, null) }),\n                        React.createElement(Route, { path: \"edit\", element: React.createElement(ProjectEditorPage, null) }),\n                        React.createElement(Route, { element: React.createElement(ProjectTabbedPage, null) },\n                            React.createElement(Route, { path: \"overview\", element: React.createElement(ProjectOverviewPage, null) }),\n                            React.createElement(Route, { path: \"connect\", element: React.createElement(ProjectConnectPage, null) }),\n                            React.createElement(Route, { path: \"live-data\", element: React.createElement(ProjectLiveDataPage, null) }))))),\n            React.createElement(Route, { path: \"/hub/streams\" },\n                React.createElement(Route, { index: true, element: React.createElement(StreamsPage, null) }),\n                React.createElement(Route, { element: React.createElement(StreamDraftPage, null) },\n                    React.createElement(Route, { path: \"new\", element: React.createElement(StreamTabbedPage, { stickySubmit: true }, (attach, ready) => ready ? (React.createElement(StreamEditPage, { saveButtonRef: attach })) : null) }),\n                    React.createElement(Route, { path: \":id\" },\n                        React.createElement(Route, { index: true, element: React.createElement(StreamIndexRedirect, null) }),\n                        React.createElement(Route, { path: \"overview\", element: React.createElement(StreamTabbedPage, { stickySubmit: true }, (attach, ready) => ready ? (React.createElement(StreamEditPage, { saveButtonRef: attach })) : null) }),\n                        React.createElement(Route, { element: React.createElement(StreamTabbedPage, null) },\n                            React.createElement(Route, { path: \"connect\", element: React.createElement(StreamConnectPage, null) }),\n                            React.createElement(Route, { path: \"live-data\", element: React.createElement(StreamLiveDataPage, null) }))))),\n            React.createElement(Route, { path: \"/hub/network\" },\n                React.createElement(Route, { index: true, element: React.createElement(Navigate, { to: {\n                            pathname: R.sponsorships(),\n                            search: window.location.search,\n                        }, replace: true }) }),\n                React.createElement(Route, { path: \"operators\" },\n                    React.createElement(Route, { index: true, element: React.createElement(OperatorsPage, null) }),\n                    React.createElement(Route, { path: \":id\", element: React.createElement(OperatorPage, null) })),\n                React.createElement(Route, { path: \"sponsorships\" },\n                    React.createElement(Route, { index: true, element: React.createElement(SponsorshipsPage, null) }),\n                    React.createElement(Route, { path: \":id\", element: React.createElement(SingleSponsorshipPage, null) })),\n                React.createElement(Route, { path: \"overview\", element: React.createElement(NetworkOverviewPage, null) })),\n            React.createElement(Route, { path: \"/\", element: React.createElement(Navigate, { to: R.operators(), replace: true }) }),\n            React.createElement(Route, { path: \"/hub\", element: React.createElement(Navigate, { to: {\n                        pathname: R.operators(),\n                        search: window.location.search,\n                    }, replace: true }) }),\n            React.createElement(Route, { path: \"/error\", element: React.createElement(GenericErrorPage, null) }),\n            React.createElement(Route, { path: \"*\", element: React.createElement(NotFoundPage, null) }),\n            \",\")),\n    React.createElement(ModalContainer, { id: Layer.Modal }),\n    React.createElement(ToastContainer, { id: Layer.Toast })));\nexport default App;\nconst ModalContainer = styled(Container).withConfig({ displayName: \"ModalContainer\", componentId: \"sc-1e1q2t1\" }) `\n    position: relative;\n    z-index: 11;\n`;\nconst ToastContainer = styled(Container).withConfig({ displayName: \"ToastContainer\", componentId: \"sc-u4zp2e\" }) `\n    bottom: 0;\n    left: 0;\n    max-width: 100%;\n    padding-bottom: 24px;\n    padding-right: 24px;\n    position: fixed;\n    z-index: 12;\n`;\nfunction Providers({ children }) {\n    return (React.createElement(NavProvider, null,\n        React.createElement(StreamrClientProvider, null,\n            React.createElement(ModalPortalProvider, null,\n                React.createElement(ModalProvider, null, children)))));\n}\nconst router = createBrowserRouter([\n    { path: '*', element: React.createElement(Root, null), errorElement: React.createElement(GenericErrorPage, null) },\n]);\nfunction App() {\n    return (React.createElement(QueryClientProvider, { client: getQueryClient() },\n        React.createElement(RouterProvider, { router: router })));\n}\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport App from '~/app';\nconst container = document.getElementById('root');\nconst root = createRoot(container);\nif (container) {\n    root.render(React.createElement(App, null));\n}\nelse {\n    throw new Error('Root element could not be found.');\n}\n","import { BN } from '~/utils/bn';\nBN.config({\n    DECIMAL_PLACES: 18,\n    EXPONENTIAL_AT: BN.config().RANGE,\n});\n","import { getGlobalScope, init } from '@sentry/react';\nif (process.env.SENTRY_DSN) {\n    init({\n        dsn: process.env.SENTRY_DSN,\n        release: process.env.VERSION,\n        environment: process.env.SENTRY_ENVIRONMENT,\n        debug: true,\n    });\n    getGlobalScope().setExtras({\n        '@streamr/sdk': process.env.STREAMR_SDK_VERSION,\n        '@streamr/config': process.env.STREAMR_CONFIG_VERSION,\n    });\n}\n","// You should init the Sentry browser SDK as soon as possible during your application load up, before initializing React\n// https://docs.sentry.io/platforms/javascript/react/\nimport '~/analytics';\nimport packageLock from '../../../package-lock.json';\nconst navigator = global.navigator || {};\nconst streamrClientVersion = packageLock.packages['node_modules/@streamr/sdk']\n    .version;\nglobal.streamr = Object.assign(global.streamr || {}, {\n    info() {\n        const info = {\n            userAgent: navigator.userAgent,\n            environment: process.env.NODE_ENV,\n            streamrClientVersion,\n        };\n        const version = process.env.GIT_VERSION || '';\n        const branch = process.env.GIT_BRANCH || '';\n        const isMaster = branch === 'master';\n        // version e.g. v2.0.5-926-g7e20dd2eb\n        const [versionNumber, , hash] = version.split('-');\n        // hash minus leading 'g', not shown on master\n        const displayHash = isMaster ? '' : hash && hash.slice(1);\n        // don't show branch if master\n        let displayBranch = branch === 'master' ? '' : branch;\n        // replace hyphen in branch name with non-breaking hyphen\n        displayBranch = branch.replace(/-/g, '‑');\n        return {\n            ...info,\n            version: versionNumber,\n            branch: displayBranch,\n            hash: displayHash,\n        };\n    },\n});\n","import BN from 'bignumber.js';\nexport { BN };\nexport function toBN(value) {\n    return typeof value === 'bigint' ? toBN(value.toString()) : new BN(value);\n}\nexport function toBigInt(value, decimals = 0n) {\n    try {\n        return BigInt(toBN(value)\n            .multipliedBy(toBN(10n ** decimals))\n            .toFixed(0));\n    }\n    catch (_) {\n        console.warn('Failed to convert BigNumberish value to BigInt. Using 0n.', value);\n    }\n    return 0n;\n}\nexport function toFloat(value, decimals) {\n    return toBN(value).dividedBy(toBN(10n ** decimals));\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"https://cdn.streamr.com/\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkcore_frontend\"] = self[\"webpackChunkcore_frontend\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\n__webpack_require__.O(undefined, [436], () => (__webpack_require__(47855)))\n__webpack_require__.O(undefined, [436], () => (__webpack_require__(8945)))\nvar __webpack_exports__ = __webpack_require__.O(undefined, [436], () => (__webpack_require__(64488)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","module","exports","MD","REGULAR","MEDIUM","SANS","PHONE","TABLET","LAPTOP","DESKTOP","MAX_BODY_WIDTH","COLORS","primary","primaryLight","primaryContrast","primaryDisabled","secondary","secondaryHover","secondaryLight","focus","click","selection","disabled","section","inputBackground","radioBorder","close","link","linkInactive","error","warning","dialogBorder","black","active","greenSpinner","spinnerBorder","activeBackground","alertInfoBackground","alertErrorBackground","alertSuccessBackground","SecondaryText","Border","Background","Text","rotate","keyframes","SpinnerRoot","div","withConfig","displayName","componentId","$animate","css","Spinner","coverage","fixed","color","size","sizeProp","strokeWidth","innerRef","props","r","d","Math","PI","ringColor","strokeColor","ring","stroke","ref","style","width","height","viewBox","cx","cy","fill","strokeLinecap","strokeDasharray","strokeDashoffset","Button","button","attrs","children","waiting","outline","onClick","kind","tabIndex","e","preventDefault","currentTarget","HTMLElement","blur","Buttonesque","$css","EmptyState","image","className","linkOnMobile","Root","ImageWrap","LinkWrap","svg","CircleIcon","xmlns","transform","fillRule","defaultProps","PinIcon","ArrowIcon","ArrowHeadIcon","LongArrowIcon","DefaultPath","path","sources","back","strokeLinejoin","backArrow","clipRule","forward","caretUp","caretDown","disconnect","tick","exclamation","cross","crossMedium","crossHeavy","linkOut","play","pause","minus","minusSmall","plus","plusSmall","user","userFull","checkmark","checkmarkOutline","opacity","checkMarkMono","refresh","circle","pin","arrow","longArrow","arrowhead","keyboard","x","y","rx","share","emptyAvatarUpload","profileMan","ry","hamburger","search","questionMark","outlineQuestionMark","outlineQuestionMark2","lockOutline","lock","lockClosed","checkBadgeOutline","checkBadge","checkBadgeHD","dropPlus","infoBadge","warnBadge","errorBadge","clear","trash","brevetDown","transfer","dataUnion","DATA","DATAColor","ETH","fillOpacity","DAI","unknownToken","console","copy","alarmBell","product","id","xlinkHref","mask","stream","clipboardPlus","clipboardCheck","expand","list","listInspect","listSettings","page","fullScreen","clipPath","externalLink","pencil","pencilFull","eye","ellipse","email","zoomOut","zoomIn","faders","github","medium","peepeth","reddit","telegram","trello","twitter","youtube","linkedin","instagram","facebook","web","xCom","SvgIcon","name","Object","keys","sort","RejectionReason","CloseButton","Symbol","Backdrop","EscapeKey","CancelButton","BackButton","isRejectionReason","value","CodedError","z","object","code","number","isCodedError","safeParse","success","ObjectWithMessage","message","string","isMessagedObject","isTransactionRejection","test","bringIn","bringOut","fadeAway","BaseModal","darkBackdrop","onBeforeAbort","onReject","onResolve","_","dismissed","dismiss","useReducer","rootRef","useRef","discard","current","root","addEventListener","animationName","getName","wigglyRef","tweenRef","reason","beforeAbort","kill","gsap","to","duration","onUpdate","wiggly","p","this","progress","intensity","sin","wave","closeRef","useEffect","onKeyDown","key","window","removeEventListener","NoScrollStyles","onMouseDown","OuterWrap","InnerWrap","Pad","Interactive","AnimatedWrap","Wigglable","createGlobalStyle","$dismissed","$dark","Footer","$borderless","$spacious","$autoHeight","LightModal","title","Head","Title","type","Content","Layer","address0","DayInSeconds","defaultChainKey","formatConfigUrl","url","options","protocol","dockerHost","includes","replace","ChainConfigExtension","coingeckoNetworkId","optional","dataUnionJoinServerUrl","dataunionGraphNames","array","chainId","default","marketplaceChains","networkSubgraphUrl","slug","sponsorshipPaymentToken","storageNodes","address","refine","thirdPartyUrl","streamIndexerUrl","fallbackChainConfigExtension","parse","parsedChainConfigExtension","record","union","undefined","draft","values","forEach","extension","lowerCasedChainKeyToChainKeyMap","getChainKey","candidate","toLowerCase","chainKey","isChainKey","warn","getCurrentChain","getChainConfig","URLSearchParams","location","get","getCurrentChainId","useCurrentChain","chainName","useMemo","useCurrentChainId","useCurrentChainKey","useCurrentChainFullName","getChainDisplayName","chainKeyToChainEntryMap","getChainEntry","config","configExtension","entry","rpc","rpcEndpoints","entryPoints","entrypoint","websocket","host","theGraphUrl","chainIdOrChainKey","getChainConfigExtension","getChainSlug","chainEntry","prototype","hasOwnProperty","call","getMarketplaceChainConfigs","marketplaceChainKeys","result","push","routeOptions","hash","chain","withSuffix","pathname","qs","stringify","encode","uriComponent","encodeURIComponent","Route","allowanceInfo","blog","contactGeneral","contactJobs","contactLabs","contactMedia","createOperator","docs","giveFeedback","hub","network","networkExplorer","networkOverview","operator","operators","privacyPolicy","project","projectConnect","projectEdit","projectLiveData","projectOverview","projects","publisherTerms","resetAllowanceInfo","siteAbout","siteDataToken","siteDataUnions","siteDesign","siteEcosystem","siteFund","siteMarketplace","siteNetwork","sitePapers","siteRoadmap","siteTokenMigration","streamConnect","streamLiveData","streamOverview","streams","sponsorship","sponsorships","tos","DisclaimerBar","href","target","rel","async","pop","MadeBy","LayoutFooter","FooterColumns","separate","topBorder","FooterColumn","SocialChannels","PosterUrl","description","otherTags","filter","Boolean","join","content","property","NetworkHelmet","Anchor","indicateOrigin","translate","component","Component","componentProps","display","useBoundingClientRect","rect","createPortal","document","getElementById","OriginIndicator","resizeSubscribe","cb","Point","JSON","useSyncExternalStore","getBoundingClientRect","$display","SimpleDropdown","detached","menu","menuWrapComponent","MenuWrap","SimpleDropdownMenu","onToggle","align","isOpen","setIsOpen","useState","toggle","useCallback","menuRef","contains","onToggleRef","stopPropagation","body","onFocus","posRef","scrollY","dx","maxWidth","clientWidth","documentElement","min","round","myWidth","SimpleDropdownRoot","top","left","$disabled","$visible","SimpleListDropdownMenu","DefaultSimpleDropdownMenu","EnvironmentConfig","availableChains","defaultChain","platformOriginUrl","streamrUrl","rest","availableChainConfigs","map","fallbackEnvironmentConfig","parsedConfig","NODE_ENV","actualEnvironment","process","env","icons","emptyIcon","alt","src","String","DraftValidationError","Error","constructor","super","captureStackTrace","setPrototypeOf","ValidationError","messages","ParseError","entity","_abi","anonymous","inputs","indexed","internalType","outputs","stateMutability","_bytecode","MarketplaceV4__factory","args","length","getDeployTransaction","overrides","deploy","connect","runner","createInterface","bytecode","abi","RemoteMarketplaceV1__factory","Uniswap2AdapterV4__factory","_marketplace","_projectRegistry","_uniswapRouter","_deployedOnDomainId","components","ProjectRegistryV1__factory","ProjectStakingV1__factory","constant","payable","Token__factory","getContractAbi","contractKey","getContractAddress","addressKey","contracts","StreamrConfig","MarketplaceV4","RemoteMarketplaceV1","MarketplaceV3","OperatorFactory","ProjectRegistryV1","OperatorDefaultDelegationPolicy","OperatorDefaultExchangeRatePolicy","OperatorDefaultUndelegationPolicy","SponsorshipDefaultLeavePolicy","SponsorshipFactory","SponsorshipMaxOperatorsJoinPolicy","SponsorshipStakeWeightedAllocationPolicy","SponsorshipVoteKickPolicy","StreamRegistry","StreamStorageRegistry","DataUnionFactory","graphClients","getGraphClient","graphClient","ApolloClient","uri","getGraphUrl","cache","defaultUrl","customUrl","dataUnionGraphClients","indexerGraphClients","getIndexerClient","client","getClientConfig","mods","chainConfig","metrics","controlLayer","ethereumNetwork","rpcs","streamRegistryChainAddress","streamStorageRegistryChainAddress","BehindIndexError","expectedBlockNumber","actualBlockNumber","prehandleBehindBlockError","blockRegexp0","blockRegexp1","Number","match","AbiChanged_OrderBy","Account_OrderBy","AddrChanged_OrderBy","Aggregation_Interval","AuthorisationChanged_OrderBy","ContenthashChanged_OrderBy","DomainEvent_OrderBy","Domain_OrderBy","ExpiryExtended_OrderBy","FusesSet_OrderBy","InterfaceChanged_OrderBy","MulticoinAddrChanged_OrderBy","NameChanged_OrderBy","NameRegistered_OrderBy","NameRenewed_OrderBy","NameTransferred_OrderBy","NameUnwrapped_OrderBy","NameWrapped_OrderBy","NewOwner_OrderBy","NewResolver_OrderBy","NewTtl_OrderBy","OrderDirection","PubkeyChanged_OrderBy","RegistrationEvent_OrderBy","Registration_OrderBy","ResolverEvent_OrderBy","Resolver_OrderBy","TextChanged_OrderBy","Transfer_OrderBy","VersionChanged_OrderBy","WrappedDomain_OrderBy","WrappedTransfer_OrderBy","_SubgraphErrorPolicy_","GetEnsDomainsForAccountDocument","Delegation_OrderBy","DelegatorDailyBucket_OrderBy","Delegator_OrderBy","Flag_OrderBy","Network_OrderBy","Node_OrderBy","OperatorDailyBucket_OrderBy","Operator_OrderBy","ProjectPaymentDetails_OrderBy","ProjectPermission_OrderBy","ProjectPurchase_OrderBy","ProjectStakeByUser_OrderBy","ProjectStakingDayBucket_OrderBy","ProjectSubscription_OrderBy","Project_OrderBy","QueueEntry_OrderBy","SlashingEvent_OrderBy","SponsoringEvent_OrderBy","SponsorshipDailyBucket_OrderBy","Sponsorship_OrderBy","Stake_OrderBy","StakingEvent_OrderBy","StreamPermission_OrderBy","Stream_OrderBy","Vote_OrderBy","StakeFieldsFragmentDoc","SponsorshipFieldsFragmentDoc","OperatorFieldsFragmentDoc","ProjectFieldsFragmentDoc","StreamFieldsFragmentDoc","SponsorshipDailyBucketFieldsFragmentDoc","SponsoringEventFieldsFragmentDoc","OperatorDailyBucketFieldsFragmentDoc","DelegatorDailyBucketFieldsFragmentDoc","GetAllOperatorsDocument","SearchOperatorsByMetadataDocument","GetOperatorByIdDocument","GetOperatorsByDelegationDocument","GetOperatorsByDelegationAndIdDocument","GetOperatorsByDelegationAndMetadataDocument","GetOperatorByOwnerAddressDocument","GetOperatorsByOwnerOrControllerAddressDocument","GetAllSponsorshipsDocument","GetSponsorshipsByCreatorDocument","GetSponsorshipByIdDocument","GetSponsorshipByStreamIdDocument","GetProjectDocument","GetProjectsDocument","GetProjectsByTextDocument","GetProjectSubscriptionsDocument","GetStreamByIdDocument","GetPagedStreamsDocument","GetSponsorshipDailyBucketsDocument","GetSponsoringEventsDocument","GetOperatorDailyBucketsDocument","GetDelegatorDailyBucketsDocument","GetMetadataDocument","GetNetworkStatsDocument","Parsable","raw","preparsed","preparse","getValue","parser","cachedValue","getIpfsGatewayBaseUrl","endsWith","getIpfsGatewayUrl","cid","getImageCrossOrigin","startsWith","RawOperatorMetadata","SyntaxError","unknown","catch","pipe","imageIpfsCid","redundancyFactor","linkedIn","UrlParser","OperatorMetadata","ZodError","trim","v","imageUrl","coerce","int","RawOperator","contractVersion","controllers","cumulativeOperatorsCutWei","cumulativeProfitsWei","dataTokenBalanceWei","delegations","delegatorCount","exchangeRate","metadataJsonString","nodes","operatorsCutFraction","operatorTokenTotalSupplyWei","owner","queueEntries","slashingEvents","stakes","totalStakeInSponsorshipsWei","valueUpdateBlockNumber","valueUpdateTimestamp","valueWithoutEarnings","Operator","arguments","_shares","addr","enabled","persisted","null","delegator","operatorTokenBalanceWei","latestDelegationTimestamp","earliestUndelegationTimestamp","amount","multipliedBy","metadata","operatorsCut","toNumber","date","entries","queuedAt","Date","events","sponsorshipId","streamId","amountWei","earningsWei","joinTimestamp","isRunning","boolean","remainingWei","minimumStakingPeriodSeconds","spotAPY","projectedInsolvency","s","isSponsorshipPaying","joinedAt","operatorId","projectedInsolvencyAt","apy","_apy","getSpotApy","wallet","getDelegatedAmountForWallet","RawSponsorship","cumulativeSponsoring","minOperators","maxOperators","operatorCount","remainingWeiUpdateTimestamp","totalPayoutWeiPerSec","totalStakedWei","Sponsorship","Infinity","remainingBalanceWei","remainingBalanceUpdatedAt","spotApy","lockedWei","payoutPerSecond","payoutPerDay","timeCorrectedRemainingBalanceWeiAt","timestampInMillis","time","secondsElapsed","max","getTime","toastIn","toastSqueeze","toastOut","AbstractToast","hidden","hide","squeezed","squeeze","setHeight","mountedAtRef","performance","now","setTimeout","useLayoutEffect","$hidden","$squeezed","ToastType","Toast","Info","desc","okLabel","cancelLabel","canSubmit","autoCloseAfter","autoCloseAfterProp","Processing","timeoutId","clearTimeout","Form","onSubmit","Success","IconWrap","label","Warning","Body","Buttons","Dot","form","$color","ProjectType","TheGraph","ChartPeriod","providers","getPublicProvider","provider","getStreamrClientInstance","newProvider","getSigner","toast","t","successToast","errorToast","vet","validationErrorToast","index","DEFAULT_OPERATOR_ORDER_BY","Id","DEFAULT_SPONSORSHIP_ORDER_BY","DEFAULT_ORDER_DIRECTION","Asc","getProjectRegistryContract","getERC20TokenContract","tokenAddress","getMarketplaceContract","getAllowance","account","recover","allowance","getProjectTypeName","projectType","DataUnion","OpenData","PaidData","getProjectTypeTitle","getProjectImageUrl","exec","getIpfsCidFromUrl","getParsedSponsorshipById","force","minBlockNumber","rawSponsorship","data","query","variables","fetchPolicy","getOperatorsByDelegation","first","skip","orderBy","orderDirection","getParsedOperatorByOwnerAddress","getParsedOperatorsByOwnerOrControllerAddress","queryResult","getParsedOperators","getter","rawOperators","mapper","yearlyIncome","reduce","sum","isEqualTo","dividedBy","find","getDelegationFractionForWallet","offset","total","getSelfDelegationFraction","getTimestampForChartPeriod","period","end","SevenDays","clone","subtract","OneMonth","ThreeMonths","OneYear","YearToDate","startOf","All","utc","getNetworkStats","stats","totalStake","sponsorshipsCount","operatorsCount","networks","parseNetworkStats","getOperatorDailyBuckets","dateLowerThan","date_lt","dateGreaterEqualThan","date_gte","batchSize","where","operator_","operatorDailyBuckets","getSponsorshipDailyBuckets","sponsorship_","sponsorshipDailyBuckets","getDelegatorDailyBuckets","delegatorId","delegatorDailyBuckets","ensApolloClient","getENSDomainsForWallet","domains","wrappedDomains","getDescription","streamalike","TimeoutError","useIsMounted","Inner","Panel","Link","TitleBar","connectModal","connectDeferral","setConnectDeferral","connecting","setError","isMounted","reject","useWalletAccount","Logo","deferral","currentAccount","Promise","race","getWalletAccount","promise","_resolve","Auth","LoadingIndicator","loading","PanelRow","Header","SignInMethod","theme","themes","Icon","Metamask","Break","freeze","break","FlagBusy","providerPromise","getWalletProvider","resolve","isMetaMask","getWalletWeb3Provider","retry","signer","getAddress","f","promiseMap","Map","accounts","request","method","existingPromise","set","delete","useWalletStore","lastKnownAccount","ensLookups","onAccountsChange","ens","ensName","next","on","isLoading","useIsWalletLoading","DefaultActions","actions","visible","linkTo","spinner","cn","Tag","ButtonWithMinWidth","as","browserNotSupported","srcSet","discardChanges","imageUpload","metamask","publishFailed","walletNoData","walletNoEth","walletError","txFailed","PngIcon","names","Modal","getChainName","some","SwitchNetworkModal","expectedChainId","actualChainId","P","cancel","add","getChainId","getNetwork","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","networkPreflight","params","toString","rpcUrls","nativeCurrency","blockExplorerUrls","blockExplorerUrl","StreamrClient","getStreamrClient","transactional","ethereum","auth","Raw","decorated","assign","Copy","Exchanges","truncate","input","truncateLongerThan","pickFirst","pickLast","regex","RegExp","substr","substring","parseStreamId","truncateStreamName","streamName","limit","separatorIndex","indexOf","addressPart","namePart","truncateStartingWithTheAddressPart","truncateStartingWithTheNamePart","shortenedAddressPart","truncateAddressPart","truncateNamePart","shortenedNamePart","StreamParser","or","parseStream","permissionAssignments","storage","permissions","assignment","userId","memo","permission","Bits","domain","parseStreamMetadata","partitions","DELETE","EDIT","GRANT","PUBLISH","SUBSCRIBE","setBits","bitsA","bitsB","unsetBits","matchBits","storageDays","inactivityThresholdHours","PathnameSchema","superRefine","ctx","addIssue","fatal","ZodIssueCode","custom","NEVER","InsufficientFundsError","StreamNotFoundError","mapping","getBalance","walletAddress","balanceOf","requirePositiveBalance","getEmptyDraft","abandoned","dirty","cold","hot","errors","fetching","initialized","persisting","createDraftStore","useDraftStore","isPersisting","draftId","drafts","setDraft","update","store","updater","isEqual","idMap","init","setErrors","teardown","onlyAbandoned","abandon","persist","fn","abortSignal","bind","issues","validate","validator","useStore","DraftContext","createContext","useDraftId","useContext","useDraft","useIsDraftClean","useIsDraftBusy","useBoundDraft","entityId","useEntity","useIsAnyDraftBeingPersisted","useIsFetchingEntity","usePersist","abortControllerRef","abortController","AbortController","abort","fnRef","signal","usePersistCallback","busy","clean","aborted","onDone","onError","useSetDraftErrors","useUpdateEntity","useValidateEntity","validatorRef","useInitDraft","recycledDraftId","generator","deps","generatorRef","useId","prefix","DefaultIdGenerator","TransactionListToast","operations","Container","state","action","Action","Item","Name","ActionWrap","IconContainer","li","$complete","$ongoing","toastedOperation","toastedOperations","op","pos","notify","StreamDraft","getEmptyStreamEntity","formatStorageOperationLabel","NewStreamLink","getOpenStreamLink","decodeURIComponent","getCryptoModal","tokenName","MenuItem","isSelected","MenuItemContainer","Menu","chains","selectedChain","setSearchParams","MenuContainer","ChainGrid","c","prev","fromEntries","Toggle","$isOpen","Caret","infoToast","useConfigValueFromChain","setValue","transformRef","mounted","newValue","updatedAt","contract","obj","getConfigValueFromChain","useMediaQuery","subscribe","matchMedia","matches","useRequestedBlockNumber","blockNumber","useLatestBehindBlockError","isSuccess","behindBlockErrorRef","useInitialBehindIndexError","resetDeps","errorRef","resetKey","resetKeyRef","useRefetchQueryBehindIndexEffect","isBehindError","refetch","confirmationModal","proceedLabel","isDangerous","ModalBody","Description","DecisionButtons","DecisionButton","$isDangerous","Alert","AlertWrap","AlertIcon","StyledIcon","StyledSpinner","$type","SliderRoot","ACTIVE","SUCCESS","CAUTION","ERROR","PROCESSING","DEFAULT","$wrap","FormModal","submitLabel","submitting","ok","FormModalRoot","FormModalHead","FormModalTitle","FormModalCloseButton","FormModalContent","SectionHeadline","h4","Hint","Section","Prop","em","$invalid","PropValue","PropList","ul","GroupHeadline","h2","Group","WingedLabelWrap","ErrorWrap","ErrorLabel","TextInput","TextareaInput","textarea","$minHeight","TextareaCounter","span","Appendix","TextAppendix","FieldWrap","$grayedOut","$top","$bottom","$padded","CopyButtonWrapAppendix","IconWrapAppendix","MaxButton","MAX_WIDTH","file","editorRef","sliderValue","setSliderValue","onSave","blob","cropInfo","imageElement","createElement","onload","canvas","cropCanvasContext","getContext","drawImage","resizedCanvas","resizedCanvasContext","toBlob","getCroppedAndResizedBlob","getCroppingRect","File","AvatarEditorWrap","StyledAvatarEditor","border","borderRadius","scale","ZoomControls","ZoomIcon","ZoomSlider","onChange","ButtonsContainer","StyledButton","$mask","onChangeProp","borderPercentage","parseInt","background","Tooltip","anchorDisplay","scrollSpy","TooltipComponent","onMouseEnter","onMouseLeave","setMounted","animated","setAnimated","TooltipRoot","onTransitionEnd","propertyName","HTMLDivElement","getComputedStyle","visibility","TooltipBody","Indicator","TooltipContent","TooltipIconWrap","$svgSize","QuestionMarkIcon","PropertyDropdown","onDismiss","toggleIcon","valuePlaceholder","open","setOpen","displayValue","Value","PropertyPopover","placeholder","required","valueProp","bodyRef","onDismissRef","Element","PropertyPopoverRoot","PropertyPopoverBody","Optional","InputWrap","Input","autoFocus","EnterButton","Submit","PlusIcon","dark","$active","$unset","PropertyDropdownList","toArray","PropertyDisplay","icon","toggleProps","PropertyIcon","RequestError","res","statusCode","response","status","getError","defaultOptions","headers","requestOptions","axios","UploadResponse","postImage","jwt","FormData","append","uploadResult","Authorization","onReceipt","replaceable","getBlockNumber","tx","replaceableTransaction","receipt","wait","cancelled","replacement","getOperatorDelegationAmount","balanceInData","DefaultImagePlaceholder","DefaultImagePlaceholderRoot","FallbackImage","crossOrigin","crossorigin","unloader","Identicon","AvatarImage","username","upload","initials","split","slice","toUpperCase","HubAvatar","HubImageAvatar","cropModal","Validator","cut","imageToUpload","instanceof","literal","operatorModal","setBusy","currentData","nextData","updateNextData","changelog","randomAddress","fileInputRef","imageBlob","URL","createObjectURL","resetError","newErrors","existingErrors","finalData","readonlyCut","hasUpdateCutOperation","hasUpdateMetadataOperation","blockNumbers","operatorContract","updateOperator","blockNo","waitForIndexedBlock","factory","poolTokenName","operatorMetadata","policies","policyParams","sleep","readOnly","AlertContainer","step","AboutOperator","AboutOperatorField","pick","AvatarField","AvatarDisplayContainer","OperatorAvatar","AvatarPlaceholder","accept","files","ButtonIcon","AvatarRequirements","AvatarImageStyles","img","blockObservers","getBlockObserver","blockObserver","lastKnownBlockNumber","pending","emitter","started","once","failureCount","idleCount","consecutiveChangeCount","_meta","meta","block","emit","off","onIndexedBlock","ensureGasMonies","waitForPurchasePropagation","projectId","attempts","fromBlock","i","queryFilter","filters","Subscribed","millis","goBack","idx","history","onBeforeNavigate","getQueryClient","queries","throwOnError","SiSymbol","defaultFractionLength","integral","abbr","fractionalLength","stripFractionalZeros","dp","isFinite","sign","isLessThan","fractional","abs","fracLength","Array","frac","saveOperator","invalidateActiveOperatorByIdQueries","invalidateQueries","exact","queryKey","refetchType","invalidateAllOperatorsQueries","invalidateDelegationsForWalletQueries","getStreamGptApiUrl","getTokenInfo","tokenInfo","fetchQuery","tokenInfoQueryParams","symbol","useTokenInfo","useQuery","queryFn","contact","decimals","staleTime","gcTime","getCachedTokenInfo","getQueryData","getSponsorshipTokenInfo","useSponsorshipFundingHistoryQuery","pageSize","currentChainId","useInfiniteQuery","skippedElements","sponsoringEvents","event","sponsor","format","getSponsoringEvents","pageParam","initialPageParam","getNextPageParam","lastPage","SponsorshipPaymentTokenName","useSponsorshipTokenInfo","Decimals","abbrProp","tooltip","unit","humanAmount","SponsorshipDecimals","unitSuffix","Tick","$checked","noop","checked","SponsorshipDisclaimer","checkboxState","onCheckboxStateChange","joinSponsorshipAsOperator","useJoinSponsorshipAsOperator","useOperatorForWalletQuery","StyledAlert","Confirm","htmlFor","mapStream","publisherCount","subscriberCount","counts","perm","subscribeExpiration","publishExpiration","calculatePubSubCount","getPagedStreams","lastId","orderOperator","graphOrderDirection","Desc","permissions_","stream_contains_nocase","hasNextPage","splice","prepareStreamResult","userAddress","DropdownMenuItem","highlight","highlightOnFocus","onKeyDownProp","onKeyDownToNextButton","onKeyDownToPrevButton","ItemRoot","el","b","parentElement","nextElementSibling","querySelector","previousElementSibling","withPrevButton","ReturnIconWrap","$highlightOnFocus","$highlight","StreamIdDropdown","onBlur","onBlurProp","onFocusProp","inputRef","listRef","queryValue","streamIds","inputFocused","setInputFocused","StreamDropdownMenuWrap","SpinnerWrap","shortStreamId","Zero","getSponsorshipStakeForOperator","stake","isSponsorshipFundedByOperator","operatorStake","getSponsorshipExtensionInDays","dailyPayoutRate","MinNumberOfOperatorsParser","gte","isSafeInteger","CreateSponsorshipForm","initialAmount","bigint","gt","minStakeDuration","minNumberOfOperators","maxNumberOfOperators","useUncollectedEarningsStore","updateEarnings","earnings","lastUpdatedTimestamp","lastSyncTimestamp","fetch","operatorAddress","addresses","getSponsorshipsAndEarnings","uncollectedEarnings","changePerSecond","myStake","totalPayoutPerSecond","myPayoutPerSecond","getEarningsForSponsorships","operatorEarnings","elapsedInSeconds","sponsorshipEarnings","stakeOnSponsorship","toastLabel","getState","forceUnstakeFromSponsorship","streamNotFoundToaster","createSponsorshipModal","balance","streamIdProp","confirmState","setConfirmState","setStreamId","rawInitialAmount","setRawInitialAmount","rawDailyPayoutRate","setRawDailyPayoutRate","rawMinStakeDurationInDays","setRawMinStakeDurationInDays","rawMinNumberOfOperators","setRawMinNumberOfOperators","backdropDismissable","extensionInDays","insufficientFunds","tooLowOperatorCount","formData","invalidMinStakeDuration","maxPenaltyPeriodInDays","tooLongMinStakeDuration","limitedSpace","potentialStreamId","checkIfStreamExists","payoutRatePerSecond","minStakeDurationInSeconds","defaultAbiCoder","policy","param","token","rawReceipt","interface","logs","item","eventName","createSponsorship","toFixed","EmptyStake","editStakeModal","leavePenalty","availableBalance","lockedStake","globalMinimumStakeWei","minimumStakeWei","a","currentAmount","rawAmount","setRawAmount","minLeaveDate","hasUndelegationQueue","difference","isAmountWithinAcceptedRange","slashingAmount","targetAmount","reduceStakeOnSponsorship","slashingReason","pluralizeUnit","fundSponsorshipModal","pricePerSecond","extensionInSeconds","extensionDuration","extensionText","asSeconds","years","months","days","hours","minutes","startDate","endDate","fundSponsorship","useInterceptHeartbeats","heartbeats","setHeartbeats","cacheKey","onMessage","msg","parsedContent","getParsedContent","messageId","arg","HeartbeatMessage","peerDescriptor","applicationVersion","timestamp","nodeId","msgType","nativeEnum","port","tls","openInternet","region","useOperatorLiveNodes","count","setIsLoading","detectedAny","transitionTime","StyledCaretIcon","StyledDropdownIndicator","DropdownIndicator","StyledCloseIcon","StyledOptionAfter","StyledOption","Option","SelectedWhiteOption","StyledWhiteDropdownOption","selectProps","menuIsOpen","isDisabled","whiteVariant","ClearIndicator","SelectField2","isClearable","noShrink","fullWidth","selected","setSelected","defaultStyles","control","styles","isFocused","styleObject","backgroundColor","fontWeight","transition","cursor","boxShadow","flexWrap","getControlStyles","position","fontSize","lineHeight","getPlaceholderStyles","singleValue","overflow","getSingleValueStyles","marginTop","padding","getMenuStyles","menuList","getMenuListStyles","menuPortal","zIndex","option","getOptionStyles","clearIndicator","getClearIndicatorStyles","whiteVariantStyles","getWhitePlaceholderStyles","borderColor","getWhiteControlStyles","getWhiteMenuStyles","getWhiteMenuListStyles","getWhiteOptionStyles","isSearchable","onMenuOpen","onMenuClose","IndicatorSeparator","menuPortalTarget","copyToast","useCopy","isCopied","setIsCopied","copiedAt","touch","NEGATIVE_INFINITY","onAfterCopied","toastMessage","timeout","normalizeVersion","ver","NaN","parts","part","num","isNaN","humanFormat","diff","divisor","val","humanize","durationSeconds","durationMs","limitErrorToaster","requiredNodeVersion","LiveNodesAndVersionCheck","liveNodesCountLoading","liveNodesCount","hasWaitedForHeartbeats","setHasWaitedForHeartbeats","timer","heartbeat","every","version","requiredVersion","major","minor","patch","requiredMajor","requiredMinor","requiredPatch","isNodeVersionGreaterThanOrEqualTo","LinkIcon","StyledLabelWrap","joinSponsorshipModal","preselectedOperator","operatorChoices","useAllOperatorsForWalletQuery","setSelectedOperator","operatorBalance","liveNodesOk","minimumSelfDelegationFraction","minimumSelfDelegationAmount","earlyLeaverPenaltyWei","ownerDelegationPercentage","currentSelfDelegationAmount","isBelowSelfFundingLimit","isAboveMinimumStake","defaultValue","o","selectedOp","Flag","isDelegatingFunds","isUndelegatingFunds","isCreatingSponsorship","isFundingSponsorship","isJoiningSponsorshipAsOperator","isEditingSponsorshipFunding","flagKey","useFlagStore","flags","wrap","useIsFlagged","useFlagger","getSponsorshipsAndParse","rawSponsorships","useSponsorshipsForCreatorQuery","searchQuery","creator","expired","inactive","my","noFunding","includeInactive","includeWithoutFunding","includeExpiredFunding","hasOperatorId","whereFilters","remainingWei_gt","projectedInsolvency_gt","floor","stakes_","operator_contains_nocase","getSponsorshipsByCreator","mapSponsorshipOrder","placeholderData","useAllSponsorshipsQuery","getAllSponsorships","useSponsorshipsByStreamIdQuery","getSponsorshipsByStreamId","useCreateSponsorship","withFlag","invalidateSponsorshipQueries","useSponsorshipDailyBucketsQuery","dataSource","selectedPeriod","ignoreToday","start","unix","maxAmount","maxIterations","elements","partialResult","bucket","yValue","pow","getSponsorshipStats","useFundSponsorshipCallback","onJoin","useEditSponsorshipFunding","sponsorshipOrSponsorshipId","getLeavePenalty","getSponsorshipLeavePenalty","columnKey","OperatorCount","TotalStakedWei","SpotApy","ProjectedInsolvency","TotalPayoutWeiPerSec","RemainingWei","invalidator","invalidateSponsorshipsForCreatorQueries","invalidateAllSponsorshipsQueries","invalidateSponsorshipByIdQueries","invalidateSponsorshipDailyBucketsQueries","invalidateSponsorshipFundingHistoryQueries","invalidateSponsorshipsByStreamIdQueries","StreamDescription","setDesc","getStreamDescription","OperatorIdCell","operatorName","truncateProp","OperatorIdCellRoot","OperatorAvatarWrap","OperatorName","$truncate","DeletedStreamIdCell","StreamInfoCell","StreamAvatarWrap","StreamInfoCellOuter","StreamIdWrap","StreamIdCell","imageUrlQuery","resp","imageHash","json","useStreamImageUrlQuery","isFetching","StreamDescriptionWrap","FundedUntilCell","remainingBalance","Iconized","isValid","SponsorshipApyCell","NumberOfOperatorsCell","currentOperatorId","joinedByCurrentOperator","Radio","disabledReason","handleChange","RadioLabel","LoadMoreButton","Meatball","layout","vertical","propsToCss","WrappedComponent","FlushHistoryDecoratorWrapperFR","forwardRef","blurCount","setBlurCount","flushHistoryOnBlur","OnCommitDecoratorWrapperFR","noEmptyCommit","onCommit","onCommitProp","smartCommit","valueRef","requireChanged","sanitise","normalize","HTMLInputElement","HTMLTextAreaElement","sanitizeValue","RevertOnEscapeDecoratorWrapperFR","revertOnEscape","SelectAllOnFocusDecoratorWrapperFR","select","selectAllOnFocus","StyledInput","invalid","EnhancedText","fns","reduceRight","acc","cur","compose","tag","unstyled","BucketType","DataUnionStatsBucket_OrderBy","DataUnion_OrderBy","MemberStatus","Member_OrderBy","RevenueEvent_OrderBy","DataUnionFieldsFragmentDoc","GetDataUnionsOwnedByDocument","getDataUnionsOwnedByInChain","origin","getDataUnionGraphClient","dataUnions","du","getDataUnionClient","joinServerUrl","providerUrl","isProviderInCorrectChain","privateKey","factoryAddress","getDataUnion","dataUnionId","getDataUnionAdminFeeForSalePoint","salePoint","beneficiary","domainId","getAdminFee","getDataUnionAdminFee","Transaction","onTransactionHash","onTransactionComplete","deployDataUnion","productId","adminFee","duAddress","dataUnionName","contractAddress","errorHandler","timeUnits","second","minute","hour","day","week","month","timeUnitSecondsMultiplierMap","getFormattedChainNameFromContext","SalePointsPayload","beneficiaryAddress","price","pricingTokenAddress","timeUnit","OpenDataPayload","newImageToUpload","termsOfUse","commercialUse","redistribution","reselling","termsName","termsUrl","salePoints","DataUnionPayload","merge","parseFloat","PaidDataPayload","enabledSalePoints","PublishableProjectPayload","momentDurationFormatsByTimeUnit","abbrMapping","toSeconds","quantity","formatDateTime","timezone","convertPrice","roundingMode","BN","ROUND_HALF_UP","valueAmount","valueUnit","targetQuantity","targetUnit","prepareProjectResult","results","mapProject","getProjectFilter","Open","paymentDetails_","Paid","pricePerSecond_gt","isDataUnion","canGrant","streams_contains","getProjects","getPublishableProjectProperties","payload","domainIds","paymentDetails","currentPricePerSecond","contactDetails","existingImageIpfsCid","formatMetadata","contractCurrencies","USD","PRODUCT_DEFINED","paymentCurrencies","maxFileSizeForImageUpload","getMostRelevantTimeUnit","formatPrice","currency","actualTimeUnit","timeUnitAbbreviation","getAbbreviation","roundedPrice","bn","lt","decimalPlaces","formatDecimals","actualSymbol","ParsedPaymentDetail","ProjectParser","canBuy","canDelete","canEdit","getEmptySalePoints","marketplaceChainConfigs","getEmptyParsedProject","chainIdProp","getParsedProjectById","payment","secondPayment","isOpenData","multiplier","parseAsync","parseProject","getTokenLogoUrl","tokenContractAddress","getCoingeckoNetworkId","Circle","tokenColor","isDark","cssColor","intToRGB","str","charCodeAt","hashCode","charAt","Image","logoUrl","imgSrc","useImage","useSuspense","srcList","isAbandonment","Host","Unmount","Update","Column","ScrollableContent","Nav","BackButtonIcon","Actions","ProjectModal","backable","closeOnEscape","PeriodContainer","DetailsContainer","Chain","ChainIcon","ChainName","Amount","AmountBoxInner","AmountBox","AmountScrollable","AmountBarInner","AmountBar","Currency","AccessPeriodModal","tokenDecimals","tokenSymbol","usdRate","rawLength","setRawLength","selectedUnit","setSelectedUnit","totalInUSD","isSubmitting","setIsSubmitting","exceedsAllowance","animation","$loading","AccessingProjectModal","Box","Explainer","AllowanceModal","chainIdToNetworkMapping","$selected","Placeholder","getPurchasePreconditions","paymentDetail","getUsdRate","ChainSelectorModal","chainIds","selectedChainId","selectedChainIdProp","selectChainId","preconditions","ConfirmPurchaseModal","FailedPurchaseModal","PurchaseCompleteModal","usePurchaseStore","inProgress","subscriptions","fetchingSubscriptions","fetchSubscriptions","getProjectSubscriptions","invalidateSubscription","purchase","projectChainId","isInProgress","preselectedChainId","skipChainSelector","chainSelectorResult","accessPeriod","initialAccessRange","allowanceModal","startOver","bail","setAllowance","seconds","buy","confirmPurchaseModal","accessingProjectModal","buyPromise","gasLimit","usePurchaseCallback","useIsProjectBeingPurchased","ProjectDraft","shouldUpdateAdminFee","requiresAdminFeeUpdate","shouldUpdateMatadata","eq","setAdminFee","minimumSubscriptionSeconds","updateProject","shouldDeployDataUnion","requiresDataUnionDeployment","deployDataUnionContract","isPublicPurchasable","createProject","useIsAccessibleByCurrentWallet","hasActiveProjectSubscription","endTimestamp","useHasActiveProjectSubscription","isProjectOwnedBy","usePersistProjectCallback","navigate","BeneficiaryAddressEditor","accountAddress","AddressItem","ActionsToggle","NoData","firstLine","secondLine","compact","EmptyStateWrap","EmptyStateParagraph","horizontalPaddingMobile","horizontalPaddingDesktop","actionPadding","ScrollTableCellsWrap","stickyColumnCount","nonStickyColumnCount","ScrollTableColumn","$actionColumn","ScrollTableNonStickyColumnsWrap","ScrollTableHeaderCell","$align","$pointer","$actionCell","ScrollTableCell","$hover","OrderCaretIcon","$direction","FloatingLoadingIndicator","NoDataWrap","ScrollTable","footerComponent","hasMoreResults","onLoadMore","tableProps","ScrollTableCore","columns","noDataFirstLine","noDataSecondLine","onOrderChange","linkMapper","actualColumns","isSticky","stickyColumns","column","nonStickyColumns","hoveredRowIndex","setHoveredRowIndex","hasOrderingEnabled","stickyColumn","sortable","OrderCaret","element","valueMapper","nonStickyColumn","actionIndex","callback","isStakedLongEnough","forceUndelegateModal","selectedSponsorshipId","setSelectedSponsorshipId","requestedAmount","getOptimalStake","selectedSponsorship","willSlash","isPartialPayout","ForceUndelegateFormModal","TableWrap","WarningCell","undelegateFundsModal","delegatedTotal","isOwner","amountLabel","totalLabel","subtitlePartial","pastAction","maxUndelegationQueueDays","freeFunds","hasZeroDeployed","minimumSelfDelegationPercentage","isSelfDelegationTooLow","isGreaterThan","isTooEarlyToUndelegate","undelegateFromOperator","allOperators","useOperatorByIdQuery","getOperatorById","useDelegationsForWalletQuery","addressProp","searchQueryProp","mapOperatorOrder","getOperatorsByDelegationAndId","getOperatorsByDelegationAndMetadata","useAllOperatorsQuery","searchOperatorsByMetadata","getAllOperators","delegateFundsModal","minimumDelegationWei","minimumDelegationSeconds","selfDelegationFraction","nextSelfDelegationFraction","tooLowCurrentSelfDelegation","isLessThanOrEqualTo","tooLowNextSelfDelegation","tooLowOwnerSelfDelegation","maxNextAmount","operatorSelfStake","getSelfDelegatedAmount","delegateToOperator","ValueWithoutEarnings","TotalStakeInSponsorshipsWei","OperatorsCutFraction","useCollectEarnings","fetchUncollectedEarnings","sponsorshipIds","collectEarnings","useProcessUndelegationQueue","processOperatorUndelegationQueue","Username","Avatarless","source","CaretDownIcon","CaretUpIcon","DropdownToggle","TextMenuItem","UserInfoMenuItem","MenuDivider","Divider","WalletAddress","SignedInUserMenu","NavDropdown","Navbar","MenuGrid","NavLink","NavbarItem","LinkWrapper","UnstyledNavbarLink","NavbarLinkDesktop","NavbarLinkMobile","$bottomBorder","NavbarItemAccount","LogoLink","Avatar","MenuItemAvatarContainer","UserInfoMobile","Dropdown","timeoutRef","show","immediately","isNetworkTabActive","NetworkNavItems","DropdownItem","linkFn","Subtitle","subtitle","networkLinks","TickIcon","NetworkAccordion","Wings","networkNavElement","NetworkMobileLink","NetworkNavElement","$flipped","DesktopNav","useEns","operatorQuery","isOperatorFetching","isMobile","menuAlignment","edge","alignMenu","nodeco","HamburgerButton","idle","MobileNav","NavOverlay","NavContainer","isAnyDraftBeingPersisted","N","shadow","Layout","footer","nav","columnize","pageTitle","innerBackgroundColor","outerBackgroundColor","rootBackgroundColor","rootComponent","LayoutRoot","outerComponent","Outer","LayoutOuter","innerComponent","LayoutInner","pathnameRef","scroll","useScrollToTop","GlobalStyles","LayoutColumn","main","$bg","GenericErrorPage","ParseErrorPage","GenericErrorPageContent","SecondaryP","isPreventable","defaultPrevented","Tab","isTab","child","$flexBasis","ItemContent","Trolley","$animated","Rails","Tabs","onSelectionChange","selectionProp","spreadEvenly","fullWidthOnMobile","smallPadding","tabs","selectedId","_tag","windowWidth","setWindowWidth","onResize","outerWidth","elementSettersRef","setElement","setElementAt","setter","newElements","w","canAnimate","enableAnimation","_selected","otherArgs","preventable","ChartPeriodTabs","isChartPeriod","NetworkChartDisplay","periodTabs","sourceTabs","SetSelector","ChartPeriodWrap","$backgroundColor","$borderColor","$pad","NetworkPageSegment","bodyComponent","BodyComponent","foot","headerComponent","HeaderComponent","RootComponent","Foot","SegmentGrid","aux","TitleBarRoot","Lhs","TitleBarLabel","Rhs","QueriedSponsorshipsTable","hideStreamId","pages","flat","editSponsorshipFunding","isFetchingNextPage","maxOperatorsReached","fetchNextPage","Separator","StatGrid","$desktopColumnCount","maxColumns","StatCell","tip","StatCellRoot","StatCellLabel","StatCellBody","StatCellContent","TipWrap","NoWalletOverlay","resourceName","WalletPass","roundBorders","locked","$roundBorders","$blur","StreamOrderBy","GetStreamsDocument","GetGlobalStreamsStatsDocument","GetNeighborsDocument","NoDataContainer","SpinnerContainer","CustomCursor","setSelectedPointValues","setSelectedPointValuesRef","CustomTooltipContainer","CustomTooltip","valuePrefix","labelFormatter","valueFormatter","NetworkChart","graphData","xAxisDisplayFormatter","yAxisAxisDisplayFormatter","tooltipLabelFormatter","tooltipValueFormatter","tooltipValuePrefix","noDataText","chartData","crossHairY","setCrossHairY","crossHairX","setCrossHairX","updateCrossHairCoordinates","xValue","ResponsiveContainer","LineChart","Line","dataKey","dot","activeDot","isAnimationActive","CartesianGrid","XAxis","tickFormatter","tickMargin","tickLine","minTickGap","interval","YAxis","orientation","ReferenceLine","formatShortDate","formatLongDate","NetworkOverviewPage","NetworkStats","MyOperatorSummary","MyDelegationsSummary","MyDelegations","MySponsorships","statsQuery","operatorCountQuery","uniquenessGate","MessagesPerSecond","breakEarly","items","messagesPerSecond","useActiveOperatorCountQuery","numOfDelegators","numOfSponsorships","useOperatorStatsForWallet","chartPeriod","setChartPeriod","chartId","setChartId","endOf","buckets","toValue","cumulativeEarningsWei","chartLabel","newChartId","setStats","minApy","maxApy","numOfOperators","POSITIVE_INFINITY","useDelegationsStats","chartDataSource","setChartDataSource","dailyDelegationChartQuery","totalValueDataWei","getDelegationStats","flatMap","NotFoundPage","NotFoundPageContent","fullChainName","AddressType","dialogTitleMap","Node","Automation","dialogSubmitLabelMap","AddressTable","disableEditing","onAddAddress","onRemoveAddress","Address","PolBalance","PendingIndicator","node","addAddressModal","newAddress","$new","setAddress","isValidAddress","LowBalanceThreshold","setBalance","newBalance","lowBalance","PolBalanceRoot","PendingIndicatorRoot","useSubmitNodeAddressesCallback","onSuccess","setOperatorNodeAddresses","useSubmitControllerAddressesCallback","addNew","CONTROLLER_ROLE","addOperatorControllerAddress","removeOperatorControllerAddress","BehindBlockErrorDisplay","latest","initial","initialBlockNumber","completed","togo","Blocks","useOperatorReachabilityStore","updateProbe","probes","reachable","probe","IPv4RegExp","IPv6RegExp","LiveNodesTable","hit","truncateNodeId","Connectivity","useIsNodeIdReachable","NetworkActionBarBackLink","NetworkActionBarBackButtonIcon","NetworkActionBarTitle","NetworkActionBarStatsTitle","OperatorActionBar","delegateFunds","useDelegateFunds","useIsUndelegatingFundsToOperator","undelegateFunds","useUndelegateFunds","canUndelegateQuery","canUndelegate","delegateLabel","undelegateLabel","OperatorActionBarRoot","Wrap0","Wrap1","getFinalKey","useBlockNumberDependenciesStore","dependencies","setDependency","finalKey","OperatorChecklist","funded","nodesDeclared","nodesFunded","nodesReachability","nodesRunning","stale","awaitedBlockNumber","useIsWaitingForBlockNumber","setNodesFunded","isLoadingLiveNodes","reachability","nodeIds","numOfReachableNodes","useOperatorReachability","nodeAddress","useOperatorChecklist","nodesReachable","ChecklistItem","stateProp","ChecklistItemRoot","IconButton","CopyIcon","ExternalLinkIcon","$width","$height","CopyButton","OperatorDetails","OperatorDetailsRoot","OperatorMetadataWrap","Addresses","AddressDisplay","OperatorVersionBadge","CtaWrap","InfoWrap","SideImageMq","$noDesc","AddressDisplayRoot","AddressDisplayLabel","AddressDisplayValue","OperatorSummary","liveNodeCount","liveNodeCountIsLoading","OperatorSummaryRoot","SponsorshipTable","isController","canCollect","useCanCollectEarningsCallback","allSponsorshipIds","canCollectAllEarnings","minimumStakeReachTime","isAfter","fromNow","UncollectedEarnings","setInterval","clearInterval","useUncollectedEarnings","getUndelegationExpirationDate","maxUndelegationQueueSeconds","UndelegationQueue","forceUndelegate","processUndelegationQueue","undelegationQueueSize","lookup","calculateUndelegationQueueSize","isProcessButtonDisabled","ProcessQueueButton","Badge","expirationDate","isBefore","defaultChartData","defaultPersistedNodes","defaultPersistedControllers","OperatorPage","initialBehindBlockError","behindBlockError","slashingFraction","selectedDataSource","setSelectedDataSource","setSelectedPeriod","chartQuery","getOperatorStats","myDelegationAmount","myDelegationPercentage","persistedNodes","setNodes","saveNodeAddresses","isSavingNodeAddresses","persistedControllers","setControllers","saveControllers","isSavingControllerAddresses","setBlockDependency","saveNodeAddressesCb","newAddresses","n","saveControllerAddressesCb","isNew","OperatorVersionNotice","ChartGrid","DelegationCell","SlashingHistoryTableContainer","NodeAddressHeader","NoticeBar","NoticeWrap","notice","FormWrapper","SearchInput","SearchIcon","ClearButton","debounceTime","focused","setFocused","inputValue","setInputValue","debouncedChangeHandler","searchValue","SearchBarWrap","NetworkActionBarWrap","NetworkActionBar","searchEnabled","onSearch","leftSideContent","rightSideContent","useTableOrder","order","setOrder","direction","currentOrder","currentOrderBy","newOrderBy","currentOrderDirection","newDirection","getNextSortingParameters","useUrlParams","searchParams","needsUpdate","currentParams","currentValue","targetValue","prevParams","newParams","TabOption","DEFAULT_ORDER_BY","DEFAULT_TAB","AllOperators","OperatorsPage","isWalletLoading","tab","selectedTab","setSearchQuery","allOperatorsQuery","myDelegationsQuery","currentQuery","OperatorsTable","DelegationsTable","chainFullName","FiltersBar","FiltersWrap","DropdownFilters","SelectFieldWrap","MobileFilterWrap","MobileFilterText","CreateProjectButton","ActionBarContainer","TimeUnitOptions","isTokenInfoCached","SalePointTokenSelector","onSalePointChange","dataTokenAddress","useDataToken","setUseDataToken","isLoadingTokenInfo","rawPrice","setRawPrice","customTokenAddress","setCustomTokenAddress","isCustomTokenInfoCached","canFetchTokenInfo","commitNewPrice","RadioButton","DataTokenIcon","CustomTokenAddressInputContainer","autoComplete","SetTokenContainer","PriceContainer","PriceInputWrap","TokenSymbol","SelectContainer","SalePointOption","multiSelect","DropdownWrap","RadioCircle","ToggleText","PlusSymbol","DropdownOuter","DropdownInner","$open","NamedMetadata","isNamedMetadata","DataUnionOption","setDataUnionId","deployNew","setDeployNew","setDataUnions","isLoadingDataUnions","canUseExisting","updateSalePoint","updateSalePointRef","foundDataUnions","getMetadata","DeployList","SelectWrap","newDataUnionId","projectTypeFilterModal","localValue","setLocalValue","productTypeOptions","Any","Owned","ActionBar","onCreateProject","onFilterChange","scope","walletAccount","MobileFilterTrigger","ratio","_width","_block","defaultStreamStats","latency","peerCount","getStreamStats","neighbors","streamPartitionId","streamPart","nodeId1","nodeId2","streamPartId","finalStreamPartitionId","rtt","pair","nodeId0","getNeighbors","validRTTs","calculateLatencyForStream","SingleBadge","BadgeContainer","right","bottom","DataUnionBadge","memberCount","linkHref","BadgeLink","StatsBadge","StreamStatsBadge","all","curr","useMultipleStreamStatsQuery","formattedMsgRate","Secondary","skeletonize","Img","TileThumbnail","loader","Tile","suppressHover","EditButton","TileImageContainer","autoSize","autoSizeProp","MarketplaceProductTile","showDataUnionBadge","showEditButton","DottedLoadingIndicator","DottedLoadingIndicatorRoot","Left","Right","NoProductsView","noOwnProjects","MarketplaceProjectRow","$fetching","ProjectsContainer","Projects","loadProducts","hasMoreSearchResults","currentUserAddress","isEditable","ModalContext","closeModal","modals","openModal","useModalContext","setModals","modalId","prevModals","nextModals","ModalContextProvider","Provider","useModal","api","PageTitleContainer","PageTitle","ProductChoices","Product","ProductTitle","ProductImage","RadioWrap","NoStreamsWarningBox","ButtonContainer","defaultContext","isModalOpen","registerModal","unregisterModal","ModalPortalContext","ModalPortalProvider","setState","render","NoModalRootError","__proto__","ModalPortal","componentDidMount","modalRoot","context","appendChild","componentWillUnmount","removeChild","contextType","getApplicationElement","Fullpage","noScroll","onClose","backdropClassName","fullpage","otherProps","modalClassName","StyledProjectTypeChooser","selectedProductType","setSelectedProductType","gotAnyStreams","useGotAnyStreams","CreateProjectModal","filterReducer","partial","proposalState","ProjectListingPage","DefaultFilter","setFilter","createProductModal","text","projectSearch","getProjectsByText","StreamsTabOption","getStreamsFromIndexer","streamIdsOption","nextPageParam","pageId","PeerCount","BytesPerSecond","bytesPerSecond","getStreamsFromGraph","orderDirectionParam","id_in","id_lt","getStatsFromPermissions","useStreamsQuery","Your","isIndexerColumn","QueriedStreamsTable","streamStats","setStreamStats","indexerQueryErrored","isError","onOrderChangeRef","StreamStatsLoader","onStats","mps","bps","streamIdsRef","onStatsRef","TermsOfUse","permitted","flag","notPermitted","permittedStr","getTermStrings","notPermittedStr","termNames","ids","mobileSpacing","tabletSpacing","desktopSpacing","ProjectHeroContainer","overflowVisible","ProjectHeroImageStyles","ProjectHeroImage","noBorderRadius","ProjectHeroTitleStyles","ProjectHeroTitle","h1","ProjectHeroMetadataContainer","ProjectHero2","descriptionProp","MarkdownWrap","DetailsPageHeader","backButtonLink","rightComponent","DetailsPageHeaderBackground","DetailsPageHeaderContainer","DetailsPageHeaderBar","LeftSideContainer","BackLink","RightSideContainer","pad","Segment","accountKey","permissionKey","useStreamAbilitiesStore","toggleFetching","fetchPermission","streamrClient","pkey","getStream","hasPermission","public","allowPublic","group","invalidate","useStreamAbility","useCurrentStreamAbility","stripIndent","minIndent","Snippet","createClient","lightNodeHeader","lightNodeSubscribe","lightNodePublish","websocketHeader","websocketPublish","websocketSubscribe","httpSubscribe","httpPublish","mqttHeader","mqttSubscribe","mqttPublish","StreamConnect","setSelectedStream","setAction","nodeType","setNodeType","currentProtocol","setCurrentProtocol","hasPublicPubPermission","hasPublicSubPermission","lightNodeSnippet","websocketSnippet","httpSnippet","mqttSnippet","currentBrokerSnippet","Grid","StreamConnectHeader","StreamConnectText","SnippetSelectorContainer","StreamConnectLightNodeSnippetContainer","CodeSnippet","language","StreamConnectSnippetCopyContainer","BrokerNodeSnippetContainer","onSelect","RightColumn","StreamConnectLink","MarketplaceTheme","DefaultTheme","Errors","_theme","overlap","_overlap","Fragment","inspectorWidth","Pusher","ModalContainer","HeaderTitle","StreamsList","StreamName","SelectorWrapper","ModalStreamSelector","selectedStream","StreamSelectorModal","closeOnEsc","Selector","prevOption","nextOption","SettingsButton","LG","Toolbar","onPartitionChange","onSettingsButtonClick","partition","inspectorFocused","LeftFiller","RightFiller","Row","Viewport","Side","ToolbarContainer","tz","guess","TooltipTheme","BottomTheme","StreamSelectorContainer","StreamSelector","DesktopStreamSelector","MobileStreamSelector","DesktopToolbar","Feed","errorComponent","streamData","streamLoaded","onStreamChange","datapoint","setDatapoint","selectedMsgId","selectedTimestamp","rowRef","copyText","streamOptions","onCopyClick","prevRow","msgId","Parent","placement","k","inlineCharacterLimit","formatValue","Cell","InspectorButton","StreamPreview","streamsList","activePartition","preselectedStreamId","previewDisabled","setInspectorFocused","selectedStreamId","setSelectedStreamId","setPartition","setStream","setPartitions","activeFn","activeFnProp","onErrorProp","tail","cacheRef","setData","onErrorRef","dataPoint","getTimestamp","areMessagesSame","toMessageRef","compareTo","unshift","firstRunRef","useStreamData","partitionCount","loadStreamData","partitionOptions","ProjectPermission","useProjectAbilitiesStore","fetchPermissions","getPermission","getProjectPermissions","pkay","useCurrentProjectAbility","Buy","Delete","Edit","Grant","useProjectAbility","FormattedPaymentRate","AccessManifest","firstSalePoint","otherSalePoints","hasAccess","isBeingPurchased","GetAccessContainer","GetAccess","projectName","ProjectLinkTabs","termsUrlError","Checkboxes","TickButton","Links","DataUnionFee","emptyProject","coldProject","DataUnionPayment","RichMarkdownEditor","defaultTheme","toolbarBackground","toolbarHoverBackground","toolbarItem","defaultDisabledExtensions","RichTextEditor","disableExtensions","ImageFilePicker","onDrop","getRootProps","getInputProps","isDragActive","maxSize","maxFiles","onDropAccepted","onDropRejected","ImageFilePickerRoot","Wide","CoverImage","Dropzone","Mobile","Desktop","Preview","EditorHero","newImageUrl","setNewImageUrl","imageAbortControllerRef","HeroContainer","NameInput","croppedFile","reader","FileReader","readAsDataURL","onerror","getBase64ForFile","DetailsWrap","newDescription","FloatingToolbar","isSSR","IntersectionObserver","useInViewport","setTarget","targetRef","inViewport","setInViewport","observerRef","isIntersecting","observer","observe","unobserve","FlexNavbar","FlexNavbarItem","EditorNav","attach","isSaveButtonVisible","StyledContainer","preserveSpace","TableGrid","Table","TableHeader","TableRows","rowCount","TableRow","GridCell","onlyDesktop","onlyTablet","notOnTablet","flex","NoStreams","StreamDetails","StreamId","StreamSelectTable","loadMore","selectedStreams","setSelectedStreams","allSelected","setAllSelected","emitSelectedStreamsChange","selectedStreamsArray","handleSelectChange","newSelectedStreams","handleSelectAllChange","shouldAllBeChecked","EmptyStreams","EditorStreams","projectStreams","setSearchValue","foundStreams","setFoundStreams","setPage","hasMore","phrase","onlyPublic","getStreamsOwnedBy","searchValueRef","startAt","is","EmptySalePoints","EmptyErrors","ProjectEditorPage","existingSalePoints","beneficiaryErrorKey","beneficiaryInvalid","newSalePoint","errors0","deleteProject","$desktopMaxWidth","ProjectDraftPage","NewProjectPage","preselectSalePoint","ExistingProjectPageWrap","projectQuery","useProjectByIdQuery","ProjectOverviewPage","StreamTable","ProjectConnectPage","ProjectLiveDataPage","ProjectTabbedPage","ProjectTitle","ProjectIndexRedirect","streamsQuery","AddressLabel","AddressContent","Banner","AboutSponsorship","ActionBarButtonBody","$background","ActionBarButtonRoot","ActionBarButton","ActionBarButtonInnerBody","ActionBarButtonCaret","$invert","ActionBarWalletDisplay","AbstractActionBar","fallbackBackButtonUrl","buttons","ctas","summaryTitle","summary","ActionsOuterWrap","Ctas","SponsorshipActionBar","canEditStake","isPaying","fundedUntil","detailedFundedUntil","useIsFundingSponsorship","JoinAsOperatorButton","walletLocked","SponsorshipSummary","minimumStakingDays","SponsorshipSummaryRoot","EmptyArray","SingleSponsorshipPage","sponsorshipQuery","useSponsorshipByIdQuery","tooltipPrefix","formatTooltipValue","formatYAxisValue","fundingEventsQuery","operational","rawFundingEvents","fundingEvents","MinOperatorCountNotReached","OperatorSpinner","OperatorListWrap","OperatorList","OperatorListHeader","OperatorListItem","defaultFilters","SponsorshipFilterButton","ToggleOption","ToggleLabel","DropdownMenu","ToggleContainer","AllSponsorships","SponsorshipsPage","initialFilters","has","setFilters","allSponsorshipsQuery","mySponsorshipsQuery","useIsCreatingSponsorshipForWallet","Stat","StatRoot","StatName","StatValue","Dimm","ButtonGrid","StreamStats","useStreamStatsQuery","StreamStatsRoot","StreamSummary","streamSummaryQuery","about","rank","schema","tags","usage","useStreamSummaryQuery","info","StreamSummaryRoot","OuterWings","StreamSummarySection","ai","AboutWrap","StreamImage","AboutWrapInner","Tags","InnerWings","scrollMode","Schema","SchemaPair","SchemaKey","IFrameWrap","StreamSummarySectionRoot","StreamSummarySectionInner","StreamSummarySectionHeader","AiGenerated","StreamSummarySectionBody","AiGeneratedRoot","x1","y1","x2","y2","gradientUnits","stopColor","PictureOnSideMedia","MapToSideMedia","$scrollMode","h3","TitleWrapper","TitleText","operationName","publicKey","uniqueKey","ev","permissionBits","ethereumAddressRegex","hexStringRegex","zeroAddressRegex","NewStreamPermissionsModal","onBeforeSubmit","setPermissionBits","setPublicKey","normalizedPublicKey","bits","PermissionItem","Labels","YouLabel","DropdownCaret","PermissionList","permissionList","StreamType","StreamTypeSelector","streamType","Private","PublicSubscribe","PublicPubSub","RadioContainer","AccessControlSection","disabledProp","TextContainer","CreateButton","CreateProjectHint","setProjects","loadProjects","DeleteSection","deleteStream","StorageNodeItem","HistorySection","noStorageEnabled","StorageNodeList","TextFieldWrap","Surround","head","customStyles","provided","backfaceVisibility","pointerEvents","letterSpacing","dropdownIndicator","marginRight","indicatorSeparator","margin","textAlign","paddingLeft","alignItems","valueContainer","Control","controlClassName","EllipsisSpan","EllipsisSpanWithTickMargin","OptionIconWrapper","IconOption","IconWrapper","SingleValue","clearable","isMulti","ADD_ENS_DOMAIN_VALUE","ENS_DOMAINS_URL","ReadonlyStreamId","Pathname","PathnameField","EditableStreamId","ownerGroups","groups","setGroups","ensDomainGiven","ensOptions","addrOptions","useStreamOwnerOptionGroups","validationError","owners","isOwnersLoading","Domain","LabelInner","DisabledDomain","InfoSection","Advanced","PartitionsSection","Partitions","PartitionRange","Min","Max","ProjectGrid","RelatedProjects","SponsorshipsTable","StreamEditPage","saveButtonRef","useCanSubmit","SaveButton","StreamLiveDataPage","canSubscribe","StreamConnectPage","StreamIndexRedirect","StreamDraftPage","StreamTabbedPage","stickySubmit","getStorageNodes","getPermissions","useStreamEntityQuery","StreamEntityForm","invalidateAbilities","updateOperation","permissionsOperation","storageOperation","metadataChanged","shouldUpdateMetadata","hotBits","coldBits","shouldUpdatePermissions","storageNodeChanges","hotEnabled","checkBalance","transientStreamId","otherMetadata","isInteger","finalMetadata","createStream","setStreamMetadata","currentStreamId","currentMetadata","newMetadata","onCreate","setPermissions","assignments","onPermissionsChange","addStreamToStorageNode","removeStreamFromStorageNode","usePersistStreamDraft","ready","TitleContainer","Asterisk","StreamsPage","setSearch","tabParam","globalStats","streamCount","useGlobalStreamStatsQuery","globalStreamCount","globalMps","globalBps","throughputMode","setThroughputMode","CreateStreamButtonWrap","ThroughputDisplay","formatBytes","Globals","recentKey","onKeyUp","setUser","setExtra","useSetSentryScopeEffect","StreamrClientProvider","setConfig","newConfig","registerLanguages","QueryClientProvider","router","ToastContainer","Providers","NavProvider","errorElement","container","DECIMAL_PLACES","EXPONENTIAL_AT","RANGE","dsn","release","environment","debug","setExtras","g","navigator","streamrClientVersion","streamr","userAgent","branch","isMaster","versionNumber","displayHash","displayBranch","toBN","toBigInt","BigInt","toFloat","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","amdO","O","chunkIds","priority","notFulfilled","fulfilled","j","__esModule","getPrototypeOf","mode","then","ns","create","def","getOwnPropertyNames","definition","defineProperty","enumerable","globalThis","Function","prop","toStringTag","nmd","paths","baseURI","self","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","nc","__webpack_exports__"],"sourceRoot":""}