@undefineds.co/xpod 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/components-ignore.json +5 -1
- package/config/notifications.json +68 -0
- package/config/xpod.base.json +9 -11
- package/dist/ai/service/AiCredentialSecret.d.ts +30 -0
- package/dist/ai/service/AiCredentialSecret.js +120 -0
- package/dist/ai/service/CredentialReaderImpl.d.ts +18 -0
- package/dist/ai/service/CredentialReaderImpl.js +81 -5
- package/dist/ai/service/CredentialReaderImpl.jsonld +42 -2
- package/dist/ai/service/EmbeddingModelPolicy.d.ts +79 -0
- package/dist/ai/service/EmbeddingModelPolicy.js +134 -0
- package/dist/ai/service/EmbeddingProviderError.js +6 -0
- package/dist/ai/service/EmbeddingServiceImpl.d.ts +13 -1
- package/dist/ai/service/EmbeddingServiceImpl.js +18 -5
- package/dist/ai/service/EmbeddingServiceImpl.jsonld +35 -0
- package/dist/ai/service/index.d.ts +2 -0
- package/dist/ai/service/index.js +2 -0
- package/dist/api/ai-gateway/connect/index.d.ts +20 -2
- package/dist/api/ai-gateway/connect/index.js +162 -16
- package/dist/api/ai-gateway/credentials/AiCredentialSecretDecoder.d.ts +12 -0
- package/dist/api/ai-gateway/credentials/AiCredentialSecretDecoder.js +30 -0
- package/dist/api/ai-gateway/errors.d.ts +1 -1
- package/dist/api/ai-gateway/models/GatewayEmbeddingModelCatalog.d.ts +11 -0
- package/dist/api/ai-gateway/models/GatewayEmbeddingModelCatalog.js +31 -0
- package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +7 -3
- package/dist/api/ai-gateway/models/ProviderCustomModelsService.d.ts +18 -0
- package/dist/api/ai-gateway/models/ProviderCustomModelsService.js +23 -0
- package/dist/api/ai-gateway/models/ProviderModelDiscoveryAdapters.d.ts +3 -1
- package/dist/api/ai-gateway/models/ProviderModelDiscoveryAdapters.js +2 -45
- package/dist/api/ai-gateway/models/ProviderModelSelectionService.d.ts +10 -0
- package/dist/api/ai-gateway/models/ProviderModelSelectionService.js +57 -20
- package/dist/api/ai-gateway/models/ProviderModelType.d.ts +28 -0
- package/dist/api/ai-gateway/models/ProviderModelType.js +34 -0
- package/dist/api/ai-gateway/models/ProviderModelsAdapter.d.ts +10 -0
- package/dist/api/ai-gateway/models/ProviderModelsAdapter.js +3 -4
- package/dist/api/ai-gateway/models/index.d.ts +1 -0
- package/dist/api/ai-gateway/models/index.js +3 -1
- package/dist/api/ai-gateway/providers/CustomRuntimeAdapter.d.ts +7 -0
- package/dist/api/ai-gateway/providers/CustomRuntimeAdapter.js +9 -2
- package/dist/api/ai-gateway/providers/ModelsDevCatalog.d.ts +7 -1
- package/dist/api/ai-gateway/providers/ModelsDevCatalog.js +4 -10
- package/dist/api/ai-gateway/providers/ProviderRegistry.d.ts +107 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.js +244 -21
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.d.ts +5 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.js +5 -1
- package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.d.ts +12 -4
- package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.js +11 -11
- package/dist/api/ai-gateway/routing/ModelRouter.d.ts +14 -0
- package/dist/api/ai-gateway/routing/ModelRouter.js +43 -4
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.d.ts +9 -1
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.js +3 -27
- package/dist/api/auth/ClientCredentialsAuthenticator.d.ts +0 -1
- package/dist/api/auth/ClientCredentialsAuthenticator.js +0 -3
- package/dist/api/auth/index.d.ts +1 -0
- package/dist/api/auth/index.js +1 -1
- package/dist/api/chatkit/pod-store.d.ts +31 -0
- package/dist/api/chatkit/pod-store.js +132 -8
- package/dist/api/container/common.js +24 -4
- package/dist/api/container/routes.js +17 -2
- package/dist/api/container/types.d.ts +3 -1
- package/dist/api/handlers/AdminHandler.d.ts +13 -0
- package/dist/api/handlers/AdminHandler.js +47 -18
- package/dist/api/handlers/AiConfigHandler.d.ts +6 -0
- package/dist/api/handlers/AiConfigHandler.js +28 -0
- package/dist/api/handlers/AiGatewayManagementHandler.js +36 -0
- package/dist/api/runs/RdfRunContextRetriever.d.ts +14 -0
- package/dist/api/runs/RdfRunContextRetriever.js +41 -5
- package/dist/api/runtime.js +2 -1
- package/dist/cli/commands/secret.d.ts +1 -0
- package/dist/cli/commands/secret.js +25 -7
- package/dist/components/components.jsonld +3 -1
- package/dist/components/context.jsonld +53 -1
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +59 -2
- package/dist/http/SubgraphSparqlHttpHandler.js +145 -13
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +37 -0
- package/dist/identity/drizzle/AccountRoleRepository.d.ts +30 -2
- package/dist/identity/drizzle/AccountRoleRepository.js +163 -15
- package/dist/identity/drizzle/EdgeNodeRepository.d.ts +0 -12
- package/dist/identity/drizzle/EdgeNodeRepository.js +5 -13
- package/dist/identity/drizzle/PodLookupRepository.d.ts +58 -4
- package/dist/identity/drizzle/PodLookupRepository.js +248 -105
- package/dist/identity/drizzle/db.d.ts +19 -0
- package/dist/identity/drizzle/db.js +39 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -3
- package/dist/logging/log-file.d.ts +17 -0
- package/dist/logging/log-file.js +69 -0
- package/dist/main.js +2 -1
- package/dist/notifications/NotificationChannelSweeper.d.ts +50 -0
- package/dist/notifications/NotificationChannelSweeper.js +131 -0
- package/dist/notifications/NotificationChannelSweeper.jsonld +136 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.d.ts +25 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.js +56 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.jsonld +77 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/runtime/Proxy.d.ts +37 -0
- package/dist/runtime/Proxy.js +88 -16
- package/dist/runtime/bootstrap.js +2 -1
- package/dist/runtime/upgrade/BunNativeUpgradeRelay.d.ts +116 -0
- package/dist/runtime/upgrade/BunNativeUpgradeRelay.js +423 -0
- package/dist/runtime/upgrade/UpgradeHandshake.d.ts +63 -0
- package/dist/runtime/upgrade/UpgradeHandshake.js +199 -0
- package/dist/runtime/upgrade/WebSocketFrames.d.ts +67 -0
- package/dist/runtime/upgrade/WebSocketFrames.js +224 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +8 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +11 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.js +27 -10
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +7 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +13 -11
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsList.js +10 -6
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.js +29 -3
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMainHeader.js +18 -3
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +16 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +92 -20
- package/node_modules/@undefineds.co/ai-connections/dist/AiCopyButton.d.ts +35 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiCopyButton.js +45 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.js +71 -11
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.js +9 -7
- package/node_modules/@undefineds.co/ai-connections/dist/AiEndpointList.d.ts +23 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiEndpointList.js +24 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +13 -4
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +35 -38
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.js +51 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiInfoTooltip.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiInfoTooltip.js +16 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiModelCatalog.d.ts +175 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiModelCatalog.js +133 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.js +2 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.js +13 -64
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderHeader.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderHeader.js +12 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiRowAction.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiRowAction.js +12 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.js +2 -1
- package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.d.ts +7 -0
- package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.js +6 -0
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +36 -5
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +52 -9
- package/node_modules/@undefineds.co/ai-connections/dist/client/normalize.js +30 -3
- package/node_modules/@undefineds.co/ai-connections/dist/client/types.d.ts +21 -1
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.d.ts +1 -3
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.js +3 -7
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/index.cjs +9 -7
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +46 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +231 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +119 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collections.js +173 -0
- package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +71 -5
- package/node_modules/@undefineds.co/ai-connections/dist/controller.js +285 -16
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.js +8 -3
- package/node_modules/@undefineds.co/ai-connections/dist/credential-storage.d.ts +59 -0
- package/node_modules/@undefineds.co/ai-connections/dist/credential-storage.js +131 -0
- package/node_modules/@undefineds.co/ai-connections/dist/endpoint-urls.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/endpoint-urls.js +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.js +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/manifest.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.js +17 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.cjs +68 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.d.ts +75 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.js +119 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.js +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +2 -27
- package/node_modules/@undefineds.co/ai-connections/package.json +1 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.d.ts +1 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.js +2 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +150 -0
- package/node_modules/@undefineds.co/extension-sdk/package.json +2 -1
- package/node_modules/@undefineds.co/models/README.md +1 -1
- package/node_modules/@undefineds.co/models/dist/ai-config/index.d.ts +3 -3
- package/node_modules/@undefineds.co/models/dist/ai-gateway.schema.d.ts +5 -0
- package/node_modules/@undefineds.co/models/dist/ai-gateway.schema.js +9 -0
- package/node_modules/@undefineds.co/models/dist/ai-runtime.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/approval.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/audit.presentation.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/capture.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/chat-project.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/chat.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/control-request.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/conversation-share.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/credential.schema.d.ts +12 -0
- package/node_modules/@undefineds.co/models/dist/credential.schema.js +15 -1
- package/node_modules/@undefineds.co/models/dist/discovery/index.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/discovery/providers.json +248 -7
- package/node_modules/@undefineds.co/models/dist/discovery/types.d.ts +31 -0
- package/node_modules/@undefineds.co/models/dist/extension/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/favorite/index.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/fixtures/contracts-chat-contact.d.ts +5 -5
- package/node_modules/@undefineds.co/models/dist/import/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/index.d.ts +73 -73
- package/node_modules/@undefineds.co/models/dist/index.js +1 -1
- package/node_modules/@undefineds.co/models/dist/input-request.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/knowledge/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/message.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/namespaces.js +5 -0
- package/node_modules/@undefineds.co/models/dist/pod-storage-descriptor.d.ts +4815 -26
- package/node_modules/@undefineds.co/models/dist/pod-storage-descriptor.js +482 -132
- package/node_modules/@undefineds.co/models/dist/schema.d.ts +4 -0
- package/node_modules/@undefineds.co/models/dist/session/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/settings/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/sidecar/persistence-mapping.d.ts +5 -5
- package/node_modules/@undefineds.co/models/dist/thread.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/types/message-block.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/vocab/_namespaces.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/vocab/index.d.ts +10 -10
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.d.ts +1 -0
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.js +1 -0
- package/node_modules/@undefineds.co/models/package.json +4 -2
- package/node_modules/@undefineds.co/pod-collections/README.md +71 -0
- package/node_modules/@undefineds.co/pod-collections/dist/diff.d.ts +85 -0
- package/node_modules/@undefineds.co/pod-collections/dist/diff.js +166 -0
- package/node_modules/@undefineds.co/pod-collections/dist/feed.d.ts +17 -0
- package/node_modules/@undefineds.co/pod-collections/dist/feed.js +27 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.cjs +1042 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.d.ts +37 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.js +89 -0
- package/node_modules/@undefineds.co/pod-collections/dist/layout.d.ts +75 -0
- package/node_modules/@undefineds.co/pod-collections/dist/layout.js +173 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mapping.d.ts +78 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mapping.js +287 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mutations.d.ts +83 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mutations.js +273 -0
- package/node_modules/@undefineds.co/pod-collections/dist/react.d.ts +21 -0
- package/node_modules/@undefineds.co/pod-collections/dist/react.js +22 -0
- package/node_modules/@undefineds.co/pod-collections/dist/read.d.ts +65 -0
- package/node_modules/@undefineds.co/pod-collections/dist/read.js +31 -0
- package/node_modules/@undefineds.co/pod-collections/dist/sync.d.ts +66 -0
- package/node_modules/@undefineds.co/pod-collections/dist/sync.js +260 -0
- package/node_modules/@undefineds.co/pod-collections/dist/types.d.ts +155 -0
- package/node_modules/@undefineds.co/pod-collections/dist/types.js +9 -0
- package/node_modules/@undefineds.co/pod-collections/package.json +42 -0
- package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +0 -1
- package/node_modules/@undefineds.co/shared-ui/dist/index.js +0 -1
- package/package.json +15 -7
- package/static/app/assets/main.css +1 -1
- package/static/app/assets/main.js +12 -13
- package/static/auth-callback/assets/AiConfigContext-DnQs1ZpW.js +1 -0
- package/static/auth-callback/assets/AiConfigPage-DOtvlxH0.js +1 -0
- package/static/auth-callback/assets/DocumentProcessingPanel-BS2voQgL.js +1 -0
- package/static/auth-callback/assets/IndexLifecyclePanel-Cvt0cJtN.js +1 -0
- package/static/auth-callback/assets/{IndexSubjectPanel-C4YG0whI.js → IndexSubjectPanel-Dhf01GqF.js} +1 -1
- package/static/auth-callback/assets/ModelAssignmentsPanel-BJutWaAF.js +1 -0
- package/static/auth-callback/assets/ModelsPage-BRS0sje3.js +11 -0
- package/static/auth-callback/assets/{NetworkPage-Cbdn_P1e.js → NetworkPage-B3qBfANA.js} +2 -2
- package/static/auth-callback/assets/{PaneListHeader-jy70Q00L.js → PaneListHeader-QQeJGTp4.js} +1 -1
- package/static/auth-callback/assets/SearchIndexingPanel-MyNUSEwT.js +1 -0
- package/static/auth-callback/assets/{StatusSubjectPanel-hfjoB5aS.js → StatusSubjectPanel-DQkEVsFs.js} +1 -1
- package/static/{settings/assets/StatusWorkspace-CKD_Rzdr.js → auth-callback/assets/StatusWorkspace-Dkv63Uwk.js} +1 -1
- package/static/auth-callback/assets/SystemSettingsPage-TIsUfX5d.js +1 -0
- package/static/auth-callback/assets/SystemSettingsSubjectPanel-BJWEt2-7.js +33 -0
- package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +3 -0
- package/static/auth-callback/assets/{activity-BcsZZxxw.js → activity-5hNeNKnL.js} +1 -1
- package/static/auth-callback/assets/admin-C6qCRFiY.js +1 -0
- package/static/auth-callback/assets/ai-connections-CryuHGKW.js +1 -0
- package/static/auth-callback/assets/{auth-callback-atKg_oig.js → auth-callback-CAFZ3R0B.js} +80 -84
- package/static/auth-callback/assets/auth-callback-rk080mvG.css +1 -0
- package/static/auth-callback/assets/{badge-BWbRHThQ.js → badge-CAIPI0CB.js} +1 -1
- package/static/auth-callback/assets/collection-runtime-D9s7h9YA.js +1 -0
- package/static/auth-callback/assets/dialog-BjA109aX.js +1 -0
- package/static/auth-callback/assets/{download-BmvG1Vya.js → download-B3Up5W2G.js} +1 -1
- package/static/auth-callback/assets/{external-link-DZ34d3g3.js → external-link-BTXgSPzB.js} +1 -1
- package/static/auth-callback/assets/index-BppXlxcp.js +41 -0
- package/static/auth-callback/assets/index-CirW4CJf.js +1 -0
- package/static/auth-callback/assets/index-DlLYWOhw.js +4 -0
- package/static/auth-callback/assets/{index-browser-B9Z7GU-T.js → index-browser-DtU38ni3.js} +1 -1
- package/static/auth-callback/assets/{key-round-tjP76Se-.js → key-round-CQCOrZ7x.js} +1 -1
- package/static/auth-callback/assets/layout-DB3pMyTl.js +1 -0
- package/static/auth-callback/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/auth-callback/assets/{rotate-ccw-C_L5ZLx1.js → rotate-ccw-C1zM2KtS.js} +1 -1
- package/static/auth-callback/assets/settings-projection-CUkyprDQ.js +1 -0
- package/static/auth-callback/assets/{skeleton-C7tGDQIs.js → skeleton-Cqp7_M9-.js} +1 -1
- package/static/auth-callback/assets/{waypoints-VMNQlWdU.js → waypoints-Bj6gAUSQ.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-SAp6BtYK.js → workspace-layout-DK8mDzrY.js} +1 -1
- package/static/auth-callback/auth-callback.html +2 -2
- package/static/dashboard/assets/AiConfigContext-BsE7MqX8.js +1 -0
- package/static/dashboard/assets/AiConfigPage-DvM-lRXa.js +1 -0
- package/static/dashboard/assets/DocumentProcessingPanel-BPfdlfuf.js +1 -0
- package/static/dashboard/assets/IndexLifecyclePanel--m0AGxvh.js +1 -0
- package/static/dashboard/assets/{IndexSubjectPanel-DQFPP6-p.js → IndexSubjectPanel-Bb7m1k3d.js} +1 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-BLi_zbMa.js +1 -0
- package/static/dashboard/assets/ModelsPage-CxdpgnfR.js +11 -0
- package/static/dashboard/assets/{NetworkPage-CHQ3YxIB.js → NetworkPage-BAIPw-D_.js} +2 -2
- package/static/dashboard/assets/{PaneListHeader-DsXemAdR.js → PaneListHeader-BBCMei0r.js} +1 -1
- package/static/dashboard/assets/SearchIndexingPanel-Ck4Y-xjR.js +1 -0
- package/static/dashboard/assets/{StatusSubjectPanel-D3PGEYT4.js → StatusSubjectPanel-D1KWfAXE.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-BcpePYUW.js → StatusWorkspace-JbA5gzXx.js} +1 -1
- package/static/dashboard/assets/SystemSettingsPage-BbwQWsSR.js +1 -0
- package/static/dashboard/assets/SystemSettingsSubjectPanel-N117nMt5.js +33 -0
- package/static/dashboard/assets/XpodAiConnectionsPodStore-CdDOb4SV.js +18 -0
- package/static/dashboard/assets/{activity-j5zrznu-.js → activity-DX1I96o_.js} +1 -1
- package/static/dashboard/assets/admin-C6qCRFiY.js +1 -0
- package/static/dashboard/assets/ai-connections-DwCRqOQa.js +1 -0
- package/static/dashboard/assets/{badge-CzeBdG7h.js → badge-k2vhtDqH.js} +1 -1
- package/static/dashboard/assets/collection-runtime-BFQ8teQJ.js +1 -0
- package/static/dashboard/assets/{dashboard-D-xANHk1.js → dashboard-DWZ-fmCT.js} +105 -109
- package/static/dashboard/assets/dashboard-rk080mvG.css +1 -0
- package/static/dashboard/assets/dialog-1CCw-iHT.js +1 -0
- package/static/dashboard/assets/{download-IcNdEZWi.js → download-C6-SNY1q.js} +1 -1
- package/static/dashboard/assets/{external-link-DxBxK8Vu.js → external-link-BgPcZ_j2.js} +1 -1
- package/static/dashboard/assets/index-6LcIUIYO.js +1 -0
- package/static/dashboard/assets/index-D7A8U6Pt.js +41 -0
- package/static/dashboard/assets/index-UD6QOE7H.js +4 -0
- package/static/dashboard/assets/{key-round-D1K7warM.js → key-round-BOd7Jo0Q.js} +1 -1
- package/static/dashboard/assets/layout-DB3pMyTl.js +1 -0
- package/static/dashboard/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/dashboard/assets/{rotate-ccw-CcN1N6p9.js → rotate-ccw-CCgJqsvx.js} +1 -1
- package/static/dashboard/assets/settings-projection-CUkyprDQ.js +1 -0
- package/static/dashboard/assets/{skeleton-CKnmJMUH.js → skeleton-Bc7abAn5.js} +1 -1
- package/static/dashboard/assets/{waypoints-DuZPO_wu.js → waypoints-s-opmJxx.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-BUj3wZ_m.js → workspace-layout-DqIQeTBV.js} +1 -1
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/AiConfigContext-BB9KZySa.js +1 -0
- package/static/settings/assets/AiConfigPage-DGSXUkLs.js +1 -0
- package/static/settings/assets/DocumentProcessingPanel-Da2Re6Rg.js +1 -0
- package/static/settings/assets/IndexLifecyclePanel-BSZuIzgr.js +1 -0
- package/static/settings/assets/{IndexSubjectPanel-73sM16Ma.js → IndexSubjectPanel-CFd0ay-r.js} +1 -1
- package/static/settings/assets/ModelAssignmentsPanel-CSAryvWJ.js +1 -0
- package/static/settings/assets/ModelsPage-BQwCwLHU.js +11 -0
- package/static/settings/assets/{NetworkPage-i6j-M2RY.js → NetworkPage-BKymvsQc.js} +2 -2
- package/static/settings/assets/{PaneListHeader-DpqC0jd5.js → PaneListHeader-Bjh3hRdQ.js} +1 -1
- package/static/settings/assets/SearchIndexingPanel-MjKL5QLU.js +1 -0
- package/static/settings/assets/{StatusSubjectPanel-Dv4q3PGh.js → StatusSubjectPanel-Bvl6K4mx.js} +1 -1
- package/static/settings/assets/StatusWorkspace-B0NzrP--.js +1 -0
- package/static/settings/assets/SystemSettingsPage-D2z6Z4FE.js +1 -0
- package/static/settings/assets/SystemSettingsSubjectPanel-4sxma4X4.js +33 -0
- package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +3 -0
- package/static/settings/assets/{activity-DaFkk8f3.js → activity-CgJJGpjx.js} +1 -1
- package/static/settings/assets/admin-C6qCRFiY.js +1 -0
- package/static/settings/assets/ai-connections-CryuHGKW.js +1 -0
- package/static/settings/assets/{badge-d5SHdc-x.js → badge-C4NypVyT.js} +1 -1
- package/static/settings/assets/collection-runtime-CTLCDxAi.js +1 -0
- package/static/settings/assets/dialog-Csq0vWUi.js +1 -0
- package/static/settings/assets/{download-CpkwomDr.js → download-DaLJJ-Wp.js} +1 -1
- package/static/settings/assets/{external-link-_4YT42Mf.js → external-link--w_iW5Au.js} +1 -1
- package/static/settings/assets/index-B0mQa59b.js +4 -0
- package/static/settings/assets/index-BukHiu4y.js +1 -0
- package/static/settings/assets/index-COmVnZi2.js +41 -0
- package/static/settings/assets/{index-browser-B06xjBdZ.js → index-browser-BGpvHwD0.js} +1 -1
- package/static/settings/assets/{key-round-Dlqmp1Kq.js → key-round-Bk4YRjBu.js} +1 -1
- package/static/settings/assets/layout-DB3pMyTl.js +1 -0
- package/static/settings/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/settings/assets/{rotate-ccw-TAY65xWT.js → rotate-ccw-TCabbqsr.js} +1 -1
- package/static/settings/assets/{settings-ExBXGgbj.js → settings-CJWpdbNC.js} +105 -109
- package/static/settings/assets/settings-projection-CUkyprDQ.js +1 -0
- package/static/settings/assets/settings-rk080mvG.css +1 -0
- package/static/settings/assets/{skeleton-DKIWjNr9.js → skeleton-JDHYVe7t.js} +1 -1
- package/static/settings/assets/{waypoints-9erLIxyR.js → waypoints-DDvEl-MU.js} +1 -1
- package/static/settings/assets/{workspace-layout-CYXfYIa3.js → workspace-layout-DV5QU30U.js} +1 -1
- package/static/settings/settings.html +2 -2
- package/node_modules/@undefineds.co/shared-ui/dist/oidc-consent.d.ts +0 -54
- package/node_modules/@undefineds.co/shared-ui/dist/oidc-consent.js +0 -21
- package/static/auth-callback/assets/AiConfigContext-C81deMM9.js +0 -1
- package/static/auth-callback/assets/AiConfigPage-evWI8T56.js +0 -1
- package/static/auth-callback/assets/DocumentProcessingPanel-B9GrDEMe.js +0 -1
- package/static/auth-callback/assets/IndexLifecyclePanel-qCo8ABQZ.js +0 -1
- package/static/auth-callback/assets/ModelAssignmentsPanel-DG7Lxh3t.js +0 -1
- package/static/auth-callback/assets/ModelsPage-CgEuqE6p.js +0 -10
- package/static/auth-callback/assets/SearchIndexingPanel-ByU3u7kp.js +0 -1
- package/static/auth-callback/assets/StatusWorkspace-BZd617sV.js +0 -1
- package/static/auth-callback/assets/SystemSettingsPage-BirzWAQM.js +0 -1
- package/static/auth-callback/assets/SystemSettingsSubjectPanel-CmsVWNCx.js +0 -31
- package/static/auth-callback/assets/admin-BU4m6Ko2.js +0 -1
- package/static/auth-callback/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/auth-callback/assets/auth-callback-C_7MUXJb.css +0 -1
- package/static/auth-callback/assets/index-BpV1hsqs.js +0 -4
- package/static/auth-callback/assets/index-D9oE6FXK.js +0 -41
- package/static/dashboard/assets/AiConfigContext-De-OtAWo.js +0 -1
- package/static/dashboard/assets/AiConfigPage-macP4Mop.js +0 -1
- package/static/dashboard/assets/DocumentProcessingPanel-C5ObvCCl.js +0 -1
- package/static/dashboard/assets/IndexLifecyclePanel-xVNa2l40.js +0 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-DMOATFpQ.js +0 -1
- package/static/dashboard/assets/ModelsPage-91UbnETA.js +0 -25
- package/static/dashboard/assets/SearchIndexingPanel-Dh70PNFZ.js +0 -1
- package/static/dashboard/assets/SystemSettingsPage-BiN5GcKx.js +0 -1
- package/static/dashboard/assets/SystemSettingsSubjectPanel-B9QrSiFp.js +0 -31
- package/static/dashboard/assets/admin-BU4m6Ko2.js +0 -1
- package/static/dashboard/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/dashboard/assets/dashboard-C_7MUXJb.css +0 -1
- package/static/dashboard/assets/index-FWZ-s52O.js +0 -41
- package/static/dashboard/assets/index-ZiQZ96oC.js +0 -4
- package/static/settings/assets/AiConfigContext-C0cQMPfG.js +0 -1
- package/static/settings/assets/AiConfigPage-CPhB4iFb.js +0 -1
- package/static/settings/assets/DocumentProcessingPanel-sYI7OpuH.js +0 -1
- package/static/settings/assets/IndexLifecyclePanel-yj8iyiT8.js +0 -1
- package/static/settings/assets/ModelAssignmentsPanel-BFIgUX5v.js +0 -1
- package/static/settings/assets/ModelsPage-BdppXl7E.js +0 -10
- package/static/settings/assets/SearchIndexingPanel-BlPnrkT3.js +0 -1
- package/static/settings/assets/SystemSettingsPage-CiOm2NzV.js +0 -1
- package/static/settings/assets/SystemSettingsSubjectPanel-Cd-GECon.js +0 -31
- package/static/settings/assets/admin-BU4m6Ko2.js +0 -1
- package/static/settings/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/settings/assets/index-BFi9yn7_.js +0 -41
- package/static/settings/assets/index-BGgEhIUy.js +0 -4
- package/static/settings/assets/settings-C_7MUXJb.css +0 -1
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import{g as _x}from"./_commonjsHelpers-B-UnjaXt.js";function zx(a,r){for(var o=0;o<r.length;o++){const s=r[o];if(typeof s!="string"&&!Array.isArray(s)){for(const u in s)if(u!=="default"&&!(u in a)){const d=Object.getOwnPropertyDescriptor(s,u);d&&Object.defineProperty(a,u,d.get?d:{enumerable:!0,get:()=>s[u]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var nd={exports:{}},No={};var cg;function Ox(){if(cg)return No;cg=1;var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(s,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var b in u)b!=="key"&&(d[b]=u[b])}else d=u;return u=d.ref,{$$typeof:a,type:s,key:h,ref:u!==void 0?u:null,props:d}}return No.Fragment=r,No.jsx=o,No.jsxs=o,No}var ug;function Mx(){return ug||(ug=1,nd.exports=Ox()),nd.exports}var f=Mx(),ad={exports:{}},ve={};var dg;function Lx(){if(dg)return ve;dg=1;var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),S=Symbol.iterator;function C(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,j={};function I(A,k,_){this.props=A,this.context=k,this.refs=j,this.updater=_||U}I.prototype.isReactComponent={},I.prototype.setState=function(A,k){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,k,"setState")},I.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function P(){}P.prototype=I.prototype;function H(A,k,_){this.props=A,this.context=k,this.refs=j,this.updater=_||U}var ee=H.prototype=new P;ee.constructor=H,N(ee,I.prototype),ee.isPureReactComponent=!0;var F=Array.isArray;function se(){}var Z={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function ce(A,k,_){var G=_.ref;return{$$typeof:a,type:A,key:k,ref:G!==void 0?G:null,props:_}}function ge(A,k){return ce(A.type,k,A.props)}function te(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function oe(A){var k={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(_){return k[_]})}var Ue=/\/+/g;function ne(A,k){return typeof A=="object"&&A!==null&&A.key!=null?oe(""+A.key):k.toString(36)}function me(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(se,se):(A.status="pending",A.then(function(k){A.status==="pending"&&(A.status="fulfilled",A.value=k)},function(k){A.status==="pending"&&(A.status="rejected",A.reason=k)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function L(A,k,_,G,$){var K=typeof A;(K==="undefined"||K==="boolean")&&(A=null);var ue=!1;if(A===null)ue=!0;else switch(K){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(A.$$typeof){case a:case r:ue=!0;break;case x:return ue=A._init,L(ue(A._payload),k,_,G,$)}}if(ue)return $=$(A),ue=G===""?"."+ne(A,0):G,F($)?(_="",ue!=null&&(_=ue.replace(Ue,"$&/")+"/"),L($,k,_,"",function(Ve){return Ve})):$!=null&&(te($)&&($=ge($,_+($.key==null||A&&A.key===$.key?"":(""+$.key).replace(Ue,"$&/")+"/")+ue)),k.push($)),1;ue=0;var Ce=G===""?".":G+":";if(F(A))for(var fe=0;fe<A.length;fe++)G=A[fe],K=Ce+ne(G,fe),ue+=L(G,k,_,K,$);else if(fe=C(A),typeof fe=="function")for(A=fe.call(A),fe=0;!(G=A.next()).done;)G=G.value,K=Ce+ne(G,fe++),ue+=L(G,k,_,K,$);else if(K==="object"){if(typeof A.then=="function")return L(me(A),k,_,G,$);throw k=String(A),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return ue}function Q(A,k,_){if(A==null)return A;var G=[],$=0;return L(A,G,"","",function(K){return k.call(_,K,$++)}),G}function W(A){if(A._status===-1){var k=A._result;k=k(),k.then(function(_){(A._status===0||A._status===-1)&&(A._status=1,A._result=_)},function(_){(A._status===0||A._status===-1)&&(A._status=2,A._result=_)}),A._status===-1&&(A._status=0,A._result=k)}if(A._status===1)return A._result.default;throw A._result}var xe=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},J={map:Q,forEach:function(A,k,_){Q(A,function(){k.apply(this,arguments)},_)},count:function(A){var k=0;return Q(A,function(){k++}),k},toArray:function(A){return Q(A,function(k){return k})||[]},only:function(A){if(!te(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ve.Activity=w,ve.Children=J,ve.Component=I,ve.Fragment=o,ve.Profiler=u,ve.PureComponent=H,ve.StrictMode=s,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,ve.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},ve.cache=function(A){return function(){return A.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(A,k,_){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var G=N({},A.props),$=A.key;if(k!=null)for(K in k.key!==void 0&&($=""+k.key),k)!Y.call(k,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&k.ref===void 0||(G[K]=k[K]);var K=arguments.length-2;if(K===1)G.children=_;else if(1<K){for(var ue=Array(K),Ce=0;Ce<K;Ce++)ue[Ce]=arguments[Ce+2];G.children=ue}return ce(A.type,$,G)},ve.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},ve.createElement=function(A,k,_){var G,$={},K=null;if(k!=null)for(G in k.key!==void 0&&(K=""+k.key),k)Y.call(k,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&($[G]=k[G]);var ue=arguments.length-2;if(ue===1)$.children=_;else if(1<ue){for(var Ce=Array(ue),fe=0;fe<ue;fe++)Ce[fe]=arguments[fe+2];$.children=Ce}if(A&&A.defaultProps)for(G in ue=A.defaultProps,ue)$[G]===void 0&&($[G]=ue[G]);return ce(A,K,$)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(A){return{$$typeof:b,render:A}},ve.isValidElement=te,ve.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:W}},ve.memo=function(A,k){return{$$typeof:g,type:A,compare:k===void 0?null:k}},ve.startTransition=function(A){var k=Z.T,_={};Z.T=_;try{var G=A(),$=Z.S;$!==null&&$(_,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(se,xe)}catch(K){xe(K)}finally{k!==null&&_.types!==null&&(k.types=_.types),Z.T=k}},ve.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},ve.use=function(A){return Z.H.use(A)},ve.useActionState=function(A,k,_){return Z.H.useActionState(A,k,_)},ve.useCallback=function(A,k){return Z.H.useCallback(A,k)},ve.useContext=function(A){return Z.H.useContext(A)},ve.useDebugValue=function(){},ve.useDeferredValue=function(A,k){return Z.H.useDeferredValue(A,k)},ve.useEffect=function(A,k){return Z.H.useEffect(A,k)},ve.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},ve.useId=function(){return Z.H.useId()},ve.useImperativeHandle=function(A,k,_){return Z.H.useImperativeHandle(A,k,_)},ve.useInsertionEffect=function(A,k){return Z.H.useInsertionEffect(A,k)},ve.useLayoutEffect=function(A,k){return Z.H.useLayoutEffect(A,k)},ve.useMemo=function(A,k){return Z.H.useMemo(A,k)},ve.useOptimistic=function(A,k){return Z.H.useOptimistic(A,k)},ve.useReducer=function(A,k,_){return Z.H.useReducer(A,k,_)},ve.useRef=function(A){return Z.H.useRef(A)},ve.useState=function(A){return Z.H.useState(A)},ve.useSyncExternalStore=function(A,k,_){return Z.H.useSyncExternalStore(A,k,_)},ve.useTransition=function(){return Z.H.useTransition()},ve.version="19.2.8",ve}var fg;function Id(){return fg||(fg=1,ad.exports=Lx()),ad.exports}var y=Id();const Sb=_x(y),Dx=zx({__proto__:null,default:Sb},[y]);var ld={exports:{}},Uo={},rd={exports:{}},od={};var mg;function kx(){return mg||(mg=1,(function(a){function r(L,Q){var W=L.length;L.push(Q);e:for(;0<W;){var xe=W-1>>>1,J=L[xe];if(0<u(J,Q))L[xe]=Q,L[W]=J,W=xe;else break e}}function o(L){return L.length===0?null:L[0]}function s(L){if(L.length===0)return null;var Q=L[0],W=L.pop();if(W!==Q){L[0]=W;e:for(var xe=0,J=L.length,A=J>>>1;xe<A;){var k=2*(xe+1)-1,_=L[k],G=k+1,$=L[G];if(0>u(_,W))G<J&&0>u($,_)?(L[xe]=$,L[G]=W,xe=G):(L[xe]=_,L[k]=W,xe=k);else if(G<J&&0>u($,W))L[xe]=$,L[G]=W,xe=G;else break e}}return Q}function u(L,Q){var W=L.sortIndex-Q.sortIndex;return W!==0?W:L.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var h=Date,b=h.now();a.unstable_now=function(){return h.now()-b}}var p=[],g=[],x=1,w=null,S=3,C=!1,U=!1,N=!1,j=!1,I=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function ee(L){for(var Q=o(g);Q!==null;){if(Q.callback===null)s(g);else if(Q.startTime<=L)s(g),Q.sortIndex=Q.expirationTime,r(p,Q);else break;Q=o(g)}}function F(L){if(N=!1,ee(L),!U)if(o(p)!==null)U=!0,se||(se=!0,oe());else{var Q=o(g);Q!==null&&me(F,Q.startTime-L)}}var se=!1,Z=-1,Y=5,ce=-1;function ge(){return j?!0:!(a.unstable_now()-ce<Y)}function te(){if(j=!1,se){var L=a.unstable_now();ce=L;var Q=!0;try{e:{U=!1,N&&(N=!1,P(Z),Z=-1),C=!0;var W=S;try{t:{for(ee(L),w=o(p);w!==null&&!(w.expirationTime>L&&ge());){var xe=w.callback;if(typeof xe=="function"){w.callback=null,S=w.priorityLevel;var J=xe(w.expirationTime<=L);if(L=a.unstable_now(),typeof J=="function"){w.callback=J,ee(L),Q=!0;break t}w===o(p)&&s(p),ee(L)}else s(p);w=o(p)}if(w!==null)Q=!0;else{var A=o(g);A!==null&&me(F,A.startTime-L),Q=!1}}break e}finally{w=null,S=W,C=!1}Q=void 0}}finally{Q?oe():se=!1}}}var oe;if(typeof H=="function")oe=function(){H(te)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,ne=Ue.port2;Ue.port1.onmessage=te,oe=function(){ne.postMessage(null)}}else oe=function(){I(te,0)};function me(L,Q){Z=I(function(){L(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(L){L.callback=null},a.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<L?Math.floor(1e3/L):5},a.unstable_getCurrentPriorityLevel=function(){return S},a.unstable_next=function(L){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var W=S;S=Q;try{return L()}finally{S=W}},a.unstable_requestPaint=function(){j=!0},a.unstable_runWithPriority=function(L,Q){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var W=S;S=L;try{return Q()}finally{S=W}},a.unstable_scheduleCallback=function(L,Q,W){var xe=a.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?xe+W:xe):W=xe,L){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=W+J,L={id:x++,callback:Q,priorityLevel:L,startTime:W,expirationTime:J,sortIndex:-1},W>xe?(L.sortIndex=W,r(g,L),o(p)===null&&L===o(g)&&(N?(P(Z),Z=-1):N=!0,me(F,W-xe))):(L.sortIndex=J,r(p,L),U||C||(U=!0,se||(se=!0,oe()))),L},a.unstable_shouldYield=ge,a.unstable_wrapCallback=function(L){var Q=S;return function(){var W=S;S=Q;try{return L.apply(this,arguments)}finally{S=W}}}})(od)),od}var hg;function Bx(){return hg||(hg=1,rd.exports=kx()),rd.exports}var id={exports:{}},qt={};var pg;function Hx(){if(pg)return qt;pg=1;var a=Id();function r(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var s={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(p,g,x){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:w==null?null:""+w,children:p,containerInfo:g,implementation:x}}var h=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,qt.createPortal=function(p,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return d(p,g,null,x)},qt.flushSync=function(p){var g=h.T,x=s.p;try{if(h.T=null,s.p=2,p)return p()}finally{h.T=g,s.p=x,s.d.f()}},qt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,s.d.C(p,g))},qt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},qt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var x=g.as,w=b(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,C=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?s.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:w,integrity:S,fetchPriority:C}):x==="script"&&s.d.X(p,{crossOrigin:w,integrity:S,fetchPriority:C,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},qt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=b(g.as,g.crossOrigin);s.d.M(p,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&s.d.M(p)},qt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,w=b(x,g.crossOrigin);s.d.L(p,x,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},qt.preloadModule=function(p,g){if(typeof p=="string")if(g){var x=b(g.as,g.crossOrigin);s.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else s.d.m(p)},qt.requestFormReset=function(p){s.d.r(p)},qt.unstable_batchedUpdates=function(p,g){return p(g)},qt.useFormState=function(p,g,x){return h.H.useFormState(p,g,x)},qt.useFormStatus=function(){return h.H.useHostTransitionStatus()},qt.version="19.2.8",qt}var gg;function Eb(){if(gg)return id.exports;gg=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(r){console.error(r)}}return a(),id.exports=Hx(),id.exports}var bg;function qx(){if(bg)return Uo;bg=1;var a=Bx(),r=Id(),o=Eb();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(s(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return p(i),e;if(c===l)return p(i),t;c=c.sibling}throw Error(s(188))}if(n.return!==l.return)n=i,l=c;else{for(var m=!1,v=i.child;v;){if(v===n){m=!0,n=i,l=c;break}if(v===l){m=!0,l=i,n=c;break}v=v.sibling}if(!m){for(v=c.child;v;){if(v===n){m=!0,n=c,l=i;break}if(v===l){m=!0,l=c,n=i;break}v=v.sibling}if(!m)throw Error(s(189))}}if(n.alternate!==l)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,S=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),H=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case I:return"Profiler";case j:return"StrictMode";case F:return"Suspense";case se:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case H:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var me=Array.isArray,L=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},xe=[],J=-1;function A(e){return{current:e}}function k(e){0>J||(e.current=xe[J],xe[J]=null,J--)}function _(e,t){J++,xe[J]=e.current,e.current=t}var G=A(null),$=A(null),K=A(null),ue=A(null);function Ce(e,t){switch(_(K,t),_($,e),_(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?zp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=zp(t),e=Op(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}k(G),_(G,e)}function fe(){k(G),k($),k(K)}function Ve(e){e.memoizedState!==null&&_(ue,e);var t=G.current,n=Op(t,e.type);t!==n&&(_($,e),_(G,n))}function ke(e){$.current===e&&(k(G),k($)),ue.current===e&&(k(ue),Co._currentValue=W)}var wt,St;function at(e){if(wt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wt=t&&t[1]||"",St=-1<n.stack.indexOf(`
|
|
1
|
+
import{g as tx}from"./_commonjsHelpers-B-UnjaXt.js";function nx(a,r){for(var i=0;i<r.length;i++){const s=r[i];if(typeof s!="string"&&!Array.isArray(s)){for(const u in s)if(u!=="default"&&!(u in a)){const d=Object.getOwnPropertyDescriptor(s,u);d&&Object.defineProperty(a,u,d.get?d:{enumerable:!0,get:()=>s[u]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var Lu={exports:{}},ho={};var Yp;function ax(){if(Yp)return ho;Yp=1;var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(s,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var v in u)v!=="key"&&(d[v]=u[v])}else d=u;return u=d.ref,{$$typeof:a,type:s,key:h,ref:u!==void 0?u:null,props:d}}return ho.Fragment=r,ho.jsx=i,ho.jsxs=i,ho}var Xp;function lx(){return Xp||(Xp=1,Lu.exports=ax()),Lu.exports}var f=lx(),Du={exports:{}},be={};var Gp;function rx(){if(Gp)return be;Gp=1;var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),S=Symbol.iterator;function T(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,_={};function Q(A,k,L){this.props=A,this.context=k,this.refs=_,this.updater=L||j}Q.prototype.isReactComponent={},Q.prototype.setState=function(A,k){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,k,"setState")},Q.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Z(){}Z.prototype=Q.prototype;function G(A,k,L){this.props=A,this.context=k,this.refs=_,this.updater=L||j}var oe=G.prototype=new Z;oe.constructor=G,N(oe,Q.prototype),oe.isPureReactComponent=!0;var ne=Array.isArray;function se(){}var I={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function ee(A,k,L){var V=L.ref;return{$$typeof:a,type:A,key:k,ref:V!==void 0?V:null,props:L}}function te(A,k){return ee(A.type,k,A.props)}function ie(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function me(A){var k={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(L){return k[L]})}var De=/\/+/g;function ve(A,k){return typeof A=="object"&&A!==null&&A.key!=null?me(""+A.key):k.toString(36)}function he(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(se,se):(A.status="pending",A.then(function(k){A.status==="pending"&&(A.status="fulfilled",A.value=k)},function(k){A.status==="pending"&&(A.status="rejected",A.reason=k)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function M(A,k,L,V,J){var W=typeof A;(W==="undefined"||W==="boolean")&&(A=null);var ue=!1;if(A===null)ue=!0;else switch(W){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(A.$$typeof){case a:case r:ue=!0;break;case x:return ue=A._init,M(ue(A._payload),k,L,V,J)}}if(ue)return J=J(A),ue=V===""?"."+ve(A,0):V,ne(J)?(L="",ue!=null&&(L=ue.replace(De,"$&/")+"/"),M(J,k,L,"",function(F){return F})):J!=null&&(ie(J)&&(J=te(J,L+(J.key==null||A&&A.key===J.key?"":(""+J.key).replace(De,"$&/")+"/")+ue)),k.push(J)),1;ue=0;var Be=V===""?".":V+":";if(ne(A))for(var de=0;de<A.length;de++)V=A[de],W=Be+ve(V,de),ue+=M(V,k,L,W,J);else if(de=T(A),typeof de=="function")for(A=de.call(A),de=0;!(V=A.next()).done;)V=V.value,W=Be+ve(V,de++),ue+=M(V,k,L,W,J);else if(W==="object"){if(typeof A.then=="function")return M(he(A),k,L,V,J);throw k=String(A),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return ue}function $(A,k,L){if(A==null)return A;var V=[],J=0;return M(A,V,"","",function(W){return k.call(L,W,J++)}),V}function P(A){if(A._status===-1){var k=A._result;k=k(),k.then(function(L){(A._status===0||A._status===-1)&&(A._status=1,A._result=L)},function(L){(A._status===0||A._status===-1)&&(A._status=2,A._result=L)}),A._status===-1&&(A._status=0,A._result=k)}if(A._status===1)return A._result.default;throw A._result}var ye=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},X={map:$,forEach:function(A,k,L){$(A,function(){k.apply(this,arguments)},L)},count:function(A){var k=0;return $(A,function(){k++}),k},toArray:function(A){return $(A,function(k){return k})||[]},only:function(A){if(!ie(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return be.Activity=w,be.Children=X,be.Component=Q,be.Fragment=i,be.Profiler=u,be.PureComponent=G,be.StrictMode=s,be.Suspense=p,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,be.__COMPILER_RUNTIME={__proto__:null,c:function(A){return I.H.useMemoCache(A)}},be.cache=function(A){return function(){return A.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(A,k,L){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var V=N({},A.props),J=A.key;if(k!=null)for(W in k.key!==void 0&&(J=""+k.key),k)!q.call(k,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&k.ref===void 0||(V[W]=k[W]);var W=arguments.length-2;if(W===1)V.children=L;else if(1<W){for(var ue=Array(W),Be=0;Be<W;Be++)ue[Be]=arguments[Be+2];V.children=ue}return ee(A.type,J,V)},be.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},be.createElement=function(A,k,L){var V,J={},W=null;if(k!=null)for(V in k.key!==void 0&&(W=""+k.key),k)q.call(k,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(J[V]=k[V]);var ue=arguments.length-2;if(ue===1)J.children=L;else if(1<ue){for(var Be=Array(ue),de=0;de<ue;de++)Be[de]=arguments[de+2];J.children=Be}if(A&&A.defaultProps)for(V in ue=A.defaultProps,ue)J[V]===void 0&&(J[V]=ue[V]);return ee(A,W,J)},be.createRef=function(){return{current:null}},be.forwardRef=function(A){return{$$typeof:v,render:A}},be.isValidElement=ie,be.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:P}},be.memo=function(A,k){return{$$typeof:g,type:A,compare:k===void 0?null:k}},be.startTransition=function(A){var k=I.T,L={};I.T=L;try{var V=A(),J=I.S;J!==null&&J(L,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(se,ye)}catch(W){ye(W)}finally{k!==null&&L.types!==null&&(k.types=L.types),I.T=k}},be.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},be.use=function(A){return I.H.use(A)},be.useActionState=function(A,k,L){return I.H.useActionState(A,k,L)},be.useCallback=function(A,k){return I.H.useCallback(A,k)},be.useContext=function(A){return I.H.useContext(A)},be.useDebugValue=function(){},be.useDeferredValue=function(A,k){return I.H.useDeferredValue(A,k)},be.useEffect=function(A,k){return I.H.useEffect(A,k)},be.useEffectEvent=function(A){return I.H.useEffectEvent(A)},be.useId=function(){return I.H.useId()},be.useImperativeHandle=function(A,k,L){return I.H.useImperativeHandle(A,k,L)},be.useInsertionEffect=function(A,k){return I.H.useInsertionEffect(A,k)},be.useLayoutEffect=function(A,k){return I.H.useLayoutEffect(A,k)},be.useMemo=function(A,k){return I.H.useMemo(A,k)},be.useOptimistic=function(A,k){return I.H.useOptimistic(A,k)},be.useReducer=function(A,k,L){return I.H.useReducer(A,k,L)},be.useRef=function(A){return I.H.useRef(A)},be.useState=function(A){return I.H.useState(A)},be.useSyncExternalStore=function(A,k,L){return I.H.useSyncExternalStore(A,k,L)},be.useTransition=function(){return I.H.useTransition()},be.version="19.2.8",be}var Vp;function Sd(){return Vp||(Vp=1,Du.exports=rx()),Du.exports}var y=Sd();const Jg=tx(y),ox=nx({__proto__:null,default:Jg},[y]);var ku={exports:{}},po={},Bu={exports:{}},Hu={};var Qp;function ix(){return Qp||(Qp=1,(function(a){function r(M,$){var P=M.length;M.push($);e:for(;0<P;){var ye=P-1>>>1,X=M[ye];if(0<u(X,$))M[ye]=$,M[P]=X,P=ye;else break e}}function i(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var $=M[0],P=M.pop();if(P!==$){M[0]=P;e:for(var ye=0,X=M.length,A=X>>>1;ye<A;){var k=2*(ye+1)-1,L=M[k],V=k+1,J=M[V];if(0>u(L,P))V<X&&0>u(J,L)?(M[ye]=J,M[V]=P,ye=V):(M[ye]=L,M[k]=P,ye=k);else if(V<X&&0>u(J,P))M[ye]=J,M[V]=P,ye=V;else break e}}return $}function u(M,$){var P=M.sortIndex-$.sortIndex;return P!==0?P:M.id-$.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var h=Date,v=h.now();a.unstable_now=function(){return h.now()-v}}var p=[],g=[],x=1,w=null,S=3,T=!1,j=!1,N=!1,_=!1,Q=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function oe(M){for(var $=i(g);$!==null;){if($.callback===null)s(g);else if($.startTime<=M)s(g),$.sortIndex=$.expirationTime,r(p,$);else break;$=i(g)}}function ne(M){if(N=!1,oe(M),!j)if(i(p)!==null)j=!0,se||(se=!0,me());else{var $=i(g);$!==null&&he(ne,$.startTime-M)}}var se=!1,I=-1,q=5,ee=-1;function te(){return _?!0:!(a.unstable_now()-ee<q)}function ie(){if(_=!1,se){var M=a.unstable_now();ee=M;var $=!0;try{e:{j=!1,N&&(N=!1,Z(I),I=-1),T=!0;var P=S;try{t:{for(oe(M),w=i(p);w!==null&&!(w.expirationTime>M&&te());){var ye=w.callback;if(typeof ye=="function"){w.callback=null,S=w.priorityLevel;var X=ye(w.expirationTime<=M);if(M=a.unstable_now(),typeof X=="function"){w.callback=X,oe(M),$=!0;break t}w===i(p)&&s(p),oe(M)}else s(p);w=i(p)}if(w!==null)$=!0;else{var A=i(g);A!==null&&he(ne,A.startTime-M),$=!1}}break e}finally{w=null,S=P,T=!1}$=void 0}}finally{$?me():se=!1}}}var me;if(typeof G=="function")me=function(){G(ie)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,ve=De.port2;De.port1.onmessage=ie,me=function(){ve.postMessage(null)}}else me=function(){Q(ie,0)};function he(M,$){I=Q(function(){M(a.unstable_now())},$)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(M){M.callback=null},a.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<M?Math.floor(1e3/M):5},a.unstable_getCurrentPriorityLevel=function(){return S},a.unstable_next=function(M){switch(S){case 1:case 2:case 3:var $=3;break;default:$=S}var P=S;S=$;try{return M()}finally{S=P}},a.unstable_requestPaint=function(){_=!0},a.unstable_runWithPriority=function(M,$){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var P=S;S=M;try{return $()}finally{S=P}},a.unstable_scheduleCallback=function(M,$,P){var ye=a.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ye+P:ye):P=ye,M){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=P+X,M={id:x++,callback:$,priorityLevel:M,startTime:P,expirationTime:X,sortIndex:-1},P>ye?(M.sortIndex=P,r(g,M),i(p)===null&&M===i(g)&&(N?(Z(I),I=-1):N=!0,he(ne,P-ye))):(M.sortIndex=X,r(p,M),j||T||(j=!0,se||(se=!0,me()))),M},a.unstable_shouldYield=te,a.unstable_wrapCallback=function(M){var $=S;return function(){var P=S;S=$;try{return M.apply(this,arguments)}finally{S=P}}}})(Hu)),Hu}var Ip;function sx(){return Ip||(Ip=1,Bu.exports=ix()),Bu.exports}var qu={exports:{}},_t={};var Zp;function cx(){if(Zp)return _t;Zp=1;var a=Sd();function r(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(p,g,x){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:w==null?null:""+w,children:p,containerInfo:g,implementation:x}}var h=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,_t.createPortal=function(p,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return d(p,g,null,x)},_t.flushSync=function(p){var g=h.T,x=s.p;try{if(h.T=null,s.p=2,p)return p()}finally{h.T=g,s.p=x,s.d.f()}},_t.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,s.d.C(p,g))},_t.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},_t.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var x=g.as,w=v(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?s.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:w,integrity:S,fetchPriority:T}):x==="script"&&s.d.X(p,{crossOrigin:w,integrity:S,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},_t.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=v(g.as,g.crossOrigin);s.d.M(p,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&s.d.M(p)},_t.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,w=v(x,g.crossOrigin);s.d.L(p,x,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},_t.preloadModule=function(p,g){if(typeof p=="string")if(g){var x=v(g.as,g.crossOrigin);s.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else s.d.m(p)},_t.requestFormReset=function(p){s.d.r(p)},_t.unstable_batchedUpdates=function(p,g){return p(g)},_t.useFormState=function(p,g,x){return h.H.useFormState(p,g,x)},_t.useFormStatus=function(){return h.H.useHostTransitionStatus()},_t.version="19.2.8",_t}var $p;function Wg(){if($p)return qu.exports;$p=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(r){console.error(r)}}return a(),qu.exports=cx(),qu.exports}var Kp;function ux(){if(Kp)return po;Kp=1;var a=sx(),r=Sd(),i=Wg();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(s(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,l=t;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(l=o.return,l!==null){n=l;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return p(o),e;if(c===l)return p(o),t;c=c.sibling}throw Error(s(188))}if(n.return!==l.return)n=o,l=c;else{for(var m=!1,b=o.child;b;){if(b===n){m=!0,n=o,l=c;break}if(b===l){m=!0,l=o,n=c;break}b=b.sibling}if(!m){for(b=c.child;b;){if(b===n){m=!0,n=c,l=o;break}if(b===l){m=!0,l=c,n=o;break}b=b.sibling}if(!m)throw Error(s(189))}}if(n.alternate!==l)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,S=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),G=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var De=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===De?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case Q:return"Profiler";case _:return"StrictMode";case ne:return"Suspense";case se:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case G:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var he=Array.isArray,M=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},ye=[],X=-1;function A(e){return{current:e}}function k(e){0>X||(e.current=ye[X],ye[X]=null,X--)}function L(e,t){X++,ye[X]=e.current,e.current=t}var V=A(null),J=A(null),W=A(null),ue=A(null);function Be(e,t){switch(L(W,t),L(J,e),L(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}k(V),L(V,e)}function de(){k(V),k(J),k(W)}function F(e){e.memoizedState!==null&&L(ue,e);var t=V.current,n=dp(t,e.type);t!==n&&(L(J,e),L(V,n))}function ge(e){J.current===e&&(k(V),k(J)),ue.current===e&&(k(ue),co._currentValue=P)}var Ne,$e;function Oe(e){if(Ne===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||"",$e=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+
|
|
4
|
-
`),
|
|
5
|
-
`);for(
|
|
6
|
-
`+E[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=
|
|
3
|
+
`+Ne+e+$e}var Ze=!1;function mt(e,t){if(!e||Ze)return"";Ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(D){var O=D}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(D){O=D}e.call(Y.prototype)}}else{try{throw Error()}catch(D){O=D}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(D){if(D&&O&&typeof D.stack=="string")return[D.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),m=c[0],b=c[1];if(m&&b){var E=m.split(`
|
|
4
|
+
`),U=b.split(`
|
|
5
|
+
`);for(o=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;if(l===E.length||o===U.length)for(l=E.length-1,o=U.length-1;1<=l&&0<=o&&E[l]!==U[o];)o--;for(;1<=l&&0<=o;l--,o--)if(E[l]!==U[o]){if(l!==1||o!==1)do if(l--,o--,0>o||E[l]!==U[o]){var B=`
|
|
6
|
+
`+E[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=o);break}}}finally{Ze=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Oe(n):""}function hl(e,t){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe("Lazy");case 13:return e.child!==t&&t!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return mt(e.type,!1);case 11:return mt(e.type.render,!1);case 1:return mt(e.type,!0);case 31:return Oe("Activity");default:return""}}function Xe(e){try{var t="",n=null;do t+=hl(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
7
|
Error generating stack: `+l.message+`
|
|
8
|
-
`+l.stack}}var gt=Object.prototype.hasOwnProperty,ut=a.unstable_scheduleCallback,Dt=a.unstable_cancelCallback,jn=a.unstable_shouldYield,Ke=a.unstable_requestPaint,Be=a.unstable_now,Nn=a.unstable_getCurrentPriorityLevel,$t=a.unstable_ImmediatePriority,kl=a.unstable_UserBlockingPriority,Tt=a.unstable_NormalPriority,Bl=a.unstable_LowPriority,Un=a.unstable_IdlePriority,Hl=a.log,el=a.unstable_setDisableYieldValue,tl=null,kt=null;function dt(e){if(typeof Hl=="function"&&el(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(tl,e)}catch{}}var Bt=Math.clz32?Math.clz32:un,Zs=Math.log,Hr=Math.LN2;function un(e){return e>>>=0,e===0?32:31-(Zs(e)/Hr|0)|0}var ql=256,nl=262144,al=4194304;function $n(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Yl(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var i=0,c=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~c,l!==0?i=$n(l):(m&=v,m!==0?i=$n(m):n||(n=v&~e,n!==0&&(i=$n(n))))):(v=l&~c,v!==0?i=$n(v):m!==0?i=$n(m):n||(n=l&~e,n!==0&&(i=$n(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function Kn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ll(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rl(){var e=al;return al<<=1,(al&62914560)===0&&(al=4194304),e}function ol(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xl(e,t,n,l,i,c){var m=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,E=e.expirationTimes,O=e.hiddenUpdates;for(n=m&~n;0<n;){var B=31-Bt(n),X=1<<B;v[B]=0,E[B]=-1;var M=O[B];if(M!==null)for(O[B]=null,B=0;B<M.length;B++){var D=M[B];D!==null&&(D.lane&=-536870913)}n&=~X}l!==0&&Fo(e,l,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(m&~t))}function Fo(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Bt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function ye(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Bt(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}function Me(e,t){var n=t&-t;return n=(n&42)!==0?1:Qe(n),(n&(e.suspendedLanes|t))!==0?0:n}function Qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Pe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ht(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:ng(e.type))}function Kt(e,t){var n=Q.p;try{return Q.p=e,t()}finally{Q.p=n}}var ot=Math.random().toString(36).slice(2),ft="__reactFiber$"+ot,Et="__reactProps$"+ot,Fe="__reactContainer$"+ot,Jt="__reactEvents$"+ot,dn="__reactListeners$"+ot,Sa="__reactHandles$"+ot,Rt="__reactResources$"+ot,Hn="__reactMarker$"+ot;function Gl(e){delete e[ft],delete e[Et],delete e[Jt],delete e[dn],delete e[Sa]}function Il(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fe]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qp(e);e!==null;){if(n=e[ft])return n;e=qp(e)}return t}e=n,n=e.parentNode}return null}function Vl(e){if(e=e[ft]||e[Fe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Ql(e){var t=e[Rt];return t||(t=e[Rt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[Hn]=!0}var xf=new Set,wf={};function il(e,t){Pl(e,t),Pl(e+"Capture",t)}function Pl(e,t){for(wf[e]=t,e=0;e<t.length;e++)xf.add(t[e])}var Sv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Sf={},Ef={};function Ev(e){return gt.call(Ef,e)?!0:gt.call(Sf,e)?!1:Sv.test(e)?Ef[e]=!0:(Sf[e]=!0,!1)}function ei(e,t,n){if(Ev(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ti(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Wn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Af(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Av(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $s(e){if(!e._valueTracker){var t=Af(e)?"checked":"value";e._valueTracker=Av(e,t,""+e[t])}}function Cf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Af(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ni(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Cv=/[\n"\\]/g;function mn(e){return e.replace(Cv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ks(e,t,n,l,i,c,m,v){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Js(e,m,fn(t)):n!=null?Js(e,m,fn(n)):l!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+fn(v):e.removeAttribute("name")}function Tf(e,t,n,l,i,c,m,v){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){$s(e);return}n=n!=null?""+fn(n):"",t=t!=null?""+fn(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=v?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),$s(e)}function Js(e,t,n){t==="number"&&ni(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Zl(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&l&&(e[n].defaultSelected=!0)}else{for(n=""+fn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Rf(e,t,n){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+fn(n):""}function jf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(s(92));if(me(l)){if(1<l.length)throw Error(s(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=fn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),$s(e)}function $l(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Nf(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Tv.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Uf(e,t,n){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&n[i]!==l&&Nf(e,i,l)}else for(var c in t)t.hasOwnProperty(c)&&Nf(e,c,t[c])}function Ws(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),jv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ai(e){return jv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fn(){}var Fs=null;function ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,Jl=null;function _f(e){var t=Vl(e);if(t&&(e=t.stateNode)){var n=e[Et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ks(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+mn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=l[Et]||null;if(!i)throw Error(s(90));Ks(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Cf(l)}break e;case"textarea":Rf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Zl(e,!!n.multiple,t,!1)}}}var tc=!1;function zf(e,t,n){if(tc)return e(t,n);tc=!0;try{var l=e(t);return l}finally{if(tc=!1,(Kl!==null||Jl!==null)&&(Ii(),Kl&&(t=Kl,e=Jl,Jl=Kl=null,_f(t),e)))for(t=0;t<e.length;t++)_f(e[t])}}function Yr(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Et]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(s(231,t,typeof n));return n}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nc=!1;if(ea)try{var Xr={};Object.defineProperty(Xr,"passive",{get:function(){nc=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch{nc=!1}var Ea=null,ac=null,li=null;function Of(){if(li)return li;var e,t=ac,n=t.length,l,i="value"in Ea?Ea.value:Ea.textContent,c=i.length;for(e=0;e<n&&t[e]===i[e];e++);var m=n-e;for(l=1;l<=m&&t[n-l]===i[c-l];l++);return li=i.slice(e,1<l?1-l:void 0)}function ri(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function oi(){return!0}function Mf(){return!1}function Xt(e){function t(n,l,i,c,m){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(c):c[v]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?oi:Mf,this.isPropagationStopped=Mf,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=oi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=oi)},persist:function(){},isPersistent:oi}),t}var sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ii=Xt(sl),Gr=w({},sl,{view:0,detail:0}),Nv=Xt(Gr),lc,rc,Ir,si=w({},Gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ir&&(Ir&&e.type==="mousemove"?(lc=e.screenX-Ir.screenX,rc=e.screenY-Ir.screenY):rc=lc=0,Ir=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:rc}}),Lf=Xt(si),Uv=w({},si,{dataTransfer:0}),_v=Xt(Uv),zv=w({},Gr,{relatedTarget:0}),oc=Xt(zv),Ov=w({},sl,{animationName:0,elapsedTime:0,pseudoElement:0}),Mv=Xt(Ov),Lv=w({},sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Dv=Xt(Lv),kv=w({},sl,{data:0}),Df=Xt(kv),Bv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qv[e])?!!t[e]:!1}function ic(){return Yv}var Xv=w({},Gr,{key:function(e){if(e.key){var t=Bv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ri(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(e){return e.type==="keypress"?ri(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ri(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gv=Xt(Xv),Iv=w({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kf=Xt(Iv),Vv=w({},Gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),Qv=Xt(Vv),Pv=w({},sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zv=Xt(Pv),$v=w({},si,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kv=Xt($v),Jv=w({},sl,{newState:0,oldState:0}),Wv=Xt(Jv),Fv=[9,13,27,32],sc=ea&&"CompositionEvent"in window,Vr=null;ea&&"documentMode"in document&&(Vr=document.documentMode);var e0=ea&&"TextEvent"in window&&!Vr,Bf=ea&&(!sc||Vr&&8<Vr&&11>=Vr),Hf=" ",qf=!1;function Yf(e,t){switch(e){case"keyup":return Fv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wl=!1;function t0(e,t){switch(e){case"compositionend":return Xf(t);case"keypress":return t.which!==32?null:(qf=!0,Hf);case"textInput":return e=t.data,e===Hf&&qf?null:e;default:return null}}function n0(e,t){if(Wl)return e==="compositionend"||!sc&&Yf(e,t)?(e=Of(),li=ac=Ea=null,Wl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bf&&t.locale!=="ko"?null:t.data;default:return null}}var a0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!a0[e.type]:t==="textarea"}function If(e,t,n,l){Kl?Jl?Jl.push(l):Jl=[l]:Kl=l,t=Ji(t,"onChange"),0<t.length&&(n=new ii("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Qr=null,Pr=null;function l0(e){Tp(e,0)}function ci(e){var t=qr(e);if(Cf(t))return e}function Vf(e,t){if(e==="change")return t}var Qf=!1;if(ea){var cc;if(ea){var uc="oninput"in document;if(!uc){var Pf=document.createElement("div");Pf.setAttribute("oninput","return;"),uc=typeof Pf.oninput=="function"}cc=uc}else cc=!1;Qf=cc&&(!document.documentMode||9<document.documentMode)}function Zf(){Qr&&(Qr.detachEvent("onpropertychange",$f),Pr=Qr=null)}function $f(e){if(e.propertyName==="value"&&ci(Pr)){var t=[];If(t,Pr,e,ec(e)),zf(l0,t)}}function r0(e,t,n){e==="focusin"?(Zf(),Qr=t,Pr=n,Qr.attachEvent("onpropertychange",$f)):e==="focusout"&&Zf()}function o0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ci(Pr)}function i0(e,t){if(e==="click")return ci(t)}function s0(e,t){if(e==="input"||e==="change")return ci(t)}function c0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wt=typeof Object.is=="function"?Object.is:c0;function Zr(e,t){if(Wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!gt.call(t,i)||!Wt(e[i],t[i]))return!1}return!0}function Kf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jf(e,t){var n=Kf(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Kf(n)}}function Wf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ff(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ni(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ni(e.document)}return t}function dc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var u0=ea&&"documentMode"in document&&11>=document.documentMode,Fl=null,fc=null,$r=null,mc=!1;function em(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mc||Fl==null||Fl!==ni(l)||(l=Fl,"selectionStart"in l&&dc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),$r&&Zr($r,l)||($r=l,l=Ji(fc,"onSelect"),0<l.length&&(t=new ii("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Fl)))}function cl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var er={animationend:cl("Animation","AnimationEnd"),animationiteration:cl("Animation","AnimationIteration"),animationstart:cl("Animation","AnimationStart"),transitionrun:cl("Transition","TransitionRun"),transitionstart:cl("Transition","TransitionStart"),transitioncancel:cl("Transition","TransitionCancel"),transitionend:cl("Transition","TransitionEnd")},hc={},tm={};ea&&(tm=document.createElement("div").style,"AnimationEvent"in window||(delete er.animationend.animation,delete er.animationiteration.animation,delete er.animationstart.animation),"TransitionEvent"in window||delete er.transitionend.transition);function ul(e){if(hc[e])return hc[e];if(!er[e])return e;var t=er[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tm)return hc[e]=t[n];return e}var nm=ul("animationend"),am=ul("animationiteration"),lm=ul("animationstart"),d0=ul("transitionrun"),f0=ul("transitionstart"),m0=ul("transitioncancel"),rm=ul("transitionend"),om=new Map,pc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pc.push("scrollEnd");function _n(e,t){om.set(e,t),il(t,[e])}var ui=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},hn=[],tr=0,gc=0;function di(){for(var e=tr,t=gc=tr=0;t<e;){var n=hn[t];hn[t++]=null;var l=hn[t];hn[t++]=null;var i=hn[t];hn[t++]=null;var c=hn[t];if(hn[t++]=null,l!==null&&i!==null){var m=l.pending;m===null?i.next=i:(i.next=m.next,m.next=i),l.pending=i}c!==0&&im(n,i,c)}}function fi(e,t,n,l){hn[tr++]=e,hn[tr++]=t,hn[tr++]=n,hn[tr++]=l,gc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function bc(e,t,n,l){return fi(e,t,n,l),mi(e)}function dl(e,t){return fi(e,null,null,t),mi(e)}function im(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var i=!1,c=e.return;c!==null;)c.childLanes|=n,l=c.alternate,l!==null&&(l.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-Bt(n),e=c.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=n|536870912),c):null}function mi(e){if(50<yo)throw yo=0,Tu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var nr={};function h0(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,n,l){return new h0(e,t,n,l)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ta(e,t){var n=e.alternate;return n===null?(n=Ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function sm(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,l,i,c){var m=0;if(l=e,typeof e=="function")yc(e)&&(m=1);else if(typeof e=="string")m=vx(e,n,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=Ft(31,n,t,i),e.elementType=ce,e.lanes=c,e;case N:return fl(n.children,i,c,t);case j:m=8,i|=24;break;case I:return e=Ft(12,n,t,i|2),e.elementType=I,e.lanes=c,e;case F:return e=Ft(13,n,t,i),e.elementType=F,e.lanes=c,e;case se:return e=Ft(19,n,t,i),e.elementType=se,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:m=10;break e;case P:m=9;break e;case ee:m=11;break e;case Z:m=14;break e;case Y:m=16,l=null;break e}m=29,n=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=Ft(m,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function fl(e,t,n,l){return e=Ft(7,e,l,t),e.lanes=n,e}function vc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function cm(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function xc(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var um=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var n=um.get(e);return n!==void 0?n:(t={value:e,source:t,stack:$e(t)},um.set(e,t),t)}return{value:e,source:t,stack:$e(t)}}var ar=[],lr=0,pi=null,Kr=0,gn=[],bn=0,Aa=null,qn=1,Yn="";function na(e,t){ar[lr++]=Kr,ar[lr++]=pi,pi=e,Kr=t}function dm(e,t,n){gn[bn++]=qn,gn[bn++]=Yn,gn[bn++]=Aa,Aa=e;var l=qn;e=Yn;var i=32-Bt(l)-1;l&=~(1<<i),n+=1;var c=32-Bt(t)+i;if(30<c){var m=i-i%5;c=(l&(1<<m)-1).toString(32),l>>=m,i-=m,qn=1<<32-Bt(t)+i|n<<i|l,Yn=c+e}else qn=1<<c|n<<i|l,Yn=e}function wc(e){e.return!==null&&(na(e,1),dm(e,1,0))}function Sc(e){for(;e===pi;)pi=ar[--lr],ar[lr]=null,Kr=ar[--lr],ar[lr]=null;for(;e===Aa;)Aa=gn[--bn],gn[bn]=null,Yn=gn[--bn],gn[bn]=null,qn=gn[--bn],gn[bn]=null}function fm(e,t){gn[bn++]=qn,gn[bn++]=Yn,gn[bn++]=Aa,qn=t.id,Yn=t.overflow,Aa=e}var _t=null,Je=null,Oe=!1,Ca=null,yn=!1,Ec=Error(s(519));function Ta(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jr(pn(t,e)),Ec}function mm(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[ft]=e,t[Et]=l,n){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(n=0;n<xo.length;n++)Re(xo[n],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),Tf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),jf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Up(t.textContent,n)?(l.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),l.onScroll!=null&&Re("scroll",t),l.onScrollEnd!=null&&Re("scrollend",t),l.onClick!=null&&(t.onclick=Fn),t=!0):t=!1,t||Ta(e,!0)}function hm(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:_t=_t.return}}function rr(e){if(e!==_t)return!1;if(!Oe)return hm(e),Oe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Yu(e.type,e.memoizedProps)),n=!n),n&&Je&&Ta(e),hm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Je=Hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Je=Hp(e)}else t===27?(t=Je,qa(e.type)?(e=Qu,Qu=null,Je=e):Je=t):Je=_t?xn(e.stateNode.nextSibling):null;return!0}function ml(){Je=_t=null,Oe=!1}function Ac(){var e=Ca;return e!==null&&(Qt===null?Qt=e:Qt.push.apply(Qt,e),Ca=null),e}function Jr(e){Ca===null?Ca=[e]:Ca.push(e)}var Cc=A(null),hl=null,aa=null;function Ra(e,t,n){_(Cc,t._currentValue),t._currentValue=n}function la(e){e._currentValue=Cc.current,k(Cc)}function Tc(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Rc(e,t,n,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var m=i.child;c=c.firstContext;e:for(;c!==null;){var v=c;c=i;for(var E=0;E<t.length;E++)if(v.context===t[E]){c.lanes|=n,v=c.alternate,v!==null&&(v.lanes|=n),Tc(c.return,n,e),l||(m=null);break e}c=v.next}}else if(i.tag===18){if(m=i.return,m===null)throw Error(s(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),Tc(m,n,e),m=null}else m=i.child;if(m!==null)m.return=i;else for(m=i;m!==null;){if(m===e){m=null;break}if(i=m.sibling,i!==null){i.return=m.return,m=i;break}m=m.return}i=m}}function or(e,t,n,l){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var m=i.alternate;if(m===null)throw Error(s(387));if(m=m.memoizedProps,m!==null){var v=i.type;Wt(i.pendingProps.value,m.value)||(e!==null?e.push(v):e=[v])}}else if(i===ue.current){if(m=i.alternate,m===null)throw Error(s(387));m.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Co):e=[Co])}i=i.return}e!==null&&Rc(t,e,n,l),t.flags|=262144}function gi(e){for(e=e.firstContext;e!==null;){if(!Wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function pl(e){hl=e,aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return pm(hl,e)}function bi(e,t){return hl===null&&pl(e),pm(e,t)}function pm(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},aa===null){if(e===null)throw Error(s(308));aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else aa=aa.next=t;return n}var p0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},g0=a.unstable_scheduleCallback,b0=a.unstable_NormalPriority,bt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jc(){return{controller:new p0,data:new Map,refCount:0}}function Wr(e){e.refCount--,e.refCount===0&&g0(b0,function(){e.controller.abort()})}var Fr=null,Nc=0,ir=0,sr=null;function y0(e,t){if(Fr===null){var n=Fr=[];Nc=0,ir=zu(),sr={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Nc++,t.then(gm,gm),t}function gm(){if(--Nc===0&&Fr!==null){sr!==null&&(sr.status="fulfilled");var e=Fr;Fr=null,ir=0,sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function v0(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var bm=L.S;L.S=function(e,t){ep=Be(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&y0(e,t),bm!==null&&bm(e,t)};var gl=A(null);function Uc(){var e=gl.current;return e!==null?e:Ze.pooledCache}function yi(e,t){t===null?_(gl,gl.current):_(gl,t.pool)}function ym(){var e=Uc();return e===null?null:{parent:bt._currentValue,pool:e}}var cr=Error(s(460)),_c=Error(s(474)),vi=Error(s(542)),xi={then:function(){}};function vm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xm(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Fn,Fn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sm(e),e;default:if(typeof t.status=="string")t.then(Fn,Fn);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sm(e),e}throw yl=t,cr}}function bl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(yl=n,cr):n}}var yl=null;function wm(){if(yl===null)throw Error(s(459));var e=yl;return yl=null,e}function Sm(e){if(e===cr||e===vi)throw Error(s(483))}var ur=null,eo=0;function wi(e){var t=eo;return eo+=1,ur===null&&(ur=[]),xm(ur,e,t)}function to(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Si(e,t){throw t.$$typeof===S?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Em(e){function t(R,T){if(e){var z=R.deletions;z===null?(R.deletions=[T],R.flags|=16):z.push(T)}}function n(R,T){if(!e)return null;for(;T!==null;)t(R,T),T=T.sibling;return null}function l(R){for(var T=new Map;R!==null;)R.key!==null?T.set(R.key,R):T.set(R.index,R),R=R.sibling;return T}function i(R,T){return R=ta(R,T),R.index=0,R.sibling=null,R}function c(R,T,z){return R.index=z,e?(z=R.alternate,z!==null?(z=z.index,z<T?(R.flags|=67108866,T):z):(R.flags|=67108866,T)):(R.flags|=1048576,T)}function m(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function v(R,T,z,q){return T===null||T.tag!==6?(T=vc(z,R.mode,q),T.return=R,T):(T=i(T,z),T.return=R,T)}function E(R,T,z,q){var he=z.type;return he===N?B(R,T,z.props.children,q,z.key):T!==null&&(T.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===Y&&bl(he)===T.type)?(T=i(T,z.props),to(T,z),T.return=R,T):(T=hi(z.type,z.key,z.props,null,R.mode,q),to(T,z),T.return=R,T)}function O(R,T,z,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==z.containerInfo||T.stateNode.implementation!==z.implementation?(T=xc(z,R.mode,q),T.return=R,T):(T=i(T,z.children||[]),T.return=R,T)}function B(R,T,z,q,he){return T===null||T.tag!==7?(T=fl(z,R.mode,q,he),T.return=R,T):(T=i(T,z),T.return=R,T)}function X(R,T,z){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=vc(""+T,R.mode,z),T.return=R,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case C:return z=hi(T.type,T.key,T.props,null,R.mode,z),to(z,T),z.return=R,z;case U:return T=xc(T,R.mode,z),T.return=R,T;case Y:return T=bl(T),X(R,T,z)}if(me(T)||oe(T))return T=fl(T,R.mode,z,null),T.return=R,T;if(typeof T.then=="function")return X(R,wi(T),z);if(T.$$typeof===H)return X(R,bi(R,T),z);Si(R,T)}return null}function M(R,T,z,q){var he=T!==null?T.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return he!==null?null:v(R,T,""+z,q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case C:return z.key===he?E(R,T,z,q):null;case U:return z.key===he?O(R,T,z,q):null;case Y:return z=bl(z),M(R,T,z,q)}if(me(z)||oe(z))return he!==null?null:B(R,T,z,q,null);if(typeof z.then=="function")return M(R,T,wi(z),q);if(z.$$typeof===H)return M(R,T,bi(R,z),q);Si(R,z)}return null}function D(R,T,z,q,he){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return R=R.get(z)||null,v(T,R,""+q,he);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case C:return R=R.get(q.key===null?z:q.key)||null,E(T,R,q,he);case U:return R=R.get(q.key===null?z:q.key)||null,O(T,R,q,he);case Y:return q=bl(q),D(R,T,z,q,he)}if(me(q)||oe(q))return R=R.get(z)||null,B(T,R,q,he,null);if(typeof q.then=="function")return D(R,T,z,wi(q),he);if(q.$$typeof===H)return D(R,T,z,bi(T,q),he);Si(T,q)}return null}function ie(R,T,z,q){for(var he=null,Le=null,de=T,Ee=T=0,ze=null;de!==null&&Ee<z.length;Ee++){de.index>Ee?(ze=de,de=null):ze=de.sibling;var De=M(R,de,z[Ee],q);if(De===null){de===null&&(de=ze);break}e&&de&&De.alternate===null&&t(R,de),T=c(De,T,Ee),Le===null?he=De:Le.sibling=De,Le=De,de=ze}if(Ee===z.length)return n(R,de),Oe&&na(R,Ee),he;if(de===null){for(;Ee<z.length;Ee++)de=X(R,z[Ee],q),de!==null&&(T=c(de,T,Ee),Le===null?he=de:Le.sibling=de,Le=de);return Oe&&na(R,Ee),he}for(de=l(de);Ee<z.length;Ee++)ze=D(de,R,Ee,z[Ee],q),ze!==null&&(e&&ze.alternate!==null&&de.delete(ze.key===null?Ee:ze.key),T=c(ze,T,Ee),Le===null?he=ze:Le.sibling=ze,Le=ze);return e&&de.forEach(function(Va){return t(R,Va)}),Oe&&na(R,Ee),he}function pe(R,T,z,q){if(z==null)throw Error(s(151));for(var he=null,Le=null,de=T,Ee=T=0,ze=null,De=z.next();de!==null&&!De.done;Ee++,De=z.next()){de.index>Ee?(ze=de,de=null):ze=de.sibling;var Va=M(R,de,De.value,q);if(Va===null){de===null&&(de=ze);break}e&&de&&Va.alternate===null&&t(R,de),T=c(Va,T,Ee),Le===null?he=Va:Le.sibling=Va,Le=Va,de=ze}if(De.done)return n(R,de),Oe&&na(R,Ee),he;if(de===null){for(;!De.done;Ee++,De=z.next())De=X(R,De.value,q),De!==null&&(T=c(De,T,Ee),Le===null?he=De:Le.sibling=De,Le=De);return Oe&&na(R,Ee),he}for(de=l(de);!De.done;Ee++,De=z.next())De=D(de,R,Ee,De.value,q),De!==null&&(e&&De.alternate!==null&&de.delete(De.key===null?Ee:De.key),T=c(De,T,Ee),Le===null?he=De:Le.sibling=De,Le=De);return e&&de.forEach(function(Ux){return t(R,Ux)}),Oe&&na(R,Ee),he}function Ie(R,T,z,q){if(typeof z=="object"&&z!==null&&z.type===N&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case C:e:{for(var he=z.key;T!==null;){if(T.key===he){if(he=z.type,he===N){if(T.tag===7){n(R,T.sibling),q=i(T,z.props.children),q.return=R,R=q;break e}}else if(T.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===Y&&bl(he)===T.type){n(R,T.sibling),q=i(T,z.props),to(q,z),q.return=R,R=q;break e}n(R,T);break}else t(R,T);T=T.sibling}z.type===N?(q=fl(z.props.children,R.mode,q,z.key),q.return=R,R=q):(q=hi(z.type,z.key,z.props,null,R.mode,q),to(q,z),q.return=R,R=q)}return m(R);case U:e:{for(he=z.key;T!==null;){if(T.key===he)if(T.tag===4&&T.stateNode.containerInfo===z.containerInfo&&T.stateNode.implementation===z.implementation){n(R,T.sibling),q=i(T,z.children||[]),q.return=R,R=q;break e}else{n(R,T);break}else t(R,T);T=T.sibling}q=xc(z,R.mode,q),q.return=R,R=q}return m(R);case Y:return z=bl(z),Ie(R,T,z,q)}if(me(z))return ie(R,T,z,q);if(oe(z)){if(he=oe(z),typeof he!="function")throw Error(s(150));return z=he.call(z),pe(R,T,z,q)}if(typeof z.then=="function")return Ie(R,T,wi(z),q);if(z.$$typeof===H)return Ie(R,T,bi(R,z),q);Si(R,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,T!==null&&T.tag===6?(n(R,T.sibling),q=i(T,z),q.return=R,R=q):(n(R,T),q=vc(z,R.mode,q),q.return=R,R=q),m(R)):n(R,T)}return function(R,T,z,q){try{eo=0;var he=Ie(R,T,z,q);return ur=null,he}catch(de){if(de===cr||de===vi)throw de;var Le=Ft(29,de,null,R.mode);return Le.lanes=q,Le.return=R,Le}}}var vl=Em(!0),Am=Em(!1),ja=!1;function zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=mi(e),im(e,null,n),t}return fi(e,l,t,n),mi(e)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,ye(e,n)}}function Mc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Lc=!1;function ao(){if(Lc){var e=sr;if(e!==null)throw e}}function lo(e,t,n,l){Lc=!1;var i=e.updateQueue;ja=!1;var c=i.firstBaseUpdate,m=i.lastBaseUpdate,v=i.shared.pending;if(v!==null){i.shared.pending=null;var E=v,O=E.next;E.next=null,m===null?c=O:m.next=O,m=E;var B=e.alternate;B!==null&&(B=B.updateQueue,v=B.lastBaseUpdate,v!==m&&(v===null?B.firstBaseUpdate=O:v.next=O,B.lastBaseUpdate=E))}if(c!==null){var X=i.baseState;m=0,B=O=E=null,v=c;do{var M=v.lane&-536870913,D=M!==v.lane;if(D?(_e&M)===M:(l&M)===M){M!==0&&M===ir&&(Lc=!0),B!==null&&(B=B.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ie=e,pe=v;M=t;var Ie=n;switch(pe.tag){case 1:if(ie=pe.payload,typeof ie=="function"){X=ie.call(Ie,X,M);break e}X=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=pe.payload,M=typeof ie=="function"?ie.call(Ie,X,M):ie,M==null)break e;X=w({},X,M);break e;case 2:ja=!0}}M=v.callback,M!==null&&(e.flags|=64,D&&(e.flags|=8192),D=i.callbacks,D===null?i.callbacks=[M]:D.push(M))}else D={lane:M,tag:v.tag,payload:v.payload,callback:v.callback,next:null},B===null?(O=B=D,E=X):B=B.next=D,m|=M;if(v=v.next,v===null){if(v=i.shared.pending,v===null)break;D=v,v=D.next,D.next=null,i.lastBaseUpdate=D,i.shared.pending=null}}while(!0);B===null&&(E=X),i.baseState=E,i.firstBaseUpdate=O,i.lastBaseUpdate=B,c===null&&(i.shared.lanes=0),La|=m,e.lanes=m,e.memoizedState=X}}function Cm(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Tm(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Cm(n[e],t)}var dr=A(null),Ei=A(0);function Rm(e,t){e=ma,_(Ei,e),_(dr,t),ma=e|t.baseLanes}function Dc(){_(Ei,ma),_(dr,dr.current)}function kc(){ma=Ei.current,k(dr),k(Ei)}var en=A(null),vn=null;function _a(e){var t=e.alternate;_(mt,mt.current&1),_(en,e),vn===null&&(t===null||dr.current!==null||t.memoizedState!==null)&&(vn=e)}function Bc(e){_(mt,mt.current),_(en,e),vn===null&&(vn=e)}function jm(e){e.tag===22?(_(mt,mt.current),_(en,e),vn===null&&(vn=e)):za()}function za(){_(mt,mt.current),_(en,en.current)}function tn(e){k(en),vn===e&&(vn=null),k(mt)}var mt=A(0);function Ai(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Iu(n)||Vu(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=0,Se=null,Xe=null,yt=null,Ci=!1,fr=!1,xl=!1,Ti=0,ro=0,mr=null,x0=0;function it(){throw Error(s(321))}function Hc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wt(e[n],t[n]))return!1;return!0}function qc(e,t,n,l,i,c){return ra=c,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?dh:tu,xl=!1,c=n(l,i),xl=!1,fr&&(c=Um(t,n,l,i)),Nm(e),c}function Nm(e){L.H=so;var t=Xe!==null&&Xe.next!==null;if(ra=0,yt=Xe=Se=null,Ci=!1,ro=0,mr=null,t)throw Error(s(300));e===null||vt||(e=e.dependencies,e!==null&&gi(e)&&(vt=!0))}function Um(e,t,n,l){Se=e;var i=0;do{if(fr&&(mr=null),ro=0,fr=!1,25<=i)throw Error(s(301));if(i+=1,yt=Xe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}L.H=fh,c=t(n,l)}while(fr);return c}function w0(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?oo(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Se.flags|=1024),t}function Yc(){var e=Ti!==0;return Ti=0,e}function Xc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Gc(e){if(Ci){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ci=!1}ra=0,yt=Xe=Se=null,fr=!1,ro=Ti=0,mr=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Se.memoizedState=yt=e:yt=yt.next=e,yt}function ht(){if(Xe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=yt===null?Se.memoizedState:yt.next;if(t!==null)yt=t,Xe=e;else{if(e===null)throw Se.alternate===null?Error(s(467)):Error(s(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},yt===null?Se.memoizedState=yt=e:yt=yt.next=e}return yt}function Ri(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oo(e){var t=ro;return ro+=1,mr===null&&(mr=[]),e=xm(mr,e,t),t=Se,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?dh:tu),e}function ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return oo(e);if(e.$$typeof===H)return zt(e)}throw Error(s(438,String(e)))}function Ic(e){var t=null,n=Se.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Se.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ri(),Se.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ge;return t.index++,n}function oa(e,t){return typeof t=="function"?t(e):t}function Ni(e){var t=ht();return Vc(t,Xe,e)}function Vc(e,t,n){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=n;var i=e.baseQueue,c=l.pending;if(c!==null){if(i!==null){var m=i.next;i.next=c.next,c.next=m}t.baseQueue=i=c,l.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var v=m=null,E=null,O=t,B=!1;do{var X=O.lane&-536870913;if(X!==O.lane?(_e&X)===X:(ra&X)===X){var M=O.revertLane;if(M===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),X===ir&&(B=!0);else if((ra&M)===M){O=O.next,M===ir&&(B=!0);continue}else X={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(v=E=X,m=c):E=E.next=X,Se.lanes|=M,La|=M;X=O.action,xl&&n(c,X),c=O.hasEagerState?O.eagerState:n(c,X)}else M={lane:X,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(v=E=M,m=c):E=E.next=M,Se.lanes|=X,La|=X;O=O.next}while(O!==null&&O!==t);if(E===null?m=c:E.next=v,!Wt(c,e.memoizedState)&&(vt=!0,B&&(n=sr,n!==null)))throw n;e.memoizedState=c,e.baseState=m,e.baseQueue=E,l.lastRenderedState=c}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Qc(e){var t=ht(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,c=t.memoizedState;if(i!==null){n.pending=null;var m=i=i.next;do c=e(c,m.action),m=m.next;while(m!==i);Wt(c,t.memoizedState)||(vt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,l]}function _m(e,t,n){var l=Se,i=ht(),c=Oe;if(c){if(n===void 0)throw Error(s(407));n=n()}else n=t();var m=!Wt((Xe||i).memoizedState,n);if(m&&(i.memoizedState=n,vt=!0),i=i.queue,$c(Mm.bind(null,l,i,e),[e]),i.getSnapshot!==t||m||yt!==null&&yt.memoizedState.tag&1){if(l.flags|=2048,hr(9,{destroy:void 0},Om.bind(null,l,i,n,t),null),Ze===null)throw Error(s(349));c||(ra&127)!==0||zm(l,t,n)}return n}function zm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t=Ri(),Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Om(e,t,n,l){t.value=n,t.getSnapshot=l,Lm(t)&&Dm(e)}function Mm(e,t,n){return n(function(){Lm(t)&&Dm(e)})}function Lm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wt(e,n)}catch{return!0}}function Dm(e){var t=dl(e,2);t!==null&&Pt(t,e,2)}function Pc(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),xl){dt(!0);try{n()}finally{dt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:e},t}function km(e,t,n,l){return e.baseState=n,Vc(e,Xe,typeof l=="function"?l:oa)}function S0(e,t,n,l,i){if(zi(e))throw Error(s(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};L.T!==null?n(!0):c.isTransition=!1,l(c),n=t.pending,n===null?(c.next=t.pending=c,Bm(t,c)):(c.next=n.next,t.pending=n.next=c)}}function Bm(e,t){var n=t.action,l=t.payload,i=e.state;if(t.isTransition){var c=L.T,m={};L.T=m;try{var v=n(i,l),E=L.S;E!==null&&E(m,v),Hm(e,t,v)}catch(O){Zc(e,t,O)}finally{c!==null&&m.types!==null&&(c.types=m.types),L.T=c}}else try{c=n(i,l),Hm(e,t,c)}catch(O){Zc(e,t,O)}}function Hm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){qm(e,t,l)},function(l){return Zc(e,t,l)}):qm(e,t,n)}function qm(e,t,n){t.status="fulfilled",t.value=n,Ym(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bm(e,n)))}function Zc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Ym(t),t=t.next;while(t!==l)}e.action=null}function Ym(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xm(e,t){return t}function Gm(e,t){if(Oe){var n=Ze.formState;if(n!==null){e:{var l=Se;if(Oe){if(Je){t:{for(var i=Je,c=yn;i.nodeType!==8;){if(!c){i=null;break t}if(i=xn(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){Je=xn(i.nextSibling),l=i.data==="F!";break e}}Ta(l)}l=!1}l&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xm,lastRenderedState:t},n.queue=l,n=sh.bind(null,Se,l),l.dispatch=n,l=Pc(!1),c=eu.bind(null,Se,!1,l.queue),l=Yt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,n=S0.bind(null,Se,i,c,n),i.dispatch=n,l.memoizedState=e,[t,n,!1]}function Im(e){var t=ht();return Vm(t,Xe,e)}function Vm(e,t,n){if(t=Vc(e,t,Xm)[0],e=Ni(oa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=oo(t)}catch(m){throw m===cr?vi:m}else l=t;t=ht();var i=t.queue,c=i.dispatch;return n!==t.memoizedState&&(Se.flags|=2048,hr(9,{destroy:void 0},E0.bind(null,i,n),null)),[l,c,e]}function E0(e,t){e.action=t}function Qm(e){var t=ht(),n=Xe;if(n!==null)return Vm(t,n,e);ht(),t=t.memoizedState,n=ht();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function hr(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Se.updateQueue,t===null&&(t=Ri(),Se.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Pm(){return ht().memoizedState}function Ui(e,t,n,l){var i=Yt();Se.flags|=e,i.memoizedState=hr(1|t,{destroy:void 0},n,l===void 0?null:l)}function _i(e,t,n,l){var i=ht();l=l===void 0?null:l;var c=i.memoizedState.inst;Xe!==null&&l!==null&&Hc(l,Xe.memoizedState.deps)?i.memoizedState=hr(t,c,n,l):(Se.flags|=e,i.memoizedState=hr(1|t,c,n,l))}function Zm(e,t){Ui(8390656,8,e,t)}function $c(e,t){_i(2048,8,e,t)}function A0(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=Ri(),Se.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function $m(e){var t=ht().memoizedState;return A0({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Km(e,t){return _i(4,2,e,t)}function Jm(e,t){return _i(4,4,e,t)}function Wm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Fm(e,t,n){n=n!=null?n.concat([e]):null,_i(4,4,Wm.bind(null,t,e),n)}function Kc(){}function eh(e,t){var n=ht();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Hc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function th(e,t){var n=ht();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Hc(t,l[1]))return l[0];if(l=e(),xl){dt(!0);try{e()}finally{dt(!1)}}return n.memoizedState=[l,t],l}function Jc(e,t,n){return n===void 0||(ra&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=np(),Se.lanes|=e,La|=e,n)}function nh(e,t,n,l){return Wt(n,t)?n:dr.current!==null?(e=Jc(e,n,l),Wt(e,t)||(vt=!0),e):(ra&42)===0||(ra&1073741824)!==0&&(_e&261930)===0?(vt=!0,e.memoizedState=n):(e=np(),Se.lanes|=e,La|=e,t)}function ah(e,t,n,l,i){var c=Q.p;Q.p=c!==0&&8>c?c:8;var m=L.T,v={};L.T=v,eu(e,!1,t,n);try{var E=i(),O=L.S;if(O!==null&&O(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var B=v0(E,l);io(e,t,B,ln(e))}else io(e,t,l,ln(e))}catch(X){io(e,t,{then:function(){},status:"rejected",reason:X},ln())}finally{Q.p=c,m!==null&&v.types!==null&&(m.types=v.types),L.T=m}}function C0(){}function Wc(e,t,n,l){if(e.tag!==5)throw Error(s(476));var i=lh(e).queue;ah(e,i,t,W,n===null?C0:function(){return rh(e),n(l)})}function lh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rh(e){var t=lh(e);t.next===null&&(t=e.alternate.memoizedState),io(e,t.next.queue,{},ln())}function Fc(){return zt(Co)}function oh(){return ht().memoizedState}function ih(){return ht().memoizedState}function T0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ln();e=Na(n);var l=Ua(t,e,n);l!==null&&(Pt(l,t,n),no(l,t,n)),t={cache:jc()},e.payload=t;return}t=t.return}}function R0(e,t,n){var l=ln();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zi(e)?ch(t,n):(n=bc(e,t,n,l),n!==null&&(Pt(n,e,l),uh(n,t,l)))}function sh(e,t,n){var l=ln();io(e,t,n,l)}function io(e,t,n,l){var i={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zi(e))ch(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,v=c(m,n);if(i.hasEagerState=!0,i.eagerState=v,Wt(v,m))return fi(e,t,i,0),Ze===null&&di(),!1}catch{}if(n=bc(e,t,i,l),n!==null)return Pt(n,e,l),uh(n,t,l),!0}return!1}function eu(e,t,n,l){if(l={lane:2,revertLane:zu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},zi(e)){if(t)throw Error(s(479))}else t=bc(e,n,l,2),t!==null&&Pt(t,e,2)}function zi(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function ch(e,t){fr=Ci=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uh(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,ye(e,n)}}var so={readContext:zt,use:ji,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};so.useEffectEvent=it;var dh={readContext:zt,use:ji,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Zm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ui(4194308,4,Wm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ui(4194308,4,e,t)},useInsertionEffect:function(e,t){Ui(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var l=e();if(xl){dt(!0);try{e()}finally{dt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Yt();if(n!==void 0){var i=n(t);if(xl){dt(!0);try{n(t)}finally{dt(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=R0.bind(null,Se,e),[l.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=Pc(e);var t=e.queue,n=sh.bind(null,Se,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Kc,useDeferredValue:function(e,t){var n=Yt();return Jc(n,e,t)},useTransition:function(){var e=Pc(!1);return e=ah.bind(null,Se,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Se,i=Yt();if(Oe){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Ze===null)throw Error(s(349));(_e&127)!==0||zm(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,Zm(Mm.bind(null,l,c,e),[e]),l.flags|=2048,hr(9,{destroy:void 0},Om.bind(null,l,c,n,t),null),n},useId:function(){var e=Yt(),t=Ze.identifierPrefix;if(Oe){var n=Yn,l=qn;n=(l&~(1<<32-Bt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ti++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=x0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Fc,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=eu.bind(null,Se,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ic,useCacheRefresh:function(){return Yt().memoizedState=T0.bind(null,Se)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((He&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},tu={readContext:zt,use:ji,useCallback:eh,useContext:zt,useEffect:$c,useImperativeHandle:Fm,useInsertionEffect:Km,useLayoutEffect:Jm,useMemo:th,useReducer:Ni,useRef:Pm,useState:function(){return Ni(oa)},useDebugValue:Kc,useDeferredValue:function(e,t){var n=ht();return nh(n,Xe.memoizedState,e,t)},useTransition:function(){var e=Ni(oa)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:oo(e),t]},useSyncExternalStore:_m,useId:oh,useHostTransitionStatus:Fc,useFormState:Im,useActionState:Im,useOptimistic:function(e,t){var n=ht();return km(n,Xe,e,t)},useMemoCache:Ic,useCacheRefresh:ih};tu.useEffectEvent=$m;var fh={readContext:zt,use:ji,useCallback:eh,useContext:zt,useEffect:$c,useImperativeHandle:Fm,useInsertionEffect:Km,useLayoutEffect:Jm,useMemo:th,useReducer:Qc,useRef:Pm,useState:function(){return Qc(oa)},useDebugValue:Kc,useDeferredValue:function(e,t){var n=ht();return Xe===null?Jc(n,e,t):nh(n,Xe.memoizedState,e,t)},useTransition:function(){var e=Qc(oa)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:oo(e),t]},useSyncExternalStore:_m,useId:oh,useHostTransitionStatus:Fc,useFormState:Qm,useActionState:Qm,useOptimistic:function(e,t){var n=ht();return Xe!==null?km(n,Xe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ic,useCacheRefresh:ih};fh.useEffectEvent=$m;function nu(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var au={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=ln(),i=Na(l);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,l),t!==null&&(Pt(t,e,l),no(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=ln(),i=Na(l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,l),t!==null&&(Pt(t,e,l),no(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ln(),l=Na(n);l.tag=2,t!=null&&(l.callback=t),t=Ua(e,l,n),t!==null&&(Pt(t,e,n),no(t,e,n))}};function mh(e,t,n,l,i,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,m):t.prototype&&t.prototype.isPureReactComponent?!Zr(n,l)||!Zr(i,c):!0}function hh(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&au.enqueueReplaceState(t,t.state,null)}function wl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=w({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function ph(e){ui(e)}function gh(e){console.error(e)}function bh(e){ui(e)}function Oi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function yh(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function lu(e,t,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){Oi(e,t)},n}function vh(e){return e=Na(e),e.tag=3,e}function xh(e,t,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var c=l.value;e.payload=function(){return i(c)},e.callback=function(){yh(t,n,l)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){yh(t,n,l),typeof i!="function"&&(Da===null?Da=new Set([this]):Da.add(this));var v=l.stack;this.componentDidCatch(l.value,{componentStack:v!==null?v:""})})}function j0(e,t,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&or(t,n,i,!0),n=en.current,n!==null){switch(n.tag){case 31:case 13:return vn===null?Vi():n.alternate===null&&st===0&&(st=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===xi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Nu(e,l,i)),!1;case 22:return n.flags|=65536,l===xi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Nu(e,l,i)),!1}throw Error(s(435,n.tag))}return Nu(e,l,i),Vi(),!1}if(Oe)return t=en.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==Ec&&(e=Error(s(422),{cause:l}),Jr(pn(e,n)))):(l!==Ec&&(t=Error(s(423),{cause:l}),Jr(pn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=pn(l,n),i=lu(e.stateNode,l,i),Mc(e,i),st!==4&&(st=2)),!1;var c=Error(s(520),{cause:l});if(c=pn(c,n),bo===null?bo=[c]:bo.push(c),st!==4&&(st=2),t===null)return!0;l=pn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=lu(n.stateNode,l,e),Mc(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Da===null||!Da.has(c))))return n.flags|=65536,i&=-i,n.lanes|=i,i=vh(i),xh(i,e,n,l),Mc(n,i),!1}n=n.return}while(n!==null);return!1}var ru=Error(s(461)),vt=!1;function Ot(e,t,n,l){t.child=e===null?Am(t,null,n,l):vl(t,e.child,n,l)}function wh(e,t,n,l,i){n=n.render;var c=t.ref;if("ref"in l){var m={};for(var v in l)v!=="ref"&&(m[v]=l[v])}else m=l;return pl(t),l=qc(e,t,n,m,c,i),v=Yc(),e!==null&&!vt?(Xc(e,t,i),ia(e,t,i)):(Oe&&v&&wc(t),t.flags|=1,Ot(e,t,l,i),t.child)}function Sh(e,t,n,l,i){if(e===null){var c=n.type;return typeof c=="function"&&!yc(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,Eh(e,t,c,l,i)):(e=hi(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!mu(e,i)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:Zr,n(m,l)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,e=ta(c,l),e.ref=t.ref,e.return=t,t.child=e}function Eh(e,t,n,l,i){if(e!==null){var c=e.memoizedProps;if(Zr(c,l)&&e.ref===t.ref)if(vt=!1,t.pendingProps=l=c,mu(e,i))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,ia(e,t,i)}return ou(e,t,n,l,i)}function Ah(e,t,n,l){var i=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~c}else l=0,t.child=null;return Ch(e,t,c,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yi(t,c!==null?c.cachePool:null),c!==null?Rm(t,c):Dc(),jm(t);else return l=t.lanes=536870912,Ch(e,t,c!==null?c.baseLanes|n:n,n,l)}else c!==null?(yi(t,c.cachePool),Rm(t,c),za(),t.memoizedState=null):(e!==null&&yi(t,null),Dc(),za());return Ot(e,t,i,n),t.child}function co(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ch(e,t,n,l,i){var c=Uc();return c=c===null?null:{parent:bt._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&yi(t,null),Dc(),jm(t),e!==null&&or(e,t,l,!0),t.childLanes=i,null}function Mi(e,t){return t=Di({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Th(e,t,n){return vl(t,e.child,null,n),e=Mi(t,t.pendingProps),e.flags|=2,tn(t),t.memoizedState=null,e}function N0(e,t,n){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(l.mode==="hidden")return e=Mi(t,l),t.lanes=536870912,co(null,e);if(Bc(t),(e=Je)?(e=Bp(e,yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Aa!==null?{id:qn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},n=cm(e),n.return=t,t.child=n,_t=t,Je=null)):e=null,e===null)throw Ta(t);return t.lanes=536870912,null}return Mi(t,l)}var c=e.memoizedState;if(c!==null){var m=c.dehydrated;if(Bc(t),i)if(t.flags&256)t.flags&=-257,t=Th(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(vt||or(e,t,n,!1),i=(n&e.childLanes)!==0,vt||i){if(l=Ze,l!==null&&(m=Me(l,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,dl(e,m),Pt(l,e,m),ru;Vi(),t=Th(e,t,n)}else e=c.treeContext,Je=xn(m.nextSibling),_t=t,Oe=!0,Ca=null,yn=!1,e!==null&&fm(t,e),t=Mi(t,l),t.flags|=4096;return t}return e=ta(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Li(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ou(e,t,n,l,i){return pl(t),n=qc(e,t,n,l,void 0,i),l=Yc(),e!==null&&!vt?(Xc(e,t,i),ia(e,t,i)):(Oe&&l&&wc(t),t.flags|=1,Ot(e,t,n,i),t.child)}function Rh(e,t,n,l,i,c){return pl(t),t.updateQueue=null,n=Um(t,l,n,i),Nm(e),l=Yc(),e!==null&&!vt?(Xc(e,t,c),ia(e,t,c)):(Oe&&l&&wc(t),t.flags|=1,Ot(e,t,n,c),t.child)}function jh(e,t,n,l,i){if(pl(t),t.stateNode===null){var c=nr,m=n.contextType;typeof m=="object"&&m!==null&&(c=zt(m)),c=new n(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=au,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},zc(t),m=n.contextType,c.context=typeof m=="object"&&m!==null?zt(m):nr,c.state=t.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(nu(t,n,m,l),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&au.enqueueReplaceState(c,c.state,null),lo(t,l,c,i),ao(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var v=t.memoizedProps,E=wl(n,v);c.props=E;var O=c.context,B=n.contextType;m=nr,typeof B=="object"&&B!==null&&(m=zt(B));var X=n.getDerivedStateFromProps;B=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,B||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v||O!==m)&&hh(t,c,l,m),ja=!1;var M=t.memoizedState;c.state=M,lo(t,l,c,i),ao(),O=t.memoizedState,v||M!==O||ja?(typeof X=="function"&&(nu(t,n,X,l),O=t.memoizedState),(E=ja||mh(t,n,E,l,M,O,m))?(B||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=O),c.props=l,c.state=O,c.context=m,l=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Oc(e,t),m=t.memoizedProps,B=wl(n,m),c.props=B,X=t.pendingProps,M=c.context,O=n.contextType,E=nr,typeof O=="object"&&O!==null&&(E=zt(O)),v=n.getDerivedStateFromProps,(O=typeof v=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==X||M!==E)&&hh(t,c,l,E),ja=!1,M=t.memoizedState,c.state=M,lo(t,l,c,i),ao();var D=t.memoizedState;m!==X||M!==D||ja||e!==null&&e.dependencies!==null&&gi(e.dependencies)?(typeof v=="function"&&(nu(t,n,v,l),D=t.memoizedState),(B=ja||mh(t,n,B,l,M,D,E)||e!==null&&e.dependencies!==null&&gi(e.dependencies))?(O||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,D,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,D,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=D),c.props=l,c.state=D,c.context=E,l=B):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,Li(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=vl(t,e.child,null,i),t.child=vl(t,null,n,i)):Ot(e,t,n,i),t.memoizedState=c.state,e=t.child):e=ia(e,t,i),e}function Nh(e,t,n,l){return ml(),t.flags|=256,Ot(e,t,n,l),t.child}var iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function su(e){return{baseLanes:e,cachePool:ym()}}function cu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=an),e}function Uh(e,t,n){var l=t.pendingProps,i=!1,c=(t.flags&128)!==0,m;if((m=c)||(m=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),m&&(i=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(i?_a(t):za(),(e=Je)?(e=Bp(e,yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Aa!==null?{id:qn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},n=cm(e),n.return=t,t.child=n,_t=t,Je=null)):e=null,e===null)throw Ta(t);return Vu(e)?t.lanes=32:t.lanes=536870912,null}var v=l.children;return l=l.fallback,i?(za(),i=t.mode,v=Di({mode:"hidden",children:v},i),l=fl(l,i,n,null),v.return=t,l.return=t,v.sibling=l,t.child=v,l=t.child,l.memoizedState=su(n),l.childLanes=cu(e,m,n),t.memoizedState=iu,co(null,l)):(_a(t),uu(t,v))}var E=e.memoizedState;if(E!==null&&(v=E.dehydrated,v!==null)){if(c)t.flags&256?(_a(t),t.flags&=-257,t=du(e,t,n)):t.memoizedState!==null?(za(),t.child=e.child,t.flags|=128,t=null):(za(),v=l.fallback,i=t.mode,l=Di({mode:"visible",children:l.children},i),v=fl(v,i,n,null),v.flags|=2,l.return=t,v.return=t,l.sibling=v,t.child=l,vl(t,e.child,null,n),l=t.child,l.memoizedState=su(n),l.childLanes=cu(e,m,n),t.memoizedState=iu,t=co(null,l));else if(_a(t),Vu(v)){if(m=v.nextSibling&&v.nextSibling.dataset,m)var O=m.dgst;m=O,l=Error(s(419)),l.stack="",l.digest=m,Jr({value:l,source:null,stack:null}),t=du(e,t,n)}else if(vt||or(e,t,n,!1),m=(n&e.childLanes)!==0,vt||m){if(m=Ze,m!==null&&(l=Me(m,n),l!==0&&l!==E.retryLane))throw E.retryLane=l,dl(e,l),Pt(m,e,l),ru;Iu(v)||Vi(),t=du(e,t,n)}else Iu(v)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Je=xn(v.nextSibling),_t=t,Oe=!0,Ca=null,yn=!1,e!==null&&fm(t,e),t=uu(t,l.children),t.flags|=4096);return t}return i?(za(),v=l.fallback,i=t.mode,E=e.child,O=E.sibling,l=ta(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,O!==null?v=ta(O,v):(v=fl(v,i,n,null),v.flags|=2),v.return=t,l.return=t,l.sibling=v,t.child=l,co(null,l),l=t.child,v=e.child.memoizedState,v===null?v=su(n):(i=v.cachePool,i!==null?(E=bt._currentValue,i=i.parent!==E?{parent:E,pool:E}:i):i=ym(),v={baseLanes:v.baseLanes|n,cachePool:i}),l.memoizedState=v,l.childLanes=cu(e,m,n),t.memoizedState=iu,co(e.child,l)):(_a(t),n=e.child,e=n.sibling,n=ta(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=n,t.memoizedState=null,n)}function uu(e,t){return t=Di({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Di(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function du(e,t,n){return vl(t,e.child,null,n),e=uu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _h(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Tc(e.return,t,n)}function fu(e,t,n,l,i,c){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i,treeForkCount:c}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=n,m.tailMode=i,m.treeForkCount=c)}function zh(e,t,n){var l=t.pendingProps,i=l.revealOrder,c=l.tail;l=l.children;var m=mt.current,v=(m&2)!==0;if(v?(m=m&1|2,t.flags|=128):m&=1,_(mt,m),Ot(e,t,l,n),l=Oe?Kr:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_h(e,n,t);else if(e.tag===19)_h(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ai(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fu(t,!1,i,n,c,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ai(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fu(t,!0,n,null,c,l);break;case"together":fu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ia(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),La|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(or(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=ta(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ta(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&gi(e)))}function U0(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),Ra(t,bt,e.memoizedState.cache),ml();break;case 27:case 5:Ve(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_a(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Uh(e,t,n):(_a(t),e=ia(e,t,n),e!==null?e.sibling:null);_a(t);break;case 19:var i=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(or(e,t,n,!1),l=(n&t.childLanes)!==0),i){if(l)return zh(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_(mt,mt.current),l)break;return null;case 22:return t.lanes=0,Ah(e,t,n,t.pendingProps);case 24:Ra(t,bt,e.memoizedState.cache)}return ia(e,t,n)}function Oh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!mu(e,n)&&(t.flags&128)===0)return vt=!1,U0(e,t,n);vt=(e.flags&131072)!==0}else vt=!1,Oe&&(t.flags&1048576)!==0&&dm(t,Kr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=bl(t.elementType),t.type=e,typeof e=="function")yc(e)?(l=wl(e,l),t.tag=1,t=jh(null,t,e,l,n)):(t.tag=0,t=ou(null,t,e,l,n));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=wh(null,t,e,l,n);break e}else if(i===Z){t.tag=14,t=Sh(null,t,e,l,n);break e}}throw t=ne(e)||e,Error(s(306,t,""))}}return t;case 0:return ou(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,i=wl(l,t.pendingProps),jh(e,t,l,i,n);case 3:e:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var c=t.memoizedState;i=c.element,Oc(e,t),lo(t,l,null,n);var m=t.memoizedState;if(l=m.cache,Ra(t,bt,l),l!==c.cache&&Rc(t,[bt],n,!0),ao(),l=m.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Nh(e,t,l,n);break e}else if(l!==i){i=pn(Error(s(424)),t),Jr(i),t=Nh(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Je=xn(e.firstChild),_t=t,Oe=!0,Ca=null,yn=!0,n=Am(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ml(),l===i){t=ia(e,t,n);break e}Ot(e,t,l,n)}t=t.child}return t;case 26:return Li(e,t),e===null?(n=Ip(t.type,null,t.pendingProps,null))?t.memoizedState=n:Oe||(n=t.type,e=t.pendingProps,l=Wi(K.current).createElement(n),l[ft]=t,l[Et]=e,Mt(l,n,e),jt(l),t.stateNode=l):t.memoizedState=Ip(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ve(t),e===null&&Oe&&(l=t.stateNode=Yp(t.type,t.pendingProps,K.current),_t=t,yn=!0,i=Je,qa(t.type)?(Qu=i,Je=xn(l.firstChild)):Je=i),Ot(e,t,t.pendingProps.children,n),Li(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((i=l=Je)&&(l=ox(l,t.type,t.pendingProps,yn),l!==null?(t.stateNode=l,_t=t,Je=xn(l.firstChild),yn=!1,i=!0):i=!1),i||Ta(t)),Ve(t),i=t.type,c=t.pendingProps,m=e!==null?e.memoizedProps:null,l=c.children,Yu(i,c)?l=null:m!==null&&Yu(i,m)&&(t.flags|=32),t.memoizedState!==null&&(i=qc(e,t,w0,null,null,n),Co._currentValue=i),Li(e,t),Ot(e,t,l,n),t.child;case 6:return e===null&&Oe&&((e=n=Je)&&(n=ix(n,t.pendingProps,yn),n!==null?(t.stateNode=n,_t=t,Je=null,e=!0):e=!1),e||Ta(t)),null;case 13:return Uh(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=vl(t,null,l,n):Ot(e,t,l,n),t.child;case 11:return wh(e,t,t.type,t.pendingProps,n);case 7:return Ot(e,t,t.pendingProps,n),t.child;case 8:return Ot(e,t,t.pendingProps.children,n),t.child;case 12:return Ot(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Ra(t,t.type,l.value),Ot(e,t,l.children,n),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,pl(t),i=zt(i),l=l(i),t.flags|=1,Ot(e,t,l,n),t.child;case 14:return Sh(e,t,t.type,t.pendingProps,n);case 15:return Eh(e,t,t.type,t.pendingProps,n);case 19:return zh(e,t,n);case 31:return N0(e,t,n);case 22:return Ah(e,t,n,t.pendingProps);case 24:return pl(t),l=zt(bt),e===null?(i=Uc(),i===null&&(i=Ze,c=jc(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=n),i=c),t.memoizedState={parent:l,cache:i},zc(t),Ra(t,bt,i)):((e.lanes&n)!==0&&(Oc(e,t),lo(t,null,null,n),ao()),i=e.memoizedState,c=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ra(t,bt,l)):(l=c.cache,Ra(t,bt,l),l!==i.cache&&Rc(t,[bt],n,!0))),Ot(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function sa(e){e.flags|=4}function hu(e,t,n,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(op())e.flags|=8192;else throw yl=xi,_c}else e.flags&=-16777217}function Mh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$p(t))if(op())e.flags|=8192;else throw yl=xi,_c}function ki(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?rl():536870912,e.lanes|=t,yr|=t)}function uo(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function _0(e,t,n){var l=t.pendingProps;switch(Sc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),la(bt),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(rr(t)?sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ac())),We(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(sa(t),c!==null?(We(t),Mh(t,c)):(We(t),hu(t,i,null,l,n))):c?c!==e.memoizedState?(sa(t),We(t),Mh(t,c)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&sa(t),We(t),hu(t,i,e,l,n)),null;case 27:if(ke(t),n=K.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return We(t),null}e=G.current,rr(t)?mm(t):(e=Yp(i,l,n),t.stateNode=e,sa(t))}return We(t),null;case 5:if(ke(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return We(t),null}if(c=G.current,rr(t))mm(t);else{var m=Wi(K.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?m.createElement(i,{is:l.is}):m.createElement(i)}}c[ft]=t,c[Et]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=c;e:switch(Mt(c,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&sa(t)}}return We(t),hu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=K.current,rr(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,i=_t,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Up(e.nodeValue,n)),e||Ta(t,!0)}else e=Wi(e).createTextNode(l),e[ft]=t,t.stateNode=e}return We(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=rr(t),n!==null){if(e===null){if(!l)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[ft]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else n=Ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(tn(t),t):(tn(t),null);if((t.flags&128)!==0)throw Error(s(558))}return We(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=rr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));i[ft]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),i=!1}else i=Ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(tn(t),t):(tn(t),null)}return tn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==i&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ki(t,t.updateQueue),We(t),null);case 4:return fe(),e===null&&Du(t.stateNode.containerInfo),We(t),null;case 10:return la(t.type),We(t),null;case 19:if(k(mt),l=t.memoizedState,l===null)return We(t),null;if(i=(t.flags&128)!==0,c=l.rendering,c===null)if(i)uo(l,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ai(e),c!==null){for(t.flags|=128,uo(l,!1),e=c.updateQueue,t.updateQueue=e,ki(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)sm(n,e),n=n.sibling;return _(mt,mt.current&1|2),Oe&&na(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Be()>Xi&&(t.flags|=128,i=!0,uo(l,!1),t.lanes=4194304)}else{if(!i)if(e=Ai(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ki(t,e),uo(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!Oe)return We(t),null}else 2*Be()-l.renderingStartTime>Xi&&n!==536870912&&(t.flags|=128,i=!0,uo(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Be(),e.sibling=null,n=mt.current,_(mt,i?n&1|2:n&1),Oe&&na(t,l.treeForkCount),e):(We(t),null);case 22:case 23:return tn(t),kc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),n=t.updateQueue,n!==null&&ki(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&k(gl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(bt),We(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function z0(e,t){switch(Sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(bt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(tn(t),t.alternate===null)throw Error(s(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(mt),null;case 4:return fe(),null;case 10:return la(t.type),null;case 22:case 23:return tn(t),kc(),e!==null&&k(gl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(bt),null;case 25:return null;default:return null}}function Lh(e,t){switch(Sc(t),t.tag){case 3:la(bt),fe();break;case 26:case 27:case 5:ke(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&tn(t);break;case 13:tn(t);break;case 19:k(mt);break;case 10:la(t.type);break;case 22:case 23:tn(t),kc(),e!==null&&k(gl);break;case 24:la(bt)}}function fo(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&e)===e){l=void 0;var c=n.create,m=n.inst;l=c(),m.destroy=l}n=n.next}while(n!==i)}}catch(v){Ye(t,t.return,v)}}function Oa(e,t,n){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var c=i.next;l=c;do{if((l.tag&e)===e){var m=l.inst,v=m.destroy;if(v!==void 0){m.destroy=void 0,i=t;var E=n,O=v;try{O()}catch(B){Ye(i,E,B)}}}l=l.next}while(l!==c)}}catch(B){Ye(t,t.return,B)}}function Dh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Tm(t,n)}catch(l){Ye(e,e.return,l)}}}function kh(e,t,n){n.props=wl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ye(e,t,l)}}function mo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(i){Ye(e,t,i)}}function Xn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){Ye(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Ye(e,t,i)}else n.current=null}function Bh(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){Ye(e,e.return,i)}}function pu(e,t,n){try{var l=e.stateNode;ex(l,e.type,n,t),l[Et]=t}catch(i){Ye(e,e.return,i)}}function Hh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function gu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&qa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bu(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Fn));else if(l!==4&&(l===27&&qa(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(bu(e,t,n),e=e.sibling;e!==null;)bu(e,t,n),e=e.sibling}function Bi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&qa(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Bi(e,t,n),e=e.sibling;e!==null;)Bi(e,t,n),e=e.sibling}function qh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Mt(t,l,n),t[ft]=e,t[Et]=n}catch(c){Ye(e,e.return,c)}}var ca=!1,xt=!1,yu=!1,Yh=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function O0(e,t){if(e=e.containerInfo,Hu=rs,e=Ff(e),dc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,v=-1,E=-1,O=0,B=0,X=e,M=null;t:for(;;){for(var D;X!==n||i!==0&&X.nodeType!==3||(v=m+i),X!==c||l!==0&&X.nodeType!==3||(E=m+l),X.nodeType===3&&(m+=X.nodeValue.length),(D=X.firstChild)!==null;)M=X,X=D;for(;;){if(X===e)break t;if(M===n&&++O===i&&(v=m),M===c&&++B===l&&(E=m),(D=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=D}n=v===-1||E===-1?null:{start:v,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(qu={focusedElem:e,selectionRange:n},rs=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,i=c.memoizedProps,c=c.memoizedState,l=n.stateNode;try{var ie=wl(n.type,i);e=l.getSnapshotBeforeUpdate(ie,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ye(n,n.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Gu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Nt=e;break}Nt=t.return}}function Xh(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:da(e,n),l&4&&fo(5,n);break;case 1:if(da(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(m){Ye(n,n.return,m)}else{var i=wl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){Ye(n,n.return,m)}}l&64&&Dh(n),l&512&&mo(n,n.return);break;case 3:if(da(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Tm(e,t)}catch(m){Ye(n,n.return,m)}}break;case 27:t===null&&l&4&&qh(n);case 26:case 5:da(e,n),t===null&&l&4&&Bh(n),l&512&&mo(n,n.return);break;case 12:da(e,n);break;case 31:da(e,n),l&4&&Vh(e,n);break;case 13:da(e,n),l&4&&Qh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=X0.bind(null,n),sx(e,n))));break;case 22:if(l=n.memoizedState!==null||ca,!l){t=t!==null&&t.memoizedState!==null||xt,i=ca;var c=xt;ca=l,(xt=t)&&!c?fa(e,n,(n.subtreeFlags&8772)!==0):da(e,n),ca=i,xt=c}break;case 30:break;default:da(e,n)}}function Gh(e){var t=e.alternate;t!==null&&(e.alternate=null,Gh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Gl(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var et=null,Gt=!1;function ua(e,t,n){for(n=n.child;n!==null;)Ih(e,t,n),n=n.sibling}function Ih(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(tl,n)}catch{}switch(n.tag){case 26:xt||Xn(n,t),ua(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:xt||Xn(n,t);var l=et,i=Gt;qa(n.type)&&(et=n.stateNode,Gt=!1),ua(e,t,n),So(n.stateNode),et=l,Gt=i;break;case 5:xt||Xn(n,t);case 6:if(l=et,i=Gt,et=null,ua(e,t,n),et=l,Gt=i,et!==null)if(Gt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(n.stateNode)}catch(c){Ye(n,t,c)}else try{et.removeChild(n.stateNode)}catch(c){Ye(n,t,c)}break;case 18:et!==null&&(Gt?(e=et,Dp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Tr(e)):Dp(et,n.stateNode));break;case 4:l=et,i=Gt,et=n.stateNode.containerInfo,Gt=!0,ua(e,t,n),et=l,Gt=i;break;case 0:case 11:case 14:case 15:Oa(2,n,t),xt||Oa(4,n,t),ua(e,t,n);break;case 1:xt||(Xn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&kh(n,t,l)),ua(e,t,n);break;case 21:ua(e,t,n);break;case 22:xt=(l=xt)||n.memoizedState!==null,ua(e,t,n),xt=l;break;default:ua(e,t,n)}}function Vh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tr(e)}catch(n){Ye(t,t.return,n)}}}function Qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tr(e)}catch(n){Ye(t,t.return,n)}}function M0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yh),t;default:throw Error(s(435,e.tag))}}function Hi(e,t){var n=M0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var i=G0.bind(null,e,l);l.then(i,i)}})}function It(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],c=e,m=t,v=m;e:for(;v!==null;){switch(v.tag){case 27:if(qa(v.type)){et=v.stateNode,Gt=!1;break e}break;case 5:et=v.stateNode,Gt=!1;break e;case 3:case 4:et=v.stateNode.containerInfo,Gt=!0;break e}v=v.return}if(et===null)throw Error(s(160));Ih(c,m,i),et=null,Gt=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ph(t,e),t=t.sibling}var zn=null;function Ph(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(t,e),Vt(e),l&4&&(Oa(3,e,e.return),fo(3,e),Oa(5,e,e.return));break;case 1:It(t,e),Vt(e),l&512&&(xt||n===null||Xn(n,n.return)),l&64&&ca&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var i=zn;if(It(t,e),Vt(e),l&512&&(xt||n===null||Xn(n,n.return)),l&4){var c=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":c=i.getElementsByTagName("title")[0],(!c||c[Hn]||c[ft]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(l),i.head.insertBefore(c,i.querySelector("head > title"))),Mt(c,l,n),c[ft]=e,jt(c),l=c;break e;case"link":var m=Pp("link","href",i).get(l+(n.href||""));if(m){for(var v=0;v<m.length;v++)if(c=m[v],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(v,1);break t}}c=i.createElement(l),Mt(c,l,n),i.head.appendChild(c);break;case"meta":if(m=Pp("meta","content",i).get(l+(n.content||""))){for(v=0;v<m.length;v++)if(c=m[v],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(v,1);break t}}c=i.createElement(l),Mt(c,l,n),i.head.appendChild(c);break;default:throw Error(s(468,l))}c[ft]=e,jt(c),l=c}e.stateNode=l}else Zp(i,e.type,e.stateNode);else e.stateNode=Qp(i,l,e.memoizedProps);else c!==l?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,l===null?Zp(i,e.type,e.stateNode):Qp(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&pu(e,e.memoizedProps,n.memoizedProps)}break;case 27:It(t,e),Vt(e),l&512&&(xt||n===null||Xn(n,n.return)),n!==null&&l&4&&pu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(It(t,e),Vt(e),l&512&&(xt||n===null||Xn(n,n.return)),e.flags&32){i=e.stateNode;try{$l(i,"")}catch(ie){Ye(e,e.return,ie)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,pu(e,i,n!==null?n.memoizedProps:i)),l&1024&&(yu=!0);break;case 6:if(It(t,e),Vt(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ie){Ye(e,e.return,ie)}}break;case 3:if(ts=null,i=zn,zn=Fi(t.containerInfo),It(t,e),zn=i,Vt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(ie){Ye(e,e.return,ie)}yu&&(yu=!1,Zh(e));break;case 4:l=zn,zn=Fi(e.stateNode.containerInfo),It(t,e),Vt(e),zn=l;break;case 12:It(t,e),Vt(e);break;case 31:It(t,e),Vt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hi(e,l)));break;case 13:It(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yi=Be()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hi(e,l)));break;case 22:i=e.memoizedState!==null;var E=n!==null&&n.memoizedState!==null,O=ca,B=xt;if(ca=O||i,xt=B||E,It(t,e),xt=B,ca=O,Vt(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||E||ca||xt||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){E=n=t;try{if(c=E.stateNode,i)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{v=E.stateNode;var X=E.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;v.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ie){Ye(E,E.return,ie)}}}else if(t.tag===6){if(n===null){E=t;try{E.stateNode.nodeValue=i?"":E.memoizedProps}catch(ie){Ye(E,E.return,ie)}}}else if(t.tag===18){if(n===null){E=t;try{var D=E.stateNode;i?kp(D,!0):kp(E.stateNode,!1)}catch(ie){Ye(E,E.return,ie)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Hi(e,n))));break;case 19:It(t,e),Vt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hi(e,l)));break;case 30:break;case 21:break;default:It(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Hh(l)){n=l;break}l=l.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode,c=gu(e);Bi(e,c,i);break;case 5:var m=n.stateNode;n.flags&32&&($l(m,""),n.flags&=-33);var v=gu(e);Bi(e,v,m);break;case 3:case 4:var E=n.stateNode.containerInfo,O=gu(e);bu(e,O,E);break;default:throw Error(s(161))}}catch(B){Ye(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Zh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function da(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Xh(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Oa(4,t,t.return),Sl(t);break;case 1:Xn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&kh(t,t.return,n),Sl(t);break;case 27:So(t.stateNode);case 26:case 5:Xn(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function fa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,c=t,m=c.flags;switch(c.tag){case 0:case 11:case 15:fa(i,c,n),fo(4,c);break;case 1:if(fa(i,c,n),l=c,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(O){Ye(l,l.return,O)}if(l=c,i=l.updateQueue,i!==null){var v=l.stateNode;try{var E=i.shared.hiddenCallbacks;if(E!==null)for(i.shared.hiddenCallbacks=null,i=0;i<E.length;i++)Cm(E[i],v)}catch(O){Ye(l,l.return,O)}}n&&m&64&&Dh(c),mo(c,c.return);break;case 27:qh(c);case 26:case 5:fa(i,c,n),n&&l===null&&m&4&&Bh(c),mo(c,c.return);break;case 12:fa(i,c,n);break;case 31:fa(i,c,n),n&&m&4&&Vh(i,c);break;case 13:fa(i,c,n),n&&m&4&&Qh(i,c);break;case 22:c.memoizedState===null&&fa(i,c,n),mo(c,c.return);break;case 30:break;default:fa(i,c,n)}t=t.sibling}}function vu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Wr(n))}function xu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e))}function On(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$h(e,t,n,l),t=t.sibling}function $h(e,t,n,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:On(e,t,n,l),i&2048&&fo(9,t);break;case 1:On(e,t,n,l);break;case 3:On(e,t,n,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e)));break;case 12:if(i&2048){On(e,t,n,l),e=t.stateNode;try{var c=t.memoizedProps,m=c.id,v=c.onPostCommit;typeof v=="function"&&v(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Ye(t,t.return,E)}}else On(e,t,n,l);break;case 31:On(e,t,n,l);break;case 13:On(e,t,n,l);break;case 23:break;case 22:c=t.stateNode,m=t.alternate,t.memoizedState!==null?c._visibility&2?On(e,t,n,l):ho(e,t):c._visibility&2?On(e,t,n,l):(c._visibility|=2,pr(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&vu(m,t);break;case 24:On(e,t,n,l),i&2048&&xu(t.alternate,t);break;default:On(e,t,n,l)}}function pr(e,t,n,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,m=t,v=n,E=l,O=m.flags;switch(m.tag){case 0:case 11:case 15:pr(c,m,v,E,i),fo(8,m);break;case 23:break;case 22:var B=m.stateNode;m.memoizedState!==null?B._visibility&2?pr(c,m,v,E,i):ho(c,m):(B._visibility|=2,pr(c,m,v,E,i)),i&&O&2048&&vu(m.alternate,m);break;case 24:pr(c,m,v,E,i),i&&O&2048&&xu(m.alternate,m);break;default:pr(c,m,v,E,i)}t=t.sibling}}function ho(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,i=l.flags;switch(l.tag){case 22:ho(n,l),i&2048&&vu(l.alternate,l);break;case 24:ho(n,l),i&2048&&xu(l.alternate,l);break;default:ho(n,l)}t=t.sibling}}var po=8192;function gr(e,t,n){if(e.subtreeFlags&po)for(e=e.child;e!==null;)Kh(e,t,n),e=e.sibling}function Kh(e,t,n){switch(e.tag){case 26:gr(e,t,n),e.flags&po&&e.memoizedState!==null&&xx(n,zn,e.memoizedState,e.memoizedProps);break;case 5:gr(e,t,n);break;case 3:case 4:var l=zn;zn=Fi(e.stateNode.containerInfo),gr(e,t,n),zn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=po,po=16777216,gr(e,t,n),po=l):gr(e,t,n));break;default:gr(e,t,n)}}function Jh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function go(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Nt=l,Fh(l,e)}Jh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wh(e),e=e.sibling}function Wh(e){switch(e.tag){case 0:case 11:case 15:go(e),e.flags&2048&&Oa(9,e,e.return);break;case 3:go(e);break;case 12:go(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qi(e)):go(e);break;default:go(e)}}function qi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Nt=l,Fh(l,e)}Jh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Oa(8,t,t.return),qi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qi(t));break;default:qi(t)}e=e.sibling}}function Fh(e,t){for(;Nt!==null;){var n=Nt;switch(n.tag){case 0:case 11:case 15:Oa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Wr(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Nt=l;else e:for(n=e;Nt!==null;){l=Nt;var i=l.sibling,c=l.return;if(Gh(l),l===n){Nt=null;break e}if(i!==null){i.return=c,Nt=i;break e}Nt=c}}}var L0={getCacheForType:function(e){var t=zt(bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return zt(bt).controller.signal}},D0=typeof WeakMap=="function"?WeakMap:Map,He=0,Ze=null,Te=null,_e=0,qe=0,nn=null,Ma=!1,br=!1,wu=!1,ma=0,st=0,La=0,El=0,Su=0,an=0,yr=0,bo=null,Qt=null,Eu=!1,Yi=0,ep=0,Xi=1/0,Gi=null,Da=null,At=0,ka=null,vr=null,ha=0,Au=0,Cu=null,tp=null,yo=0,Tu=null;function ln(){return(He&2)!==0&&_e!==0?_e&-_e:L.T!==null?zu():Ht()}function np(){if(an===0)if((_e&536870912)===0||Oe){var e=nl;nl<<=1,(nl&3932160)===0&&(nl=262144),an=e}else an=536870912;return e=en.current,e!==null&&(e.flags|=32),an}function Pt(e,t,n){(e===Ze&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(xr(e,0),Ba(e,_e,an,!1)),Jn(e,n),((He&2)===0||e!==Ze)&&(e===Ze&&((He&2)===0&&(El|=n),st===4&&Ba(e,_e,an,!1)),Gn(e))}function ap(e,t,n){if((He&6)!==0)throw Error(s(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Kn(e,t),i=l?H0(e,t):ju(e,t,!0),c=l;do{if(i===0){br&&!l&&Ba(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!k0(n)){i=ju(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var v=e;i=bo;var E=v.current.memoizedState.isDehydrated;if(E&&(xr(v,m).flags|=256),m=ju(v,m,!1),m!==2){if(wu&&!E){v.errorRecoveryDisabledLanes|=c,El|=c,i=4;break e}c=Qt,Qt=i,c!==null&&(Qt===null?Qt=c:Qt.push.apply(Qt,c))}i=m}if(c=!1,i!==2)continue}}if(i===1){xr(e,0),Ba(e,t,0,!0);break}e:{switch(l=e,c=i,c){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ba(l,t,an,!Ma);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=Yi+300-Be(),10<i)){if(Ba(l,t,an,!Ma),Yl(l,0,!0)!==0)break e;ha=t,l.timeoutHandle=Mp(lp.bind(null,l,n,Qt,Gi,Eu,t,an,El,yr,Ma,c,"Throttled",-0,0),i);break e}lp(l,n,Qt,Gi,Eu,t,an,El,yr,Ma,c,null,-0,0)}}break}while(!0);Gn(e)}function lp(e,t,n,l,i,c,m,v,E,O,B,X,M,D){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Kh(t,c,X);var ie=(c&62914560)===c?Yi-Be():(c&4194048)===c?ep-Be():0;if(ie=wx(X,ie),ie!==null){ha=c,e.cancelPendingCommit=ie(fp.bind(null,e,t,c,n,l,i,m,v,E,B,X,null,M,D)),Ba(e,c,m,!O);return}}fp(e,t,c,n,l,i,m,v,E)}function k0(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],c=i.getSnapshot;i=i.value;try{if(!Wt(c(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ba(e,t,n,l){t&=~Su,t&=~El,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var c=31-Bt(i),m=1<<c;l[c]=-1,i&=~m}n!==0&&Fo(e,n,t)}function Ii(){return(He&6)===0?(vo(0),!1):!0}function Ru(){if(Te!==null){if(qe===0)var e=Te.return;else e=Te,aa=hl=null,Gc(e),ur=null,eo=0,e=Te;for(;e!==null;)Lh(e.alternate,e),e=e.return;Te=null}}function xr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ax(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ha=0,Ru(),Ze=e,Te=n=ta(e.current,null),_e=t,qe=0,nn=null,Ma=!1,br=Kn(e,t),wu=!1,yr=an=Su=El=La=st=0,Qt=bo=null,Eu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-Bt(l),c=1<<i;t|=e[i],l&=~c}return ma=t,di(),n}function rp(e,t){Se=null,L.H=so,t===cr||t===vi?(t=wm(),qe=3):t===_c?(t=wm(),qe=4):qe=t===ru?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,nn=t,Te===null&&(st=1,Oi(e,pn(t,e.current)))}function op(){var e=en.current;return e===null?!0:(_e&4194048)===_e?vn===null:(_e&62914560)===_e||(_e&536870912)!==0?e===vn:!1}function ip(){var e=L.H;return L.H=so,e===null?so:e}function sp(){var e=L.A;return L.A=L0,e}function Vi(){st=4,Ma||(_e&4194048)!==_e&&en.current!==null||(br=!0),(La&134217727)===0&&(El&134217727)===0||Ze===null||Ba(Ze,_e,an,!1)}function ju(e,t,n){var l=He;He|=2;var i=ip(),c=sp();(Ze!==e||_e!==t)&&(Gi=null,xr(e,t)),t=!1;var m=st;e:do try{if(qe!==0&&Te!==null){var v=Te,E=nn;switch(qe){case 8:Ru(),m=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(t=!0);var O=qe;if(qe=0,nn=null,wr(e,v,E,O),n&&br){m=0;break e}break;default:O=qe,qe=0,nn=null,wr(e,v,E,O)}}B0(),m=st;break}catch(B){rp(e,B)}while(!0);return t&&e.shellSuspendCounter++,aa=hl=null,He=l,L.H=i,L.A=c,Te===null&&(Ze=null,_e=0,di()),m}function B0(){for(;Te!==null;)cp(Te)}function H0(e,t){var n=He;He|=2;var l=ip(),i=sp();Ze!==e||_e!==t?(Gi=null,Xi=Be()+500,xr(e,t)):br=Kn(e,t);e:do try{if(qe!==0&&Te!==null){t=Te;var c=nn;t:switch(qe){case 1:qe=0,nn=null,wr(e,t,c,1);break;case 2:case 9:if(vm(c)){qe=0,nn=null,up(t);break}t=function(){qe!==2&&qe!==9||Ze!==e||(qe=7),Gn(e)},c.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:vm(c)?(qe=0,nn=null,up(t)):(qe=0,nn=null,wr(e,t,c,7));break;case 5:var m=null;switch(Te.tag){case 26:m=Te.memoizedState;case 5:case 27:var v=Te;if(m?$p(m):v.stateNode.complete){qe=0,nn=null;var E=v.sibling;if(E!==null)Te=E;else{var O=v.return;O!==null?(Te=O,Qi(O)):Te=null}break t}}qe=0,nn=null,wr(e,t,c,5);break;case 6:qe=0,nn=null,wr(e,t,c,6);break;case 8:Ru(),st=6;break e;default:throw Error(s(462))}}q0();break}catch(B){rp(e,B)}while(!0);return aa=hl=null,L.H=l,L.A=i,He=n,Te!==null?0:(Ze=null,_e=0,di(),st)}function q0(){for(;Te!==null&&!jn();)cp(Te)}function cp(e){var t=Oh(e.alternate,e,ma);e.memoizedProps=e.pendingProps,t===null?Qi(e):Te=t}function up(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Rh(n,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=Rh(n,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Gc(t);default:Lh(n,t),t=Te=sm(t,ma),t=Oh(n,t,ma)}e.memoizedProps=e.pendingProps,t===null?Qi(e):Te=t}function wr(e,t,n,l){aa=hl=null,Gc(t),ur=null,eo=0;var i=t.return;try{if(j0(e,i,t,n,_e)){st=1,Oi(e,pn(n,e.current)),Te=null;return}}catch(c){if(i!==null)throw Te=i,c;st=1,Oi(e,pn(n,e.current)),Te=null;return}t.flags&32768?(Oe||l===1?e=!0:br||(_e&536870912)!==0?e=!1:(Ma=e=!0,(l===2||l===9||l===3||l===6)&&(l=en.current,l!==null&&l.tag===13&&(l.flags|=16384))),dp(t,e)):Qi(t)}function Qi(e){var t=e;do{if((t.flags&32768)!==0){dp(t,Ma);return}e=t.return;var n=_0(t.alternate,t,ma);if(n!==null){Te=n;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);st===0&&(st=5)}function dp(e,t){do{var n=z0(e.alternate,e);if(n!==null){n.flags&=32767,Te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=n}while(e!==null);st=6,Te=null}function fp(e,t,n,l,i,c,m,v,E){e.cancelPendingCommit=null;do Pi();while(At!==0);if((He&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(c=t.lanes|t.childLanes,c|=gc,Xl(e,n,c,m,v,E),e===Ze&&(Te=Ze=null,_e=0),vr=t,ka=e,ha=n,Au=c,Cu=i,tp=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,I0(Tt,function(){return bp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,i=Q.p,Q.p=2,m=He,He|=4;try{O0(e,t,n)}finally{He=m,Q.p=i,L.T=l}}At=1,mp(),hp(),pp()}}function mp(){if(At===1){At=0;var e=ka,t=vr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=L.T,L.T=null;var l=Q.p;Q.p=2;var i=He;He|=4;try{Ph(t,e);var c=qu,m=Ff(e.containerInfo),v=c.focusedElem,E=c.selectionRange;if(m!==v&&v&&v.ownerDocument&&Wf(v.ownerDocument.documentElement,v)){if(E!==null&&dc(v)){var O=E.start,B=E.end;if(B===void 0&&(B=O),"selectionStart"in v)v.selectionStart=O,v.selectionEnd=Math.min(B,v.value.length);else{var X=v.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var D=M.getSelection(),ie=v.textContent.length,pe=Math.min(E.start,ie),Ie=E.end===void 0?pe:Math.min(E.end,ie);!D.extend&&pe>Ie&&(m=Ie,Ie=pe,pe=m);var R=Jf(v,pe),T=Jf(v,Ie);if(R&&T&&(D.rangeCount!==1||D.anchorNode!==R.node||D.anchorOffset!==R.offset||D.focusNode!==T.node||D.focusOffset!==T.offset)){var z=X.createRange();z.setStart(R.node,R.offset),D.removeAllRanges(),pe>Ie?(D.addRange(z),D.extend(T.node,T.offset)):(z.setEnd(T.node,T.offset),D.addRange(z))}}}}for(X=[],D=v;D=D.parentNode;)D.nodeType===1&&X.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<X.length;v++){var q=X[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}rs=!!Hu,qu=Hu=null}finally{He=i,Q.p=l,L.T=n}}e.current=t,At=2}}function hp(){if(At===2){At=0;var e=ka,t=vr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=L.T,L.T=null;var l=Q.p;Q.p=2;var i=He;He|=4;try{Xh(e,t.alternate,t)}finally{He=i,Q.p=l,L.T=n}}At=3}}function pp(){if(At===4||At===3){At=0,Ke();var e=ka,t=vr,n=ha,l=tp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,vr=ka=null,gp(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Da=null),Pe(n),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(tl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,i=Q.p,Q.p=2,L.T=null;try{for(var c=e.onRecoverableError,m=0;m<l.length;m++){var v=l[m];c(v.value,{componentStack:v.stack})}}finally{L.T=t,Q.p=i}}(ha&3)!==0&&Pi(),Gn(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Tu?yo++:(yo=0,Tu=e):yo=0,vo(0)}}function gp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wr(t)))}function Pi(){return mp(),hp(),pp(),bp()}function bp(){if(At!==5)return!1;var e=ka,t=Au;Au=0;var n=Pe(ha),l=L.T,i=Q.p;try{Q.p=32>n?32:n,L.T=null,n=Cu,Cu=null;var c=ka,m=ha;if(At=0,vr=ka=null,ha=0,(He&6)!==0)throw Error(s(331));var v=He;if(He|=4,Wh(c.current),$h(c,c.current,m,n),He=v,vo(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(tl,c)}catch{}return!0}finally{Q.p=i,L.T=l,gp(e,t)}}function yp(e,t,n){t=pn(n,t),t=lu(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Jn(e,2),Gn(e))}function Ye(e,t,n){if(e.tag===3)yp(e,e,n);else for(;t!==null;){if(t.tag===3){yp(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Da===null||!Da.has(l))){e=pn(n,e),n=vh(2),l=Ua(t,n,2),l!==null&&(xh(n,l,t,e),Jn(l,2),Gn(l));break}}t=t.return}}function Nu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new D0;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(wu=!0,i.add(n),e=Y0.bind(null,e,t,n),t.then(e,e))}function Y0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ze===e&&(_e&n)===n&&(st===4||st===3&&(_e&62914560)===_e&&300>Be()-Yi?(He&2)===0&&xr(e,0):Su|=n,yr===_e&&(yr=0)),Gn(e)}function vp(e,t){t===0&&(t=rl()),e=dl(e,t),e!==null&&(Jn(e,t),Gn(e))}function X0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vp(e,n)}function G0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),vp(e,n)}function I0(e,t){return ut(e,t)}var Zi=null,Sr=null,Uu=!1,$i=!1,_u=!1,Ha=0;function Gn(e){e!==Sr&&e.next===null&&(Sr===null?Zi=Sr=e:Sr=Sr.next=e),$i=!0,Uu||(Uu=!0,Q0())}function vo(e,t){if(!_u&&$i){_u=!0;do for(var n=!1,l=Zi;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var c=0;else{var m=l.suspendedLanes,v=l.pingedLanes;c=(1<<31-Bt(42|e)+1)-1,c&=i&~(m&~v),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Ep(l,c))}else c=_e,c=Yl(l,l===Ze?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Kn(l,c)||(n=!0,Ep(l,c));l=l.next}while(n);_u=!1}}function V0(){xp()}function xp(){$i=Uu=!1;var e=0;Ha!==0&&nx()&&(e=Ha);for(var t=Be(),n=null,l=Zi;l!==null;){var i=l.next,c=wp(l,t);c===0?(l.next=null,n===null?Zi=i:n.next=i,i===null&&(Sr=n)):(n=l,(e!==0||(c&3)!==0)&&($i=!0)),l=i}At!==0&&At!==5||vo(e),Ha!==0&&(Ha=0)}function wp(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var m=31-Bt(c),v=1<<m,E=i[m];E===-1?((v&n)===0||(v&l)!==0)&&(i[m]=ll(v,t)):E<=t&&(e.expiredLanes|=v),c&=~v}if(t=Ze,n=_e,n=Yl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Dt(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Kn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Dt(l),Pe(n)){case 2:case 8:n=kl;break;case 32:n=Tt;break;case 268435456:n=Un;break;default:n=Tt}return l=Sp.bind(null,e),n=ut(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Dt(l),e.callbackPriority=2,e.callbackNode=null,2}function Sp(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Pi()&&e.callbackNode!==n)return null;var l=_e;return l=Yl(e,e===Ze?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ap(e,l,t),wp(e,Be()),e.callbackNode!=null&&e.callbackNode===n?Sp.bind(null,e):null)}function Ep(e,t){if(Pi())return null;ap(e,t,!0)}function Q0(){lx(function(){(He&6)!==0?ut($t,V0):xp()})}function zu(){if(Ha===0){var e=ir;e===0&&(e=ql,ql<<=1,(ql&261888)===0&&(ql=256)),Ha=e}return Ha}function Ap(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ai(""+e)}function Cp(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function P0(e,t,n,l,i){if(t==="submit"&&n&&n.stateNode===i){var c=Ap((i[Et]||null).action),m=l.submitter;m&&(t=(t=m[Et]||null)?Ap(t.formAction):m.getAttribute("formAction"),t!==null&&(c=t,m=null));var v=new ii("action","action",null,l,i);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ha!==0){var E=m?Cp(i,m):new FormData(i);Wc(n,{pending:!0,data:E,method:i.method,action:c},null,E)}}else typeof c=="function"&&(v.preventDefault(),E=m?Cp(i,m):new FormData(i),Wc(n,{pending:!0,data:E,method:i.method,action:c},c,E))},currentTarget:i}]})}}for(var Ou=0;Ou<pc.length;Ou++){var Mu=pc[Ou],Z0=Mu.toLowerCase(),$0=Mu[0].toUpperCase()+Mu.slice(1);_n(Z0,"on"+$0)}_n(nm,"onAnimationEnd"),_n(am,"onAnimationIteration"),_n(lm,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(d0,"onTransitionRun"),_n(f0,"onTransitionStart"),_n(m0,"onTransitionCancel"),_n(rm,"onTransitionEnd"),Pl("onMouseEnter",["mouseout","mouseover"]),Pl("onMouseLeave",["mouseout","mouseover"]),Pl("onPointerEnter",["pointerout","pointerover"]),Pl("onPointerLeave",["pointerout","pointerover"]),il("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),il("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),il("onBeforeInput",["compositionend","keypress","textInput","paste"]),il("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),il("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),il("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),K0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xo));function Tp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var m=l.length-1;0<=m;m--){var v=l[m],E=v.instance,O=v.currentTarget;if(v=v.listener,E!==c&&i.isPropagationStopped())break e;c=v,i.currentTarget=O;try{c(i)}catch(B){ui(B)}i.currentTarget=null,c=E}else for(m=0;m<l.length;m++){if(v=l[m],E=v.instance,O=v.currentTarget,v=v.listener,E!==c&&i.isPropagationStopped())break e;c=v,i.currentTarget=O;try{c(i)}catch(B){ui(B)}i.currentTarget=null,c=E}}}}function Re(e,t){var n=t[Jt];n===void 0&&(n=t[Jt]=new Set);var l=e+"__bubble";n.has(l)||(Rp(t,e,2,!1),n.add(l))}function Lu(e,t,n){var l=0;t&&(l|=4),Rp(n,e,l,t)}var Ki="_reactListening"+Math.random().toString(36).slice(2);function Du(e){if(!e[Ki]){e[Ki]=!0,xf.forEach(function(n){n!=="selectionchange"&&(K0.has(n)||Lu(n,!1,e),Lu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ki]||(t[Ki]=!0,Lu("selectionchange",!1,t))}}function Rp(e,t,n,l){switch(ng(t)){case 2:var i=Ax;break;case 8:i=Cx;break;default:i=Ju}n=i.bind(null,t,n,e),i=void 0,!nc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ku(e,t,n,l,i){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var v=l.stateNode.containerInfo;if(v===i)break;if(m===4)for(m=l.return;m!==null;){var E=m.tag;if((E===3||E===4)&&m.stateNode.containerInfo===i)return;m=m.return}for(;v!==null;){if(m=Il(v),m===null)return;if(E=m.tag,E===5||E===6||E===26||E===27){l=c=m;continue e}v=v.parentNode}}l=l.return}zf(function(){var O=c,B=ec(n),X=[];e:{var M=om.get(e);if(M!==void 0){var D=ii,ie=e;switch(e){case"keypress":if(ri(n)===0)break e;case"keydown":case"keyup":D=Gv;break;case"focusin":ie="focus",D=oc;break;case"focusout":ie="blur",D=oc;break;case"beforeblur":case"afterblur":D=oc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=Lf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=_v;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Qv;break;case nm:case am:case lm:D=Mv;break;case rm:D=Zv;break;case"scroll":case"scrollend":D=Nv;break;case"wheel":D=Kv;break;case"copy":case"cut":case"paste":D=Dv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=kf;break;case"toggle":case"beforetoggle":D=Wv}var pe=(t&4)!==0,Ie=!pe&&(e==="scroll"||e==="scrollend"),R=pe?M!==null?M+"Capture":null:M;pe=[];for(var T=O,z;T!==null;){var q=T;if(z=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||z===null||R===null||(q=Yr(T,R),q!=null&&pe.push(wo(T,q,z))),Ie)break;T=T.return}0<pe.length&&(M=new D(M,ie,null,n,B),X.push({event:M,listeners:pe}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",M&&n!==Fs&&(ie=n.relatedTarget||n.fromElement)&&(Il(ie)||ie[Fe]))break e;if((D||M)&&(M=B.window===B?B:(M=B.ownerDocument)?M.defaultView||M.parentWindow:window,D?(ie=n.relatedTarget||n.toElement,D=O,ie=ie?Il(ie):null,ie!==null&&(Ie=d(ie),pe=ie.tag,ie!==Ie||pe!==5&&pe!==27&&pe!==6)&&(ie=null)):(D=null,ie=O),D!==ie)){if(pe=Lf,q="onMouseLeave",R="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(pe=kf,q="onPointerLeave",R="onPointerEnter",T="pointer"),Ie=D==null?M:qr(D),z=ie==null?M:qr(ie),M=new pe(q,T+"leave",D,n,B),M.target=Ie,M.relatedTarget=z,q=null,Il(B)===O&&(pe=new pe(R,T+"enter",ie,n,B),pe.target=z,pe.relatedTarget=Ie,q=pe),Ie=q,D&&ie)t:{for(pe=J0,R=D,T=ie,z=0,q=R;q;q=pe(q))z++;q=0;for(var he=T;he;he=pe(he))q++;for(;0<z-q;)R=pe(R),z--;for(;0<q-z;)T=pe(T),q--;for(;z--;){if(R===T||T!==null&&R===T.alternate){pe=R;break t}R=pe(R),T=pe(T)}pe=null}else pe=null;D!==null&&jp(X,M,D,pe,!1),ie!==null&&Ie!==null&&jp(X,Ie,ie,pe,!0)}}e:{if(M=O?qr(O):window,D=M.nodeName&&M.nodeName.toLowerCase(),D==="select"||D==="input"&&M.type==="file")var Le=Vf;else if(Gf(M))if(Qf)Le=s0;else{Le=o0;var de=r0}else D=M.nodeName,!D||D.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?O&&Ws(O.elementType)&&(Le=Vf):Le=i0;if(Le&&(Le=Le(e,O))){If(X,Le,n,B);break e}de&&de(e,M,O),e==="focusout"&&O&&M.type==="number"&&O.memoizedProps.value!=null&&Js(M,"number",M.value)}switch(de=O?qr(O):window,e){case"focusin":(Gf(de)||de.contentEditable==="true")&&(Fl=de,fc=O,$r=null);break;case"focusout":$r=fc=Fl=null;break;case"mousedown":mc=!0;break;case"contextmenu":case"mouseup":case"dragend":mc=!1,em(X,n,B);break;case"selectionchange":if(u0)break;case"keydown":case"keyup":em(X,n,B)}var Ee;if(sc)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Wl?Yf(e,n)&&(ze="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ze="onCompositionStart");ze&&(Bf&&n.locale!=="ko"&&(Wl||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Wl&&(Ee=Of()):(Ea=B,ac="value"in Ea?Ea.value:Ea.textContent,Wl=!0)),de=Ji(O,ze),0<de.length&&(ze=new Df(ze,e,null,n,B),X.push({event:ze,listeners:de}),Ee?ze.data=Ee:(Ee=Xf(n),Ee!==null&&(ze.data=Ee)))),(Ee=e0?t0(e,n):n0(e,n))&&(ze=Ji(O,"onBeforeInput"),0<ze.length&&(de=new Df("onBeforeInput","beforeinput",null,n,B),X.push({event:de,listeners:ze}),de.data=Ee)),P0(X,e,O,n,B)}Tp(X,t)})}function wo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ji(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=Yr(e,n),i!=null&&l.unshift(wo(e,i,c)),i=Yr(e,t),i!=null&&l.push(wo(e,i,c))),e.tag===3)return l;e=e.return}return[]}function J0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jp(e,t,n,l,i){for(var c=t._reactName,m=[];n!==null&&n!==l;){var v=n,E=v.alternate,O=v.stateNode;if(v=v.tag,E!==null&&E===l)break;v!==5&&v!==26&&v!==27||O===null||(E=O,i?(O=Yr(n,c),O!=null&&m.unshift(wo(n,O,E))):i||(O=Yr(n,c),O!=null&&m.push(wo(n,O,E)))),n=n.return}m.length!==0&&e.push({event:t,listeners:m})}var W0=/\r\n?/g,F0=/\u0000|\uFFFD/g;function Np(e){return(typeof e=="string"?e:""+e).replace(W0,`
|
|
9
|
-
`).replace(F0,"")}function Up(e,t){return t=Np(t),Np(e)===t}function Ge(e,t,n,l,i,c){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||$l(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&$l(e,""+l);break;case"className":ti(e,"class",l);break;case"tabIndex":ti(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ti(e,n,l);break;case"style":Uf(e,l,c);break;case"data":if(t!=="object"){ti(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ai(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&Ge(e,t,"name",i.name,i,null),Ge(e,t,"formEncType",i.formEncType,i,null),Ge(e,t,"formMethod",i.formMethod,i,null),Ge(e,t,"formTarget",i.formTarget,i,null)):(Ge(e,t,"encType",i.encType,i,null),Ge(e,t,"method",i.method,i,null),Ge(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ai(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Fn);break;case"onScroll":l!=null&&Re("scroll",e);break;case"onScrollEnd":l!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ai(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Re("beforetoggle",e),Re("toggle",e),ei(e,"popover",l);break;case"xlinkActuate":Wn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Wn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Wn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Wn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Wn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Wn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ei(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Rv.get(n)||n,ei(e,n,l))}}function Bu(e,t,n,l,i,c){switch(n){case"style":Uf(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"children":typeof l=="string"?$l(e,l):(typeof l=="number"||typeof l=="bigint")&&$l(e,""+l);break;case"onScroll":l!=null&&Re("scroll",e);break;case"onScrollEnd":l!=null&&Re("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),c=e[Et]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof l=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,i);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):ei(e,n,l)}}}function Mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var l=!1,i=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ge(e,t,c,m,n,null)}}i&&Ge(e,t,"srcSet",n.srcSet,n,null),l&&Ge(e,t,"src",n.src,n,null);return;case"input":Re("invalid",e);var v=c=m=i=null,E=null,O=null;for(l in n)if(n.hasOwnProperty(l)){var B=n[l];if(B!=null)switch(l){case"name":i=B;break;case"type":m=B;break;case"checked":E=B;break;case"defaultChecked":O=B;break;case"value":c=B;break;case"defaultValue":v=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,t));break;default:Ge(e,t,l,B,n,null)}}Tf(e,c,v,E,O,m,i,!1);return;case"select":Re("invalid",e),l=m=c=null;for(i in n)if(n.hasOwnProperty(i)&&(v=n[i],v!=null))switch(i){case"value":c=v;break;case"defaultValue":m=v;break;case"multiple":l=v;default:Ge(e,t,i,v,n,null)}t=c,n=m,e.multiple=!!l,t!=null?Zl(e,!!l,t,!1):n!=null&&Zl(e,!!l,n,!0);return;case"textarea":Re("invalid",e),c=i=l=null;for(m in n)if(n.hasOwnProperty(m)&&(v=n[m],v!=null))switch(m){case"value":l=v;break;case"defaultValue":i=v;break;case"children":c=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(s(91));break;default:Ge(e,t,m,v,n,null)}jf(e,l,i,c);return;case"option":for(E in n)n.hasOwnProperty(E)&&(l=n[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ge(e,t,E,l,n,null));return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(l=0;l<xo.length;l++)Re(xo[l],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in n)if(n.hasOwnProperty(O)&&(l=n[O],l!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ge(e,t,O,l,n,null)}return;default:if(Ws(t)){for(B in n)n.hasOwnProperty(B)&&(l=n[B],l!==void 0&&Bu(e,t,B,l,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(l=n[v],l!=null&&Ge(e,t,v,l,n,null))}function ex(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,m=null,v=null,E=null,O=null,B=null;for(D in n){var X=n[D];if(n.hasOwnProperty(D)&&X!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":E=X;default:l.hasOwnProperty(D)||Ge(e,t,D,null,l,X)}}for(var M in l){var D=l[M];if(X=n[M],l.hasOwnProperty(M)&&(D!=null||X!=null))switch(M){case"type":c=D;break;case"name":i=D;break;case"checked":O=D;break;case"defaultChecked":B=D;break;case"value":m=D;break;case"defaultValue":v=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(s(137,t));break;default:D!==X&&Ge(e,t,M,D,l,X)}}Ks(e,m,v,E,O,B,c,i);return;case"select":D=m=v=M=null;for(c in n)if(E=n[c],n.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":D=E;default:l.hasOwnProperty(c)||Ge(e,t,c,null,l,E)}for(i in l)if(c=l[i],E=n[i],l.hasOwnProperty(i)&&(c!=null||E!=null))switch(i){case"value":M=c;break;case"defaultValue":v=c;break;case"multiple":m=c;default:c!==E&&Ge(e,t,i,c,l,E)}t=v,n=m,l=D,M!=null?Zl(e,!!n,M,!1):!!l!=!!n&&(t!=null?Zl(e,!!n,t,!0):Zl(e,!!n,n?[]:"",!1));return;case"textarea":D=M=null;for(v in n)if(i=n[v],n.hasOwnProperty(v)&&i!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ge(e,t,v,null,l,i)}for(m in l)if(i=l[m],c=n[m],l.hasOwnProperty(m)&&(i!=null||c!=null))switch(m){case"value":M=i;break;case"defaultValue":D=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(s(91));break;default:i!==c&&Ge(e,t,m,i,l,c)}Rf(e,M,D);return;case"option":for(var ie in n)M=n[ie],n.hasOwnProperty(ie)&&M!=null&&!l.hasOwnProperty(ie)&&(ie==="selected"?e.selected=!1:Ge(e,t,ie,null,l,M));for(E in l)M=l[E],D=n[E],l.hasOwnProperty(E)&&M!==D&&(M!=null||D!=null)&&(E==="selected"?e.selected=M&&typeof M!="function"&&typeof M!="symbol":Ge(e,t,E,M,l,D));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in n)M=n[pe],n.hasOwnProperty(pe)&&M!=null&&!l.hasOwnProperty(pe)&&Ge(e,t,pe,null,l,M);for(O in l)if(M=l[O],D=n[O],l.hasOwnProperty(O)&&M!==D&&(M!=null||D!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(137,t));break;default:Ge(e,t,O,M,l,D)}return;default:if(Ws(t)){for(var Ie in n)M=n[Ie],n.hasOwnProperty(Ie)&&M!==void 0&&!l.hasOwnProperty(Ie)&&Bu(e,t,Ie,void 0,l,M);for(B in l)M=l[B],D=n[B],!l.hasOwnProperty(B)||M===D||M===void 0&&D===void 0||Bu(e,t,B,M,l,D);return}}for(var R in n)M=n[R],n.hasOwnProperty(R)&&M!=null&&!l.hasOwnProperty(R)&&Ge(e,t,R,null,l,M);for(X in l)M=l[X],D=n[X],!l.hasOwnProperty(X)||M===D||M==null&&D==null||Ge(e,t,X,M,l,D)}function _p(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var i=n[l],c=i.transferSize,m=i.initiatorType,v=i.duration;if(c&&v&&_p(m)){for(m=0,v=i.responseEnd,l+=1;l<n.length;l++){var E=n[l],O=E.startTime;if(O>v)break;var B=E.transferSize,X=E.initiatorType;B&&_p(X)&&(E=E.responseEnd,m+=B*(E<v?1:(v-O)/(E-O)))}if(--l,t+=8*(c+m)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hu=null,qu=null;function Wi(e){return e.nodeType===9?e:e.ownerDocument}function zp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Op(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Yu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xu=null;function nx(){var e=window.event;return e&&e.type==="popstate"?e===Xu?!1:(Xu=e,!0):(Xu=null,!1)}var Mp=typeof setTimeout=="function"?setTimeout:void 0,ax=typeof clearTimeout=="function"?clearTimeout:void 0,Lp=typeof Promise=="function"?Promise:void 0,lx=typeof queueMicrotask=="function"?queueMicrotask:typeof Lp<"u"?function(e){return Lp.resolve(null).then(e).catch(rx)}:Mp;function rx(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function Dp(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(i),Tr(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")So(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,So(n);for(var c=n.firstChild;c;){var m=c.nextSibling,v=c.nodeName;c[Hn]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&So(e.ownerDocument.body);n=i}while(n);Tr(t)}function kp(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Gu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Gu(n),Gl(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function ox(e,t,n,l){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Hn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=xn(e.nextSibling),e===null)break}return null}function ix(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=xn(e.nextSibling),e===null))return null;return e}function Bp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=xn(e.nextSibling),e===null))return null;return e}function Iu(e){return e.data==="$?"||e.data==="$~"}function Vu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sx(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Qu=null;function Hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return xn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function qp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Yp(e,t,n){switch(t=Wi(n),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function So(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Gl(e)}var wn=new Map,Xp=new Set;function Fi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pa=Q.d;Q.d={f:cx,r:ux,D:dx,C:fx,L:mx,m:hx,X:gx,S:px,M:bx};function cx(){var e=pa.f(),t=Ii();return e||t}function ux(e){var t=Vl(e);t!==null&&t.tag===5&&t.type==="form"?rh(t):pa.r(e)}var Er=typeof document>"u"?null:document;function Gp(e,t,n){var l=Er;if(l&&typeof t=="string"&&t){var i=mn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Xp.has(i)||(Xp.add(i),e={rel:e,crossOrigin:n,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),Mt(t,"link",e),jt(t),l.head.appendChild(t)))}}function dx(e){pa.D(e),Gp("dns-prefetch",e,null)}function fx(e,t){pa.C(e,t),Gp("preconnect",e,t)}function mx(e,t,n){pa.L(e,t,n);var l=Er;if(l&&e&&t){var i='link[rel="preload"][as="'+mn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+mn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+mn(n.imageSizes)+'"]')):i+='[href="'+mn(e)+'"]';var c=i;switch(t){case"style":c=Ar(e);break;case"script":c=Cr(e)}wn.has(c)||(e=w({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),wn.set(c,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Eo(c))||t==="script"&&l.querySelector(Ao(c))||(t=l.createElement("link"),Mt(t,"link",e),jt(t),l.head.appendChild(t)))}}function hx(e,t){pa.m(e,t);var n=Er;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+mn(l)+'"][href="'+mn(e)+'"]',c=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Cr(e)}if(!wn.has(c)&&(e=w({rel:"modulepreload",href:e},t),wn.set(c,e),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ao(c)))return}l=n.createElement("link"),Mt(l,"link",e),jt(l),n.head.appendChild(l)}}}function px(e,t,n){pa.S(e,t,n);var l=Er;if(l&&e){var i=Ql(l).hoistableStyles,c=Ar(e);t=t||"default";var m=i.get(c);if(!m){var v={loading:0,preload:null};if(m=l.querySelector(Eo(c)))v.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},n),(n=wn.get(c))&&Pu(e,n);var E=m=l.createElement("link");jt(E),Mt(E,"link",e),E._p=new Promise(function(O,B){E.onload=O,E.onerror=B}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,es(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:v},i.set(c,m)}}}function gx(e,t){pa.X(e,t);var n=Er;if(n&&e){var l=Ql(n).hoistableScripts,i=Cr(e),c=l.get(i);c||(c=n.querySelector(Ao(i)),c||(e=w({src:e,async:!0},t),(t=wn.get(i))&&Zu(e,t),c=n.createElement("script"),jt(c),Mt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(i,c))}}function bx(e,t){pa.M(e,t);var n=Er;if(n&&e){var l=Ql(n).hoistableScripts,i=Cr(e),c=l.get(i);c||(c=n.querySelector(Ao(i)),c||(e=w({src:e,async:!0,type:"module"},t),(t=wn.get(i))&&Zu(e,t),c=n.createElement("script"),jt(c),Mt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(i,c))}}function Ip(e,t,n,l){var i=(i=K.current)?Fi(i):null;if(!i)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ar(n.href),n=Ql(i).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ar(n.href);var c=Ql(i).hoistableStyles,m=c.get(e);if(m||(i=i.ownerDocument||i,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,m),(c=i.querySelector(Eo(e)))&&!c._p&&(m.instance=c,m.state.loading=5),wn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wn.set(e,n),c||yx(i,e,n,m.state))),t&&l===null)throw Error(s(528,""));return m}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Cr(n),n=Ql(i).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Ar(e){return'href="'+mn(e)+'"'}function Eo(e){return'link[rel="stylesheet"]['+e+"]"}function Vp(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function yx(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Mt(t,"link",n),jt(t),e.head.appendChild(t))}function Cr(e){return'[src="'+mn(e)+'"]'}function Ao(e){return"script[async]"+e}function Qp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+mn(n.href)+'"]');if(l)return t.instance=l,jt(l),l;var i=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),jt(l),Mt(l,"style",i),es(l,n.precedence,e),t.instance=l;case"stylesheet":i=Ar(n.href);var c=e.querySelector(Eo(i));if(c)return t.state.loading|=4,t.instance=c,jt(c),c;l=Vp(n),(i=wn.get(i))&&Pu(l,i),c=(e.ownerDocument||e).createElement("link"),jt(c);var m=c;return m._p=new Promise(function(v,E){m.onload=v,m.onerror=E}),Mt(c,"link",l),t.state.loading|=4,es(c,n.precedence,e),t.instance=c;case"script":return c=Cr(n.src),(i=e.querySelector(Ao(c)))?(t.instance=i,jt(i),i):(l=n,(i=wn.get(c))&&(l=w({},n),Zu(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),jt(i),Mt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,es(l,n.precedence,e));return t.instance}function es(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,c=i,m=0;m<l.length;m++){var v=l[m];if(v.dataset.precedence===t)c=v;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ts=null;function Pp(e,t,n){if(ts===null){var l=new Map,i=ts=new Map;i.set(n,l)}else i=ts,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var c=n[i];if(!(c[Hn]||c[ft]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(t)||"";m=e+m;var v=l.get(m);v?v.push(c):l.set(m,[c])}}return l}function Zp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function vx(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function $p(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function xx(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ar(l.href),c=t.querySelector(Eo(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ns.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,jt(c);return}c=t.ownerDocument||t,l=Vp(l),(i=wn.get(i))&&Pu(l,i),c=c.createElement("link"),jt(c);var m=c;m._p=new Promise(function(v,E){m.onload=v,m.onerror=E}),Mt(c,"link",l),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ns.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var $u=0;function wx(e,t){return e.stylesheets&&e.count===0&&ls(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ls(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&$u===0&&($u=62500*tx());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ls(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>$u?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ls(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var as=null;function ls(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,as=new Map,t.forEach(Sx,e),as=null,ns.call(e))}function Sx(e,t){if(!(t.state.loading&4)){var n=as.get(e);if(n)var l=n.get(null);else{n=new Map,as.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var m=i[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),l=m)}l&&n.set(null,l)}i=t.instance,m=i.getAttribute("data-precedence"),c=n.get(m)||l,c===l&&n.set(null,i),n.set(m,i),this.count++,l=ns.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Co={$$typeof:H,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Ex(e,t,n,l,i,c,m,v,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ol(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ol(0),this.hiddenUpdates=ol(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Kp(e,t,n,l,i,c,m,v,E,O,B,X){return e=new Ex(e,t,n,m,E,O,B,X,v),t=1,c===!0&&(t|=24),c=Ft(3,null,null,t),e.current=c,c.stateNode=e,t=jc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:n,cache:t},zc(c),e}function Jp(e){return e?(e=nr,e):nr}function Wp(e,t,n,l,i,c){i=Jp(i),l.context===null?l.context=i:l.pendingContext=i,l=Na(t),l.payload={element:n},c=c===void 0?null:c,c!==null&&(l.callback=c),n=Ua(e,l,t),n!==null&&(Pt(n,e,t),no(n,e,t))}function Fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ku(e,t){Fp(e,t),(e=e.alternate)&&Fp(e,t)}function eg(e){if(e.tag===13||e.tag===31){var t=dl(e,67108864);t!==null&&Pt(t,e,67108864),Ku(e,67108864)}}function tg(e){if(e.tag===13||e.tag===31){var t=ln();t=Qe(t);var n=dl(e,t);n!==null&&Pt(n,e,t),Ku(e,t)}}var rs=!0;function Ax(e,t,n,l){var i=L.T;L.T=null;var c=Q.p;try{Q.p=2,Ju(e,t,n,l)}finally{Q.p=c,L.T=i}}function Cx(e,t,n,l){var i=L.T;L.T=null;var c=Q.p;try{Q.p=8,Ju(e,t,n,l)}finally{Q.p=c,L.T=i}}function Ju(e,t,n,l){if(rs){var i=Wu(l);if(i===null)ku(e,t,l,os,n),ag(e,l);else if(Rx(i,e,t,n,l))l.stopPropagation();else if(ag(e,l),t&4&&-1<Tx.indexOf(e)){for(;i!==null;){var c=Vl(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=$n(c.pendingLanes);if(m!==0){var v=c;for(v.pendingLanes|=2,v.entangledLanes|=2;m;){var E=1<<31-Bt(m);v.entanglements[1]|=E,m&=~E}Gn(c),(He&6)===0&&(Xi=Be()+500,vo(0))}}break;case 31:case 13:v=dl(c,2),v!==null&&Pt(v,c,2),Ii(),Ku(c,2)}if(c=Wu(l),c===null&&ku(e,t,l,os,n),c===i)break;i=c}i!==null&&l.stopPropagation()}else ku(e,t,l,null,n)}}function Wu(e){return e=ec(e),Fu(e)}var os=null;function Fu(e){if(os=null,e=Il(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=b(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return os=e,null}function ng(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Nn()){case $t:return 2;case kl:return 8;case Tt:case Bl:return 32;case Un:return 268435456;default:return 32}default:return 32}}var ed=!1,Ya=null,Xa=null,Ga=null,To=new Map,Ro=new Map,Ia=[],Tx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ag(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Xa=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":To.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ro.delete(t.pointerId)}}function jo(e,t,n,l,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Vl(t),t!==null&&eg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rx(e,t,n,l,i){switch(t){case"focusin":return Ya=jo(Ya,e,t,n,l,i),!0;case"dragenter":return Xa=jo(Xa,e,t,n,l,i),!0;case"mouseover":return Ga=jo(Ga,e,t,n,l,i),!0;case"pointerover":var c=i.pointerId;return To.set(c,jo(To.get(c)||null,e,t,n,l,i)),!0;case"gotpointercapture":return c=i.pointerId,Ro.set(c,jo(Ro.get(c)||null,e,t,n,l,i)),!0}return!1}function lg(e){var t=Il(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,Kt(e.priority,function(){tg(n)});return}}else if(t===31){if(t=b(n),t!==null){e.blockedOn=t,Kt(e.priority,function(){tg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function is(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wu(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Fs=l,n.target.dispatchEvent(l),Fs=null}else return t=Vl(n),t!==null&&eg(t),e.blockedOn=n,!1;t.shift()}return!0}function rg(e,t,n){is(e)&&n.delete(t)}function jx(){ed=!1,Ya!==null&&is(Ya)&&(Ya=null),Xa!==null&&is(Xa)&&(Xa=null),Ga!==null&&is(Ga)&&(Ga=null),To.forEach(rg),Ro.forEach(rg)}function ss(e,t){e.blockedOn===t&&(e.blockedOn=null,ed||(ed=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,jx)))}var cs=null;function og(e){cs!==e&&(cs=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){cs===e&&(cs=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(Fu(l||n)===null)continue;break}var c=Vl(n);c!==null&&(e.splice(t,3),t-=3,Wc(c,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function Tr(e){function t(E){return ss(E,e)}Ya!==null&&ss(Ya,e),Xa!==null&&ss(Xa,e),Ga!==null&&ss(Ga,e),To.forEach(t),Ro.forEach(t);for(var n=0;n<Ia.length;n++){var l=Ia[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ia.length&&(n=Ia[0],n.blockedOn===null);)lg(n),n.blockedOn===null&&Ia.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],c=n[l+1],m=i[Et]||null;if(typeof c=="function")m||og(n);else if(m){var v=null;if(c&&c.hasAttribute("formAction")){if(i=c,m=c[Et]||null)v=m.formAction;else if(Fu(i)!==null)continue}else v=m.action;typeof v=="function"?n[l+1]=v:(n.splice(l,3),l-=3),og(n)}}}function ig(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return i=m})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function td(e){this._internalRoot=e}us.prototype.render=td.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current,l=ln();Wp(n,l,e,t,null,null)},us.prototype.unmount=td.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wp(e.current,2,null,e,null,null),Ii(),t[Fe]=null}};function us(e){this._internalRoot=e}us.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ia.length&&t!==0&&t<Ia[n].priority;n++);Ia.splice(n,0,e),n===0&&lg(e)}};var sg=r.version;if(sg!=="19.2.8")throw Error(s(527,sg,"19.2.8"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var Nx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ds.isDisabled&&ds.supportsFiber)try{tl=ds.inject(Nx),kt=ds}catch{}}return Uo.createRoot=function(e,t){if(!u(e))throw Error(s(299));var n=!1,l="",i=ph,c=gh,m=bh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=Kp(e,1,!1,null,null,n,l,null,i,c,m,ig),e[Fe]=t.current,Du(e),new td(t)},Uo.hydrateRoot=function(e,t,n){if(!u(e))throw Error(s(299));var l=!1,i="",c=ph,m=gh,v=bh,E=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(E=n.formState)),t=Kp(e,1,!0,t,n??null,l,i,E,c,m,v,ig),t.context=Jp(null),n=t.current,l=ln(),l=Qe(l),i=Na(l),i.callback=null,Ua(n,i,l),n=l,t.current.lanes=n,Jn(t,n),Gn(t),e[Fe]=t.current,Du(e),new us(t)},Uo.version="19.2.8",Uo}var yg;function Yx(){if(yg)return ld.exports;yg=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(r){console.error(r)}}return a(),ld.exports=qx(),ld.exports}var Xx=Yx();function Gx(a=typeof window>"u"?"/.account/":window.location.pathname){return/^\/\.account\/interaction\/[^/]+(?=\/|$)/u.exec(a)?.[0]??"/.account"}function V(a,r=typeof window>"u"?void 0:window.location){const o=String(a);if(!r)return o;const s=Gx(r.pathname);if(s==="/.account")return o;const u=new URL(o,r.href);return u.origin!==r.origin||!u.pathname.startsWith("/.account/")||u.pathname.startsWith("/.account/interaction/")?o:(u.pathname=`${s}${u.pathname.slice(9)}`,o.startsWith("/")&&!o.startsWith("//")?`${u.pathname}${u.search}${u.hash}`:u.href)}var Vd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ab=/^[\\/]{2}/;function Ix(a,r){return r+a.replace(/\\/g,"/")}var vg="popstate";function xg(a){return typeof a=="object"&&a!=null&&"pathname"in a&&"search"in a&&"hash"in a&&"state"in a&&"key"in a}function Vx(a={}){function r(s,u){let d=u.state?.masked,{pathname:h,search:b,hash:p}=d||s.location;return Sd("",{pathname:h,search:b,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default",d?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function o(s,u){return typeof u=="string"?u:qo(u)}return Px(r,o,null,a)}function nt(a,r){if(a===!1||a===null||typeof a>"u")throw new Error(r)}function Cn(a,r){if(!a){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Qx(){return Math.random().toString(36).substring(2,10)}function wg(a,r){return{usr:a.state,key:a.key,idx:r,masked:a.mask?{pathname:a.pathname,search:a.search,hash:a.hash}:void 0}}function Sd(a,r,o=null,s,u){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof r=="string"?Lr(r):r,state:o,key:r&&r.key||s||Qx(),mask:u}}function qo({pathname:a="/",search:r="",hash:o=""}){return r&&r!=="?"&&(a+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(a+=o.charAt(0)==="#"?o:"#"+o),a}function Lr(a){let r={};if(a){let o=a.indexOf("#");o>=0&&(r.hash=a.substring(o),a=a.substring(0,o));let s=a.indexOf("?");s>=0&&(r.search=a.substring(s),a=a.substring(0,s)),a&&(r.pathname=a)}return r}function Px(a,r,o,s={}){let{window:u=document.defaultView,v5Compat:d=!1}=s,h=u.history,b="POP",p=null,g=x();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function x(){return(h.state||{idx:null}).idx}function w(){b="POP";let j=x(),I=j==null?null:j-g;g=j,p&&p({action:b,location:N.location,delta:I})}function S(j,I){b="PUSH";let P=xg(j)?j:Sd(N.location,j,I);g=x()+1;let H=wg(P,g),ee=N.createHref(P.mask||P);try{h.pushState(H,"",ee)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;u.location.assign(ee)}d&&p&&p({action:b,location:N.location,delta:1})}function C(j,I){b="REPLACE";let P=xg(j)?j:Sd(N.location,j,I);g=x();let H=wg(P,g),ee=N.createHref(P.mask||P);h.replaceState(H,"",ee),d&&p&&p({action:b,location:N.location,delta:0})}function U(j){return Zx(u,j)}let N={get action(){return b},get location(){return a(u,h)},listen(j){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(vg,w),p=j,()=>{u.removeEventListener(vg,w),p=null}},createHref(j){return r(u,j)},createURL:U,encodeLocation(j){let I=U(j);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:S,replace:C,go(j){return h.go(j)}};return N}function Zx(a,r,o=!1){let s="http://localhost";a&&(s=a.location.origin!=="null"?a.location.origin:a.location.href),nt(s,"No window.location.(origin|href) available to create URL");let u=typeof r=="string"?r:qo(r);return u=u.replace(/ $/,"%20"),!o&&Ab.test(u)&&(u=s+u),new URL(u,s)}function Cb(a,r,o="/"){return $x(a,r,o,!1)}function $x(a,r,o,s,u){let d=typeof r=="string"?Lr(r):r,h=ya(d.pathname||"/",o);if(h==null)return null;let b=Kx(a),p=null,g=iw(h);for(let x=0;p==null&&x<b.length;++x)p=ow(b[x],g,s);return p}function Kx(a){let r=Tb(a);return Jx(r),r}function Tb(a,r=[],o=[],s="",u=!1){let d=(h,b,p=u,g)=>{let x={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:b,route:h};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(s)&&p)return;nt(x.relativePath.startsWith(s),`Absolute route path "${x.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(s.length)}let w=Ln([s,x.relativePath]),S=o.concat(x);h.children&&h.children.length>0&&(nt(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),Tb(h.children,r,S,w,p)),!(h.path==null&&!h.index)&&r.push({path:w,score:lw(w,h.index),routesMeta:S.map((C,U)=>{let[N,j]=Nb(C.relativePath,C.caseSensitive,U===S.length-1);return{...C,matcher:N,compiledParams:j}})})};return a.forEach((h,b)=>{if(h.path===""||!h.path?.includes("?"))d(h,b);else for(let p of Rb(h.path))d(h,b,!0,p)}),r}function Rb(a){let r=a.split("/");if(r.length===0)return[];let[o,...s]=r,u=o.endsWith("?"),d=o.replace(/\?$/,"");if(s.length===0)return u?[d,""]:[d];let h=Rb(s.join("/")),b=[];return b.push(...h.map(p=>p===""?d:[d,p].join("/"))),u&&b.push(...h),b.map(p=>a.startsWith("/")&&p===""?"/":p)}function Jx(a){a.sort((r,o)=>r.score!==o.score?o.score-r.score:rw(r.routesMeta.map(s=>s.childrenIndex),o.routesMeta.map(s=>s.childrenIndex)))}var Wx=/^:[\w-]+$/,Fx=3,ew=2,tw=1,nw=10,aw=-2,Sg=a=>a==="*";function lw(a,r){let o=a.split("/"),s=o.length;return o.some(Sg)&&(s+=aw),r&&(s+=ew),o.filter(u=>!Sg(u)).reduce((u,d)=>u+(Wx.test(d)?Fx:d===""?tw:nw),s)}function rw(a,r){return a.length===r.length&&a.slice(0,-1).every((s,u)=>s===r[u])?a[a.length-1]-r[r.length-1]:0}function ow(a,r,o=!1){let{routesMeta:s}=a,u={},d="/",h=[];for(let b=0;b<s.length;++b){let p=s[b],g=b===s.length-1,x=d==="/"?r:r.slice(d.length)||"/",w={path:p.relativePath,caseSensitive:p.caseSensitive,end:g},S=p.matcher&&p.compiledParams?jb(w,x,p.matcher,p.compiledParams):Ss(w,x),C=p.route;if(!S&&g&&o&&!s[s.length-1].route.index&&(S=Ss({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},x)),!S)return null;Object.assign(u,S.params),h.push({params:u,pathname:Ln([d,S.pathname]),pathnameBase:uw(Ln([d,S.pathnameBase])),route:C}),S.pathnameBase!=="/"&&(d=Ln([d,S.pathnameBase]))}return h}function Ss(a,r){typeof a=="string"&&(a={path:a,caseSensitive:!1,end:!0});let[o,s]=Nb(a.path,a.caseSensitive,a.end);return jb(a,r,o,s)}function jb(a,r,o,s){let u=r.match(o);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),b=u.slice(1);return{params:s.reduce((g,{paramName:x,isOptional:w},S)=>{if(x==="*"){let U=b[S]||"";h=d.slice(0,d.length-U.length).replace(/(.)\/+$/,"$1")}const C=b[S];return w&&!C?g[x]=void 0:g[x]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:h,pattern:a}}function Nb(a,r=!1,o=!0){Cn(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let s=[],u="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,b,p,g,x)=>{if(s.push({paramName:b,isOptional:p!=null}),p){let w=x.charAt(g+h.length);return w&&w!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(s.push({paramName:"*"}),u+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?u+="\\/*$":a!==""&&a!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,r?void 0:"i"),s]}function iw(a){try{return a.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Cn(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),a}}function ya(a,r){if(r==="/")return a;if(!a.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,s=a.charAt(o);return s&&s!=="/"?null:a.slice(o)||"/"}function sw(a,r="/"){let{pathname:o,search:s="",hash:u=""}=typeof a=="string"?Lr(a):a,d;return o?(o=Ub(o),o.startsWith("/")?d=Eg(o.substring(1),"/"):d=Eg(o,r)):d=r,{pathname:d,search:dw(s),hash:fw(u)}}function Eg(a,r){let o=Es(r).split("/");return a.split("/").forEach(u=>{u===".."?o.length>1&&o.pop():u!=="."&&o.push(u)}),o.length>1?o.join("/"):"/"}function sd(a,r,o,s){return`Cannot include a '${a}' character in a manually specified \`to.${r}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function cw(a){return a.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Qd(a){let r=cw(a);return r.map((o,s)=>s===r.length-1?o.pathname:o.pathnameBase)}function Os(a,r,o,s=!1){let u;typeof a=="string"?u=Lr(a):(u={...a},nt(!u.pathname||!u.pathname.includes("?"),sd("?","pathname","search",u)),nt(!u.pathname||!u.pathname.includes("#"),sd("#","pathname","hash",u)),nt(!u.search||!u.search.includes("#"),sd("#","search","hash",u)));let d=a===""||u.pathname==="",h=d?"/":u.pathname,b;if(h==null)b=o;else{let w=r.length-1;if(!s&&h.startsWith("..")){let S=h.split("/");for(;S[0]==="..";)S.shift(),w-=1;u.pathname=S.join("/")}b=w>=0?r[w]:"/"}let p=sw(u,b),g=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&o.endsWith("/");return!p.pathname.endsWith("/")&&(g||x)&&(p.pathname+="/"),p}var Ub=a=>a.replace(/[\\/]{2,}/g,"/"),Ln=a=>Ub(a.join("/")),Es=a=>a.replace(/\/+$/,""),uw=a=>Es(a).replace(/^\/*/,"/"),dw=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,fw=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a,mw=class{constructor(a,r,o,s=!1){this.status=a,this.statusText=r||"",this.internal=s,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function hw(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}function pw(a){let r=a.map(o=>o.route.path).filter(Boolean);return Ln(r)||"/"}var _b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zb(a,r){let o=a;if(typeof o!="string"||!Vd.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let s=o,u=!1;if(_b)try{let d=new URL(window.location.href),h=Ab.test(o)?new URL(Ix(o,d.protocol)):new URL(o),b=ya(h.pathname,r);h.origin===d.origin&&b!=null?o=b+h.search+h.hash:u=!0}catch{Cn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:u,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ob=["POST","PUT","PATCH","DELETE"];new Set(Ob);var gw=["GET",...Ob];new Set(gw);var bw=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function yw(a){try{return bw.includes(new URL(a).protocol)}catch{return!1}}var Dr=y.createContext(null);Dr.displayName="DataRouter";var Ms=y.createContext(null);Ms.displayName="DataRouterState";var Mb=y.createContext(!1);function vw(){return y.useContext(Mb)}var Lb=y.createContext({isTransitioning:!1});Lb.displayName="ViewTransition";var xw=y.createContext(new Map);xw.displayName="Fetchers";var ww=y.createContext(null);ww.displayName="Await";var sn=y.createContext(null);sn.displayName="Navigation";var Qo=y.createContext(null);Qo.displayName="Location";var Pn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Pn.displayName="Route";var Pd=y.createContext(null);Pd.displayName="RouteError";var Db="REACT_ROUTER_ERROR",Sw="REDIRECT",Ew="ROUTE_ERROR_RESPONSE";function Aw(a){if(a.startsWith(`${Db}:${Sw}:{`))try{let r=JSON.parse(a.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Cw(a){if(a.startsWith(`${Db}:${Ew}:{`))try{let r=JSON.parse(a.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new mw(r.status,r.statusText,r.data)}catch{}}function Tw(a,{relative:r}={}){nt(kr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:s}=y.useContext(sn),{hash:u,pathname:d,search:h}=Po(a,{relative:r}),b=d;return o!=="/"&&(b=d==="/"?o:Ln([o,d])),s.createHref({pathname:b,search:h,hash:u})}function kr(){return y.useContext(Qo)!=null}function cn(){return nt(kr(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Qo).location}var kb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Bb(a){y.useContext(sn).static||y.useLayoutEffect(a)}function Zn(){let{isDataRoute:a}=y.useContext(Pn);return a?Hw():Rw()}function Rw(){nt(kr(),"useNavigate() may be used only in the context of a <Router> component.");let a=y.useContext(Dr),{basename:r,navigator:o}=y.useContext(sn),{matches:s}=y.useContext(Pn),{pathname:u}=cn(),d=JSON.stringify(Qd(s)),h=y.useRef(!1);return Bb(()=>{h.current=!0}),y.useCallback((p,g={})=>{if(Cn(h.current,kb),!h.current)return;if(typeof p=="number"){o.go(p);return}let x=Os(p,JSON.parse(d),u,g.relative==="path");a==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:Ln([r,x.pathname])),(g.replace?o.replace:o.push)(x,g.state,g)},[r,o,d,u,a])}y.createContext(null);function Po(a,{relative:r}={}){let{matches:o}=y.useContext(Pn),{pathname:s}=cn(),u=JSON.stringify(Qd(o));return y.useMemo(()=>Os(a,JSON.parse(u),s,r==="path"),[a,u,s,r])}function jw(a,r){return Hb(a,r)}function Hb(a,r,o){nt(kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(sn),{matches:u}=y.useContext(Pn),d=u[u.length-1],h=d?d.params:{},b=d?d.pathname:"/",p=d?d.pathnameBase:"/",g=d&&d.route;{let j=g&&g.path||"";Yb(b,!g||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
8
|
+
`+l.stack}}var vt=Object.prototype.hasOwnProperty,Ut=a.unstable_scheduleCallback,bn=a.unstable_cancelCallback,Yn=a.unstable_shouldYield,xn=a.unstable_requestPaint,yt=a.unstable_now,St=a.unstable_getCurrentPriorityLevel,xr=a.unstable_ImmediatePriority,an=a.unstable_UserBlockingPriority,Va=a.unstable_NormalPriority,Oo=a.unstable_LowPriority,wr=a.unstable_IdlePriority,As=a.log,Sr=a.unstable_setDisableYieldValue,Qa=null,ht=null;function Vt(e){if(typeof As=="function"&&Sr(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Qa,e)}catch{}}var Et=Math.clz32?Math.clz32:Cs,Er=Math.log,pl=Math.LN2;function Cs(e){return e>>>=0,e===0?32:31-(Er(e)/pl|0)|0}var Se=256,Ue=262144,rt=4194304;function Fe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qt(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?o=Fe(l):(m&=b,m!==0?o=Fe(m):n||(n=b&~e,n!==0&&(o=Fe(n))))):(b=l&~c,b!==0?o=Fe(b):m!==0?o=Fe(m):n||(n=l&~e,n!==0&&(o=Fe(n)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:o}function Lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ot(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gl(){var e=rt;return rt<<=1,(rt&62914560)===0&&(rt=4194304),e}function da(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function et(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wn(e,t,n,l,o,c){var m=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var b=e.entanglements,E=e.expirationTimes,U=e.hiddenUpdates;for(n=m&~n;0<n;){var B=31-Et(n),Y=1<<B;b[B]=0,E[B]=-1;var O=U[B];if(O!==null)for(U[B]=null,B=0;B<O.length;B++){var D=O[B];D!==null&&(D.lane&=-536870913)}n&=~Y}l!==0&&It(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(m&~t))}function It(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Et(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Xn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Et(n),o=1<<l;o&t|e[l]&t&&(e[l]|=t),n&=~o}}function bt(e,t){var n=t&-t;return n=(n&42)!==0?1:fa(n),(n&(e.suspendedLanes|t))!==0?0:n}function fa(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vl(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $d(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Mp(e.type))}function Kd(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var ma=Math.random().toString(36).slice(2),At="__reactFiber$"+ma,Dt="__reactProps$"+ma,yl="__reactContainer$"+ma,Ts="__reactEvents$"+ma,Vy="__reactListeners$"+ma,Qy="__reactHandles$"+ma,Pd="__reactResources$"+ma,Ar="__reactMarker$"+ma;function Rs(e){delete e[At],delete e[Dt],delete e[Ts],delete e[Vy],delete e[Qy]}function bl(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yl]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yp(e);e!==null;){if(n=e[At])return n;e=yp(e)}return t}e=n,n=e.parentNode}return null}function xl(e){if(e=e[At]||e[yl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Cr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function wl(e){var t=e[Pd];return t||(t=e[Pd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xt(e){e[Ar]=!0}var Jd=new Set,Wd={};function Ia(e,t){Sl(e,t),Sl(e+"Capture",t)}function Sl(e,t){for(Wd[e]=t,e=0;e<t.length;e++)Jd.add(t[e])}var Iy=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Fd={},ef={};function Zy(e){return vt.call(ef,e)?!0:vt.call(Fd,e)?!1:Iy.test(e)?ef[e]=!0:(Fd[e]=!0,!1)}function Mo(e,t,n){if(Zy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Lo(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Gn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $y(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ns(e){if(!e._valueTracker){var t=tf(e)?"checked":"value";e._valueTracker=$y(e,t,""+e[t])}}function nf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=tf(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Do(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ky=/[\n"\\]/g;function rn(e){return e.replace(Ky,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function js(e,t,n,l,o,c,m,b){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ln(t)):e.value!==""+ln(t)&&(e.value=""+ln(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?_s(e,m,ln(t)):n!=null?_s(e,m,ln(n)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+ln(b):e.removeAttribute("name")}function af(e,t,n,l,o,c,m,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Ns(e);return}n=n!=null?""+ln(n):"",t=t!=null?""+ln(t):n,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Ns(e)}function _s(e,t,n){t==="number"&&Do(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function El(e,t,n,l){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&l&&(e[n].defaultSelected=!0)}else{for(n=""+ln(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function lf(e,t,n){if(t!=null&&(t=""+ln(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+ln(n):""}function rf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(s(92));if(he(l)){if(1<l.length)throw Error(s(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=ln(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Ns(e)}function Al(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Py=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function of(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Py.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function sf(e,t,n){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&n[o]!==l&&of(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&of(e,c,t[c])}function zs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Wy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ko(e){return Wy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Us=null;function Os(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cl=null,Tl=null;function cf(e){var t=xl(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(js(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+rn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var o=l[Dt]||null;if(!o)throw Error(s(90));js(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&nf(l)}break e;case"textarea":lf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&El(e,!!n.multiple,t,!1)}}}var Ms=!1;function uf(e,t,n){if(Ms)return e(t,n);Ms=!0;try{var l=e(t);return l}finally{if(Ms=!1,(Cl!==null||Tl!==null)&&(Ai(),Cl&&(t=Cl,e=Tl,Tl=Cl=null,cf(t),e)))for(t=0;t<e.length;t++)cf(e[t])}}function Tr(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Dt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(s(231,t,typeof n));return n}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ls=!1;if(Qn)try{var Rr={};Object.defineProperty(Rr,"passive",{get:function(){Ls=!0}}),window.addEventListener("test",Rr,Rr),window.removeEventListener("test",Rr,Rr)}catch{Ls=!1}var ha=null,Ds=null,Bo=null;function df(){if(Bo)return Bo;var e,t=Ds,n=t.length,l,o="value"in ha?ha.value:ha.textContent,c=o.length;for(e=0;e<n&&t[e]===o[e];e++);var m=n-e;for(l=1;l<=m&&t[n-l]===o[c-l];l++);return Bo=o.slice(e,1<l?1-l:void 0)}function Ho(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qo(){return!0}function ff(){return!1}function kt(e){function t(n,l,o,c,m){this._reactName=n,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(n=e[b],this[b]=n?n(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?qo:ff,this.isPropagationStopped=ff,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=qo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qo)},persist:function(){},isPersistent:qo}),t}var Za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yo=kt(Za),Nr=w({},Za,{view:0,detail:0}),Fy=kt(Nr),ks,Bs,jr,Xo=w({},Nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==jr&&(jr&&e.type==="mousemove"?(ks=e.screenX-jr.screenX,Bs=e.screenY-jr.screenY):Bs=ks=0,jr=e),ks)},movementY:function(e){return"movementY"in e?e.movementY:Bs}}),mf=kt(Xo),eb=w({},Xo,{dataTransfer:0}),tb=kt(eb),nb=w({},Nr,{relatedTarget:0}),Hs=kt(nb),ab=w({},Za,{animationName:0,elapsedTime:0,pseudoElement:0}),lb=kt(ab),rb=w({},Za,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ob=kt(rb),ib=w({},Za,{data:0}),hf=kt(ib),sb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function db(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ub[e])?!!t[e]:!1}function qs(){return db}var fb=w({},Nr,{key:function(e){if(e.key){var t=sb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ho(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qs,charCode:function(e){return e.type==="keypress"?Ho(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ho(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mb=kt(fb),hb=w({},Xo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pf=kt(hb),pb=w({},Nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qs}),gb=kt(pb),vb=w({},Za,{propertyName:0,elapsedTime:0,pseudoElement:0}),yb=kt(vb),bb=w({},Xo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),xb=kt(bb),wb=w({},Za,{newState:0,oldState:0}),Sb=kt(wb),Eb=[9,13,27,32],Ys=Qn&&"CompositionEvent"in window,_r=null;Qn&&"documentMode"in document&&(_r=document.documentMode);var Ab=Qn&&"TextEvent"in window&&!_r,gf=Qn&&(!Ys||_r&&8<_r&&11>=_r),vf=" ",yf=!1;function bf(e,t){switch(e){case"keyup":return Eb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rl=!1;function Cb(e,t){switch(e){case"compositionend":return xf(t);case"keypress":return t.which!==32?null:(yf=!0,vf);case"textInput":return e=t.data,e===vf&&yf?null:e;default:return null}}function Tb(e,t){if(Rl)return e==="compositionend"||!Ys&&bf(e,t)?(e=df(),Bo=Ds=ha=null,Rl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return gf&&t.locale!=="ko"?null:t.data;default:return null}}var Rb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rb[e.type]:t==="textarea"}function Sf(e,t,n,l){Cl?Tl?Tl.push(l):Tl=[l]:Cl=l,t=zi(t,"onChange"),0<t.length&&(n=new Yo("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var zr=null,Ur=null;function Nb(e){lp(e,0)}function Go(e){var t=Cr(e);if(nf(t))return e}function Ef(e,t){if(e==="change")return t}var Af=!1;if(Qn){var Xs;if(Qn){var Gs="oninput"in document;if(!Gs){var Cf=document.createElement("div");Cf.setAttribute("oninput","return;"),Gs=typeof Cf.oninput=="function"}Xs=Gs}else Xs=!1;Af=Xs&&(!document.documentMode||9<document.documentMode)}function Tf(){zr&&(zr.detachEvent("onpropertychange",Rf),Ur=zr=null)}function Rf(e){if(e.propertyName==="value"&&Go(Ur)){var t=[];Sf(t,Ur,e,Os(e)),uf(Nb,t)}}function jb(e,t,n){e==="focusin"?(Tf(),zr=t,Ur=n,zr.attachEvent("onpropertychange",Rf)):e==="focusout"&&Tf()}function _b(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Go(Ur)}function zb(e,t){if(e==="click")return Go(t)}function Ub(e,t){if(e==="input"||e==="change")return Go(t)}function Ob(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Ob;function Or(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var o=n[l];if(!vt.call(t,o)||!Zt(e[o],t[o]))return!1}return!0}function Nf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jf(e,t){var n=Nf(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Nf(n)}}function _f(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_f(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Do(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Do(e.document)}return t}function Vs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Mb=Qn&&"documentMode"in document&&11>=document.documentMode,Nl=null,Qs=null,Mr=null,Is=!1;function Uf(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Is||Nl==null||Nl!==Do(l)||(l=Nl,"selectionStart"in l&&Vs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Mr&&Or(Mr,l)||(Mr=l,l=zi(Qs,"onSelect"),0<l.length&&(t=new Yo("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Nl)))}function $a(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var jl={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionrun:$a("Transition","TransitionRun"),transitionstart:$a("Transition","TransitionStart"),transitioncancel:$a("Transition","TransitionCancel"),transitionend:$a("Transition","TransitionEnd")},Zs={},Of={};Qn&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete jl.animationend.animation,delete jl.animationiteration.animation,delete jl.animationstart.animation),"TransitionEvent"in window||delete jl.transitionend.transition);function Ka(e){if(Zs[e])return Zs[e];if(!jl[e])return e;var t=jl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Of)return Zs[e]=t[n];return e}var Mf=Ka("animationend"),Lf=Ka("animationiteration"),Df=Ka("animationstart"),Lb=Ka("transitionrun"),Db=Ka("transitionstart"),kb=Ka("transitioncancel"),kf=Ka("transitionend"),Bf=new Map,$s="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");$s.push("scrollEnd");function Sn(e,t){Bf.set(e,t),Ia(t,[e])}var Vo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},on=[],_l=0,Ks=0;function Qo(){for(var e=_l,t=Ks=_l=0;t<e;){var n=on[t];on[t++]=null;var l=on[t];on[t++]=null;var o=on[t];on[t++]=null;var c=on[t];if(on[t++]=null,l!==null&&o!==null){var m=l.pending;m===null?o.next=o:(o.next=m.next,m.next=o),l.pending=o}c!==0&&Hf(n,o,c)}}function Io(e,t,n,l){on[_l++]=e,on[_l++]=t,on[_l++]=n,on[_l++]=l,Ks|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ps(e,t,n,l){return Io(e,t,n,l),Zo(e)}function Pa(e,t){return Io(e,null,null,t),Zo(e)}function Hf(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var o=!1,c=e.return;c!==null;)c.childLanes|=n,l=c.alternate,l!==null&&(l.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Et(n),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=n|536870912),c):null}function Zo(e){if(50<no)throw no=0,ru=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function Bb(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,n,l){return new Bb(e,t,n,l)}function Js(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var n=e.alternate;return n===null?(n=$t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function qf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $o(e,t,n,l,o,c){var m=0;if(l=e,typeof e=="function")Js(e)&&(m=1);else if(typeof e=="string")m=G0(e,n,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=$t(31,n,t,o),e.elementType=ee,e.lanes=c,e;case N:return Ja(n.children,o,c,t);case _:m=8,o|=24;break;case Q:return e=$t(12,n,t,o|2),e.elementType=Q,e.lanes=c,e;case ne:return e=$t(13,n,t,o),e.elementType=ne,e.lanes=c,e;case se:return e=$t(19,n,t,o),e.elementType=se,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:m=10;break e;case Z:m=9;break e;case oe:m=11;break e;case I:m=14;break e;case q:m=16,l=null;break e}m=29,n=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=$t(m,n,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function Ja(e,t,n,l){return e=$t(7,e,l,t),e.lanes=n,e}function Ws(e,t,n){return e=$t(6,e,null,t),e.lanes=n,e}function Yf(e){var t=$t(18,null,null,0);return t.stateNode=e,t}function Fs(e,t,n){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xf=new WeakMap;function sn(e,t){if(typeof e=="object"&&e!==null){var n=Xf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Xe(t)},Xf.set(e,t),t)}return{value:e,source:t,stack:Xe(t)}}var Ul=[],Ol=0,Ko=null,Lr=0,cn=[],un=0,pa=null,_n=1,zn="";function Zn(e,t){Ul[Ol++]=Lr,Ul[Ol++]=Ko,Ko=e,Lr=t}function Gf(e,t,n){cn[un++]=_n,cn[un++]=zn,cn[un++]=pa,pa=e;var l=_n;e=zn;var o=32-Et(l)-1;l&=~(1<<o),n+=1;var c=32-Et(t)+o;if(30<c){var m=o-o%5;c=(l&(1<<m)-1).toString(32),l>>=m,o-=m,_n=1<<32-Et(t)+o|n<<o|l,zn=c+e}else _n=1<<c|n<<o|l,zn=e}function ec(e){e.return!==null&&(Zn(e,1),Gf(e,1,0))}function tc(e){for(;e===Ko;)Ko=Ul[--Ol],Ul[Ol]=null,Lr=Ul[--Ol],Ul[Ol]=null;for(;e===pa;)pa=cn[--un],cn[un]=null,zn=cn[--un],cn[un]=null,_n=cn[--un],cn[un]=null}function Vf(e,t){cn[un++]=_n,cn[un++]=zn,cn[un++]=pa,_n=t.id,zn=t.overflow,pa=e}var Ct=null,Ke=null,ze=!1,ga=null,dn=!1,nc=Error(s(519));function va(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dr(sn(t,e)),nc}function Qf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[At]=e,t[Dt]=l,n){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(n=0;n<lo.length;n++)Te(lo[n],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),af(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),rf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||sp(t.textContent,n)?(l.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),l.onScroll!=null&&Te("scroll",t),l.onScrollEnd!=null&&Te("scrollend",t),l.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||va(e,!0)}function If(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:dn=!1;return;case 27:case 3:dn=!0;return;default:Ct=Ct.return}}function Ml(e){if(e!==Ct)return!1;if(!ze)return If(e),ze=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||xu(e.type,e.memoizedProps)),n=!n),n&&Ke&&va(e),If(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ke=vp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Ke=vp(e)}else t===27?(t=Ke,za(e.type)?(e=Cu,Cu=null,Ke=e):Ke=t):Ke=Ct?mn(e.stateNode.nextSibling):null;return!0}function Wa(){Ke=Ct=null,ze=!1}function ac(){var e=ga;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),ga=null),e}function Dr(e){ga===null?ga=[e]:ga.push(e)}var lc=A(null),Fa=null,$n=null;function ya(e,t,n){L(lc,t._currentValue),t._currentValue=n}function Kn(e){e._currentValue=lc.current,k(lc)}function rc(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function oc(e,t,n,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var m=o.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){c.lanes|=n,b=c.alternate,b!==null&&(b.lanes|=n),rc(c.return,n,e),l||(m=null);break e}c=b.next}}else if(o.tag===18){if(m=o.return,m===null)throw Error(s(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),rc(m,n,e),m=null}else m=o.child;if(m!==null)m.return=o;else for(m=o;m!==null;){if(m===e){m=null;break}if(o=m.sibling,o!==null){o.return=m.return,m=o;break}m=m.return}o=m}}function Ll(e,t,n,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var m=o.alternate;if(m===null)throw Error(s(387));if(m=m.memoizedProps,m!==null){var b=o.type;Zt(o.pendingProps.value,m.value)||(e!==null?e.push(b):e=[b])}}else if(o===ue.current){if(m=o.alternate,m===null)throw Error(s(387));m.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(co):e=[co])}o=o.return}e!==null&&oc(t,e,n,l),t.flags|=262144}function Po(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function el(e){Fa=e,$n=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return Zf(Fa,e)}function Jo(e,t){return Fa===null&&el(e),Zf(e,t)}function Zf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$n===null){if(e===null)throw Error(s(308));$n=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $n=$n.next=t;return n}var Hb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},qb=a.unstable_scheduleCallback,Yb=a.unstable_NormalPriority,ct={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ic(){return{controller:new Hb,data:new Map,refCount:0}}function kr(e){e.refCount--,e.refCount===0&&qb(Yb,function(){e.controller.abort()})}var Br=null,sc=0,Dl=0,kl=null;function Xb(e,t){if(Br===null){var n=Br=[];sc=0,Dl=du(),kl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return sc++,t.then($f,$f),t}function $f(){if(--sc===0&&Br!==null){kl!==null&&(kl.status="fulfilled");var e=Br;Br=null,Dl=0,kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Gb(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),l}var Kf=M.S;M.S=function(e,t){Uh=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Xb(e,t),Kf!==null&&Kf(e,t)};var tl=A(null);function cc(){var e=tl.current;return e!==null?e:Ie.pooledCache}function Wo(e,t){t===null?L(tl,tl.current):L(tl,t.pool)}function Pf(){var e=cc();return e===null?null:{parent:ct._currentValue,pool:e}}var Bl=Error(s(460)),uc=Error(s(474)),Fo=Error(s(542)),ei={then:function(){}};function Jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Vn,Vn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,em(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,em(e),e}throw al=t,Bl}}function nl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(al=n,Bl):n}}var al=null;function Ff(){if(al===null)throw Error(s(459));var e=al;return al=null,e}function em(e){if(e===Bl||e===Fo)throw Error(s(483))}var Hl=null,Hr=0;function ti(e){var t=Hr;return Hr+=1,Hl===null&&(Hl=[]),Wf(Hl,e,t)}function qr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ni(e,t){throw t.$$typeof===S?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tm(e){function t(R,C){if(e){var z=R.deletions;z===null?(R.deletions=[C],R.flags|=16):z.push(C)}}function n(R,C){if(!e)return null;for(;C!==null;)t(R,C),C=C.sibling;return null}function l(R){for(var C=new Map;R!==null;)R.key!==null?C.set(R.key,R):C.set(R.index,R),R=R.sibling;return C}function o(R,C){return R=In(R,C),R.index=0,R.sibling=null,R}function c(R,C,z){return R.index=z,e?(z=R.alternate,z!==null?(z=z.index,z<C?(R.flags|=67108866,C):z):(R.flags|=67108866,C)):(R.flags|=1048576,C)}function m(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function b(R,C,z,H){return C===null||C.tag!==6?(C=Ws(z,R.mode,H),C.return=R,C):(C=o(C,z),C.return=R,C)}function E(R,C,z,H){var fe=z.type;return fe===N?B(R,C,z.props.children,H,z.key):C!==null&&(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===q&&nl(fe)===C.type)?(C=o(C,z.props),qr(C,z),C.return=R,C):(C=$o(z.type,z.key,z.props,null,R.mode,H),qr(C,z),C.return=R,C)}function U(R,C,z,H){return C===null||C.tag!==4||C.stateNode.containerInfo!==z.containerInfo||C.stateNode.implementation!==z.implementation?(C=Fs(z,R.mode,H),C.return=R,C):(C=o(C,z.children||[]),C.return=R,C)}function B(R,C,z,H,fe){return C===null||C.tag!==7?(C=Ja(z,R.mode,H,fe),C.return=R,C):(C=o(C,z),C.return=R,C)}function Y(R,C,z){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Ws(""+C,R.mode,z),C.return=R,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case T:return z=$o(C.type,C.key,C.props,null,R.mode,z),qr(z,C),z.return=R,z;case j:return C=Fs(C,R.mode,z),C.return=R,C;case q:return C=nl(C),Y(R,C,z)}if(he(C)||me(C))return C=Ja(C,R.mode,z,null),C.return=R,C;if(typeof C.then=="function")return Y(R,ti(C),z);if(C.$$typeof===G)return Y(R,Jo(R,C),z);ni(R,C)}return null}function O(R,C,z,H){var fe=C!==null?C.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return fe!==null?null:b(R,C,""+z,H);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case T:return z.key===fe?E(R,C,z,H):null;case j:return z.key===fe?U(R,C,z,H):null;case q:return z=nl(z),O(R,C,z,H)}if(he(z)||me(z))return fe!==null?null:B(R,C,z,H,null);if(typeof z.then=="function")return O(R,C,ti(z),H);if(z.$$typeof===G)return O(R,C,Jo(R,z),H);ni(R,z)}return null}function D(R,C,z,H,fe){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return R=R.get(z)||null,b(C,R,""+H,fe);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case T:return R=R.get(H.key===null?z:H.key)||null,E(C,R,H,fe);case j:return R=R.get(H.key===null?z:H.key)||null,U(C,R,H,fe);case q:return H=nl(H),D(R,C,z,H,fe)}if(he(H)||me(H))return R=R.get(z)||null,B(C,R,H,fe,null);if(typeof H.then=="function")return D(R,C,z,ti(H),fe);if(H.$$typeof===G)return D(R,C,z,Jo(C,H),fe);ni(C,H)}return null}function re(R,C,z,H){for(var fe=null,Me=null,ce=C,Ee=C=0,_e=null;ce!==null&&Ee<z.length;Ee++){ce.index>Ee?(_e=ce,ce=null):_e=ce.sibling;var Le=O(R,ce,z[Ee],H);if(Le===null){ce===null&&(ce=_e);break}e&&ce&&Le.alternate===null&&t(R,ce),C=c(Le,C,Ee),Me===null?fe=Le:Me.sibling=Le,Me=Le,ce=_e}if(Ee===z.length)return n(R,ce),ze&&Zn(R,Ee),fe;if(ce===null){for(;Ee<z.length;Ee++)ce=Y(R,z[Ee],H),ce!==null&&(C=c(ce,C,Ee),Me===null?fe=ce:Me.sibling=ce,Me=ce);return ze&&Zn(R,Ee),fe}for(ce=l(ce);Ee<z.length;Ee++)_e=D(ce,R,Ee,z[Ee],H),_e!==null&&(e&&_e.alternate!==null&&ce.delete(_e.key===null?Ee:_e.key),C=c(_e,C,Ee),Me===null?fe=_e:Me.sibling=_e,Me=_e);return e&&ce.forEach(function(Da){return t(R,Da)}),ze&&Zn(R,Ee),fe}function pe(R,C,z,H){if(z==null)throw Error(s(151));for(var fe=null,Me=null,ce=C,Ee=C=0,_e=null,Le=z.next();ce!==null&&!Le.done;Ee++,Le=z.next()){ce.index>Ee?(_e=ce,ce=null):_e=ce.sibling;var Da=O(R,ce,Le.value,H);if(Da===null){ce===null&&(ce=_e);break}e&&ce&&Da.alternate===null&&t(R,ce),C=c(Da,C,Ee),Me===null?fe=Da:Me.sibling=Da,Me=Da,ce=_e}if(Le.done)return n(R,ce),ze&&Zn(R,Ee),fe;if(ce===null){for(;!Le.done;Ee++,Le=z.next())Le=Y(R,Le.value,H),Le!==null&&(C=c(Le,C,Ee),Me===null?fe=Le:Me.sibling=Le,Me=Le);return ze&&Zn(R,Ee),fe}for(ce=l(ce);!Le.done;Ee++,Le=z.next())Le=D(ce,R,Ee,Le.value,H),Le!==null&&(e&&Le.alternate!==null&&ce.delete(Le.key===null?Ee:Le.key),C=c(Le,C,Ee),Me===null?fe=Le:Me.sibling=Le,Me=Le);return e&&ce.forEach(function(ex){return t(R,ex)}),ze&&Zn(R,Ee),fe}function Qe(R,C,z,H){if(typeof z=="object"&&z!==null&&z.type===N&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case T:e:{for(var fe=z.key;C!==null;){if(C.key===fe){if(fe=z.type,fe===N){if(C.tag===7){n(R,C.sibling),H=o(C,z.props.children),H.return=R,R=H;break e}}else if(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===q&&nl(fe)===C.type){n(R,C.sibling),H=o(C,z.props),qr(H,z),H.return=R,R=H;break e}n(R,C);break}else t(R,C);C=C.sibling}z.type===N?(H=Ja(z.props.children,R.mode,H,z.key),H.return=R,R=H):(H=$o(z.type,z.key,z.props,null,R.mode,H),qr(H,z),H.return=R,R=H)}return m(R);case j:e:{for(fe=z.key;C!==null;){if(C.key===fe)if(C.tag===4&&C.stateNode.containerInfo===z.containerInfo&&C.stateNode.implementation===z.implementation){n(R,C.sibling),H=o(C,z.children||[]),H.return=R,R=H;break e}else{n(R,C);break}else t(R,C);C=C.sibling}H=Fs(z,R.mode,H),H.return=R,R=H}return m(R);case q:return z=nl(z),Qe(R,C,z,H)}if(he(z))return re(R,C,z,H);if(me(z)){if(fe=me(z),typeof fe!="function")throw Error(s(150));return z=fe.call(z),pe(R,C,z,H)}if(typeof z.then=="function")return Qe(R,C,ti(z),H);if(z.$$typeof===G)return Qe(R,C,Jo(R,z),H);ni(R,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,C!==null&&C.tag===6?(n(R,C.sibling),H=o(C,z),H.return=R,R=H):(n(R,C),H=Ws(z,R.mode,H),H.return=R,R=H),m(R)):n(R,C)}return function(R,C,z,H){try{Hr=0;var fe=Qe(R,C,z,H);return Hl=null,fe}catch(ce){if(ce===Bl||ce===Fo)throw ce;var Me=$t(29,ce,null,R.mode);return Me.lanes=H,Me.return=R,Me}}}var ll=tm(!0),nm=tm(!1),ba=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ke&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Zo(e),Hf(e,null,n),t}return Io(e,l,t,n),Zo(e)}function Yr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Xn(e,n)}}function mc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?o=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?o=c=t:c=c.next=t}else o=c=t;n={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var hc=!1;function Xr(){if(hc){var e=kl;if(e!==null)throw e}}function Gr(e,t,n,l){hc=!1;var o=e.updateQueue;ba=!1;var c=o.firstBaseUpdate,m=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,U=E.next;E.next=null,m===null?c=U:m.next=U,m=E;var B=e.alternate;B!==null&&(B=B.updateQueue,b=B.lastBaseUpdate,b!==m&&(b===null?B.firstBaseUpdate=U:b.next=U,B.lastBaseUpdate=E))}if(c!==null){var Y=o.baseState;m=0,B=U=E=null,b=c;do{var O=b.lane&-536870913,D=O!==b.lane;if(D?(je&O)===O:(l&O)===O){O!==0&&O===Dl&&(hc=!0),B!==null&&(B=B.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var re=e,pe=b;O=t;var Qe=n;switch(pe.tag){case 1:if(re=pe.payload,typeof re=="function"){Y=re.call(Qe,Y,O);break e}Y=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=pe.payload,O=typeof re=="function"?re.call(Qe,Y,O):re,O==null)break e;Y=w({},Y,O);break e;case 2:ba=!0}}O=b.callback,O!==null&&(e.flags|=64,D&&(e.flags|=8192),D=o.callbacks,D===null?o.callbacks=[O]:D.push(O))}else D={lane:O,tag:b.tag,payload:b.payload,callback:b.callback,next:null},B===null?(U=B=D,E=Y):B=B.next=D,m|=O;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;D=b,b=D.next,D.next=null,o.lastBaseUpdate=D,o.shared.pending=null}}while(!0);B===null&&(E=Y),o.baseState=E,o.firstBaseUpdate=U,o.lastBaseUpdate=B,c===null&&(o.shared.lanes=0),Ta|=m,e.lanes=m,e.memoizedState=Y}}function am(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function lm(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)am(n[e],t)}var ql=A(null),ai=A(0);function rm(e,t){e=la,L(ai,e),L(ql,t),la=e|t.baseLanes}function pc(){L(ai,la),L(ql,ql.current)}function gc(){la=ai.current,k(ql),k(ai)}var Kt=A(null),fn=null;function Sa(e){var t=e.alternate;L(ot,ot.current&1),L(Kt,e),fn===null&&(t===null||ql.current!==null||t.memoizedState!==null)&&(fn=e)}function vc(e){L(ot,ot.current),L(Kt,e),fn===null&&(fn=e)}function om(e){e.tag===22?(L(ot,ot.current),L(Kt,e),fn===null&&(fn=e)):Ea()}function Ea(){L(ot,ot.current),L(Kt,Kt.current)}function Pt(e){k(Kt),fn===e&&(fn=null),k(ot)}var ot=A(0);function li(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Eu(n)||Au(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pn=0,xe=null,Ge=null,ut=null,ri=!1,Yl=!1,rl=!1,oi=0,Vr=0,Xl=null,Vb=0;function nt(){throw Error(s(321))}function yc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zt(e[n],t[n]))return!1;return!0}function bc(e,t,n,l,o,c){return Pn=c,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Gm:Mc,rl=!1,c=n(l,o),rl=!1,Yl&&(c=sm(t,n,l,o)),im(e),c}function im(e){M.H=Zr;var t=Ge!==null&&Ge.next!==null;if(Pn=0,ut=Ge=xe=null,ri=!1,Vr=0,Xl=null,t)throw Error(s(300));e===null||dt||(e=e.dependencies,e!==null&&Po(e)&&(dt=!0))}function sm(e,t,n,l){xe=e;var o=0;do{if(Yl&&(Xl=null),Vr=0,Yl=!1,25<=o)throw Error(s(301));if(o+=1,ut=Ge=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}M.H=Vm,c=t(n,l)}while(Yl);return c}function Qb(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?Qr(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(xe.flags|=1024),t}function xc(){var e=oi!==0;return oi=0,e}function wc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Sc(e){if(ri){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ri=!1}Pn=0,ut=Ge=xe=null,Yl=!1,Vr=oi=0,Xl=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?xe.memoizedState=ut=e:ut=ut.next=e,ut}function it(){if(Ge===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=ut===null?xe.memoizedState:ut.next;if(t!==null)ut=t,Ge=e;else{if(e===null)throw xe.alternate===null?Error(s(467)):Error(s(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ut===null?xe.memoizedState=ut=e:ut=ut.next=e}return ut}function ii(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qr(e){var t=Vr;return Vr+=1,Xl===null&&(Xl=[]),e=Wf(Xl,e,t),t=xe,(ut===null?t.memoizedState:ut.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Gm:Mc),e}function si(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qr(e);if(e.$$typeof===G)return Tt(e)}throw Error(s(438,String(e)))}function Ec(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=xe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ii(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=te;return t.index++,n}function Jn(e,t){return typeof t=="function"?t(e):t}function ci(e){var t=it();return Ac(t,Ge,e)}function Ac(e,t,n){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=n;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var m=o.next;o.next=c.next,c.next=m}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var b=m=null,E=null,U=t,B=!1;do{var Y=U.lane&-536870913;if(Y!==U.lane?(je&Y)===Y:(Pn&Y)===Y){var O=U.revertLane;if(O===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),Y===Dl&&(B=!0);else if((Pn&O)===O){U=U.next,O===Dl&&(B=!0);continue}else Y={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},E===null?(b=E=Y,m=c):E=E.next=Y,xe.lanes|=O,Ta|=O;Y=U.action,rl&&n(c,Y),c=U.hasEagerState?U.eagerState:n(c,Y)}else O={lane:Y,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},E===null?(b=E=O,m=c):E=E.next=O,xe.lanes|=Y,Ta|=Y;U=U.next}while(U!==null&&U!==t);if(E===null?m=c:E.next=b,!Zt(c,e.memoizedState)&&(dt=!0,B&&(n=kl,n!==null)))throw n;e.memoizedState=c,e.baseState=m,e.baseQueue=E,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Cc(e){var t=it(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var l=n.dispatch,o=n.pending,c=t.memoizedState;if(o!==null){n.pending=null;var m=o=o.next;do c=e(c,m.action),m=m.next;while(m!==o);Zt(c,t.memoizedState)||(dt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,l]}function cm(e,t,n){var l=xe,o=it(),c=ze;if(c){if(n===void 0)throw Error(s(407));n=n()}else n=t();var m=!Zt((Ge||o).memoizedState,n);if(m&&(o.memoizedState=n,dt=!0),o=o.queue,Nc(fm.bind(null,l,o,e),[e]),o.getSnapshot!==t||m||ut!==null&&ut.memoizedState.tag&1){if(l.flags|=2048,Gl(9,{destroy:void 0},dm.bind(null,l,o,n,t),null),Ie===null)throw Error(s(349));c||(Pn&127)!==0||um(l,t,n)}return n}function um(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=ii(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dm(e,t,n,l){t.value=n,t.getSnapshot=l,mm(t)&&hm(e)}function fm(e,t,n){return n(function(){mm(t)&&hm(e)})}function mm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zt(e,n)}catch{return!0}}function hm(e){var t=Pa(e,2);t!==null&&Xt(t,e,2)}function Tc(e){var t=Mt();if(typeof e=="function"){var n=e;if(e=n(),rl){Vt(!0);try{n()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},t}function pm(e,t,n,l){return e.baseState=n,Ac(e,Ge,typeof l=="function"?l:Jn)}function Ib(e,t,n,l,o){if(fi(e))throw Error(s(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};M.T!==null?n(!0):c.isTransition=!1,l(c),n=t.pending,n===null?(c.next=t.pending=c,gm(t,c)):(c.next=n.next,t.pending=n.next=c)}}function gm(e,t){var n=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=M.T,m={};M.T=m;try{var b=n(o,l),E=M.S;E!==null&&E(m,b),vm(e,t,b)}catch(U){Rc(e,t,U)}finally{c!==null&&m.types!==null&&(c.types=m.types),M.T=c}}else try{c=n(o,l),vm(e,t,c)}catch(U){Rc(e,t,U)}}function vm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){ym(e,t,l)},function(l){return Rc(e,t,l)}):ym(e,t,n)}function ym(e,t,n){t.status="fulfilled",t.value=n,bm(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,gm(e,n)))}function Rc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,bm(t),t=t.next;while(t!==l)}e.action=null}function bm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xm(e,t){return t}function wm(e,t){if(ze){var n=Ie.formState;if(n!==null){e:{var l=xe;if(ze){if(Ke){t:{for(var o=Ke,c=dn;o.nodeType!==8;){if(!c){o=null;break t}if(o=mn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Ke=mn(o.nextSibling),l=o.data==="F!";break e}}va(l)}l=!1}l&&(t=n[0])}}return n=Mt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xm,lastRenderedState:t},n.queue=l,n=qm.bind(null,xe,l),l.dispatch=n,l=Tc(!1),c=Oc.bind(null,xe,!1,l.queue),l=Mt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,n=Ib.bind(null,xe,o,c,n),o.dispatch=n,l.memoizedState=e,[t,n,!1]}function Sm(e){var t=it();return Em(t,Ge,e)}function Em(e,t,n){if(t=Ac(e,t,xm)[0],e=ci(Jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Qr(t)}catch(m){throw m===Bl?Fo:m}else l=t;t=it();var o=t.queue,c=o.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,Gl(9,{destroy:void 0},Zb.bind(null,o,n),null)),[l,c,e]}function Zb(e,t){e.action=t}function Am(e){var t=it(),n=Ge;if(n!==null)return Em(t,n,e);it(),t=t.memoizedState,n=it();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Gl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=xe.updateQueue,t===null&&(t=ii(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Cm(){return it().memoizedState}function ui(e,t,n,l){var o=Mt();xe.flags|=e,o.memoizedState=Gl(1|t,{destroy:void 0},n,l===void 0?null:l)}function di(e,t,n,l){var o=it();l=l===void 0?null:l;var c=o.memoizedState.inst;Ge!==null&&l!==null&&yc(l,Ge.memoizedState.deps)?o.memoizedState=Gl(t,c,n,l):(xe.flags|=e,o.memoizedState=Gl(1|t,c,n,l))}function Tm(e,t){ui(8390656,8,e,t)}function Nc(e,t){di(2048,8,e,t)}function $b(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=ii(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Rm(e){var t=it().memoizedState;return $b({ref:t,nextImpl:e}),function(){if((ke&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Nm(e,t){return di(4,2,e,t)}function jm(e,t){return di(4,4,e,t)}function _m(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zm(e,t,n){n=n!=null?n.concat([e]):null,di(4,4,_m.bind(null,t,e),n)}function jc(){}function Um(e,t){var n=it();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&yc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Om(e,t){var n=it();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&yc(t,l[1]))return l[0];if(l=e(),rl){Vt(!0);try{e()}finally{Vt(!1)}}return n.memoizedState=[l,t],l}function _c(e,t,n){return n===void 0||(Pn&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Mh(),xe.lanes|=e,Ta|=e,n)}function Mm(e,t,n,l){return Zt(n,t)?n:ql.current!==null?(e=_c(e,n,l),Zt(e,t)||(dt=!0),e):(Pn&42)===0||(Pn&1073741824)!==0&&(je&261930)===0?(dt=!0,e.memoizedState=n):(e=Mh(),xe.lanes|=e,Ta|=e,t)}function Lm(e,t,n,l,o){var c=$.p;$.p=c!==0&&8>c?c:8;var m=M.T,b={};M.T=b,Oc(e,!1,t,n);try{var E=o(),U=M.S;if(U!==null&&U(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var B=Gb(E,l);Ir(e,t,B,Ft(e))}else Ir(e,t,l,Ft(e))}catch(Y){Ir(e,t,{then:function(){},status:"rejected",reason:Y},Ft())}finally{$.p=c,m!==null&&b.types!==null&&(m.types=b.types),M.T=m}}function Kb(){}function zc(e,t,n,l){if(e.tag!==5)throw Error(s(476));var o=Dm(e).queue;Lm(e,o,t,P,n===null?Kb:function(){return km(e),n(l)})}function Dm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function km(e){var t=Dm(e);t.next===null&&(t=e.alternate.memoizedState),Ir(e,t.next.queue,{},Ft())}function Uc(){return Tt(co)}function Bm(){return it().memoizedState}function Hm(){return it().memoizedState}function Pb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ft();e=xa(n);var l=wa(t,e,n);l!==null&&(Xt(l,t,n),Yr(l,t,n)),t={cache:ic()},e.payload=t;return}t=t.return}}function Jb(e,t,n){var l=Ft();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fi(e)?Ym(t,n):(n=Ps(e,t,n,l),n!==null&&(Xt(n,e,l),Xm(n,t,l)))}function qm(e,t,n){var l=Ft();Ir(e,t,n,l)}function Ir(e,t,n,l){var o={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fi(e))Ym(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,b=c(m,n);if(o.hasEagerState=!0,o.eagerState=b,Zt(b,m))return Io(e,t,o,0),Ie===null&&Qo(),!1}catch{}if(n=Ps(e,t,o,l),n!==null)return Xt(n,e,l),Xm(n,t,l),!0}return!1}function Oc(e,t,n,l){if(l={lane:2,revertLane:du(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fi(e)){if(t)throw Error(s(479))}else t=Ps(e,n,l,2),t!==null&&Xt(t,e,2)}function fi(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Ym(e,t){Yl=ri=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xm(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Xn(e,n)}}var Zr={readContext:Tt,use:si,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};Zr.useEffectEvent=nt;var Gm={readContext:Tt,use:si,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Tm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ui(4194308,4,_m.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ui(4194308,4,e,t)},useInsertionEffect:function(e,t){ui(4,2,e,t)},useMemo:function(e,t){var n=Mt();t=t===void 0?null:t;var l=e();if(rl){Vt(!0);try{e()}finally{Vt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Mt();if(n!==void 0){var o=n(t);if(rl){Vt(!0);try{n(t)}finally{Vt(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=Jb.bind(null,xe,e),[l.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,n=qm.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:jc,useDeferredValue:function(e,t){var n=Mt();return _c(n,e,t)},useTransition:function(){var e=Tc(!1);return e=Lm.bind(null,xe,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=xe,o=Mt();if(ze){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Ie===null)throw Error(s(349));(je&127)!==0||um(l,t,n)}o.memoizedState=n;var c={value:n,getSnapshot:t};return o.queue=c,Tm(fm.bind(null,l,c,e),[e]),l.flags|=2048,Gl(9,{destroy:void 0},dm.bind(null,l,c,n,t),null),n},useId:function(){var e=Mt(),t=Ie.identifierPrefix;if(ze){var n=zn,l=_n;n=(l&~(1<<32-Et(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=oi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Vb++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Uc,useFormState:wm,useActionState:wm,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Oc.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ec,useCacheRefresh:function(){return Mt().memoizedState=Pb.bind(null,xe)},useEffectEvent:function(e){var t=Mt(),n={impl:e};return t.memoizedState=n,function(){if((ke&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Mc={readContext:Tt,use:si,useCallback:Um,useContext:Tt,useEffect:Nc,useImperativeHandle:zm,useInsertionEffect:Nm,useLayoutEffect:jm,useMemo:Om,useReducer:ci,useRef:Cm,useState:function(){return ci(Jn)},useDebugValue:jc,useDeferredValue:function(e,t){var n=it();return Mm(n,Ge.memoizedState,e,t)},useTransition:function(){var e=ci(Jn)[0],t=it().memoizedState;return[typeof e=="boolean"?e:Qr(e),t]},useSyncExternalStore:cm,useId:Bm,useHostTransitionStatus:Uc,useFormState:Sm,useActionState:Sm,useOptimistic:function(e,t){var n=it();return pm(n,Ge,e,t)},useMemoCache:Ec,useCacheRefresh:Hm};Mc.useEffectEvent=Rm;var Vm={readContext:Tt,use:si,useCallback:Um,useContext:Tt,useEffect:Nc,useImperativeHandle:zm,useInsertionEffect:Nm,useLayoutEffect:jm,useMemo:Om,useReducer:Cc,useRef:Cm,useState:function(){return Cc(Jn)},useDebugValue:jc,useDeferredValue:function(e,t){var n=it();return Ge===null?_c(n,e,t):Mm(n,Ge.memoizedState,e,t)},useTransition:function(){var e=Cc(Jn)[0],t=it().memoizedState;return[typeof e=="boolean"?e:Qr(e),t]},useSyncExternalStore:cm,useId:Bm,useHostTransitionStatus:Uc,useFormState:Am,useActionState:Am,useOptimistic:function(e,t){var n=it();return Ge!==null?pm(n,Ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ec,useCacheRefresh:Hm};Vm.useEffectEvent=Rm;function Lc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Dc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Ft(),o=xa(l);o.payload=t,n!=null&&(o.callback=n),t=wa(e,o,l),t!==null&&(Xt(t,e,l),Yr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Ft(),o=xa(l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=wa(e,o,l),t!==null&&(Xt(t,e,l),Yr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ft(),l=xa(n);l.tag=2,t!=null&&(l.callback=t),t=wa(e,l,n),t!==null&&(Xt(t,e,n),Yr(t,e,n))}};function Qm(e,t,n,l,o,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,m):t.prototype&&t.prototype.isPureReactComponent?!Or(n,l)||!Or(o,c):!0}function Im(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Dc.enqueueReplaceState(t,t.state,null)}function ol(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=w({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function Zm(e){Vo(e)}function $m(e){console.error(e)}function Km(e){Vo(e)}function mi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Pm(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function kc(e,t,n){return n=xa(n),n.tag=3,n.payload={element:null},n.callback=function(){mi(e,t)},n}function Jm(e){return e=xa(e),e.tag=3,e}function Wm(e,t,n,l){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){Pm(t,n,l)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){Pm(t,n,l),typeof o!="function"&&(Ra===null?Ra=new Set([this]):Ra.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function Wb(e,t,n,l,o){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Ll(t,n,o,!0),n=Kt.current,n!==null){switch(n.tag){case 31:case 13:return fn===null?Ci():n.alternate===null&&at===0&&(at=3),n.flags&=-257,n.flags|=65536,n.lanes=o,l===ei?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),su(e,l,o)),!1;case 22:return n.flags|=65536,l===ei?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),su(e,l,o)),!1}throw Error(s(435,n.tag))}return su(e,l,o),Ci(),!1}if(ze)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==nc&&(e=Error(s(422),{cause:l}),Dr(sn(e,n)))):(l!==nc&&(t=Error(s(423),{cause:l}),Dr(sn(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=sn(l,n),o=kc(e.stateNode,l,o),mc(e,o),at!==4&&(at=2)),!1;var c=Error(s(520),{cause:l});if(c=sn(c,n),to===null?to=[c]:to.push(c),at!==4&&(at=2),t===null)return!0;l=sn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=kc(n.stateNode,l,e),mc(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ra===null||!Ra.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Jm(o),Wm(o,e,n,l),mc(n,o),!1}n=n.return}while(n!==null);return!1}var Bc=Error(s(461)),dt=!1;function Rt(e,t,n,l){t.child=e===null?nm(t,null,n,l):ll(t,e.child,n,l)}function Fm(e,t,n,l,o){n=n.render;var c=t.ref;if("ref"in l){var m={};for(var b in l)b!=="ref"&&(m[b]=l[b])}else m=l;return el(t),l=bc(e,t,n,m,c,o),b=xc(),e!==null&&!dt?(wc(e,t,o),Wn(e,t,o)):(ze&&b&&ec(t),t.flags|=1,Rt(e,t,l,o),t.child)}function eh(e,t,n,l,o){if(e===null){var c=n.type;return typeof c=="function"&&!Js(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,th(e,t,c,l,o)):(e=$o(n.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Ic(e,o)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:Or,n(m,l)&&e.ref===t.ref)return Wn(e,t,o)}return t.flags|=1,e=In(c,l),e.ref=t.ref,e.return=t,t.child=e}function th(e,t,n,l,o){if(e!==null){var c=e.memoizedProps;if(Or(c,l)&&e.ref===t.ref)if(dt=!1,t.pendingProps=l=c,Ic(e,o))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,Wn(e,t,o)}return Hc(e,t,n,l,o)}function nh(e,t,n,l){var o=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return ah(e,t,c,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wo(t,c!==null?c.cachePool:null),c!==null?rm(t,c):pc(),om(t);else return l=t.lanes=536870912,ah(e,t,c!==null?c.baseLanes|n:n,n,l)}else c!==null?(Wo(t,c.cachePool),rm(t,c),Ea(),t.memoizedState=null):(e!==null&&Wo(t,null),pc(),Ea());return Rt(e,t,o,n),t.child}function $r(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ah(e,t,n,l,o){var c=cc();return c=c===null?null:{parent:ct._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Wo(t,null),pc(),om(t),e!==null&&Ll(e,t,l,!0),t.childLanes=o,null}function hi(e,t){return t=gi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lh(e,t,n){return ll(t,e.child,null,n),e=hi(t,t.pendingProps),e.flags|=2,Pt(t),t.memoizedState=null,e}function Fb(e,t,n){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(l.mode==="hidden")return e=hi(t,l),t.lanes=536870912,$r(null,e);if(vc(t),(e=Ke)?(e=gp(e,dn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:_n,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},n=Yf(e),n.return=t,t.child=n,Ct=t,Ke=null)):e=null,e===null)throw va(t);return t.lanes=536870912,null}return hi(t,l)}var c=e.memoizedState;if(c!==null){var m=c.dehydrated;if(vc(t),o)if(t.flags&256)t.flags&=-257,t=lh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(dt||Ll(e,t,n,!1),o=(n&e.childLanes)!==0,dt||o){if(l=Ie,l!==null&&(m=bt(l,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,Pa(e,m),Xt(l,e,m),Bc;Ci(),t=lh(e,t,n)}else e=c.treeContext,Ke=mn(m.nextSibling),Ct=t,ze=!0,ga=null,dn=!1,e!==null&&Vf(t,e),t=hi(t,l),t.flags|=4096;return t}return e=In(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Hc(e,t,n,l,o){return el(t),n=bc(e,t,n,l,void 0,o),l=xc(),e!==null&&!dt?(wc(e,t,o),Wn(e,t,o)):(ze&&l&&ec(t),t.flags|=1,Rt(e,t,n,o),t.child)}function rh(e,t,n,l,o,c){return el(t),t.updateQueue=null,n=sm(t,l,n,o),im(e),l=xc(),e!==null&&!dt?(wc(e,t,c),Wn(e,t,c)):(ze&&l&&ec(t),t.flags|=1,Rt(e,t,n,c),t.child)}function oh(e,t,n,l,o){if(el(t),t.stateNode===null){var c=zl,m=n.contextType;typeof m=="object"&&m!==null&&(c=Tt(m)),c=new n(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Dc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},dc(t),m=n.contextType,c.context=typeof m=="object"&&m!==null?Tt(m):zl,c.state=t.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(Lc(t,n,m,l),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&Dc.enqueueReplaceState(c,c.state,null),Gr(t,l,c,o),Xr(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,E=ol(n,b);c.props=E;var U=c.context,B=n.contextType;m=zl,typeof B=="object"&&B!==null&&(m=Tt(B));var Y=n.getDerivedStateFromProps;B=typeof Y=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,B||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||U!==m)&&Im(t,c,l,m),ba=!1;var O=t.memoizedState;c.state=O,Gr(t,l,c,o),Xr(),U=t.memoizedState,b||O!==U||ba?(typeof Y=="function"&&(Lc(t,n,Y,l),U=t.memoizedState),(E=ba||Qm(t,n,E,l,O,U,m))?(B||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=U),c.props=l,c.state=U,c.context=m,l=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,fc(e,t),m=t.memoizedProps,B=ol(n,m),c.props=B,Y=t.pendingProps,O=c.context,U=n.contextType,E=zl,typeof U=="object"&&U!==null&&(E=Tt(U)),b=n.getDerivedStateFromProps,(U=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==Y||O!==E)&&Im(t,c,l,E),ba=!1,O=t.memoizedState,c.state=O,Gr(t,l,c,o),Xr();var D=t.memoizedState;m!==Y||O!==D||ba||e!==null&&e.dependencies!==null&&Po(e.dependencies)?(typeof b=="function"&&(Lc(t,n,b,l),D=t.memoizedState),(B=ba||Qm(t,n,B,l,O,D,E)||e!==null&&e.dependencies!==null&&Po(e.dependencies))?(U||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,D,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,D,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=D),c.props=l,c.state=D,c.context=E,l=B):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,pi(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=ll(t,e.child,null,o),t.child=ll(t,null,n,o)):Rt(e,t,n,o),t.memoizedState=c.state,e=t.child):e=Wn(e,t,o),e}function ih(e,t,n,l){return Wa(),t.flags|=256,Rt(e,t,n,l),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yc(e){return{baseLanes:e,cachePool:Pf()}}function Xc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Wt),e}function sh(e,t,n){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,m;if((m=c)||(m=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),m&&(o=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(o?Sa(t):Ea(),(e=Ke)?(e=gp(e,dn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:_n,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},n=Yf(e),n.return=t,t.child=n,Ct=t,Ke=null)):e=null,e===null)throw va(t);return Au(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(Ea(),o=t.mode,b=gi({mode:"hidden",children:b},o),l=Ja(l,o,n,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=Yc(n),l.childLanes=Xc(e,m,n),t.memoizedState=qc,$r(null,l)):(Sa(t),Gc(t,b))}var E=e.memoizedState;if(E!==null&&(b=E.dehydrated,b!==null)){if(c)t.flags&256?(Sa(t),t.flags&=-257,t=Vc(e,t,n)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),b=l.fallback,o=t.mode,l=gi({mode:"visible",children:l.children},o),b=Ja(b,o,n,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,ll(t,e.child,null,n),l=t.child,l.memoizedState=Yc(n),l.childLanes=Xc(e,m,n),t.memoizedState=qc,t=$r(null,l));else if(Sa(t),Au(b)){if(m=b.nextSibling&&b.nextSibling.dataset,m)var U=m.dgst;m=U,l=Error(s(419)),l.stack="",l.digest=m,Dr({value:l,source:null,stack:null}),t=Vc(e,t,n)}else if(dt||Ll(e,t,n,!1),m=(n&e.childLanes)!==0,dt||m){if(m=Ie,m!==null&&(l=bt(m,n),l!==0&&l!==E.retryLane))throw E.retryLane=l,Pa(e,l),Xt(m,e,l),Bc;Eu(b)||Ci(),t=Vc(e,t,n)}else Eu(b)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Ke=mn(b.nextSibling),Ct=t,ze=!0,ga=null,dn=!1,e!==null&&Vf(t,e),t=Gc(t,l.children),t.flags|=4096);return t}return o?(Ea(),b=l.fallback,o=t.mode,E=e.child,U=E.sibling,l=In(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,U!==null?b=In(U,b):(b=Ja(b,o,n,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,$r(null,l),l=t.child,b=e.child.memoizedState,b===null?b=Yc(n):(o=b.cachePool,o!==null?(E=ct._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=Pf(),b={baseLanes:b.baseLanes|n,cachePool:o}),l.memoizedState=b,l.childLanes=Xc(e,m,n),t.memoizedState=qc,$r(e.child,l)):(Sa(t),n=e.child,e=n.sibling,n=In(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=n,t.memoizedState=null,n)}function Gc(e,t){return t=gi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function gi(e,t){return e=$t(22,e,null,t),e.lanes=0,e}function Vc(e,t,n){return ll(t,e.child,null,n),e=Gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ch(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),rc(e.return,t,n)}function Qc(e,t,n,l,o,c){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:o,treeForkCount:c}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=n,m.tailMode=o,m.treeForkCount=c)}function uh(e,t,n){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var m=ot.current,b=(m&2)!==0;if(b?(m=m&1|2,t.flags|=128):m&=1,L(ot,m),Rt(e,t,l,n),l=ze?Lr:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ch(e,n,t);else if(e.tag===19)ch(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&li(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Qc(t,!1,o,n,c,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&li(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Qc(t,!0,n,null,c,l);break;case"together":Qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ta|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ll(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Po(e)))}function e0(e,t,n){switch(t.tag){case 3:Be(t,t.stateNode.containerInfo),ya(t,ct,e.memoizedState.cache),Wa();break;case 27:case 5:F(t);break;case 4:Be(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Sa(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sh(e,t,n):(Sa(t),e=Wn(e,t,n),e!==null?e.sibling:null);Sa(t);break;case 19:var o=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Ll(e,t,n,!1),l=(n&t.childLanes)!==0),o){if(l)return uh(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),L(ot,ot.current),l)break;return null;case 22:return t.lanes=0,nh(e,t,n,t.pendingProps);case 24:ya(t,ct,e.memoizedState.cache)}return Wn(e,t,n)}function dh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Ic(e,n)&&(t.flags&128)===0)return dt=!1,e0(e,t,n);dt=(e.flags&131072)!==0}else dt=!1,ze&&(t.flags&1048576)!==0&&Gf(t,Lr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")Js(e)?(l=ol(e,l),t.tag=1,t=oh(null,t,e,l,n)):(t.tag=0,t=Hc(null,t,e,l,n));else{if(e!=null){var o=e.$$typeof;if(o===oe){t.tag=11,t=Fm(null,t,e,l,n);break e}else if(o===I){t.tag=14,t=eh(null,t,e,l,n);break e}}throw t=ve(e)||e,Error(s(306,t,""))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,o=ol(l,t.pendingProps),oh(e,t,l,o,n);case 3:e:{if(Be(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,fc(e,t),Gr(t,l,null,n);var m=t.memoizedState;if(l=m.cache,ya(t,ct,l),l!==c.cache&&oc(t,[ct],n,!0),Xr(),l=m.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=ih(e,t,l,n);break e}else if(l!==o){o=sn(Error(s(424)),t),Dr(o),t=ih(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=mn(e.firstChild),Ct=t,ze=!0,ga=null,dn=!0,n=nm(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wa(),l===o){t=Wn(e,t,n);break e}Rt(e,t,l,n)}t=t.child}return t;case 26:return pi(e,t),e===null?(n=Sp(t.type,null,t.pendingProps,null))?t.memoizedState=n:ze||(n=t.type,e=t.pendingProps,l=Ui(W.current).createElement(n),l[At]=t,l[Dt]=e,Nt(l,n,e),xt(l),t.stateNode=l):t.memoizedState=Sp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return F(t),e===null&&ze&&(l=t.stateNode=bp(t.type,t.pendingProps,W.current),Ct=t,dn=!0,o=Ke,za(t.type)?(Cu=o,Ke=mn(l.firstChild)):Ke=o),Rt(e,t,t.pendingProps.children,n),pi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((o=l=Ke)&&(l=_0(l,t.type,t.pendingProps,dn),l!==null?(t.stateNode=l,Ct=t,Ke=mn(l.firstChild),dn=!1,o=!0):o=!1),o||va(t)),F(t),o=t.type,c=t.pendingProps,m=e!==null?e.memoizedProps:null,l=c.children,xu(o,c)?l=null:m!==null&&xu(o,m)&&(t.flags|=32),t.memoizedState!==null&&(o=bc(e,t,Qb,null,null,n),co._currentValue=o),pi(e,t),Rt(e,t,l,n),t.child;case 6:return e===null&&ze&&((e=n=Ke)&&(n=z0(n,t.pendingProps,dn),n!==null?(t.stateNode=n,Ct=t,Ke=null,e=!0):e=!1),e||va(t)),null;case 13:return sh(e,t,n);case 4:return Be(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ll(t,null,l,n):Rt(e,t,l,n),t.child;case 11:return Fm(e,t,t.type,t.pendingProps,n);case 7:return Rt(e,t,t.pendingProps,n),t.child;case 8:return Rt(e,t,t.pendingProps.children,n),t.child;case 12:return Rt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,ya(t,t.type,l.value),Rt(e,t,l.children,n),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,el(t),o=Tt(o),l=l(o),t.flags|=1,Rt(e,t,l,n),t.child;case 14:return eh(e,t,t.type,t.pendingProps,n);case 15:return th(e,t,t.type,t.pendingProps,n);case 19:return uh(e,t,n);case 31:return Fb(e,t,n);case 22:return nh(e,t,n,t.pendingProps);case 24:return el(t),l=Tt(ct),e===null?(o=cc(),o===null&&(o=Ie,c=ic(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),t.memoizedState={parent:l,cache:o},dc(t),ya(t,ct,o)):((e.lanes&n)!==0&&(fc(e,t),Gr(t,null,null,n),Xr()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),ya(t,ct,l)):(l=c.cache,ya(t,ct,l),l!==o.cache&&oc(t,[ct],n,!0))),Rt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Fn(e){e.flags|=4}function Zc(e,t,n,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Bh())e.flags|=8192;else throw al=ei,uc}else e.flags&=-16777217}function fh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Rp(t))if(Bh())e.flags|=8192;else throw al=ei,uc}function vi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gl():536870912,e.lanes|=t,Zl|=t)}function Kr(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function t0(e,t,n){var l=t.pendingProps;switch(tc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kn(ct),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?Fn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ac())),Pe(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(Fn(t),c!==null?(Pe(t),fh(t,c)):(Pe(t),Zc(t,o,null,l,n))):c?c!==e.memoizedState?(Fn(t),Pe(t),fh(t,c)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Fn(t),Pe(t),Zc(t,o,e,l,n)),null;case 27:if(ge(t),n=W.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Fn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Pe(t),null}e=V.current,Ml(t)?Qf(t):(e=bp(o,l,n),t.stateNode=e,Fn(t))}return Pe(t),null;case 5:if(ge(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Fn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Pe(t),null}if(c=V.current,Ml(t))Qf(t);else{var m=Ui(W.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?m.createElement(o,{is:l.is}):m.createElement(o)}}c[At]=t,c[Dt]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=c;e:switch(Nt(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Fn(t)}}return Pe(t),Zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Fn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=W.current,Ml(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,o=Ct,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[At]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||sp(e.nodeValue,n)),e||va(t,!0)}else e=Ui(e).createTextNode(l),e[At]=t,t.stateNode=e}return Pe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ml(t),n!==null){if(e===null){if(!l)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[At]=t}else Wa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else n=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Pt(t),t):(Pt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return Pe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ml(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[At]=t}else Wa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),o=!1}else o=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Pt(t),t):(Pt(t),null)}return Pt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vi(t,t.updateQueue),Pe(t),null);case 4:return de(),e===null&&pu(t.stateNode.containerInfo),Pe(t),null;case 10:return Kn(t.type),Pe(t),null;case 19:if(k(ot),l=t.memoizedState,l===null)return Pe(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)Kr(l,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=li(e),c!==null){for(t.flags|=128,Kr(l,!1),e=c.updateQueue,t.updateQueue=e,vi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)qf(n,e),n=n.sibling;return L(ot,ot.current&1|2),ze&&Zn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>Si&&(t.flags|=128,o=!0,Kr(l,!1),t.lanes=4194304)}else{if(!o)if(e=li(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,vi(t,e),Kr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!ze)return Pe(t),null}else 2*yt()-l.renderingStartTime>Si&&n!==536870912&&(t.flags|=128,o=!0,Kr(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,n=ot.current,L(ot,o?n&1|2:n&1),ze&&Zn(t,l.treeForkCount),e):(Pe(t),null);case 22:case 23:return Pt(t),gc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),n=t.updateQueue,n!==null&&vi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&k(tl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Kn(ct),Pe(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function n0(e,t){switch(tc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kn(ct),de(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(Pt(t),t.alternate===null)throw Error(s(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Pt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(ot),null;case 4:return de(),null;case 10:return Kn(t.type),null;case 22:case 23:return Pt(t),gc(),e!==null&&k(tl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kn(ct),null;case 25:return null;default:return null}}function mh(e,t){switch(tc(t),t.tag){case 3:Kn(ct),de();break;case 26:case 27:case 5:ge(t);break;case 4:de();break;case 31:t.memoizedState!==null&&Pt(t);break;case 13:Pt(t);break;case 19:k(ot);break;case 10:Kn(t.type);break;case 22:case 23:Pt(t),gc(),e!==null&&k(tl);break;case 24:Kn(ct)}}function Pr(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var o=l.next;n=o;do{if((n.tag&e)===e){l=void 0;var c=n.create,m=n.inst;l=c(),m.destroy=l}n=n.next}while(n!==o)}}catch(b){Ye(t,t.return,b)}}function Aa(e,t,n){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var m=l.inst,b=m.destroy;if(b!==void 0){m.destroy=void 0,o=t;var E=n,U=b;try{U()}catch(B){Ye(o,E,B)}}}l=l.next}while(l!==c)}}catch(B){Ye(t,t.return,B)}}function hh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{lm(t,n)}catch(l){Ye(e,e.return,l)}}}function ph(e,t,n){n.props=ol(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ye(e,t,l)}}function Jr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(o){Ye(e,t,o)}}function Un(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(o){Ye(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Ye(e,t,o)}else n.current=null}function gh(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(o){Ye(e,e.return,o)}}function $c(e,t,n){try{var l=e.stateNode;A0(l,e.type,n,t),l[Dt]=t}catch(o){Ye(e,e.return,o)}}function vh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&za(e.type)||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&za(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Pc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vn));else if(l!==4&&(l===27&&za(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Pc(e,t,n),e=e.sibling;e!==null;)Pc(e,t,n),e=e.sibling}function yi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&za(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(yi(e,t,n),e=e.sibling;e!==null;)yi(e,t,n),e=e.sibling}function yh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Nt(t,l,n),t[At]=e,t[Dt]=n}catch(c){Ye(e,e.return,c)}}var ea=!1,ft=!1,Jc=!1,bh=typeof WeakSet=="function"?WeakSet:Set,wt=null;function a0(e,t){if(e=e.containerInfo,yu=Hi,e=zf(e),Vs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,b=-1,E=-1,U=0,B=0,Y=e,O=null;t:for(;;){for(var D;Y!==n||o!==0&&Y.nodeType!==3||(b=m+o),Y!==c||l!==0&&Y.nodeType!==3||(E=m+l),Y.nodeType===3&&(m+=Y.nodeValue.length),(D=Y.firstChild)!==null;)O=Y,Y=D;for(;;){if(Y===e)break t;if(O===n&&++U===o&&(b=m),O===c&&++B===l&&(E=m),(D=Y.nextSibling)!==null)break;Y=O,O=Y.parentNode}Y=D}n=b===-1||E===-1?null:{start:b,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(bu={focusedElem:e,selectionRange:n},Hi=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,o=c.memoizedProps,c=c.memoizedState,l=n.stateNode;try{var re=ol(n.type,o);e=l.getSnapshotBeforeUpdate(re,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ye(n,n.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Su(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Su(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,wt=e;break}wt=t.return}}function xh(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:na(e,n),l&4&&Pr(5,n);break;case 1:if(na(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(m){Ye(n,n.return,m)}else{var o=ol(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){Ye(n,n.return,m)}}l&64&&hh(n),l&512&&Jr(n,n.return);break;case 3:if(na(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{lm(e,t)}catch(m){Ye(n,n.return,m)}}break;case 27:t===null&&l&4&&yh(n);case 26:case 5:na(e,n),t===null&&l&4&&gh(n),l&512&&Jr(n,n.return);break;case 12:na(e,n);break;case 31:na(e,n),l&4&&Eh(e,n);break;case 13:na(e,n),l&4&&Ah(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=f0.bind(null,n),U0(e,n))));break;case 22:if(l=n.memoizedState!==null||ea,!l){t=t!==null&&t.memoizedState!==null||ft,o=ea;var c=ft;ea=l,(ft=t)&&!c?aa(e,n,(n.subtreeFlags&8772)!==0):na(e,n),ea=o,ft=c}break;case 30:break;default:na(e,n)}}function wh(e){var t=e.alternate;t!==null&&(e.alternate=null,wh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Rs(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,Bt=!1;function ta(e,t,n){for(n=n.child;n!==null;)Sh(e,t,n),n=n.sibling}function Sh(e,t,n){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Qa,n)}catch{}switch(n.tag){case 26:ft||Un(n,t),ta(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ft||Un(n,t);var l=Je,o=Bt;za(n.type)&&(Je=n.stateNode,Bt=!1),ta(e,t,n),oo(n.stateNode),Je=l,Bt=o;break;case 5:ft||Un(n,t);case 6:if(l=Je,o=Bt,Je=null,ta(e,t,n),Je=l,Bt=o,Je!==null)if(Bt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(c){Ye(n,t,c)}else try{Je.removeChild(n.stateNode)}catch(c){Ye(n,t,c)}break;case 18:Je!==null&&(Bt?(e=Je,hp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),tr(e)):hp(Je,n.stateNode));break;case 4:l=Je,o=Bt,Je=n.stateNode.containerInfo,Bt=!0,ta(e,t,n),Je=l,Bt=o;break;case 0:case 11:case 14:case 15:Aa(2,n,t),ft||Aa(4,n,t),ta(e,t,n);break;case 1:ft||(Un(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&ph(n,t,l)),ta(e,t,n);break;case 21:ta(e,t,n);break;case 22:ft=(l=ft)||n.memoizedState!==null,ta(e,t,n),ft=l;break;default:ta(e,t,n)}}function Eh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{tr(e)}catch(n){Ye(t,t.return,n)}}}function Ah(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{tr(e)}catch(n){Ye(t,t.return,n)}}function l0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bh),t;default:throw Error(s(435,e.tag))}}function bi(e,t){var n=l0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var o=m0.bind(null,e,l);l.then(o,o)}})}function Ht(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var o=n[l],c=e,m=t,b=m;e:for(;b!==null;){switch(b.tag){case 27:if(za(b.type)){Je=b.stateNode,Bt=!1;break e}break;case 5:Je=b.stateNode,Bt=!1;break e;case 3:case 4:Je=b.stateNode.containerInfo,Bt=!0;break e}b=b.return}if(Je===null)throw Error(s(160));Sh(c,m,o),Je=null,Bt=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ch(t,e),t=t.sibling}var En=null;function Ch(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),qt(e),l&4&&(Aa(3,e,e.return),Pr(3,e),Aa(5,e,e.return));break;case 1:Ht(t,e),qt(e),l&512&&(ft||n===null||Un(n,n.return)),l&64&&ea&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var o=En;if(Ht(t,e),qt(e),l&512&&(ft||n===null||Un(n,n.return)),l&4){var c=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[Ar]||c[At]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),Nt(c,l,n),c[At]=e,xt(c),l=c;break e;case"link":var m=Cp("link","href",o).get(l+(n.href||""));if(m){for(var b=0;b<m.length;b++)if(c=m[b],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(b,1);break t}}c=o.createElement(l),Nt(c,l,n),o.head.appendChild(c);break;case"meta":if(m=Cp("meta","content",o).get(l+(n.content||""))){for(b=0;b<m.length;b++)if(c=m[b],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(b,1);break t}}c=o.createElement(l),Nt(c,l,n),o.head.appendChild(c);break;default:throw Error(s(468,l))}c[At]=e,xt(c),l=c}e.stateNode=l}else Tp(o,e.type,e.stateNode);else e.stateNode=Ap(o,l,e.memoizedProps);else c!==l?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,l===null?Tp(o,e.type,e.stateNode):Ap(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ht(t,e),qt(e),l&512&&(ft||n===null||Un(n,n.return)),n!==null&&l&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ht(t,e),qt(e),l&512&&(ft||n===null||Un(n,n.return)),e.flags&32){o=e.stateNode;try{Al(o,"")}catch(re){Ye(e,e.return,re)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,$c(e,o,n!==null?n.memoizedProps:o)),l&1024&&(Jc=!0);break;case 6:if(Ht(t,e),qt(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(re){Ye(e,e.return,re)}}break;case 3:if(Li=null,o=En,En=Oi(t.containerInfo),Ht(t,e),En=o,qt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{tr(t.containerInfo)}catch(re){Ye(e,e.return,re)}Jc&&(Jc=!1,Th(e));break;case 4:l=En,En=Oi(e.stateNode.containerInfo),Ht(t,e),qt(e),En=l;break;case 12:Ht(t,e),qt(e);break;case 31:Ht(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,bi(e,l)));break;case 13:Ht(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(wi=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,bi(e,l)));break;case 22:o=e.memoizedState!==null;var E=n!==null&&n.memoizedState!==null,U=ea,B=ft;if(ea=U||o,ft=B||E,Ht(t,e),ft=B,ea=U,qt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||E||ea||ft||il(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){E=n=t;try{if(c=E.stateNode,o)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{b=E.stateNode;var Y=E.memoizedProps.style,O=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;b.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(re){Ye(E,E.return,re)}}}else if(t.tag===6){if(n===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(re){Ye(E,E.return,re)}}}else if(t.tag===18){if(n===null){E=t;try{var D=E.stateNode;o?pp(D,!0):pp(E.stateNode,!1)}catch(re){Ye(E,E.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,bi(e,n))));break;case 19:Ht(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,bi(e,l)));break;case 30:break;case 21:break;default:Ht(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(vh(l)){n=l;break}l=l.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var o=n.stateNode,c=Kc(e);yi(e,c,o);break;case 5:var m=n.stateNode;n.flags&32&&(Al(m,""),n.flags&=-33);var b=Kc(e);yi(e,b,m);break;case 3:case 4:var E=n.stateNode.containerInfo,U=Kc(e);Pc(e,U,E);break;default:throw Error(s(161))}}catch(B){Ye(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Th(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Th(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xh(e,t.alternate,t),t=t.sibling}function il(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Aa(4,t,t.return),il(t);break;case 1:Un(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ph(t,t.return,n),il(t);break;case 27:oo(t.stateNode);case 26:case 5:Un(t,t.return),il(t);break;case 22:t.memoizedState===null&&il(t);break;case 30:il(t);break;default:il(t)}e=e.sibling}}function aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,m=c.flags;switch(c.tag){case 0:case 11:case 15:aa(o,c,n),Pr(4,c);break;case 1:if(aa(o,c,n),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(U){Ye(l,l.return,U)}if(l=c,o=l.updateQueue,o!==null){var b=l.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)am(E[o],b)}catch(U){Ye(l,l.return,U)}}n&&m&64&&hh(c),Jr(c,c.return);break;case 27:yh(c);case 26:case 5:aa(o,c,n),n&&l===null&&m&4&&gh(c),Jr(c,c.return);break;case 12:aa(o,c,n);break;case 31:aa(o,c,n),n&&m&4&&Eh(o,c);break;case 13:aa(o,c,n),n&&m&4&&Ah(o,c);break;case 22:c.memoizedState===null&&aa(o,c,n),Jr(c,c.return);break;case 30:break;default:aa(o,c,n)}t=t.sibling}}function Wc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&kr(n))}function Fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&kr(e))}function An(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rh(e,t,n,l),t=t.sibling}function Rh(e,t,n,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,n,l),o&2048&&Pr(9,t);break;case 1:An(e,t,n,l);break;case 3:An(e,t,n,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&kr(e)));break;case 12:if(o&2048){An(e,t,n,l),e=t.stateNode;try{var c=t.memoizedProps,m=c.id,b=c.onPostCommit;typeof b=="function"&&b(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Ye(t,t.return,E)}}else An(e,t,n,l);break;case 31:An(e,t,n,l);break;case 13:An(e,t,n,l);break;case 23:break;case 22:c=t.stateNode,m=t.alternate,t.memoizedState!==null?c._visibility&2?An(e,t,n,l):Wr(e,t):c._visibility&2?An(e,t,n,l):(c._visibility|=2,Vl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Wc(m,t);break;case 24:An(e,t,n,l),o&2048&&Fc(t.alternate,t);break;default:An(e,t,n,l)}}function Vl(e,t,n,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,m=t,b=n,E=l,U=m.flags;switch(m.tag){case 0:case 11:case 15:Vl(c,m,b,E,o),Pr(8,m);break;case 23:break;case 22:var B=m.stateNode;m.memoizedState!==null?B._visibility&2?Vl(c,m,b,E,o):Wr(c,m):(B._visibility|=2,Vl(c,m,b,E,o)),o&&U&2048&&Wc(m.alternate,m);break;case 24:Vl(c,m,b,E,o),o&&U&2048&&Fc(m.alternate,m);break;default:Vl(c,m,b,E,o)}t=t.sibling}}function Wr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,o=l.flags;switch(l.tag){case 22:Wr(n,l),o&2048&&Wc(l.alternate,l);break;case 24:Wr(n,l),o&2048&&Fc(l.alternate,l);break;default:Wr(n,l)}t=t.sibling}}var Fr=8192;function Ql(e,t,n){if(e.subtreeFlags&Fr)for(e=e.child;e!==null;)Nh(e,t,n),e=e.sibling}function Nh(e,t,n){switch(e.tag){case 26:Ql(e,t,n),e.flags&Fr&&e.memoizedState!==null&&V0(n,En,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,n);break;case 3:case 4:var l=En;En=Oi(e.stateNode.containerInfo),Ql(e,t,n),En=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Fr,Fr=16777216,Ql(e,t,n),Fr=l):Ql(e,t,n));break;default:Ql(e,t,n)}}function jh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function eo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];wt=l,zh(l,e)}jh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_h(e),e=e.sibling}function _h(e){switch(e.tag){case 0:case 11:case 15:eo(e),e.flags&2048&&Aa(9,e,e.return);break;case 3:eo(e);break;case 12:eo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xi(e)):eo(e);break;default:eo(e)}}function xi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];wt=l,zh(l,e)}jh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Aa(8,t,t.return),xi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,xi(t));break;default:xi(t)}e=e.sibling}}function zh(e,t){for(;wt!==null;){var n=wt;switch(n.tag){case 0:case 11:case 15:Aa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:kr(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,wt=l;else e:for(n=e;wt!==null;){l=wt;var o=l.sibling,c=l.return;if(wh(l),l===n){wt=null;break e}if(o!==null){o.return=c,wt=o;break e}wt=c}}}var r0={getCacheForType:function(e){var t=Tt(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Tt(ct).controller.signal}},o0=typeof WeakMap=="function"?WeakMap:Map,ke=0,Ie=null,Ce=null,je=0,qe=0,Jt=null,Ca=!1,Il=!1,eu=!1,la=0,at=0,Ta=0,sl=0,tu=0,Wt=0,Zl=0,to=null,Yt=null,nu=!1,wi=0,Uh=0,Si=1/0,Ei=null,Ra=null,pt=0,Na=null,$l=null,ra=0,au=0,lu=null,Oh=null,no=0,ru=null;function Ft(){return(ke&2)!==0&&je!==0?je&-je:M.T!==null?du():$d()}function Mh(){if(Wt===0)if((je&536870912)===0||ze){var e=Ue;Ue<<=1,(Ue&3932160)===0&&(Ue=262144),Wt=e}else Wt=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Wt}function Xt(e,t,n){(e===Ie&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(Kl(e,0),ja(e,je,Wt,!1)),et(e,n),((ke&2)===0||e!==Ie)&&(e===Ie&&((ke&2)===0&&(sl|=n),at===4&&ja(e,je,Wt,!1)),On(e))}function Lh(e,t,n){if((ke&6)!==0)throw Error(s(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Lt(e,t),o=l?c0(e,t):iu(e,t,!0),c=l;do{if(o===0){Il&&!l&&ja(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!i0(n)){o=iu(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var b=e;o=to;var E=b.current.memoizedState.isDehydrated;if(E&&(Kl(b,m).flags|=256),m=iu(b,m,!1),m!==2){if(eu&&!E){b.errorRecoveryDisabledLanes|=c,sl|=c,o=4;break e}c=Yt,Yt=o,c!==null&&(Yt===null?Yt=c:Yt.push.apply(Yt,c))}o=m}if(c=!1,o!==2)continue}}if(o===1){Kl(e,0),ja(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:ja(l,t,Wt,!Ca);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=wi+300-yt(),10<o)){if(ja(l,t,Wt,!Ca),Qt(l,0,!0)!==0)break e;ra=t,l.timeoutHandle=fp(Dh.bind(null,l,n,Yt,Ei,nu,t,Wt,sl,Zl,Ca,c,"Throttled",-0,0),o);break e}Dh(l,n,Yt,Ei,nu,t,Wt,sl,Zl,Ca,c,null,-0,0)}}break}while(!0);On(e)}function Dh(e,t,n,l,o,c,m,b,E,U,B,Y,O,D){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},Nh(t,c,Y);var re=(c&62914560)===c?wi-yt():(c&4194048)===c?Uh-yt():0;if(re=Q0(Y,re),re!==null){ra=c,e.cancelPendingCommit=re(Vh.bind(null,e,t,c,n,l,o,m,b,E,B,Y,null,O,D)),ja(e,c,m,!U);return}}Vh(e,t,c,n,l,o,m,b,E)}function i0(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var o=n[l],c=o.getSnapshot;o=o.value;try{if(!Zt(c(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ja(e,t,n,l){t&=~tu,t&=~sl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-Et(o),m=1<<c;l[c]=-1,o&=~m}n!==0&&It(e,n,t)}function Ai(){return(ke&6)===0?(ao(0),!1):!0}function ou(){if(Ce!==null){if(qe===0)var e=Ce.return;else e=Ce,$n=Fa=null,Sc(e),Hl=null,Hr=0,e=Ce;for(;e!==null;)mh(e.alternate,e),e=e.return;Ce=null}}function Kl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,R0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ra=0,ou(),Ie=e,Ce=n=In(e.current,null),je=t,qe=0,Jt=null,Ca=!1,Il=Lt(e,t),eu=!1,Zl=Wt=tu=sl=Ta=at=0,Yt=to=null,nu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Et(l),c=1<<o;t|=e[o],l&=~c}return la=t,Qo(),n}function kh(e,t){xe=null,M.H=Zr,t===Bl||t===Fo?(t=Ff(),qe=3):t===uc?(t=Ff(),qe=4):qe=t===Bc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Ce===null&&(at=1,mi(e,sn(t,e.current)))}function Bh(){var e=Kt.current;return e===null?!0:(je&4194048)===je?fn===null:(je&62914560)===je||(je&536870912)!==0?e===fn:!1}function Hh(){var e=M.H;return M.H=Zr,e===null?Zr:e}function qh(){var e=M.A;return M.A=r0,e}function Ci(){at=4,Ca||(je&4194048)!==je&&Kt.current!==null||(Il=!0),(Ta&134217727)===0&&(sl&134217727)===0||Ie===null||ja(Ie,je,Wt,!1)}function iu(e,t,n){var l=ke;ke|=2;var o=Hh(),c=qh();(Ie!==e||je!==t)&&(Ei=null,Kl(e,t)),t=!1;var m=at;e:do try{if(qe!==0&&Ce!==null){var b=Ce,E=Jt;switch(qe){case 8:ou(),m=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var U=qe;if(qe=0,Jt=null,Pl(e,b,E,U),n&&Il){m=0;break e}break;default:U=qe,qe=0,Jt=null,Pl(e,b,E,U)}}s0(),m=at;break}catch(B){kh(e,B)}while(!0);return t&&e.shellSuspendCounter++,$n=Fa=null,ke=l,M.H=o,M.A=c,Ce===null&&(Ie=null,je=0,Qo()),m}function s0(){for(;Ce!==null;)Yh(Ce)}function c0(e,t){var n=ke;ke|=2;var l=Hh(),o=qh();Ie!==e||je!==t?(Ei=null,Si=yt()+500,Kl(e,t)):Il=Lt(e,t);e:do try{if(qe!==0&&Ce!==null){t=Ce;var c=Jt;t:switch(qe){case 1:qe=0,Jt=null,Pl(e,t,c,1);break;case 2:case 9:if(Jf(c)){qe=0,Jt=null,Xh(t);break}t=function(){qe!==2&&qe!==9||Ie!==e||(qe=7),On(e)},c.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:Jf(c)?(qe=0,Jt=null,Xh(t)):(qe=0,Jt=null,Pl(e,t,c,7));break;case 5:var m=null;switch(Ce.tag){case 26:m=Ce.memoizedState;case 5:case 27:var b=Ce;if(m?Rp(m):b.stateNode.complete){qe=0,Jt=null;var E=b.sibling;if(E!==null)Ce=E;else{var U=b.return;U!==null?(Ce=U,Ti(U)):Ce=null}break t}}qe=0,Jt=null,Pl(e,t,c,5);break;case 6:qe=0,Jt=null,Pl(e,t,c,6);break;case 8:ou(),at=6;break e;default:throw Error(s(462))}}u0();break}catch(B){kh(e,B)}while(!0);return $n=Fa=null,M.H=l,M.A=o,ke=n,Ce!==null?0:(Ie=null,je=0,Qo(),at)}function u0(){for(;Ce!==null&&!Yn();)Yh(Ce)}function Yh(e){var t=dh(e.alternate,e,la);e.memoizedProps=e.pendingProps,t===null?Ti(e):Ce=t}function Xh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=rh(n,t,t.pendingProps,t.type,void 0,je);break;case 11:t=rh(n,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Sc(t);default:mh(n,t),t=Ce=qf(t,la),t=dh(n,t,la)}e.memoizedProps=e.pendingProps,t===null?Ti(e):Ce=t}function Pl(e,t,n,l){$n=Fa=null,Sc(t),Hl=null,Hr=0;var o=t.return;try{if(Wb(e,o,t,n,je)){at=1,mi(e,sn(n,e.current)),Ce=null;return}}catch(c){if(o!==null)throw Ce=o,c;at=1,mi(e,sn(n,e.current)),Ce=null;return}t.flags&32768?(ze||l===1?e=!0:Il||(je&536870912)!==0?e=!1:(Ca=e=!0,(l===2||l===9||l===3||l===6)&&(l=Kt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Gh(t,e)):Ti(t)}function Ti(e){var t=e;do{if((t.flags&32768)!==0){Gh(t,Ca);return}e=t.return;var n=t0(t.alternate,t,la);if(n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);at===0&&(at=5)}function Gh(e,t){do{var n=n0(e.alternate,e);if(n!==null){n.flags&=32767,Ce=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=n}while(e!==null);at=6,Ce=null}function Vh(e,t,n,l,o,c,m,b,E){e.cancelPendingCommit=null;do Ri();while(pt!==0);if((ke&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(c=t.lanes|t.childLanes,c|=Ks,wn(e,n,c,m,b,E),e===Ie&&(Ce=Ie=null,je=0),$l=t,Na=e,ra=n,au=c,lu=o,Oh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,h0(Va,function(){return Kh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,o=$.p,$.p=2,m=ke,ke|=4;try{a0(e,t,n)}finally{ke=m,$.p=o,M.T=l}}pt=1,Qh(),Ih(),Zh()}}function Qh(){if(pt===1){pt=0;var e=Na,t=$l,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null;var l=$.p;$.p=2;var o=ke;ke|=4;try{Ch(t,e);var c=bu,m=zf(e.containerInfo),b=c.focusedElem,E=c.selectionRange;if(m!==b&&b&&b.ownerDocument&&_f(b.ownerDocument.documentElement,b)){if(E!==null&&Vs(b)){var U=E.start,B=E.end;if(B===void 0&&(B=U),"selectionStart"in b)b.selectionStart=U,b.selectionEnd=Math.min(B,b.value.length);else{var Y=b.ownerDocument||document,O=Y&&Y.defaultView||window;if(O.getSelection){var D=O.getSelection(),re=b.textContent.length,pe=Math.min(E.start,re),Qe=E.end===void 0?pe:Math.min(E.end,re);!D.extend&&pe>Qe&&(m=Qe,Qe=pe,pe=m);var R=jf(b,pe),C=jf(b,Qe);if(R&&C&&(D.rangeCount!==1||D.anchorNode!==R.node||D.anchorOffset!==R.offset||D.focusNode!==C.node||D.focusOffset!==C.offset)){var z=Y.createRange();z.setStart(R.node,R.offset),D.removeAllRanges(),pe>Qe?(D.addRange(z),D.extend(C.node,C.offset)):(z.setEnd(C.node,C.offset),D.addRange(z))}}}}for(Y=[],D=b;D=D.parentNode;)D.nodeType===1&&Y.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Y.length;b++){var H=Y[b];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Hi=!!yu,bu=yu=null}finally{ke=o,$.p=l,M.T=n}}e.current=t,pt=2}}function Ih(){if(pt===2){pt=0;var e=Na,t=$l,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=M.T,M.T=null;var l=$.p;$.p=2;var o=ke;ke|=4;try{xh(e,t.alternate,t)}finally{ke=o,$.p=l,M.T=n}}pt=3}}function Zh(){if(pt===4||pt===3){pt=0,xn();var e=Na,t=$l,n=ra,l=Oh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pt=5:(pt=0,$l=Na=null,$h(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Ra=null),vl(n),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Qa,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,o=$.p,$.p=2,M.T=null;try{for(var c=e.onRecoverableError,m=0;m<l.length;m++){var b=l[m];c(b.value,{componentStack:b.stack})}}finally{M.T=t,$.p=o}}(ra&3)!==0&&Ri(),On(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===ru?no++:(no=0,ru=e):no=0,ao(0)}}function $h(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,kr(t)))}function Ri(){return Qh(),Ih(),Zh(),Kh()}function Kh(){if(pt!==5)return!1;var e=Na,t=au;au=0;var n=vl(ra),l=M.T,o=$.p;try{$.p=32>n?32:n,M.T=null,n=lu,lu=null;var c=Na,m=ra;if(pt=0,$l=Na=null,ra=0,(ke&6)!==0)throw Error(s(331));var b=ke;if(ke|=4,_h(c.current),Rh(c,c.current,m,n),ke=b,ao(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Qa,c)}catch{}return!0}finally{$.p=o,M.T=l,$h(e,t)}}function Ph(e,t,n){t=sn(n,t),t=kc(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(et(e,2),On(e))}function Ye(e,t,n){if(e.tag===3)Ph(e,e,n);else for(;t!==null;){if(t.tag===3){Ph(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ra===null||!Ra.has(l))){e=sn(n,e),n=Jm(2),l=wa(t,n,2),l!==null&&(Wm(n,l,t,e),et(l,2),On(l));break}}t=t.return}}function su(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new o0;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(n)||(eu=!0,o.add(n),e=d0.bind(null,e,t,n),t.then(e,e))}function d0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ie===e&&(je&n)===n&&(at===4||at===3&&(je&62914560)===je&&300>yt()-wi?(ke&2)===0&&Kl(e,0):tu|=n,Zl===je&&(Zl=0)),On(e)}function Jh(e,t){t===0&&(t=gl()),e=Pa(e,t),e!==null&&(et(e,t),On(e))}function f0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jh(e,n)}function m0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),Jh(e,n)}function h0(e,t){return Ut(e,t)}var Ni=null,Jl=null,cu=!1,ji=!1,uu=!1,_a=0;function On(e){e!==Jl&&e.next===null&&(Jl===null?Ni=Jl=e:Jl=Jl.next=e),ji=!0,cu||(cu=!0,g0())}function ao(e,t){if(!uu&&ji){uu=!0;do for(var n=!1,l=Ni;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var m=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-Et(42|e)+1)-1,c&=o&~(m&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,tp(l,c))}else c=je,c=Qt(l,l===Ie?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Lt(l,c)||(n=!0,tp(l,c));l=l.next}while(n);uu=!1}}function p0(){Wh()}function Wh(){ji=cu=!1;var e=0;_a!==0&&T0()&&(e=_a);for(var t=yt(),n=null,l=Ni;l!==null;){var o=l.next,c=Fh(l,t);c===0?(l.next=null,n===null?Ni=o:n.next=o,o===null&&(Jl=n)):(n=l,(e!==0||(c&3)!==0)&&(ji=!0)),l=o}pt!==0&&pt!==5||ao(e),_a!==0&&(_a=0)}function Fh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var m=31-Et(c),b=1<<m,E=o[m];E===-1?((b&n)===0||(b&l)!==0)&&(o[m]=Ot(b,t)):E<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ie,n=je,n=Qt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&bn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Lt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&bn(l),vl(n)){case 2:case 8:n=an;break;case 32:n=Va;break;case 268435456:n=wr;break;default:n=Va}return l=ep.bind(null,e),n=Ut(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&bn(l),e.callbackPriority=2,e.callbackNode=null,2}function ep(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ri()&&e.callbackNode!==n)return null;var l=je;return l=Qt(e,e===Ie?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Lh(e,l,t),Fh(e,yt()),e.callbackNode!=null&&e.callbackNode===n?ep.bind(null,e):null)}function tp(e,t){if(Ri())return null;Lh(e,t,!0)}function g0(){N0(function(){(ke&6)!==0?Ut(xr,p0):Wh()})}function du(){if(_a===0){var e=Dl;e===0&&(e=Se,Se<<=1,(Se&261888)===0&&(Se=256)),_a=e}return _a}function np(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ko(""+e)}function ap(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function v0(e,t,n,l,o){if(t==="submit"&&n&&n.stateNode===o){var c=np((o[Dt]||null).action),m=l.submitter;m&&(t=(t=m[Dt]||null)?np(t.formAction):m.getAttribute("formAction"),t!==null&&(c=t,m=null));var b=new Yo("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(_a!==0){var E=m?ap(o,m):new FormData(o);zc(n,{pending:!0,data:E,method:o.method,action:c},null,E)}}else typeof c=="function"&&(b.preventDefault(),E=m?ap(o,m):new FormData(o),zc(n,{pending:!0,data:E,method:o.method,action:c},c,E))},currentTarget:o}]})}}for(var fu=0;fu<$s.length;fu++){var mu=$s[fu],y0=mu.toLowerCase(),b0=mu[0].toUpperCase()+mu.slice(1);Sn(y0,"on"+b0)}Sn(Mf,"onAnimationEnd"),Sn(Lf,"onAnimationIteration"),Sn(Df,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(Lb,"onTransitionRun"),Sn(Db,"onTransitionStart"),Sn(kb,"onTransitionCancel"),Sn(kf,"onTransitionEnd"),Sl("onMouseEnter",["mouseout","mouseover"]),Sl("onMouseLeave",["mouseout","mouseover"]),Sl("onPointerEnter",["pointerout","pointerover"]),Sl("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),x0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lo));function lp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var m=l.length-1;0<=m;m--){var b=l[m],E=b.instance,U=b.currentTarget;if(b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=U;try{c(o)}catch(B){Vo(B)}o.currentTarget=null,c=E}else for(m=0;m<l.length;m++){if(b=l[m],E=b.instance,U=b.currentTarget,b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=U;try{c(o)}catch(B){Vo(B)}o.currentTarget=null,c=E}}}}function Te(e,t){var n=t[Ts];n===void 0&&(n=t[Ts]=new Set);var l=e+"__bubble";n.has(l)||(rp(t,e,2,!1),n.add(l))}function hu(e,t,n){var l=0;t&&(l|=4),rp(n,e,l,t)}var _i="_reactListening"+Math.random().toString(36).slice(2);function pu(e){if(!e[_i]){e[_i]=!0,Jd.forEach(function(n){n!=="selectionchange"&&(x0.has(n)||hu(n,!1,e),hu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_i]||(t[_i]=!0,hu("selectionchange",!1,t))}}function rp(e,t,n,l){switch(Mp(t)){case 2:var o=$0;break;case 8:o=K0;break;default:o=_u}n=o.bind(null,t,n,e),o=void 0,!Ls||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function gu(e,t,n,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var b=l.stateNode.containerInfo;if(b===o)break;if(m===4)for(m=l.return;m!==null;){var E=m.tag;if((E===3||E===4)&&m.stateNode.containerInfo===o)return;m=m.return}for(;b!==null;){if(m=bl(b),m===null)return;if(E=m.tag,E===5||E===6||E===26||E===27){l=c=m;continue e}b=b.parentNode}}l=l.return}uf(function(){var U=c,B=Os(n),Y=[];e:{var O=Bf.get(e);if(O!==void 0){var D=Yo,re=e;switch(e){case"keypress":if(Ho(n)===0)break e;case"keydown":case"keyup":D=mb;break;case"focusin":re="focus",D=Hs;break;case"focusout":re="blur",D=Hs;break;case"beforeblur":case"afterblur":D=Hs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=tb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=gb;break;case Mf:case Lf:case Df:D=lb;break;case kf:D=yb;break;case"scroll":case"scrollend":D=Fy;break;case"wheel":D=xb;break;case"copy":case"cut":case"paste":D=ob;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=pf;break;case"toggle":case"beforetoggle":D=Sb}var pe=(t&4)!==0,Qe=!pe&&(e==="scroll"||e==="scrollend"),R=pe?O!==null?O+"Capture":null:O;pe=[];for(var C=U,z;C!==null;){var H=C;if(z=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||z===null||R===null||(H=Tr(C,R),H!=null&&pe.push(ro(C,H,z))),Qe)break;C=C.return}0<pe.length&&(O=new D(O,re,null,n,B),Y.push({event:O,listeners:pe}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",O&&n!==Us&&(re=n.relatedTarget||n.fromElement)&&(bl(re)||re[yl]))break e;if((D||O)&&(O=B.window===B?B:(O=B.ownerDocument)?O.defaultView||O.parentWindow:window,D?(re=n.relatedTarget||n.toElement,D=U,re=re?bl(re):null,re!==null&&(Qe=d(re),pe=re.tag,re!==Qe||pe!==5&&pe!==27&&pe!==6)&&(re=null)):(D=null,re=U),D!==re)){if(pe=mf,H="onMouseLeave",R="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(pe=pf,H="onPointerLeave",R="onPointerEnter",C="pointer"),Qe=D==null?O:Cr(D),z=re==null?O:Cr(re),O=new pe(H,C+"leave",D,n,B),O.target=Qe,O.relatedTarget=z,H=null,bl(B)===U&&(pe=new pe(R,C+"enter",re,n,B),pe.target=z,pe.relatedTarget=Qe,H=pe),Qe=H,D&&re)t:{for(pe=w0,R=D,C=re,z=0,H=R;H;H=pe(H))z++;H=0;for(var fe=C;fe;fe=pe(fe))H++;for(;0<z-H;)R=pe(R),z--;for(;0<H-z;)C=pe(C),H--;for(;z--;){if(R===C||C!==null&&R===C.alternate){pe=R;break t}R=pe(R),C=pe(C)}pe=null}else pe=null;D!==null&&op(Y,O,D,pe,!1),re!==null&&Qe!==null&&op(Y,Qe,re,pe,!0)}}e:{if(O=U?Cr(U):window,D=O.nodeName&&O.nodeName.toLowerCase(),D==="select"||D==="input"&&O.type==="file")var Me=Ef;else if(wf(O))if(Af)Me=Ub;else{Me=_b;var ce=jb}else D=O.nodeName,!D||D.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?U&&zs(U.elementType)&&(Me=Ef):Me=zb;if(Me&&(Me=Me(e,U))){Sf(Y,Me,n,B);break e}ce&&ce(e,O,U),e==="focusout"&&U&&O.type==="number"&&U.memoizedProps.value!=null&&_s(O,"number",O.value)}switch(ce=U?Cr(U):window,e){case"focusin":(wf(ce)||ce.contentEditable==="true")&&(Nl=ce,Qs=U,Mr=null);break;case"focusout":Mr=Qs=Nl=null;break;case"mousedown":Is=!0;break;case"contextmenu":case"mouseup":case"dragend":Is=!1,Uf(Y,n,B);break;case"selectionchange":if(Mb)break;case"keydown":case"keyup":Uf(Y,n,B)}var Ee;if(Ys)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Rl?bf(e,n)&&(_e="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_e="onCompositionStart");_e&&(gf&&n.locale!=="ko"&&(Rl||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Rl&&(Ee=df()):(ha=B,Ds="value"in ha?ha.value:ha.textContent,Rl=!0)),ce=zi(U,_e),0<ce.length&&(_e=new hf(_e,e,null,n,B),Y.push({event:_e,listeners:ce}),Ee?_e.data=Ee:(Ee=xf(n),Ee!==null&&(_e.data=Ee)))),(Ee=Ab?Cb(e,n):Tb(e,n))&&(_e=zi(U,"onBeforeInput"),0<_e.length&&(ce=new hf("onBeforeInput","beforeinput",null,n,B),Y.push({event:ce,listeners:_e}),ce.data=Ee)),v0(Y,e,U,n,B)}lp(Y,t)})}function ro(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zi(e,t){for(var n=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=Tr(e,n),o!=null&&l.unshift(ro(e,o,c)),o=Tr(e,t),o!=null&&l.push(ro(e,o,c))),e.tag===3)return l;e=e.return}return[]}function w0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function op(e,t,n,l,o){for(var c=t._reactName,m=[];n!==null&&n!==l;){var b=n,E=b.alternate,U=b.stateNode;if(b=b.tag,E!==null&&E===l)break;b!==5&&b!==26&&b!==27||U===null||(E=U,o?(U=Tr(n,c),U!=null&&m.unshift(ro(n,U,E))):o||(U=Tr(n,c),U!=null&&m.push(ro(n,U,E)))),n=n.return}m.length!==0&&e.push({event:t,listeners:m})}var S0=/\r\n?/g,E0=/\u0000|\uFFFD/g;function ip(e){return(typeof e=="string"?e:""+e).replace(S0,`
|
|
9
|
+
`).replace(E0,"")}function sp(e,t){return t=ip(t),ip(e)===t}function Ve(e,t,n,l,o,c){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Al(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Al(e,""+l);break;case"className":Lo(e,"class",l);break;case"tabIndex":Lo(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Lo(e,n,l);break;case"style":sf(e,l,c);break;case"data":if(t!=="object"){Lo(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ko(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&Ve(e,t,"name",o.name,o,null),Ve(e,t,"formEncType",o.formEncType,o,null),Ve(e,t,"formMethod",o.formMethod,o,null),Ve(e,t,"formTarget",o.formTarget,o,null)):(Ve(e,t,"encType",o.encType,o,null),Ve(e,t,"method",o.method,o,null),Ve(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ko(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(n=l.__html,n!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ko(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Te("beforetoggle",e),Te("toggle",e),Mo(e,"popover",l);break;case"xlinkActuate":Gn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Mo(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Jy.get(n)||n,Mo(e,n,l))}}function vu(e,t,n,l,o,c){switch(n){case"style":sf(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(n=l.__html,n!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Al(e,l):(typeof l=="number"||typeof l=="bigint")&&Al(e,""+l);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wd.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),c=e[Dt]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,o);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Mo(e,n,l)}}}function Nt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var l=!1,o=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ve(e,t,c,m,n,null)}}o&&Ve(e,t,"srcSet",n.srcSet,n,null),l&&Ve(e,t,"src",n.src,n,null);return;case"input":Te("invalid",e);var b=c=m=o=null,E=null,U=null;for(l in n)if(n.hasOwnProperty(l)){var B=n[l];if(B!=null)switch(l){case"name":o=B;break;case"type":m=B;break;case"checked":E=B;break;case"defaultChecked":U=B;break;case"value":c=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,t));break;default:Ve(e,t,l,B,n,null)}}af(e,c,b,E,U,m,o,!1);return;case"select":Te("invalid",e),l=m=c=null;for(o in n)if(n.hasOwnProperty(o)&&(b=n[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":m=b;break;case"multiple":l=b;default:Ve(e,t,o,b,n,null)}t=c,n=m,e.multiple=!!l,t!=null?El(e,!!l,t,!1):n!=null&&El(e,!!l,n,!0);return;case"textarea":Te("invalid",e),c=o=l=null;for(m in n)if(n.hasOwnProperty(m)&&(b=n[m],b!=null))switch(m){case"value":l=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(s(91));break;default:Ve(e,t,m,b,n,null)}rf(e,l,o,c);return;case"option":for(E in n)n.hasOwnProperty(E)&&(l=n[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ve(e,t,E,l,n,null));return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(l=0;l<lo.length;l++)Te(lo[l],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in n)if(n.hasOwnProperty(U)&&(l=n[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ve(e,t,U,l,n,null)}return;default:if(zs(t)){for(B in n)n.hasOwnProperty(B)&&(l=n[B],l!==void 0&&vu(e,t,B,l,n,void 0));return}}for(b in n)n.hasOwnProperty(b)&&(l=n[b],l!=null&&Ve(e,t,b,l,n,null))}function A0(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,m=null,b=null,E=null,U=null,B=null;for(D in n){var Y=n[D];if(n.hasOwnProperty(D)&&Y!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":E=Y;default:l.hasOwnProperty(D)||Ve(e,t,D,null,l,Y)}}for(var O in l){var D=l[O];if(Y=n[O],l.hasOwnProperty(O)&&(D!=null||Y!=null))switch(O){case"type":c=D;break;case"name":o=D;break;case"checked":U=D;break;case"defaultChecked":B=D;break;case"value":m=D;break;case"defaultValue":b=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(s(137,t));break;default:D!==Y&&Ve(e,t,O,D,l,Y)}}js(e,m,b,E,U,B,c,o);return;case"select":D=m=b=O=null;for(c in n)if(E=n[c],n.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":D=E;default:l.hasOwnProperty(c)||Ve(e,t,c,null,l,E)}for(o in l)if(c=l[o],E=n[o],l.hasOwnProperty(o)&&(c!=null||E!=null))switch(o){case"value":O=c;break;case"defaultValue":b=c;break;case"multiple":m=c;default:c!==E&&Ve(e,t,o,c,l,E)}t=b,n=m,l=D,O!=null?El(e,!!n,O,!1):!!l!=!!n&&(t!=null?El(e,!!n,t,!0):El(e,!!n,n?[]:"",!1));return;case"textarea":D=O=null;for(b in n)if(o=n[b],n.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ve(e,t,b,null,l,o)}for(m in l)if(o=l[m],c=n[m],l.hasOwnProperty(m)&&(o!=null||c!=null))switch(m){case"value":O=o;break;case"defaultValue":D=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==c&&Ve(e,t,m,o,l,c)}lf(e,O,D);return;case"option":for(var re in n)O=n[re],n.hasOwnProperty(re)&&O!=null&&!l.hasOwnProperty(re)&&(re==="selected"?e.selected=!1:Ve(e,t,re,null,l,O));for(E in l)O=l[E],D=n[E],l.hasOwnProperty(E)&&O!==D&&(O!=null||D!=null)&&(E==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":Ve(e,t,E,O,l,D));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in n)O=n[pe],n.hasOwnProperty(pe)&&O!=null&&!l.hasOwnProperty(pe)&&Ve(e,t,pe,null,l,O);for(U in l)if(O=l[U],D=n[U],l.hasOwnProperty(U)&&O!==D&&(O!=null||D!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(s(137,t));break;default:Ve(e,t,U,O,l,D)}return;default:if(zs(t)){for(var Qe in n)O=n[Qe],n.hasOwnProperty(Qe)&&O!==void 0&&!l.hasOwnProperty(Qe)&&vu(e,t,Qe,void 0,l,O);for(B in l)O=l[B],D=n[B],!l.hasOwnProperty(B)||O===D||O===void 0&&D===void 0||vu(e,t,B,O,l,D);return}}for(var R in n)O=n[R],n.hasOwnProperty(R)&&O!=null&&!l.hasOwnProperty(R)&&Ve(e,t,R,null,l,O);for(Y in l)O=l[Y],D=n[Y],!l.hasOwnProperty(Y)||O===D||O==null&&D==null||Ve(e,t,Y,O,l,D)}function cp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function C0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var o=n[l],c=o.transferSize,m=o.initiatorType,b=o.duration;if(c&&b&&cp(m)){for(m=0,b=o.responseEnd,l+=1;l<n.length;l++){var E=n[l],U=E.startTime;if(U>b)break;var B=E.transferSize,Y=E.initiatorType;B&&cp(Y)&&(E=E.responseEnd,m+=B*(E<b?1:(b-U)/(E-U)))}if(--l,t+=8*(c+m)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var yu=null,bu=null;function Ui(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function xu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=null;function T0(){var e=window.event;return e&&e.type==="popstate"?e===wu?!1:(wu=e,!0):(wu=null,!1)}var fp=typeof setTimeout=="function"?setTimeout:void 0,R0=typeof clearTimeout=="function"?clearTimeout:void 0,mp=typeof Promise=="function"?Promise:void 0,N0=typeof queueMicrotask=="function"?queueMicrotask:typeof mp<"u"?function(e){return mp.resolve(null).then(e).catch(j0)}:fp;function j0(e){setTimeout(function(){throw e})}function za(e){return e==="head"}function hp(e,t){var n=t,l=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(o),tr(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")oo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,oo(n);for(var c=n.firstChild;c;){var m=c.nextSibling,b=c.nodeName;c[Ar]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&oo(e.ownerDocument.body);n=o}while(n);tr(t)}function pp(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Su(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Su(n),Rs(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _0(e,t,n,l){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ar])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function z0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function gp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=mn(e.nextSibling),e===null))return null;return e}function Eu(e){return e.data==="$?"||e.data==="$~"}function Au(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function U0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function mn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Cu=null;function vp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return mn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function yp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function bp(e,t,n){switch(t=Ui(n),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function oo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rs(e)}var hn=new Map,xp=new Set;function Oi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var oa=$.d;$.d={f:O0,r:M0,D:L0,C:D0,L:k0,m:B0,X:q0,S:H0,M:Y0};function O0(){var e=oa.f(),t=Ai();return e||t}function M0(e){var t=xl(e);t!==null&&t.tag===5&&t.type==="form"?km(t):oa.r(e)}var Wl=typeof document>"u"?null:document;function wp(e,t,n){var l=Wl;if(l&&typeof t=="string"&&t){var o=rn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),xp.has(o)||(xp.add(o),e={rel:e,crossOrigin:n,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Nt(t,"link",e),xt(t),l.head.appendChild(t)))}}function L0(e){oa.D(e),wp("dns-prefetch",e,null)}function D0(e,t){oa.C(e,t),wp("preconnect",e,t)}function k0(e,t,n){oa.L(e,t,n);var l=Wl;if(l&&e&&t){var o='link[rel="preload"][as="'+rn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+rn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+rn(n.imageSizes)+'"]')):o+='[href="'+rn(e)+'"]';var c=o;switch(t){case"style":c=Fl(e);break;case"script":c=er(e)}hn.has(c)||(e=w({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),hn.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(io(c))||t==="script"&&l.querySelector(so(c))||(t=l.createElement("link"),Nt(t,"link",e),xt(t),l.head.appendChild(t)))}}function B0(e,t){oa.m(e,t);var n=Wl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+rn(l)+'"][href="'+rn(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=er(e)}if(!hn.has(c)&&(e=w({rel:"modulepreload",href:e},t),hn.set(c,e),n.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(so(c)))return}l=n.createElement("link"),Nt(l,"link",e),xt(l),n.head.appendChild(l)}}}function H0(e,t,n){oa.S(e,t,n);var l=Wl;if(l&&e){var o=wl(l).hoistableStyles,c=Fl(e);t=t||"default";var m=o.get(c);if(!m){var b={loading:0,preload:null};if(m=l.querySelector(io(c)))b.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},n),(n=hn.get(c))&&Tu(e,n);var E=m=l.createElement("link");xt(E),Nt(E,"link",e),E._p=new Promise(function(U,B){E.onload=U,E.onerror=B}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Mi(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:b},o.set(c,m)}}}function q0(e,t){oa.X(e,t);var n=Wl;if(n&&e){var l=wl(n).hoistableScripts,o=er(e),c=l.get(o);c||(c=n.querySelector(so(o)),c||(e=w({src:e,async:!0},t),(t=hn.get(o))&&Ru(e,t),c=n.createElement("script"),xt(c),Nt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function Y0(e,t){oa.M(e,t);var n=Wl;if(n&&e){var l=wl(n).hoistableScripts,o=er(e),c=l.get(o);c||(c=n.querySelector(so(o)),c||(e=w({src:e,async:!0,type:"module"},t),(t=hn.get(o))&&Ru(e,t),c=n.createElement("script"),xt(c),Nt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function Sp(e,t,n,l){var o=(o=W.current)?Oi(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Fl(n.href),n=wl(o).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Fl(n.href);var c=wl(o).hoistableStyles,m=c.get(e);if(m||(o=o.ownerDocument||o,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,m),(c=o.querySelector(io(e)))&&!c._p&&(m.instance=c,m.state.loading=5),hn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hn.set(e,n),c||X0(o,e,n,m.state))),t&&l===null)throw Error(s(528,""));return m}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=er(n),n=wl(o).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Fl(e){return'href="'+rn(e)+'"'}function io(e){return'link[rel="stylesheet"]['+e+"]"}function Ep(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function X0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Nt(t,"link",n),xt(t),e.head.appendChild(t))}function er(e){return'[src="'+rn(e)+'"]'}function so(e){return"script[async]"+e}function Ap(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+rn(n.href)+'"]');if(l)return t.instance=l,xt(l),l;var o=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),xt(l),Nt(l,"style",o),Mi(l,n.precedence,e),t.instance=l;case"stylesheet":o=Fl(n.href);var c=e.querySelector(io(o));if(c)return t.state.loading|=4,t.instance=c,xt(c),c;l=Ep(n),(o=hn.get(o))&&Tu(l,o),c=(e.ownerDocument||e).createElement("link"),xt(c);var m=c;return m._p=new Promise(function(b,E){m.onload=b,m.onerror=E}),Nt(c,"link",l),t.state.loading|=4,Mi(c,n.precedence,e),t.instance=c;case"script":return c=er(n.src),(o=e.querySelector(so(c)))?(t.instance=o,xt(o),o):(l=n,(o=hn.get(c))&&(l=w({},n),Ru(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),xt(o),Nt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Mi(l,n.precedence,e));return t.instance}function Mi(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,m=0;m<l.length;m++){var b=l[m];if(b.dataset.precedence===t)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Tu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Li=null;function Cp(e,t,n){if(Li===null){var l=new Map,o=Li=new Map;o.set(n,l)}else o=Li,l=o.get(n),l||(l=new Map,o.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var c=n[o];if(!(c[Ar]||c[At]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(t)||"";m=e+m;var b=l.get(m);b?b.push(c):l.set(m,[c])}}return l}function Tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function G0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Rp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function V0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Fl(l.href),c=t.querySelector(io(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Di.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,xt(c);return}c=t.ownerDocument||t,l=Ep(l),(o=hn.get(o))&&Tu(l,o),c=c.createElement("link"),xt(c);var m=c;m._p=new Promise(function(b,E){m.onload=b,m.onerror=E}),Nt(c,"link",l),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Di.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Nu=0;function Q0(e,t){return e.stylesheets&&e.count===0&&Bi(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Bi(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Nu===0&&(Nu=62500*C0());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Bi(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Nu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Di(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ki=null;function Bi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ki=new Map,t.forEach(I0,e),ki=null,Di.call(e))}function I0(e,t){if(!(t.state.loading&4)){var n=ki.get(e);if(n)var l=n.get(null);else{n=new Map,ki.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var m=o[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),l=m)}l&&n.set(null,l)}o=t.instance,m=o.getAttribute("data-precedence"),c=n.get(m)||l,c===l&&n.set(null,o),n.set(m,o),this.count++,l=Di.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var co={$$typeof:G,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Z0(e,t,n,l,o,c,m,b,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.hiddenUpdates=da(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Np(e,t,n,l,o,c,m,b,E,U,B,Y){return e=new Z0(e,t,n,m,E,U,B,Y,b),t=1,c===!0&&(t|=24),c=$t(3,null,null,t),e.current=c,c.stateNode=e,t=ic(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:n,cache:t},dc(c),e}function jp(e){return e?(e=zl,e):zl}function _p(e,t,n,l,o,c){o=jp(o),l.context===null?l.context=o:l.pendingContext=o,l=xa(t),l.payload={element:n},c=c===void 0?null:c,c!==null&&(l.callback=c),n=wa(e,l,t),n!==null&&(Xt(n,e,t),Yr(n,e,t))}function zp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ju(e,t){zp(e,t),(e=e.alternate)&&zp(e,t)}function Up(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&Xt(t,e,67108864),ju(e,67108864)}}function Op(e){if(e.tag===13||e.tag===31){var t=Ft();t=fa(t);var n=Pa(e,t);n!==null&&Xt(n,e,t),ju(e,t)}}var Hi=!0;function $0(e,t,n,l){var o=M.T;M.T=null;var c=$.p;try{$.p=2,_u(e,t,n,l)}finally{$.p=c,M.T=o}}function K0(e,t,n,l){var o=M.T;M.T=null;var c=$.p;try{$.p=8,_u(e,t,n,l)}finally{$.p=c,M.T=o}}function _u(e,t,n,l){if(Hi){var o=zu(l);if(o===null)gu(e,t,l,qi,n),Lp(e,l);else if(J0(o,e,t,n,l))l.stopPropagation();else if(Lp(e,l),t&4&&-1<P0.indexOf(e)){for(;o!==null;){var c=xl(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=Fe(c.pendingLanes);if(m!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;m;){var E=1<<31-Et(m);b.entanglements[1]|=E,m&=~E}On(c),(ke&6)===0&&(Si=yt()+500,ao(0))}}break;case 31:case 13:b=Pa(c,2),b!==null&&Xt(b,c,2),Ai(),ju(c,2)}if(c=zu(l),c===null&&gu(e,t,l,qi,n),c===o)break;o=c}o!==null&&l.stopPropagation()}else gu(e,t,l,null,n)}}function zu(e){return e=Os(e),Uu(e)}var qi=null;function Uu(e){if(qi=null,e=bl(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=v(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qi=e,null}function Mp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(St()){case xr:return 2;case an:return 8;case Va:case Oo:return 32;case wr:return 268435456;default:return 32}default:return 32}}var Ou=!1,Ua=null,Oa=null,Ma=null,uo=new Map,fo=new Map,La=[],P0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Lp(e,t){switch(e){case"focusin":case"focusout":Ua=null;break;case"dragenter":case"dragleave":Oa=null;break;case"mouseover":case"mouseout":Ma=null;break;case"pointerover":case"pointerout":uo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fo.delete(t.pointerId)}}function mo(e,t,n,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=xl(t),t!==null&&Up(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function J0(e,t,n,l,o){switch(t){case"focusin":return Ua=mo(Ua,e,t,n,l,o),!0;case"dragenter":return Oa=mo(Oa,e,t,n,l,o),!0;case"mouseover":return Ma=mo(Ma,e,t,n,l,o),!0;case"pointerover":var c=o.pointerId;return uo.set(c,mo(uo.get(c)||null,e,t,n,l,o)),!0;case"gotpointercapture":return c=o.pointerId,fo.set(c,mo(fo.get(c)||null,e,t,n,l,o)),!0}return!1}function Dp(e){var t=bl(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,Kd(e.priority,function(){Op(n)});return}}else if(t===31){if(t=v(n),t!==null){e.blockedOn=t,Kd(e.priority,function(){Op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zu(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Us=l,n.target.dispatchEvent(l),Us=null}else return t=xl(n),t!==null&&Up(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Yi(e)&&n.delete(t)}function W0(){Ou=!1,Ua!==null&&Yi(Ua)&&(Ua=null),Oa!==null&&Yi(Oa)&&(Oa=null),Ma!==null&&Yi(Ma)&&(Ma=null),uo.forEach(kp),fo.forEach(kp)}function Xi(e,t){e.blockedOn===t&&(e.blockedOn=null,Ou||(Ou=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,W0)))}var Gi=null;function Bp(e){Gi!==e&&(Gi=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Gi===e&&(Gi=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Uu(l||n)===null)continue;break}var c=xl(n);c!==null&&(e.splice(t,3),t-=3,zc(c,{pending:!0,data:o,method:n.method,action:l},l,o))}}))}function tr(e){function t(E){return Xi(E,e)}Ua!==null&&Xi(Ua,e),Oa!==null&&Xi(Oa,e),Ma!==null&&Xi(Ma,e),uo.forEach(t),fo.forEach(t);for(var n=0;n<La.length;n++){var l=La[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<La.length&&(n=La[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&La.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var o=n[l],c=n[l+1],m=o[Dt]||null;if(typeof c=="function")m||Bp(n);else if(m){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,m=c[Dt]||null)b=m.formAction;else if(Uu(o)!==null)continue}else b=m.action;typeof b=="function"?n[l+1]=b:(n.splice(l,3),l-=3),Bp(n)}}}function Hp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return o=m})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Mu(e){this._internalRoot=e}Vi.prototype.render=Mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current,l=Ft();_p(n,l,e,t,null,null)},Vi.prototype.unmount=Mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_p(e.current,2,null,e,null,null),Ai(),t[yl]=null}};function Vi(e){this._internalRoot=e}Vi.prototype.unstable_scheduleHydration=function(e){if(e){var t=$d();e={blockedOn:null,target:e,priority:t};for(var n=0;n<La.length&&t!==0&&t<La[n].priority;n++);La.splice(n,0,e),n===0&&Dp(e)}};var qp=r.version;if(qp!=="19.2.8")throw Error(s(527,qp,"19.2.8"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var F0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qi.isDisabled&&Qi.supportsFiber)try{Qa=Qi.inject(F0),ht=Qi}catch{}}return po.createRoot=function(e,t){if(!u(e))throw Error(s(299));var n=!1,l="",o=Zm,c=$m,m=Km;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=Np(e,1,!1,null,null,n,l,null,o,c,m,Hp),e[yl]=t.current,pu(e),new Mu(t)},po.hydrateRoot=function(e,t,n){if(!u(e))throw Error(s(299));var l=!1,o="",c=Zm,m=$m,b=Km,E=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError),n.formState!==void 0&&(E=n.formState)),t=Np(e,1,!0,t,n??null,l,o,E,c,m,b,Hp),t.context=jp(null),n=t.current,l=Ft(),l=fa(l),o=xa(l),o.callback=null,wa(n,o,l),n=l,t.current.lanes=n,et(t,n),On(t),e[yl]=t.current,pu(e),new Vi(t)},po.version="19.2.8",po}var Pp;function dx(){if(Pp)return ku.exports;Pp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(r){console.error(r)}}return a(),ku.exports=ux(),ku.exports}var fx=dx();function mx(a=typeof window>"u"?"/.account/":window.location.pathname){return/^\/\.account\/interaction\/[^/]+(?=\/|$)/u.exec(a)?.[0]??"/.account"}function K(a,r=typeof window>"u"?void 0:window.location){const i=String(a);if(!r)return i;const s=mx(r.pathname);if(s==="/.account")return i;const u=new URL(i,r.href);return u.origin!==r.origin||!u.pathname.startsWith("/.account/")||u.pathname.startsWith("/.account/interaction/")?i:(u.pathname=`${s}${u.pathname.slice(9)}`,i.startsWith("/")&&!i.startsWith("//")?`${u.pathname}${u.search}${u.hash}`:u.href)}var Ed=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Fg=/^[\\/]{2}/;function hx(a,r){return r+a.replace(/\\/g,"/")}var Jp="popstate";function Wp(a){return typeof a=="object"&&a!=null&&"pathname"in a&&"search"in a&&"hash"in a&&"state"in a&&"key"in a}function px(a={}){function r(s,u){let d=u.state?.masked,{pathname:h,search:v,hash:p}=d||s.location;return ed("",{pathname:h,search:v,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default",d?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function i(s,u){return typeof u=="string"?u:Eo(u)}return vx(r,i,null,a)}function We(a,r){if(a===!1||a===null||typeof a>"u")throw new Error(r)}function vn(a,r){if(!a){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function gx(){return Math.random().toString(36).substring(2,10)}function Fp(a,r){return{usr:a.state,key:a.key,idx:r,masked:a.mask?{pathname:a.pathname,search:a.search,hash:a.hash}:void 0}}function ed(a,r,i=null,s,u){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof r=="string"?hr(r):r,state:i,key:r&&r.key||s||gx(),mask:u}}function Eo({pathname:a="/",search:r="",hash:i=""}){return r&&r!=="?"&&(a+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function hr(a){let r={};if(a){let i=a.indexOf("#");i>=0&&(r.hash=a.substring(i),a=a.substring(0,i));let s=a.indexOf("?");s>=0&&(r.search=a.substring(s),a=a.substring(0,s)),a&&(r.pathname=a)}return r}function vx(a,r,i,s={}){let{window:u=document.defaultView,v5Compat:d=!1}=s,h=u.history,v="POP",p=null,g=x();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function x(){return(h.state||{idx:null}).idx}function w(){v="POP";let _=x(),Q=_==null?null:_-g;g=_,p&&p({action:v,location:N.location,delta:Q})}function S(_,Q){v="PUSH";let Z=Wp(_)?_:ed(N.location,_,Q);g=x()+1;let G=Fp(Z,g),oe=N.createHref(Z.mask||Z);try{h.pushState(G,"",oe)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;u.location.assign(oe)}d&&p&&p({action:v,location:N.location,delta:1})}function T(_,Q){v="REPLACE";let Z=Wp(_)?_:ed(N.location,_,Q);g=x();let G=Fp(Z,g),oe=N.createHref(Z.mask||Z);h.replaceState(G,"",oe),d&&p&&p({action:v,location:N.location,delta:0})}function j(_){return yx(u,_)}let N={get action(){return v},get location(){return a(u,h)},listen(_){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(Jp,w),p=_,()=>{u.removeEventListener(Jp,w),p=null}},createHref(_){return r(u,_)},createURL:j,encodeLocation(_){let Q=j(_);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:S,replace:T,go(_){return h.go(_)}};return N}function yx(a,r,i=!1){let s="http://localhost";a&&(s=a.location.origin!=="null"?a.location.origin:a.location.href),We(s,"No window.location.(origin|href) available to create URL");let u=typeof r=="string"?r:Eo(r);return u=u.replace(/ $/,"%20"),!i&&Fg.test(u)&&(u=s+u),new URL(u,s)}function ev(a,r,i="/"){return bx(a,r,i,!1)}function bx(a,r,i,s,u){let d=typeof r=="string"?hr(r):r,h=sa(d.pathname||"/",i);if(h==null)return null;let v=xx(a),p=null,g=zx(h);for(let x=0;p==null&&x<v.length;++x)p=_x(v[x],g,s);return p}function xx(a){let r=tv(a);return wx(r),r}function tv(a,r=[],i=[],s="",u=!1){let d=(h,v,p=u,g)=>{let x={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(s)&&p)return;We(x.relativePath.startsWith(s),`Absolute route path "${x.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(s.length)}let w=Tn([s,x.relativePath]),S=i.concat(x);h.children&&h.children.length>0&&(We(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),tv(h.children,r,S,w,p)),!(h.path==null&&!h.index)&&r.push({path:w,score:Nx(w,h.index),routesMeta:S.map((T,j)=>{let[N,_]=lv(T.relativePath,T.caseSensitive,j===S.length-1);return{...T,matcher:N,compiledParams:_}})})};return a.forEach((h,v)=>{if(h.path===""||!h.path?.includes("?"))d(h,v);else for(let p of nv(h.path))d(h,v,!0,p)}),r}function nv(a){let r=a.split("/");if(r.length===0)return[];let[i,...s]=r,u=i.endsWith("?"),d=i.replace(/\?$/,"");if(s.length===0)return u?[d,""]:[d];let h=nv(s.join("/")),v=[];return v.push(...h.map(p=>p===""?d:[d,p].join("/"))),u&&v.push(...h),v.map(p=>a.startsWith("/")&&p===""?"/":p)}function wx(a){a.sort((r,i)=>r.score!==i.score?i.score-r.score:jx(r.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var Sx=/^:[\w-]+$/,Ex=3,Ax=2,Cx=1,Tx=10,Rx=-2,eg=a=>a==="*";function Nx(a,r){let i=a.split("/"),s=i.length;return i.some(eg)&&(s+=Rx),r&&(s+=Ax),i.filter(u=>!eg(u)).reduce((u,d)=>u+(Sx.test(d)?Ex:d===""?Cx:Tx),s)}function jx(a,r){return a.length===r.length&&a.slice(0,-1).every((s,u)=>s===r[u])?a[a.length-1]-r[r.length-1]:0}function _x(a,r,i=!1){let{routesMeta:s}=a,u={},d="/",h=[];for(let v=0;v<s.length;++v){let p=s[v],g=v===s.length-1,x=d==="/"?r:r.slice(d.length)||"/",w={path:p.relativePath,caseSensitive:p.caseSensitive,end:g},S=p.matcher&&p.compiledParams?av(w,x,p.matcher,p.compiledParams):ns(w,x),T=p.route;if(!S&&g&&i&&!s[s.length-1].route.index&&(S=ns({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},x)),!S)return null;Object.assign(u,S.params),h.push({params:u,pathname:Tn([d,S.pathname]),pathnameBase:Mx(Tn([d,S.pathnameBase])),route:T}),S.pathnameBase!=="/"&&(d=Tn([d,S.pathnameBase]))}return h}function ns(a,r){typeof a=="string"&&(a={path:a,caseSensitive:!1,end:!0});let[i,s]=lv(a.path,a.caseSensitive,a.end);return av(a,r,i,s)}function av(a,r,i,s){let u=r.match(i);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),v=u.slice(1);return{params:s.reduce((g,{paramName:x,isOptional:w},S)=>{if(x==="*"){let j=v[S]||"";h=d.slice(0,d.length-j.length).replace(/(.)\/+$/,"$1")}const T=v[S];return w&&!T?g[x]=void 0:g[x]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:h,pattern:a}}function lv(a,r=!1,i=!0){vn(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let s=[],u="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,v,p,g,x)=>{if(s.push({paramName:v,isOptional:p!=null}),p){let w=x.charAt(g+h.length);return w&&w!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(s.push({paramName:"*"}),u+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":a!==""&&a!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,r?void 0:"i"),s]}function zx(a){try{return a.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return vn(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),a}}function sa(a,r){if(r==="/")return a;if(!a.toLowerCase().startsWith(r.toLowerCase()))return null;let i=r.endsWith("/")?r.length-1:r.length,s=a.charAt(i);return s&&s!=="/"?null:a.slice(i)||"/"}function Ux(a,r="/"){let{pathname:i,search:s="",hash:u=""}=typeof a=="string"?hr(a):a,d;return i?(i=rv(i),i.startsWith("/")?d=tg(i.substring(1),"/"):d=tg(i,r)):d=r,{pathname:d,search:Lx(s),hash:Dx(u)}}function tg(a,r){let i=as(r).split("/");return a.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Yu(a,r,i,s){return`Cannot include a '${a}' character in a manually specified \`to.${r}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ox(a){return a.filter((r,i)=>i===0||r.route.path&&r.route.path.length>0)}function Ad(a){let r=Ox(a);return r.map((i,s)=>s===r.length-1?i.pathname:i.pathnameBase)}function fs(a,r,i,s=!1){let u;typeof a=="string"?u=hr(a):(u={...a},We(!u.pathname||!u.pathname.includes("?"),Yu("?","pathname","search",u)),We(!u.pathname||!u.pathname.includes("#"),Yu("#","pathname","hash",u)),We(!u.search||!u.search.includes("#"),Yu("#","search","hash",u)));let d=a===""||u.pathname==="",h=d?"/":u.pathname,v;if(h==null)v=i;else{let w=r.length-1;if(!s&&h.startsWith("..")){let S=h.split("/");for(;S[0]==="..";)S.shift(),w-=1;u.pathname=S.join("/")}v=w>=0?r[w]:"/"}let p=Ux(u,v),g=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(g||x)&&(p.pathname+="/"),p}var rv=a=>a.replace(/[\\/]{2,}/g,"/"),Tn=a=>rv(a.join("/")),as=a=>a.replace(/\/+$/,""),Mx=a=>as(a).replace(/^\/*/,"/"),Lx=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,Dx=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a,kx=class{constructor(a,r,i,s=!1){this.status=a,this.statusText=r||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Bx(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}function Hx(a){let r=a.map(i=>i.route.path).filter(Boolean);return Tn(r)||"/"}var ov=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iv(a,r){let i=a;if(typeof i!="string"||!Ed.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,u=!1;if(ov)try{let d=new URL(window.location.href),h=Fg.test(i)?new URL(hx(i,d.protocol)):new URL(i),v=sa(h.pathname,r);h.origin===d.origin&&v!=null?i=v+h.search+h.hash:u=!0}catch{vn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:u,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sv=["POST","PUT","PATCH","DELETE"];new Set(sv);var qx=["GET",...sv];new Set(qx);var Yx=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Xx(a){try{return Yx.includes(new URL(a).protocol)}catch{return!1}}var pr=y.createContext(null);pr.displayName="DataRouter";var ms=y.createContext(null);ms.displayName="DataRouterState";var cv=y.createContext(!1);function Gx(){return y.useContext(cv)}var uv=y.createContext({isTransitioning:!1});uv.displayName="ViewTransition";var Vx=y.createContext(new Map);Vx.displayName="Fetchers";var Qx=y.createContext(null);Qx.displayName="Await";var tn=y.createContext(null);tn.displayName="Navigation";var No=y.createContext(null);No.displayName="Location";var Hn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Hn.displayName="Route";var Cd=y.createContext(null);Cd.displayName="RouteError";var dv="REACT_ROUTER_ERROR",Ix="REDIRECT",Zx="ROUTE_ERROR_RESPONSE";function $x(a){if(a.startsWith(`${dv}:${Ix}:{`))try{let r=JSON.parse(a.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Kx(a){if(a.startsWith(`${dv}:${Zx}:{`))try{let r=JSON.parse(a.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new kx(r.status,r.statusText,r.data)}catch{}}function Px(a,{relative:r}={}){We(gr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=y.useContext(tn),{hash:u,pathname:d,search:h}=jo(a,{relative:r}),v=d;return i!=="/"&&(v=d==="/"?i:Tn([i,d])),s.createHref({pathname:v,search:h,hash:u})}function gr(){return y.useContext(No)!=null}function nn(){return We(gr(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(No).location}var fv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mv(a){y.useContext(tn).static||y.useLayoutEffect(a)}function qn(){let{isDataRoute:a}=y.useContext(Hn);return a?cw():Jx()}function Jx(){We(gr(),"useNavigate() may be used only in the context of a <Router> component.");let a=y.useContext(pr),{basename:r,navigator:i}=y.useContext(tn),{matches:s}=y.useContext(Hn),{pathname:u}=nn(),d=JSON.stringify(Ad(s)),h=y.useRef(!1);return mv(()=>{h.current=!0}),y.useCallback((p,g={})=>{if(vn(h.current,fv),!h.current)return;if(typeof p=="number"){i.go(p);return}let x=fs(p,JSON.parse(d),u,g.relative==="path");a==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:Tn([r,x.pathname])),(g.replace?i.replace:i.push)(x,g.state,g)},[r,i,d,u,a])}y.createContext(null);function jo(a,{relative:r}={}){let{matches:i}=y.useContext(Hn),{pathname:s}=nn(),u=JSON.stringify(Ad(i));return y.useMemo(()=>fs(a,JSON.parse(u),s,r==="path"),[a,u,s,r])}function Wx(a,r){return hv(a,r)}function hv(a,r,i){We(gr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(tn),{matches:u}=y.useContext(Hn),d=u[u.length-1],h=d?d.params:{},v=d?d.pathname:"/",p=d?d.pathnameBase:"/",g=d&&d.route;{let _=g&&g.path||"";gv(v,!g||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
10
|
|
|
11
|
-
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let x=cn(),w;if(r){let j=typeof r=="string"?Lr(r):r;nt(p==="/"||j.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${j.pathname}" was given in the \`location\` prop.`),w=j}else w=x;let S=w.pathname||"/",C=S;if(p!=="/"){let j=p.replace(/^\//,"").split("/");C="/"+S.replace(/^\//,"").split("/").slice(j.length).join("/")}let U=o&&o.state.matches.length?o.state.matches.map(j=>Object.assign(j,{route:o.manifest[j.route.id]||j.route})):Cb(a,{pathname:C});Cn(g||U!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Cn(U==null||U[U.length-1].route.element!==void 0||U[U.length-1].route.Component!==void 0||U[U.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=Ow(U&&U.map(j=>Object.assign({},j,{params:Object.assign({},h,j.params),pathname:Ln([p,s.encodeLocation?s.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?p:Ln([p,s.encodeLocation?s.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),u,o);return r&&N?y.createElement(Qo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...w},navigationType:"POP"}},N):N}function Nw(){let a=Bw(),r=hw(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),o=a instanceof Error?a.stack:null,s="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",a),h=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:d},"ErrorBoundary")," or"," ",y.createElement("code",{style:d},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),o?y.createElement("pre",{style:u},o):null,h)}var Uw=y.createElement(Nw,null),qb=class extends y.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,r){return r.location!==a.location||r.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:r.error,location:r.location,revalidation:a.revalidation||r.revalidation}}componentDidCatch(a,r){this.props.onError?this.props.onError(a,r):console.error("React Router caught the following error during render",a)}render(){let a=this.state.error;if(this.context&&typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){const o=Cw(a.digest);o&&(a=o)}let r=a!==void 0?y.createElement(Pn.Provider,{value:this.props.routeContext},y.createElement(Pd.Provider,{value:a,children:this.props.component})):this.props.children;return this.context?y.createElement(_w,{error:a},r):r}};qb.contextType=Mb;var cd=new WeakMap;function _w({children:a,error:r}){let{basename:o}=y.useContext(sn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let s=Aw(r.digest);if(s){let u=cd.get(r);if(u)throw u;let d=zb(s.location,o),h=d.absoluteURL||d.to;if(yw(h))throw new Error("Invalid redirect location");if(_b&&!cd.get(r))if(d.isExternal||s.reloadDocument)window.location.href=h;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw cd.set(r,b),b}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return a}function zw({routeContext:a,match:r,children:o}){let s=y.useContext(Dr);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Pn.Provider,{value:a},o)}function Ow(a,r=[],o){let s=o?.state;if(a==null){if(!s)return null;if(s.errors)a=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)a=s.matches;else return null}let u=a,d=s?.errors;if(d!=null){let x=u.findIndex(w=>w.route.id&&d?.[w.route.id]!==void 0);nt(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),u=u.slice(0,Math.min(u.length,x+1))}let h=!1,b=-1;if(o&&s){h=s.renderFallback;for(let x=0;x<u.length;x++){let w=u[x];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(b=x),w.route.id){let{loaderData:S,errors:C}=s,U=w.route.loader&&!S.hasOwnProperty(w.route.id)&&(!C||C[w.route.id]===void 0);if(w.route.lazy||U){o.isStatic&&(h=!0),b>=0?u=u.slice(0,b+1):u=[u[0]];break}}}}let p=o?.onError,g=s&&p?(x,w)=>{p(x,{location:s.location,params:s.matches?.[0]?.params??{},pattern:pw(s.matches),errorInfo:w})}:void 0;return u.reduceRight((x,w,S)=>{let C,U=!1,N=null,j=null;s&&(C=d&&w.route.id?d[w.route.id]:void 0,N=w.route.errorElement||Uw,h&&(b<0&&S===0?(Yb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,j=null):b===S&&(U=!0,j=w.route.hydrateFallbackElement||null)));let I=r.concat(u.slice(0,S+1)),P=()=>{let H;return C?H=N:U?H=j:w.route.Component?H=y.createElement(w.route.Component,null):w.route.element?H=w.route.element:H=x,y.createElement(zw,{match:w,routeContext:{outlet:x,matches:I,isDataRoute:s!=null},children:H})};return s&&(w.route.ErrorBoundary||w.route.errorElement||S===0)?y.createElement(qb,{location:s.location,revalidation:s.revalidation,component:N,error:C,children:P(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:g}):P()},null)}function Zd(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mw(a){let r=y.useContext(Dr);return nt(r,Zd(a)),r}function Lw(a){let r=y.useContext(Ms);return nt(r,Zd(a)),r}function Dw(a){let r=y.useContext(Pn);return nt(r,Zd(a)),r}function $d(a){let r=Dw(a),o=r.matches[r.matches.length-1];return nt(o.route.id,`${a} can only be used on routes that contain a unique "id"`),o.route.id}function kw(){return $d("useRouteId")}function Bw(){let a=y.useContext(Pd),r=Lw("useRouteError"),o=$d("useRouteError");return a!==void 0?a:r.errors?.[o]}function Hw(){let{router:a}=Mw("useNavigate"),r=$d("useNavigate"),o=y.useRef(!1);return Bb(()=>{o.current=!0}),y.useCallback(async(u,d={})=>{Cn(o.current,kb),o.current&&(typeof u=="number"?await a.navigate(u):await a.navigate(u,{fromRouteId:r,...d}))},[a,r])}var Ag={};function Yb(a,r,o){!r&&!Ag[a]&&(Ag[a]=!0,Cn(!1,o))}y.memo(qw);function qw({routes:a,manifest:r,future:o,state:s,isStatic:u,onError:d}){return Hb(a,void 0,{manifest:r,state:s,isStatic:u,onError:d})}function Dn({to:a,replace:r,state:o,relative:s}){nt(kr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=y.useContext(sn);Cn(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=y.useContext(Pn),{pathname:h}=cn(),b=Zn(),p=Os(a,Qd(d),h,s==="path"),g=JSON.stringify(p);return y.useEffect(()=>{b(JSON.parse(g),{replace:r,state:o,relative:s})},[b,g,s,r,o]),null}function Sn(a){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Yw({basename:a="/",children:r=null,location:o,navigationType:s="POP",navigator:u,static:d=!1,useTransitions:h}){nt(!kr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=a.replace(/^\/*/,"/"),p=y.useMemo(()=>({basename:b,navigator:u,static:d,useTransitions:h,future:{}}),[b,u,d,h]);typeof o=="string"&&(o=Lr(o));let{pathname:g="/",search:x="",hash:w="",state:S=null,key:C="default",mask:U}=o,N=y.useMemo(()=>{let j=ya(g,b);return j==null?null:{location:{pathname:j,search:x,hash:w,state:S,key:C,mask:U},navigationType:s}},[b,g,x,w,S,C,s,U]);return Cn(N!=null,`<Router basename="${b}"> is not able to match the URL "${g}${x}${w}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:y.createElement(sn.Provider,{value:p},y.createElement(Qo.Provider,{children:r,value:N}))}function Xw({children:a,location:r}){return jw(Ed(a),r)}function Ed(a,r=[]){let o=[];return y.Children.forEach(a,(s,u)=>{if(!y.isValidElement(s))return;let d=[...r,u];if(s.type===y.Fragment){o.push.apply(o,Ed(s.props.children,d));return}nt(s.type===Sn,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!s.props.index||!s.props.children,"An index route cannot have child routes.");let h={id:s.props.id||d.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(h.children=Ed(s.props.children,d)),o.push(h)}),o}var ys="get",vs="application/x-www-form-urlencoded";function Ls(a){return typeof HTMLElement<"u"&&a instanceof HTMLElement}function Gw(a){return Ls(a)&&a.tagName.toLowerCase()==="button"}function Iw(a){return Ls(a)&&a.tagName.toLowerCase()==="form"}function Vw(a){return Ls(a)&&a.tagName.toLowerCase()==="input"}function Qw(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function Pw(a,r){return a.button===0&&(!r||r==="_self")&&!Qw(a)}function Ad(a=""){return new URLSearchParams(typeof a=="string"||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce((r,o)=>{let s=a[o];return r.concat(Array.isArray(s)?s.map(u=>[o,u]):[[o,s]])},[]))}function Zw(a,r){let o=Ad(a);return r&&r.forEach((s,u)=>{o.has(u)||r.getAll(u).forEach(d=>{o.append(u,d)})}),o}var fs=null;function $w(){if(fs===null)try{new FormData(document.createElement("form"),0),fs=!1}catch{fs=!0}return fs}var Kw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ud(a){return a!=null&&!Kw.has(a)?(Cn(!1,`"${a}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vs}"`),null):a}function Jw(a,r){let o,s,u,d,h;if(Iw(a)){let b=a.getAttribute("action");s=b?ya(b,r):null,o=a.getAttribute("method")||ys,u=ud(a.getAttribute("enctype"))||vs,d=new FormData(a)}else if(Gw(a)||Vw(a)&&(a.type==="submit"||a.type==="image")){let b=a.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=a.getAttribute("formaction")||b.getAttribute("action");if(s=p?ya(p,r):null,o=a.getAttribute("formmethod")||b.getAttribute("method")||ys,u=ud(a.getAttribute("formenctype"))||ud(b.getAttribute("enctype"))||vs,d=new FormData(b,a),!$w()){let{name:g,type:x,value:w}=a;if(x==="image"){let S=g?`${g}.`:"";d.append(`${S}x`,"0"),d.append(`${S}y`,"0")}else g&&d.append(g,w)}}else{if(Ls(a))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=ys,s=null,u=vs,h=a}return d&&u==="text/plain"&&(h=d,d=void 0),{action:s,method:o.toLowerCase(),encType:u,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Kd(a,r){if(a===!1||a===null||typeof a>"u")throw new Error(r)}function Xb(a,r,o,s){let u=typeof a=="string"?new URL(a,typeof window>"u"?"server://singlefetch/":window.location.origin):a;return o?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${s}`:u.pathname=`${u.pathname}.${s}`:u.pathname==="/"?u.pathname=`_root.${s}`:r&&ya(u.pathname,r)==="/"?u.pathname=`${Es(r)}/_root.${s}`:u.pathname=`${Es(u.pathname)}.${s}`,u}async function Ww(a,r){if(a.id in r)return r[a.id];try{let o=await import(a.module);return r[a.id]=o,o}catch(o){return console.error(`Error loading route module \`${a.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Fw(a){return a==null?!1:a.href==null?a.rel==="preload"&&typeof a.imageSrcSet=="string"&&typeof a.imageSizes=="string":typeof a.rel=="string"&&typeof a.href=="string"}async function eS(a,r,o){let s=await Promise.all(a.map(async u=>{let d=r.routes[u.route.id];if(d){let h=await Ww(d,o);return h.links?h.links():[]}return[]}));return lS(s.flat(1).filter(Fw).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function Cg(a,r,o,s,u,d){let h=(p,g)=>o[g]?p.route.id!==o[g].route.id:!0,b=(p,g)=>o[g].pathname!==p.pathname||o[g].route.path?.endsWith("*")&&o[g].params["*"]!==p.params["*"];return d==="assets"?r.filter((p,g)=>h(p,g)||b(p,g)):d==="data"?r.filter((p,g)=>{let x=s.routes[p.route.id];if(!x||!x.hasLoader)return!1;if(h(p,g)||b(p,g))return!0;if(p.route.shouldRevalidate){let w=p.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(a,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function tS(a,r,{includeHydrateFallback:o}={}){return nS(a.map(s=>{let u=r.routes[s.route.id];if(!u)return[];let d=[u.module];return u.clientActionModule&&(d=d.concat(u.clientActionModule)),u.clientLoaderModule&&(d=d.concat(u.clientLoaderModule)),o&&u.hydrateFallbackModule&&(d=d.concat(u.hydrateFallbackModule)),u.imports&&(d=d.concat(u.imports)),d}).flat(1))}function nS(a){return[...new Set(a)]}function aS(a){let r={},o=Object.keys(a).sort();for(let s of o)r[s]=a[s];return r}function lS(a,r){let o=new Set;return new Set(r),a.reduce((s,u)=>{let d=JSON.stringify(aS(u));return o.has(d)||(o.add(d),s.push({key:d,link:u})),s},[])}function Jd(){let a=y.useContext(Dr);return Kd(a,"You must render this element inside a <DataRouterContext.Provider> element"),a}function rS(){let a=y.useContext(Ms);return Kd(a,"You must render this element inside a <DataRouterStateContext.Provider> element"),a}var Wd=y.createContext(void 0);Wd.displayName="FrameworkContext";function Ds(){let a=y.useContext(Wd);return Kd(a,"You must render this element inside a <HydratedRouter> element"),a}function oS(a,r){let o=y.useContext(Wd),[s,u]=y.useState(!1),[d,h]=y.useState(!1),{onFocus:b,onBlur:p,onMouseEnter:g,onMouseLeave:x,onTouchStart:w}=r,S=y.useRef(null);y.useEffect(()=>{if(a==="render"&&h(!0),a==="viewport"){let N=I=>{I.forEach(P=>{h(P.isIntersecting)})},j=new IntersectionObserver(N,{threshold:.5});return S.current&&j.observe(S.current),()=>{j.disconnect()}}},[a]),y.useEffect(()=>{if(s){let N=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(N)}}},[s]);let C=()=>{u(!0)},U=()=>{u(!1),h(!1)};return o?a!=="intent"?[d,S,{}]:[d,S,{onFocus:_o(b,C),onBlur:_o(p,U),onMouseEnter:_o(g,C),onMouseLeave:_o(x,U),onTouchStart:_o(w,C)}]:[!1,S,{}]}function _o(a,r){return o=>{a&&a(o),o.defaultPrevented||r(o)}}function iS({page:a,...r}){let o=vw(),{nonce:s}=Ds(),{router:u}=Jd(),d=y.useMemo(()=>Cb(u.routes,a,u.basename),[u.routes,a,u.basename]);return d?(r.nonce==null&&s&&(r={...r,nonce:s}),o?y.createElement(cS,{page:a,matches:d,...r}):y.createElement(uS,{page:a,matches:d,...r})):null}function sS(a){let{manifest:r,routeModules:o}=Ds(),[s,u]=y.useState([]);return y.useEffect(()=>{let d=!1;return eS(a,r,o).then(h=>{d||u(h)}),()=>{d=!0}},[a,r,o]),s}function cS({page:a,matches:r,...o}){let s=cn(),{future:u}=Ds(),{basename:d}=Jd(),h=y.useMemo(()=>{if(a===s.pathname+s.search+s.hash)return[];let b=Xb(a,d,u.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let x of r)typeof x.route.shouldRevalidate=="function"?p=!0:g.push(x.route.id);return p&&g.length>0&&b.searchParams.set("_routes",g.join(",")),[b.pathname+b.search]},[d,u.v8_trailingSlashAwareDataRequests,a,s,r]);return y.createElement(y.Fragment,null,h.map(b=>y.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...o})))}function uS({page:a,matches:r,...o}){let s=cn(),{future:u,manifest:d,routeModules:h}=Ds(),{basename:b}=Jd(),{loaderData:p,matches:g}=rS(),x=y.useMemo(()=>Cg(a,r,g,d,s,"data"),[a,r,g,d,s]),w=y.useMemo(()=>Cg(a,r,g,d,s,"assets"),[a,r,g,d,s]),S=y.useMemo(()=>{if(a===s.pathname+s.search+s.hash)return[];let N=new Set,j=!1;if(r.forEach(P=>{let H=d.routes[P.route.id];!H||!H.hasLoader||(!x.some(ee=>ee.route.id===P.route.id)&&P.route.id in p&&h[P.route.id]?.shouldRevalidate||H.hasClientLoader?j=!0:N.add(P.route.id))}),N.size===0)return[];let I=Xb(a,b,u.v8_trailingSlashAwareDataRequests,"data");return j&&N.size>0&&I.searchParams.set("_routes",r.filter(P=>N.has(P.route.id)).map(P=>P.route.id).join(",")),[I.pathname+I.search]},[b,u.v8_trailingSlashAwareDataRequests,p,s,d,x,r,a,h]),C=y.useMemo(()=>tS(w,d),[w,d]),U=sS(w);return y.createElement(y.Fragment,null,S.map(N=>y.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...o})),C.map(N=>y.createElement("link",{key:N,rel:"modulepreload",href:N,...o})),U.map(({key:N,link:j})=>y.createElement("link",{key:N,nonce:o.nonce,...j,crossOrigin:j.crossOrigin??o.crossOrigin})))}function dS(...a){return r=>{a.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var fS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fS&&(window.__reactRouterVersion="7.18.2")}catch{}function mS({basename:a,children:r,useTransitions:o,window:s}){let u=y.useRef();u.current==null&&(u.current=Vx({window:s,v5Compat:!0}));let d=u.current,[h,b]=y.useState({action:d.action,location:d.location}),p=y.useCallback(g=>{o===!1?b(g):y.startTransition(()=>b(g))},[o]);return y.useLayoutEffect(()=>d.listen(p),[d,p]),y.createElement(Yw,{basename:a,children:r,location:h.location,navigationType:h.action,navigator:d,useTransitions:o})}var As=y.forwardRef(function({onClick:r,discover:o="render",prefetch:s="none",relative:u,reloadDocument:d,replace:h,mask:b,state:p,target:g,to:x,preventScrollReset:w,viewTransition:S,defaultShouldRevalidate:C,...U},N){let{basename:j,navigator:I,useTransitions:P}=y.useContext(sn),H=typeof x=="string"&&Vd.test(x),ee=zb(x,j);x=ee.to;let F=Tw(x,{relative:u}),se=cn(),Z=null;if(b){let me=Os(b,[],se.mask?se.mask.pathname:"/",!0);j!=="/"&&(me.pathname=me.pathname==="/"?j:Ln([j,me.pathname])),Z=I.createHref(me)}let[Y,ce,ge]=oS(s,U),te=bS(x,{replace:h,mask:b,state:p,target:g,preventScrollReset:w,relative:u,viewTransition:S,defaultShouldRevalidate:C,useTransitions:P});function oe(me){r&&r(me),me.defaultPrevented||te(me)}let Ue=!(ee.isExternal||d),ne=y.createElement("a",{...U,...ge,href:(Ue?Z:void 0)||ee.absoluteURL||F,onClick:Ue?oe:r,ref:dS(N,ce),target:g,"data-discover":!H&&o==="render"?"true":void 0});return Y&&!H?y.createElement(y.Fragment,null,ne,y.createElement(iS,{page:F})):ne});As.displayName="Link";var hS=y.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:s="",end:u=!1,style:d,to:h,viewTransition:b,children:p,...g},x){let w=Po(h,{relative:g.relative}),S=cn(),C=y.useContext(Ms),{navigator:U,basename:N}=y.useContext(sn),j=C!=null&&SS(w)&&b===!0,I=U.encodeLocation?U.encodeLocation(w).pathname:w.pathname,P=S.pathname,H=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;o||(P=P.toLowerCase(),H=H?H.toLowerCase():null,I=I.toLowerCase()),H&&N&&(H=ya(H,N)||H);const ee=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let F=P===I||!u&&P.startsWith(I)&&P.charAt(ee)==="/",se=H!=null&&(H===I||!u&&H.startsWith(I)&&H.charAt(I.length)==="/"),Z={isActive:F,isPending:se,isTransitioning:j},Y=F?r:void 0,ce;typeof s=="function"?ce=s(Z):ce=[s,F?"active":null,se?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ge=typeof d=="function"?d(Z):d;return y.createElement(As,{...g,"aria-current":Y,className:ce,ref:x,style:ge,to:h,viewTransition:b},typeof p=="function"?p(Z):p)});hS.displayName="NavLink";var pS=y.forwardRef(({discover:a="render",fetcherKey:r,navigate:o,reloadDocument:s,replace:u,state:d,method:h=ys,action:b,onSubmit:p,relative:g,preventScrollReset:x,viewTransition:w,defaultShouldRevalidate:S,...C},U)=>{let{useTransitions:N}=y.useContext(sn),j=xS(),I=wS(b,{relative:g}),P=h.toLowerCase()==="get"?"get":"post",H=typeof b=="string"&&Vd.test(b),ee=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let se=F.nativeEvent.submitter,Z=se?.getAttribute("formmethod")||h,Y=()=>j(se||F.currentTarget,{fetcherKey:r,method:Z,navigate:o,replace:u,state:d,relative:g,preventScrollReset:x,viewTransition:w,defaultShouldRevalidate:S});N&&o!==!1?y.startTransition(()=>Y()):Y()};return y.createElement("form",{ref:U,method:P,action:I,onSubmit:s?p:ee,...C,"data-discover":!H&&a==="render"?"true":void 0})});pS.displayName="Form";function gS(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gb(a){let r=y.useContext(Dr);return nt(r,gS(a)),r}function bS(a,{target:r,replace:o,mask:s,state:u,preventScrollReset:d,relative:h,viewTransition:b,defaultShouldRevalidate:p,useTransitions:g}={}){let x=Zn(),w=cn(),S=Po(a,{relative:h});return y.useCallback(C=>{if(Pw(C,r)){C.preventDefault();let U=o!==void 0?o:qo(w)===qo(S),N=()=>x(a,{replace:U,mask:s,state:u,preventScrollReset:d,relative:h,viewTransition:b,defaultShouldRevalidate:p});g?y.startTransition(()=>N()):N()}},[w,x,S,o,s,u,r,a,d,h,b,p,g])}function Ib(a){Cn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let r=y.useRef(Ad(a)),o=y.useRef(!1),s=cn(),u=y.useMemo(()=>Zw(s.search,o.current?null:r.current),[s.search]),d=Zn(),h=y.useCallback((b,p)=>{const g=Ad(typeof b=="function"?b(new URLSearchParams(u)):b);o.current=!0,d("?"+g,p)},[d,u]);return[u,h]}var yS=0,vS=()=>`__${String(++yS)}__`;function xS(){let{router:a}=Gb("useSubmit"),{basename:r}=y.useContext(sn),o=kw(),s=a.fetch,u=a.navigate;return y.useCallback(async(d,h={})=>{let{action:b,method:p,encType:g,formData:x,body:w}=Jw(d,r);if(h.navigate===!1){let S=h.fetcherKey||vS();await s(S,o,h.action||b,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:w,formMethod:h.method||p,formEncType:h.encType||g,flushSync:h.flushSync})}else await u(h.action||b,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:w,formMethod:h.method||p,formEncType:h.encType||g,replace:h.replace,state:h.state,fromRouteId:o,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,u,r,o])}function wS(a,{relative:r}={}){let{basename:o}=y.useContext(sn),s=y.useContext(Pn);nt(s,"useFormAction must be used inside a RouteContext");let[u]=s.matches.slice(-1),d={...Po(a||".",{relative:r})},h=cn();if(a==null){d.search=h.search;let b=new URLSearchParams(d.search),p=b.getAll("index");if(p.some(x=>x==="")){b.delete("index"),p.filter(w=>w).forEach(w=>b.append("index",w));let x=b.toString();d.search=x?`?${x}`:""}}return(!a||a===".")&&u.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(d.pathname=d.pathname==="/"?o:Ln([o,d.pathname])),qo(d)}function SS(a,{relative:r}={}){let o=y.useContext(Lb);nt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=Gb("useViewTransitionState"),u=Po(a,{relative:r});if(!o.isTransitioning)return!1;let d=ya(o.currentLocation.pathname,s)||o.currentLocation.pathname,h=ya(o.nextLocation.pathname,s)||o.nextLocation.pathname;return Ss(u.pathname,h)!=null||Ss(u.pathname,d)!=null}var ES=Eb();const Fd="css-account",Tg="xpod.cssAccountToken",Cd="xpod.cssAccountAuthority",AS="CSS-Account-Token";function ks(){return typeof window<"u"&&typeof document<"u"}function Vb(){if(!ks())return;const a=document.cookie.split(";");for(const r of a){const[o,...s]=r.trim().split("=");if(o===Fd){const u=s.join("=");try{return u?decodeURIComponent(u):void 0}catch{return}}}}function CS(a){ks()&&(document.cookie=`${Fd}=${encodeURIComponent(a)}; Path=/; SameSite=Lax`)}function TS(){ks()&&(document.cookie=`${Fd}=; Path=/; SameSite=Lax; Max-Age=0`)}function RS(){if(!(typeof window>"u")){try{window.localStorage.removeItem(Tg)}catch{}try{window.sessionStorage.removeItem(Tg)}catch{}}}function jS(a){if(!ks())return!1;const r=Qb(a),o=window.localStorage.getItem(Cd),s=o!==null?o!==r:new URL(r).origin!==window.location.origin;return window.localStorage.setItem(Cd,r),s&&Cs(),s}function Qb(a){const r=new URL(a,window.location.origin);if(!["http:","https:"].includes(r.protocol)||r.username||r.password||r.pathname!=="/.account/"||r.search||r.hash)throw new Error("Invalid Account authority");return r.href}function dd(a){!a||Vb()===a||CS(a)}function Cs(){RS(),TS()}function jl(){return Vb()}function Tn(a,r={Accept:"application/json"}){const o={...r};return a&&!NS(o,"Authorization")&&(o.Authorization=`${AS} ${a}`),o}function tt(a={Accept:"application/json"},r){if(r)try{if(window.localStorage.getItem(Cd)!==Qb(r))return{...a}}catch{return{...a}}return Tn(jl(),a)}function NS(a,r){const o=r.toLowerCase();return Object.keys(a).some(s=>s.toLowerCase()===o)}const Pb=new Set(["http:","https:"]),US=new Set(["state","redirect_uri","client_id","response_type","code_challenge","code_challenge_method"]);function Rg(a,r){if(!a||typeof a.url!="string"||a.url.trim()==="")throw new TypeError(`${r}.url must be a non-empty absolute URL`);if(typeof a.label!="string")throw new TypeError(`${r}.label must be a string`);let o;try{o=new URL(a.url.trim())}catch{throw new TypeError(`${r}.url must be a valid absolute URL`)}if(!Pb.has(o.protocol))throw new TypeError(`${r}.url must use http or https`);if(o.username||o.password)throw new TypeError(`${r}.url must not contain credentials`);if(o.hash)throw new TypeError(`${r}.url must not contain a fragment`);return{url:o.href,label:a.label}}function _S(a){if(typeof a!="string"||a===""||/[\s\u0000-\u001f\u007f-\u009f]/u.test(a))throw new TypeError("webId must be a non-empty identifier without whitespace or control characters");return a}function zS(a){if(!a||typeof a.storageUrl!="string"||a.storageUrl.trim()==="")throw new TypeError("selectedStorage.storageUrl must be a non-empty absolute URL");_S(a.webId);let r;try{r=new URL(a.storageUrl.trim())}catch{throw new TypeError("selectedStorage.storageUrl must be a valid absolute URL")}if(!Pb.has(r.protocol))throw new TypeError("selectedStorage.storageUrl must use http or https");if(r.username||r.password)throw new TypeError("selectedStorage.storageUrl must not contain credentials");if(r.hash)throw new TypeError("selectedStorage.storageUrl must not contain a fragment");return{storageUrl:r.href,webId:a.webId,...a.label===void 0?{}:{label:a.label}}}function Do(a,r,o){if(!r.includes(a))throw new TypeError(`${o} has an unsupported value`);return a}function Zb(a){if(!a||typeof a.id!="string"||a.id.trim()==="")throw new TypeError("route.id must be a non-empty opaque identifier");if(typeof a.label!="string")throw new TypeError("route.label must be a string");return{id:a.id.trim(),label:a.label,...a.description===void 0?{}:{description:a.description},...a.badge===void 0?{}:{badge:{label:a.badge.label,tone:Do(a.badge.tone,["neutral","primary","success","warning","danger"],"route.badge.tone")}},identityProvider:Rg(a.identityProvider,"route.identityProvider"),...a.storageProvider===void 0?{}:{storageProvider:Rg(a.storageProvider,"route.storageProvider")},availability:Do(a.availability,["ready","starting","unavailable"],"route.availability"),...a.unavailableReason===void 0?{}:{unavailableReason:a.unavailableReason}}}function OS(a){let r=a;for(let o=0;o<4;o+=1){let s;try{s=decodeURIComponent(r)}catch{throw new TypeError("returnTo contains malformed percent encoding")}if(s===r)return r;r=s}return r}function MS(a,r){return r.some(o=>{if(o==="/")return a.startsWith("/");const s=o.endsWith("/")?o.slice(0,-1):o;return a===s||a.startsWith(`${s}/`)})}function LS(a,r){if(a===void 0)return;if(typeof a!="string"||a.trim()==="")throw new TypeError("returnTo must be a non-empty application path");const o=a.trim(),s=OS(o),u=s.split(/[?#]/,1)[0];if(!o.startsWith("/")||o.startsWith("//")||o.includes("\\")||s.includes("\\")||/^[a-z][a-z\d+.-]*:/i.test(s)||s.startsWith("//")||u.split("/").some(d=>d==="..")||!MS(u,r))throw new TypeError("returnTo must be a safe path within the application allow-list");return o}function DS(a){if(!a||typeof a.id!="string"||a.id.trim()==="")throw new TypeError("transaction.id must be a non-empty opaque identifier");const r=a.authorizationParameters===void 0?void 0:{...a.authorizationParameters};if(r){for(const s of Object.keys(r))if(US.has(s.toLowerCase()))throw new TypeError(`authorizationParameters cannot override ${s}`)}const o=a.prompt===void 0?void 0:Do(a.prompt,["login","consent","select_account"],"transaction.prompt");return{id:a.id,route:Zb(a.route),...a.selectedStorage===void 0?{}:{selectedStorage:zS(a.selectedStorage)},authorizationSurface:Do(a.authorizationSurface,["redirect","popup","embedded","external"],"transaction.authorizationSurface"),...o===void 0?{}:{prompt:o},discovery:Do(a.discovery,["standard","strict"],"transaction.discovery"),...r===void 0?{}:{authorizationParameters:r},...a.returnTo===void 0?{}:{returnTo:LS(a.returnTo,["/"])}}}async function kS(a){let r;try{r=await a.fetch.call(globalThis,a.statusUrl??"/provision/status",{credentials:"include",headers:{accept:"application/json"}})}catch{return}if(!r?.ok)return;const o=await r.json().catch(()=>{});if(typeof o?.publicUrl=="string")try{return $b({canonicalBaseUrl:o.publicUrl,localBaseUrl:a.localBaseUrl})}catch{return}}function jg(a,r){let o;try{o=a instanceof URL?new URL(a.href):new URL(a)}catch{return}const s=r.map($b).filter(u=>BS(o,u.canonicalBaseUrl)).sort((u,d)=>d.canonicalBaseUrl.length-u.canonicalBaseUrl.length)[0];return s?HS(o,s):void 0}function $b(a){return{canonicalBaseUrl:Ng(a.canonicalBaseUrl),localBaseUrl:Ng(a.localBaseUrl)}}function Ng(a){const r=new URL(a);if(r.protocol!=="http:"&&r.protocol!=="https:")throw new TypeError("Solid local routes must use http or https");return r.search="",r.hash="",r.href.endsWith("/")?r.href:`${r.href}/`}function BS(a,r){const o=new URL(r);return a.origin===o.origin&&a.pathname.startsWith(o.pathname)}function HS(a,r){const o=new URL(r.canonicalBaseUrl),s=new URL(r.localBaseUrl),u=a.pathname.slice(o.pathname.length),d=new URL(u,s);return d.search=a.search,d.hash=a.hash,d}let fd,Ug;function ef(a){if(typeof window>"u"||typeof a!="string"||!a.trim())return;const r=a.trim();try{const o=new URL(r,window.location.origin);return o.origin!==window.location.origin||!["http:","https:"].includes(o.protocol)||o.username||o.password?void 0:V(o)}catch{return}}async function Ut(a,r=fetch,o){if(typeof window>"u"||typeof a!="string"||!a.trim())return;if(o)try{const g=new URL(o,window.location.origin),x=new URL(a.trim(),g);if(x.origin===g.origin&&g.pathname.startsWith("/.account/")&&x.pathname.startsWith("/.account/")&&["http:","https:"].includes(x.protocol)&&!x.username&&!x.password)return V(x)}catch{}const s=ef(a);if(s)return s;let u;try{u=new URL(a)}catch{return}if(!["http:","https:"].includes(u.protocol)||u.username||u.password||!u.pathname.startsWith("/.account/"))return;if(fd&&Ug===window.location.origin){const g=jg(u,[fd]);if(g)return V(g)}const d={localBaseUrl:`${window.location.origin}/`,statusUrl:new URL("/provision/status",window.location.origin).href},h=await Promise.resolve(r.call(globalThis,d.statusUrl,{credentials:"include",headers:{accept:"application/json"}})).catch(()=>{}),b=h?await kS({...d,fetch:async()=>h.clone()}):void 0;b&&(fd=b,Ug=window.location.origin);const p=b?jg(u,[b]):void 0;return p?V(p):void 0}const Kb=y.createContext(null);function kn(){const a=y.useContext(Kb);if(!a)throw new Error("useAuth must be used within AuthProvider");return a}function qS(a){const r=Jb(a);if(!r)return;const o=typeof r.serviceAccessToken=="string"?r.serviceAccessToken:typeof r.serviceToken=="string"?r.serviceToken:void 0;if(!(typeof r.spUrl!="string"||!o)&&!(typeof r.exp=="number"&&r.exp<Math.floor(Date.now()/1e3))&&!(typeof r.serviceAccessTokenExp=="number"&&r.serviceAccessTokenExp<Math.floor(Date.now()/1e3)))return{spUrl:Qn(r.spUrl),serviceToken:o,serviceAccessToken:typeof r.serviceAccessToken=="string"?r.serviceAccessToken:void 0,serviceAccessTokenExp:typeof r.serviceAccessTokenExp=="number"?r.serviceAccessTokenExp:void 0,spDomain:typeof r.spDomain=="string"?r.spDomain:void 0,exp:typeof r.exp=="number"?r.exp:void 0}}function Jb(a){if(!a)return;const r=a.split(".")[0];if(r)try{const o=r.replace(/-/g,"+").replace(/_/g,"/"),s=o.padEnd(Math.ceil(o.length/4)*4,"=");if(typeof globalThis.atob!="function")return;const u=Uint8Array.from(globalThis.atob(s),d=>d.charCodeAt(0));return JSON.parse(new TextDecoder().decode(u))}catch{return}}function Zo(a){const r=qS(a);if(!r)return;const o=r.spDomain?Qn(`https://${r.spDomain}`):Qn(r.spUrl);return{lookupUrl:o,storageRoot:o,serviceToken:r.serviceToken}}function Rr(a){const r=Jb(a);if(typeof r?.spUrl=="string")return{storageRoot:r.spDomain?Qn(`https://${r.spDomain}`):Qn(r.spUrl)}}async function tf(a,r,o){const s=Zo(o);if(!s||!o)return o?{provisionCode:o}:void 0;const u=await a(new URL("/provision/pods",Fb(s)).toString(),{method:"POST",headers:{Authorization:`Bearer ${s.serviceToken}`,"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({podName:r})});if(!u.ok)throw new Error(await GS(u)??"Failed to prepare Local Pod");const d=await u.json().catch(()=>{}),h=typeof d?.provisionReceipt=="string"?d.provisionReceipt:void 0;if(!h)throw new Error("Local Pod preparation did not return a provision receipt");return{provisionCode:o,provisionReceipt:h}}async function nf(a,r,o){const s=Zo(o);return s?(await Wb(a,r,s)).map(d=>({webId:d.webId,podUrl:typeof d.podUrl=="string"?Qn(d.podUrl):void 0,storageUrl:Qn(d.storageUrl)})):void 0}async function Wb(a,r,o){const s=Array.from(new Set(r.filter(p=>typeof p=="string"&&p.length>0)));if(s.length===0)return[];const u=Fb(o),d=await a(new URL("/provision/webids",u).toString(),{method:"POST",headers:{Authorization:`Bearer ${o.serviceToken}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({webIds:s})});if(!d.ok)throw new Error(`Local storage bindings request failed (${d.status})`);const h=await d.json().catch(()=>{});if(!Array.isArray(h?.entries)||h.entries.some(p=>!p||typeof p.webId!="string"||!p.webId||typeof p.storageUrl!="string"||!p.storageUrl))throw new Error("Local storage bindings response is malformed");const b=new Set(s);return h.entries.filter(p=>p&&typeof p.webId=="string"&&b.has(p.webId)).filter(p=>typeof p.storageUrl=="string"&&p.storageUrl.length>0).filter(p=>$a(p.storageUrl,o.storageRoot))}function Fb(a){return(QS()?YS():void 0)??a.lookupUrl}function YS(){if(!(typeof window>"u"))try{const a=new URL(window.location.href);return XS(a.hostname)?Qn(a.origin):void 0}catch{return}}function XS(a){return a==="localhost"||a==="::1"||a==="[::1]"||/^127(?:\.\d{1,3}){3}$/u.test(a)}async function GS(a){const r=await a.text?.().catch(()=>{});if(r)try{const o=JSON.parse(r);return typeof o.message=="string"?o.message:typeof o.error=="string"?o.error:r}catch{return r}}function $a(a,r){const o=VS(a),s=IS(r);return!!(o&&s&&o.startsWith(s))}function IS(a){if(a)try{return Qn(new URL(a).toString())}catch{return}}function VS(a){try{return Qn(new URL(a).toString())}catch{return}}function Qn(a){return a.replace(/\/+$/u,"")+"/"}const ey="Cloud storage is not ready. Please wait for Xpod to reconnect and try again.",Bs=new WeakMap;function QS(){return typeof window<"u"&&Bs.has(window)}function md(){typeof window<"u"&&Bs.delete(window)}function PS(a){typeof window<"u"&&Bs.set(window,a)}function ty(){try{const a=sessionStorage.getItem("provisionCode")?.trim();return a||void 0}catch{return}}function ZS(a){const r=a.split(".")[0];if(!r)return!0;try{const o=r.replace(/-/g,"+").replace(/_/g,"/"),s=o.padEnd(Math.ceil(o.length/4)*4,"=");if(typeof globalThis.atob!="function")return!0;const u=JSON.parse(globalThis.atob(s));return typeof u.exp=="number"?u.exp>Math.floor(Date.now()/1e3):!0}catch{return!0}}function Nl(a){const r=a?.trim();if(r)return ZS(r)?r:void 0}function Hs(){return Nl(ty())}function $S(a=typeof window<"u"?window.location.search:"",r=typeof window<"u"?window.__XPOD__:void 0){const o=typeof r?.provisionCode=="string"?r.provisionCode.trim():void 0;if(r?.authenticating===!0){if(o)return zr(o),Nl(o);af();return}try{const s=new URLSearchParams(a).get("provisionCode")?.trim();if(s)return zr(s),Nl(s)}catch{}return o?(zr(o),Nl(o)):Hs()}function zr(a){try{sessionStorage.setItem("provisionCode",a)}catch{}}function af(){try{sessionStorage.removeItem("provisionCode")}catch{}}function lf(a,r=Hs(),o){const s={name:a.trim()};return r&&(s.settings={provisionCode:r,...o?{provisionReceipt:o}:{}}),s}async function qs(a){const r=await ny(a);if(r.activeProvisionCode)return r.activeProvisionCode;if(r.hasProvisionOperation)throw new Error(ey)}async function Ys(a){const{hasProvisionOperation:r,...o}=await ny(a);return o}async function ny(a){const r=typeof window<"u"?window.__XPOD__:void 0;if(r?.authenticating===!0){const h=typeof r.provisionCode=="string"?r.provisionCode.trim():void 0,b=Nl(h);return b?(zr(b),{activeProvisionCode:b,hasProvisionOperation:!0,storageRoot:Rr(b)?.storageRoot}):(af(),h?{hasProvisionOperation:!0,storageRoot:Rr(h)?.storageRoot}:{hasProvisionOperation:!1})}const o=a?.trim()||(typeof r?.provisionCode=="string"?r.provisionCode.trim():void 0),s=typeof window<"u"?Bs.get(window):void 0;if(!o&&s){const h=await s(),b=Nl(h);return b?(zr(b),{activeProvisionCode:b,hasProvisionOperation:!0,storageRoot:Rr(b)?.storageRoot}):{hasProvisionOperation:!0,storageRoot:Rr(h)?.storageRoot}}const u=o||ty(),d=Nl(u);return d?{activeProvisionCode:d,hasProvisionOperation:!0,storageRoot:Rr(d)?.storageRoot}:u?{hasProvisionOperation:!0,storageRoot:Rr(u)?.storageRoot}:{hasProvisionOperation:!1}}async function rf(a){return qs(a)}const zo="/.account/";function KS(a){return!!a&&typeof a=="object"&&!Array.isArray(a)}async function _g(a=fetch){if(typeof window>"u")return zo;if(!WS(window.location.hostname)){const s=window.__XPOD__?.idpIndex;if(s!==void 0){try{const u=new URL(s,window.location.origin);if(typeof s=="string"&&s.trim()&&["http:","https:"].includes(u.protocol)&&u.pathname===zo&&!u.username&&!u.password&&!u.search&&!u.hash)return md(),u.href}catch{}throw new Error("Server bootstrap did not expose a valid Account index")}}const r=await a(new URL("/provision/status",window.location.origin),{credentials:"include",headers:{accept:"application/json"}});if(r.status===404)return md(),new URL(zo,window.location.origin).href;if(!r.ok)throw new Error(`Local provisioning status request failed (${r.status})`);let o;try{o=await r.json()}catch{throw new Error("Local provisioning status response was not valid JSON")}if(!KS(o)||typeof o.managed!="boolean")throw new Error("Local provisioning status response was not valid");if(o.managed===!1)return md(),new URL(zo,window.location.origin).href;if(typeof o.oidcIssuer=="string")try{const s=new URL(o.oidcIssuer);if(["http:","https:"].includes(s.protocol)&&!s.username&&!s.password)return JS(a),typeof o.provisionCode=="string"&&zr(o.provisionCode),new URL(zo,s).href}catch{}throw new Error("Local provisioning status did not expose a valid OIDC issuer")}function JS(a){const r=new URL("/provision/status",window.location.origin);PS(async()=>{const o=await a(r,{credentials:"include",headers:{accept:"application/json"}}),s=o.ok?await o.json().catch(()=>{}):void 0;if(s?.managed!==!0||s?.registered!==!0||typeof s?.provisionCode!="string")throw new Error(ey);return s.provisionCode})}function WS(a){return a==="localhost"||a==="::1"||a==="[::1]"||/^127(?:\.\d{1,3}){3}$/u.test(a)}const FS="/.account/",Tl="Xpod 登录服务暂时不可用,请稍后重试。",hd=[250,750,1500],e1=300,t1=3e3;function n1(){if(typeof window>"u")return!1;const a=window.location.pathname;return a==="/.account"||a.startsWith("/.account/")}function a1(a){const r=a?.account;if(!r)return;const o={...typeof r.id=="string"?{id:r.id}:{},...typeof r.username=="string"?{username:r.username}:{},...typeof r.displayName=="string"?{displayName:r.displayName}:{}};return Object.keys(o).length>0?o:void 0}function zg(a){return a?.account?.logout?{status:"authenticated"}:{status:"anonymous",mode:"login"}}function l1(a){return a===502||a===503||a===504}function Og(a){return a?{status:"error",mode:"login",message:Tl}:{status:"initializing"}}function Mg(a){return new Promise(r=>setTimeout(r,a))}function r1({children:a}){const[r,o]=y.useState(),[s,u]=y.useState(null),[d,h]=y.useState(!0),[b,p]=y.useState(null),[g,x]=y.useState(!1),[w,S]=y.useState({status:"initializing"}),C=y.useRef(0),U=y.useRef(!0),N=y.useRef(0),j=y.useRef(void 0),I=y.useRef(null),P=y.useRef(void 0),H=y.useRef(0),ee=y.useRef(0),F=y.useRef(!1),se=y.useCallback(()=>{const _=I.current?.account;return _?.logout?JSON.stringify([j.current,_.id,_.logout,_.clientCredentials]):void 0},[]),Z=y.useCallback(()=>{H.current+=1,F.current=!0},[]),Y=y.useCallback((_,G)=>{const $=se(),K=P.current;I.current=_,P.current=G,($!==se()||K!==G)&&Z(),F.current=!se()},[se,Z]),ce=y.useCallback(()=>{const _=se(),G=H.current,$=jl();let K=!!_&&$===P.current&&!F.current&&ee.current===0;return()=>{if(!K||!U.current||F.current||ee.current>0||G!==H.current||_!==se()||$!==jl())throw K=!1,new Error("Account 登录状态已改变,请重新打开客户端凭据操作。")}},[se]),ge=w.status==="authenticated",te=d||w.status==="submitting",oe=y.useRef(!1),Ue=y.useCallback(_=>{(jS(_)||j.current&&j.current!==_)&&(N.current+=1,C.current+=1,oe.current=!1,Y(null),u(null),x(!1),S({status:"initializing"})),j.current=_,o(_)},[Y]),ne=y.useCallback(async()=>{h(!0),p(null),S(_=>_.status==="authenticated"?_:{status:"initializing"});try{const _=await _g();return U.current?(Ue(_),_):void 0}catch{if(!U.current)return;Y(null),u(null),x(!1),p(Tl),S({status:"error",mode:"login",message:Tl}),h(!1);return}},[Ue,Y]);y.useEffect(()=>{let _=!0;return _g().then(G=>{_&&U.current&&Ue(G)}).catch(()=>{!_||!U.current||(Y(null),u(null),x(!1),p(Tl),S({status:"error",mode:"login",message:Tl}),h(!1))}),()=>{_=!1}},[Ue,Y]),y.useEffect(()=>(U.current=!0,()=>{U.current=!1,Z(),N.current+=1}),[Z]);const me=y.useCallback(_=>U.current&&_===N.current,[]),L=y.useCallback(async()=>{const _=new AbortController,G=setTimeout(()=>_.abort(),t1);try{const $=j.current;if(!$)return!1;const K=await fetch(V(new URL("oidc/consent/",$)),{headers:tt(void 0,$),credentials:"include",signal:_.signal});return K.ok?!!(await K.json()).client:!1}catch{return!1}finally{clearTimeout(G)}},[]),Q=y.useCallback(async({exposeTransientError:_,generation:G,confirmUnauthenticated:$})=>{const K=j.current;if(!K)return"stale";const ue=jl(),Ce=()=>ue===jl()?!0:(Z(),!1);try{const fe=await fetch(V(K),{headers:tt(void 0,K),credentials:"include"});if(!me(G))return"stale";if(!Ce())return"transient-error";if(fe.ok){const Ve=await fe.json();if(!me(G))return"stale";if(!Ce())return"transient-error";if(!Ve?.controls||typeof Ve.controls!="object"||Array.isArray(Ve.controls))throw new Error("Invalid CSS Account controls response");const ke=Ve.controls,wt=++C.current;x(!1),Y(ke,ue),u(ke),p(null);const St=zg(ke);return oe.current=St.status==="anonymous",S(St),ke.account?.logout&&n1()&&L().then(at=>{me(G)&&wt===C.current&&x(at)}),"ok"}else{if(fe.status===401||fe.status===403)return $?(C.current+=1,Cs(),oe.current=!0,x(!1),Y({}),u({}),S({status:"anonymous",mode:"login"}),p(null),"ok"):"unauthenticated";if(C.current+=1,x(!1),l1(fe.status))return p(null),S(ke=>ke.status==="authenticated"?ke:Og(_)),"transient-error";Z();const Ve=`Failed to load account controls (Status: ${fe.status})`;return p(Ve),S({status:"error",mode:"login",message:Ve}),"terminal-error"}}catch{return me(G)?(C.current+=1,x(!1),p(null),S(fe=>fe.status==="authenticated"?fe:Og(_)),"transient-error"):"stale"}},[Y,L,me,Z]),W=y.useCallback(async()=>{const _=++N.current;for(let G=0;G<=hd.length;G+=1){const $=G===hd.length,K=await Q({exposeTransientError:$,generation:_});if(K==="unauthenticated")return!me(_)||(await Mg(e1),!me(_))?"stale":Q({exposeTransientError:!0,generation:_,confirmUnauthenticated:!0});if(K!=="transient-error")return K;if(!me(_)||!$&&(S(ue=>ue.status==="authenticated"?ue:{status:"initializing"}),await Mg(hd[G]),!me(_)))return"stale"}return"transient-error"},[Q,me]);y.useEffect(()=>{if(!r)return;let _=!0;return(async()=>(await W(),_&&U.current&&h(!1)))(),()=>{_=!1}},[W,r]);const xe=y.useCallback(async()=>{const _=await ne();if(_&&_===r){const G=await W();if(U.current&&h(!1),G==="ok")return zg(I.current)}return{status:"error",mode:"login",message:Tl}},[W,r,ne]),J=y.useCallback(async()=>{await xe()},[xe]),A=y.useCallback(async()=>{ee.current+=1;try{Z(),N.current+=1,C.current+=1,I.current?.account?.logout||(oe.current=!1,(j.current??await ne())&&await W());const _=j.current,G=I.current?.account?.logout,$=await Ut(G,fetch,_);let K=!$&&(!!G||!oe.current);if($)try{const ue=await fetch(V($),{method:"POST",headers:tt(void 0,_),credentials:"include"});K=!ue.ok&&ue.status!==401&&ue.status!==403}catch{K=!0}if(K){S({status:"error",mode:"login",message:Tl});return}N.current+=1,C.current+=1,oe.current=!0,h(!1),Cs(),x(!1),Y({}),u({}),p(null),S({status:"anonymous",mode:"login"})}finally{ee.current-=1}},[Y,W,ne,Z]),k=y.useMemo(()=>a1(s),[s]);return f.jsx(Kb.Provider,{value:{controls:s,isInitializing:d,initError:b,idpIndex:r??FS,isLoggedIn:ge,isAnonymous:()=>oe.current,bindAccountCapability:ce,authenticating:te,hasOidcPending:g,refetchControls:xe,retry:J,logout:A,accountState:w,identity:k},children:a})}const ay=(...a)=>a.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim();const o1=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const i1=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,s)=>s?s.toUpperCase():o.toLowerCase());const Lg=a=>{const r=i1(a);return r.charAt(0).toUpperCase()+r.slice(1)};var s1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c1=a=>{for(const r in a)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const u1=y.forwardRef(({color:a="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:u="",children:d,iconNode:h,...b},p)=>y.createElement("svg",{ref:p,...s1,width:r,height:r,stroke:a,strokeWidth:s?Number(o)*24/Number(r):o,className:ay("lucide",u),...!d&&!c1(b)&&{"aria-hidden":"true"},...b},[...h.map(([g,x])=>y.createElement(g,x)),...Array.isArray(d)?d:[d]]));const ct=(a,r)=>{const o=y.forwardRef(({className:s,...u},d)=>y.createElement(u1,{ref:d,iconNode:r,className:ay(`lucide-${o1(Lg(a))}`,`lucide-${a}`,s),...u}));return o.displayName=Lg(a),o};const d1=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],f1=ct("arrow-left",d1);const m1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],h1=ct("arrow-right",m1);const p1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Dg=ct("check",p1);const g1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],b1=ct("chevron-down",g1);const y1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Xs=ct("circle-alert",y1);const v1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],x1=ct("circle-check-big",v1);const w1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ly=ct("clock",w1);const S1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],kg=ct("copy",S1);const E1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],A1=ct("database",E1);const C1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Bg=ct("external-link",C1);const T1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],R1=ct("globe",T1);const j1=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],N1=ct("hard-drive",j1);const U1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_1=ct("info",U1);const z1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],pd=ct("key",z1);const O1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ry=ct("layers",O1);const M1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_l=ct("loader-circle",M1);const L1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],D1=ct("log-out",L1);const k1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Hg=ct("plus",k1);const B1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Ts=ct("shield",B1);const H1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qg=ct("trash-2",H1);const q1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Y1=ct("user",q1);const X1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],G1=ct("x",X1);var I1=Object.defineProperty,En=(a,r)=>I1(a,"name",{value:r,configurable:!0});function V1(a,r){const o=y.createContext(r);o.displayName=a+"Context";const s=En(d=>{const{children:h,...b}=d,p=y.useMemo(()=>b,Object.values(b));return f.jsx(o.Provider,{value:p,children:h})},"Provider");s.displayName=a+"Provider";function u(d,h={}){const{optional:b=!1}=h,p=y.useContext(o);if(p)return p;if(r!==void 0)return r;if(!b)throw new Error(`\`${d}\` must be used within \`${a}\``)}return En(u,"useContext"),[s,u]}En(V1,"createContext");function oy(a,r=[]){let o=[];function s(d,h){const b=y.createContext(h);b.displayName=d+"Context";const p=o.length;o=[...o,h];const g=En(w=>{const{scope:S,children:C,...U}=w,N=S?.[a]?.[p]||b,j=y.useMemo(()=>U,Object.values(U));return f.jsx(N.Provider,{value:j,children:C})},"Provider");g.displayName=d+"Provider";function x(w,S,C={}){const{optional:U=!1}=C,N=S?.[a]?.[p]||b,j=y.useContext(N);if(j)return j;if(h!==void 0)return h;if(!U)throw new Error(`\`${w}\` must be used within \`${d}\``)}return En(x,"useContext"),[g,x]}En(s,"createContext");const u=En(()=>{const d=o.map(h=>y.createContext(h));return En(function(b){const p=b?.[a]||d;return y.useMemo(()=>({[`__scope${a}`]:{...b,[a]:p}}),[b,p])},"useScope")},"createScope");return u.scopeName=a,[s,iy(u,...r)]}En(oy,"createContextScope");function iy(...a){const r=a[0];if(a.length===1)return r;const o=En(()=>{const s=a.map(u=>({useScope:u(),scopeName:u.scopeName}));return En(function(d){const h=s.reduce((b,{useScope:p,scopeName:g})=>{const w=p(d)[`__scope${g}`];return{...b,...w}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:h}),[h])},"useComposedScopes")},"createScope");return o.scopeName=r.scopeName,o}En(iy,"composeContextScopes");var Q1=Object.defineProperty,P1=(a,r)=>Q1(a,"name",{value:r,configurable:!0});function Pa(a){const r=y.useRef(a);return y.useEffect(()=>{r.current=a}),y.useMemo(()=>((...o)=>r.current?.(...o)),[])}P1(Pa,"useCallbackRef");var Td=globalThis?.document?y.useLayoutEffect:()=>{},Z1=Object.defineProperty,of=(a,r)=>Z1(a,"name",{value:r,configurable:!0});function Rd(a,r){if(typeof a=="function")return a(r);a!=null&&(a.current=r)}of(Rd,"setRef");function sy(...a){return r=>{let o=!1;const s=a.map(u=>{const d=Rd(u,r);return!o&&typeof d=="function"&&(o=!0),d});if(o)return()=>{for(let u=0;u<s.length;u++){const d=s[u];typeof d=="function"?d():Rd(a[u],null)}}}}of(sy,"composeRefs");function Wa(...a){return y.useCallback(sy(...a),a)}of(Wa,"useComposedRefs");var $1=Object.defineProperty,Bn=(a,r)=>$1(a,"name",{value:r,configurable:!0});function sf(a){const r=y.forwardRef((o,s)=>{let{children:u,...d}=o,h=null,b=!1;const p=[];jd(u)&&typeof ms=="function"&&(u=ms(u._payload)),y.Children.forEach(u,S=>{if(fy(S)){b=!0;const C=S;let U="child"in C.props?C.props.child:C.props.children;jd(U)&&typeof ms=="function"&&(U=ms(U._payload)),h=W1(C,U),p.push(h?.props?.children)}else p.push(S)}),h?h=y.cloneElement(h,void 0,p):!b&&y.Children.count(u)===1&&y.isValidElement(u)&&(h=u);const g=h?dy(h):void 0,x=Wa(s,g);if(!h){if(u||u===0)throw new Error(b?tE(a):eE(a));return u}const w=uy(d,h.props??{});return h.type!==y.Fragment&&(w.ref=s?x:g),y.cloneElement(h,w)});return r.displayName=`${a}.Slot`,r}Bn(sf,"createSlot");var K1=sf("Slot"),cy=Symbol.for("radix.slottable");function J1(a){const r=Bn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return r.displayName=`${a}.Slottable`,r.__radixId=cy,r}Bn(J1,"createSlottable");var W1=Bn((a,r)=>{if("child"in a.props){const o=a.props.child;return y.isValidElement(o)?y.cloneElement(o,void 0,a.props.children(o.props.children)):null}return y.isValidElement(r)?r:null},"getSlottableElementFromSlottable");function uy(a,r){const o={...r};for(const s in r){const u=a[s],d=r[s];/^on[A-Z]/.test(s)?u&&d?o[s]=(...b)=>{const p=d(...b);return u(...b),p}:u&&(o[s]=u):s==="style"?o[s]={...u,...d}:s==="className"&&(o[s]=[u,d].filter(Boolean).join(" "))}return{...a,...o}}Bn(uy,"mergeProps");function dy(a){let r=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?a.ref:(r=Object.getOwnPropertyDescriptor(a,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?a.props.ref:a.props.ref||a.ref)}Bn(dy,"getElementRef");function fy(a){return y.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===cy}Bn(fy,"isSlottable");var F1=Symbol.for("react.lazy");function jd(a){return a!=null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===F1&&"_payload"in a&&my(a._payload)}Bn(jd,"isLazyComponent");function my(a){return typeof a=="object"&&a!==null&&"then"in a}Bn(my,"isPromiseLike");var eE=Bn(a=>`${a} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),tE=Bn(a=>`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ms=Dx[" use ".trim().toString()],nE=Object.defineProperty,aE=(a,r)=>nE(a,"name",{value:r,configurable:!0}),lE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$o=lE.reduce((a,r)=>{const o=sf(`Primitive.${r}`),s=y.forwardRef((u,d)=>{const{asChild:h,...b}=u,p=h?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(p,{...b,ref:d})});return s.displayName=`Primitive.${r}`,{...a,[r]:s}},{});function rE(a,r){a&&ES.flushSync(()=>a.dispatchEvent(r))}aE(rE,"dispatchDiscreteCustomEvent");function hy(a){var r,o,s="";if(typeof a=="string"||typeof a=="number")s+=a;else if(typeof a=="object")if(Array.isArray(a)){var u=a.length;for(r=0;r<u;r++)a[r]&&(o=hy(a[r]))&&(s&&(s+=" "),s+=o)}else for(o in a)a[o]&&(s&&(s+=" "),s+=o);return s}function py(){for(var a,r,o=0,s="",u=arguments.length;o<u;o++)(a=arguments[o])&&(r=hy(a))&&(s&&(s+=" "),s+=r);return s}const oE=(a,r)=>{const o=new Array(a.length+r.length);for(let s=0;s<a.length;s++)o[s]=a[s];for(let s=0;s<r.length;s++)o[a.length+s]=r[s];return o},iE=(a,r)=>({classGroupId:a,validator:r}),gy=(a=new Map,r=null,o)=>({nextPart:a,validators:r,classGroupId:o}),Rs="-",Yg=[],sE="arbitrary..",cE=a=>{const r=dE(a),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=a;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return uE(h);const b=h.split(Rs),p=b[0]===""&&b.length>1?1:0;return by(b,p,r)},getConflictingClassGroupIds:(h,b)=>{if(b){const p=s[h],g=o[h];return p?g?oE(g,p):p:g||Yg}return o[h]||Yg}}},by=(a,r,o)=>{if(a.length-r===0)return o.classGroupId;const u=a[r],d=o.nextPart.get(u);if(d){const g=by(a,r+1,d);if(g)return g}const h=o.validators;if(h===null)return;const b=r===0?a.join(Rs):a.slice(r).join(Rs),p=h.length;for(let g=0;g<p;g++){const x=h[g];if(x.validator(b))return x.classGroupId}},uE=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=a.slice(1,-1),o=r.indexOf(":"),s=r.slice(0,o);return s?sE+s:void 0})(),dE=a=>{const{theme:r,classGroups:o}=a;return fE(o,r)},fE=(a,r)=>{const o=gy();for(const s in a){const u=a[s];cf(u,o,s,r)}return o},cf=(a,r,o,s)=>{const u=a.length;for(let d=0;d<u;d++){const h=a[d];mE(h,r,o,s)}},mE=(a,r,o,s)=>{if(typeof a=="string"){hE(a,r,o);return}if(typeof a=="function"){pE(a,r,o,s);return}gE(a,r,o,s)},hE=(a,r,o)=>{const s=a===""?r:yy(r,a);s.classGroupId=o},pE=(a,r,o,s)=>{if(bE(a)){cf(a(s),r,o,s);return}r.validators===null&&(r.validators=[]),r.validators.push(iE(o,a))},gE=(a,r,o,s)=>{const u=Object.entries(a),d=u.length;for(let h=0;h<d;h++){const[b,p]=u[h];cf(p,yy(r,b),o,s)}},yy=(a,r)=>{let o=a;const s=r.split(Rs),u=s.length;for(let d=0;d<u;d++){const h=s[d];let b=o.nextPart.get(h);b||(b=gy(),o.nextPart.set(h,b)),o=b}return o},bE=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,yE=a=>{if(a<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),s=Object.create(null);const u=(d,h)=>{o[d]=h,r++,r>a&&(r=0,s=o,o=Object.create(null))};return{get(d){let h=o[d];if(h!==void 0)return h;if((h=s[d])!==void 0)return u(d,h),h},set(d,h){d in o?o[d]=h:u(d,h)}}},Nd="!",Xg=":",vE=[],Gg=(a,r,o,s,u)=>({modifiers:a,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:s,isExternal:u}),xE=a=>{const{prefix:r,experimentalParseClassName:o}=a;let s=u=>{const d=[];let h=0,b=0,p=0,g;const x=u.length;for(let N=0;N<x;N++){const j=u[N];if(h===0&&b===0){if(j===Xg){d.push(u.slice(p,N)),p=N+1;continue}if(j==="/"){g=N;continue}}j==="["?h++:j==="]"?h--:j==="("?b++:j===")"&&b--}const w=d.length===0?u:u.slice(p);let S=w,C=!1;w.endsWith(Nd)?(S=w.slice(0,-1),C=!0):w.startsWith(Nd)&&(S=w.slice(1),C=!0);const U=g&&g>p?g-p:void 0;return Gg(d,C,S,U)};if(r){const u=r+Xg,d=s;s=h=>h.startsWith(u)?d(h.slice(u.length)):Gg(vE,!1,h,void 0,!0)}if(o){const u=s;s=d=>o({className:d,parseClassName:u})}return s},wE=a=>{const r=new Map;return a.orderSensitiveModifiers.forEach((o,s)=>{r.set(o,1e6+s)}),o=>{const s=[];let u=[];for(let d=0;d<o.length;d++){const h=o[d],b=h[0]==="[",p=r.has(h);b||p?(u.length>0&&(u.sort(),s.push(...u),u=[]),s.push(h)):u.push(h)}return u.length>0&&(u.sort(),s.push(...u)),s}},SE=a=>({cache:yE(a.cacheSize),parseClassName:xE(a),sortModifiers:wE(a),postfixLookupClassGroupIds:EE(a),...cE(a)}),EE=a=>{const r=Object.create(null),o=a.postfixLookupClassGroups;if(o)for(let s=0;s<o.length;s++)r[o[s]]=!0;return r},AE=/\s+/,CE=(a,r)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:h}=r,b=[],p=a.trim().split(AE);let g="";for(let x=p.length-1;x>=0;x-=1){const w=p[x],{isExternal:S,modifiers:C,hasImportantModifier:U,baseClassName:N,maybePostfixModifierPosition:j}=o(w);if(S){g=w+(g.length>0?" "+g:g);continue}let I=!!j,P;if(I){const Z=N.substring(0,j);P=s(Z);const Y=P&&h[P]?s(N):void 0;Y&&Y!==P&&(P=Y,I=!1)}else P=s(N);if(!P){if(!I){g=w+(g.length>0?" "+g:g);continue}if(P=s(N),!P){g=w+(g.length>0?" "+g:g);continue}I=!1}const H=C.length===0?"":C.length===1?C[0]:d(C).join(":"),ee=U?H+Nd:H,F=ee+P;if(b.indexOf(F)>-1)continue;b.push(F);const se=u(P,I);for(let Z=0;Z<se.length;++Z){const Y=se[Z];b.push(ee+Y)}g=w+(g.length>0?" "+g:g)}return g},TE=(...a)=>{let r=0,o,s,u="";for(;r<a.length;)(o=a[r++])&&(s=vy(o))&&(u&&(u+=" "),u+=s);return u},vy=a=>{if(typeof a=="string")return a;let r,o="";for(let s=0;s<a.length;s++)a[s]&&(r=vy(a[s]))&&(o&&(o+=" "),o+=r);return o},RE=(a,...r)=>{let o,s,u,d;const h=p=>{const g=r.reduce((x,w)=>w(x),a());return o=SE(g),s=o.cache.get,u=o.cache.set,d=b,b(p)},b=p=>{const g=s(p);if(g)return g;const x=CE(p,o);return u(p,x),x};return d=h,(...p)=>d(TE(...p))},jE=[],Ct=a=>{const r=o=>o[a]||jE;return r.isThemeGetter=!0,r},xy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,UE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_E=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ME=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qa=a=>NE.test(a),Ae=a=>!!a&&!Number.isNaN(Number(a)),In=a=>!!a&&Number.isInteger(Number(a)),gd=a=>a.endsWith("%")&&Ae(a.slice(0,-1)),ga=a=>UE.test(a),Sy=()=>!0,LE=a=>_E.test(a)&&!zE.test(a),uf=()=>!1,DE=a=>OE.test(a),kE=a=>ME.test(a),BE=a=>!ae(a)&&!re(a),HE=a=>a.startsWith("@container")&&(a[10]==="/"&&a[11]!==void 0||a[11]==="s"&&a[16]!==void 0&&a.startsWith("-size/",10)||a[11]==="n"&&a[18]!==void 0&&a.startsWith("-normal/",10)),qE=a=>Fa(a,Cy,uf),ae=a=>xy.test(a),Al=a=>Fa(a,Ty,LE),Ig=a=>Fa(a,ZE,Ae),YE=a=>Fa(a,jy,Sy),XE=a=>Fa(a,Ry,uf),Vg=a=>Fa(a,Ey,uf),GE=a=>Fa(a,Ay,kE),hs=a=>Fa(a,Ny,DE),re=a=>wy.test(a),Oo=a=>Ll(a,Ty),IE=a=>Ll(a,Ry),Qg=a=>Ll(a,Ey),VE=a=>Ll(a,Cy),QE=a=>Ll(a,Ay),ps=a=>Ll(a,Ny,!0),PE=a=>Ll(a,jy,!0),Fa=(a,r,o)=>{const s=xy.exec(a);return s?s[1]?r(s[1]):o(s[2]):!1},Ll=(a,r,o=!1)=>{const s=wy.exec(a);return s?s[1]?r(s[1]):o:!1},Ey=a=>a==="position"||a==="percentage",Ay=a=>a==="image"||a==="url",Cy=a=>a==="length"||a==="size"||a==="bg-size",Ty=a=>a==="length",ZE=a=>a==="number",Ry=a=>a==="family-name",jy=a=>a==="number"||a==="weight",Ny=a=>a==="shadow",$E=()=>{const a=Ct("color"),r=Ct("font"),o=Ct("text"),s=Ct("font-weight"),u=Ct("tracking"),d=Ct("leading"),h=Ct("breakpoint"),b=Ct("container"),p=Ct("spacing"),g=Ct("radius"),x=Ct("shadow"),w=Ct("inset-shadow"),S=Ct("text-shadow"),C=Ct("drop-shadow"),U=Ct("blur"),N=Ct("perspective"),j=Ct("aspect"),I=Ct("ease"),P=Ct("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...ee(),re,ae],se=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],Y=()=>[re,ae,p],ce=()=>[Qa,"full","auto",...Y()],ge=()=>[In,"none","subgrid",re,ae],te=()=>["auto",{span:["full",In,re,ae]},In,re,ae],oe=()=>[In,"auto",re,ae],Ue=()=>["auto","min","max","fr",re,ae],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],me=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...Y()],Q=()=>[Qa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],W=()=>[Qa,"screen","full","dvw","lvw","svw","min","max","fit",...Y()],xe=()=>[Qa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Y()],J=()=>[a,re,ae],A=()=>[...ee(),Qg,Vg,{position:[re,ae]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",VE,qE,{size:[re,ae]}],G=()=>[gd,Oo,Al],$=()=>["","none","full",g,re,ae],K=()=>["",Ae,Oo,Al],ue=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Ae,gd,Qg,Vg],Ve=()=>["","none",U,re,ae],ke=()=>["none",Ae,re,ae],wt=()=>["none",Ae,re,ae],St=()=>[Ae,re,ae],at=()=>[Qa,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ga],breakpoint:[ga],color:[Sy],container:[ga],"drop-shadow":[ga],ease:["in","out","in-out"],font:[BE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ga],shadow:[ga],spacing:["px",Ae],text:[ga],"text-shadow":[ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qa,ae,re,j]}],container:["container"],"container-type":[{"@container":["","normal","size",re,ae]}],"container-named":[HE],columns:[{columns:[Ae,ae,re,b]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:se()}],"overflow-x":[{"overflow-x":se()}],"overflow-y":[{"overflow-y":se()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ce()}],"inset-x":[{"inset-x":ce()}],"inset-y":[{"inset-y":ce()}],start:[{"inset-s":ce(),start:ce()}],end:[{"inset-e":ce(),end:ce()}],"inset-bs":[{"inset-bs":ce()}],"inset-be":[{"inset-be":ce()}],top:[{top:ce()}],right:[{right:ce()}],bottom:[{bottom:ce()}],left:[{left:ce()}],visibility:["visible","invisible","collapse"],z:[{z:[In,"auto",re,ae]}],basis:[{basis:[Qa,"full","auto",b,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,Qa,"auto","initial","none",ae]}],grow:[{grow:["",Ae,re,ae]}],shrink:[{shrink:["",Ae,re,ae]}],order:[{order:[In,"first","last","none",re,ae]}],"grid-cols":[{"grid-cols":ge()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ge()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ue()}],"auto-rows":[{"auto-rows":Ue()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...me(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pbs:[{pbs:Y()}],pbe:[{pbe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...xe()]}],"min-block-size":[{"min-block":["auto",...xe()]}],"max-block-size":[{"max-block":["none",...xe()]}],w:[{w:[b,"screen",...Q()]}],"min-w":[{"min-w":[b,"screen","none",...Q()]}],"max-w":[{"max-w":[b,"screen","none","prose",{screen:[h]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",o,Oo,Al]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,PE,YE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gd,ae]}],"font-family":[{font:[IE,XE,r]}],"font-features":[{"font-features":[ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,re,ae]}],"line-clamp":[{"line-clamp":[Ae,"none",re,Ig]}],leading:[{leading:[d,...Y()]}],"list-image":[{"list-image":["none",re,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",re,Al]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[Ae,"auto",re,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"tab-size":[{tab:[In,re,ae]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},In,re,ae],radial:["",re,ae],conic:[In,re,ae]},QE,GE]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-bs":[{"border-bs":K()}],"border-w-be":[{"border-be":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-bs":[{"border-bs":J()}],"border-color-be":[{"border-be":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,re,ae]}],"outline-w":[{outline:["",Ae,Oo,Al]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",x,ps,hs]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",w,ps,hs]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[Ae,Al]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",S,ps,hs]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[Ae,re,ae]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[re,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":ee()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,ae]}],filter:[{filter:["","none",re,ae]}],blur:[{blur:Ve()}],brightness:[{brightness:[Ae,re,ae]}],contrast:[{contrast:[Ae,re,ae]}],"drop-shadow":[{"drop-shadow":["","none",C,ps,hs]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",Ae,re,ae]}],"hue-rotate":[{"hue-rotate":[Ae,re,ae]}],invert:[{invert:["",Ae,re,ae]}],saturate:[{saturate:[Ae,re,ae]}],sepia:[{sepia:["",Ae,re,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",re,ae]}],"backdrop-blur":[{"backdrop-blur":Ve()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,re,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,re,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,re,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,re,ae]}],"backdrop-invert":[{"backdrop-invert":["",Ae,re,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,re,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,re,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,re,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",re,ae]}],ease:[{ease:["linear","initial",I,re,ae]}],delay:[{delay:[Ae,re,ae]}],animate:[{animate:["none",P,re,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,re,ae]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:ke()}],"rotate-x":[{"rotate-x":ke()}],"rotate-y":[{"rotate-y":ke()}],"rotate-z":[{"rotate-z":ke()}],scale:[{scale:wt()}],"scale-x":[{"scale-x":wt()}],"scale-y":[{"scale-y":wt()}],"scale-z":[{"scale-z":wt()}],"scale-3d":["scale-3d"],skew:[{skew:St()}],"skew-x":[{"skew-x":St()}],"skew-y":[{"skew-y":St()}],transform:[{transform:[re,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],zoom:[{zoom:[In,re,ae]}],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":J()}],"scrollbar-track-color":[{"scrollbar-track":J()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mbs":[{"scroll-mbs":Y()}],"scroll-mbe":[{"scroll-mbe":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pbs":[{"scroll-pbs":Y()}],"scroll-pbe":[{"scroll-pbe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re,ae]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[Ae,Oo,Al,Ig]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},KE=RE($E);function Zt(...a){return KE(py(a))}const Pg=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,Zg=py,JE=(a,r)=>o=>{var s;if(r?.variants==null)return Zg(a,o?.class,o?.className);const{variants:u,defaultVariants:d}=r,h=Object.keys(u).map(g=>{const x=o?.[g],w=d?.[g];if(x===null)return null;const S=Pg(x)||Pg(w);return u[g][S]}),b=o&&Object.entries(o).reduce((g,x)=>{let[w,S]=x;return S===void 0||(g[w]=S),g},{}),p=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((g,x)=>{let{class:w,className:S,...C}=x;return Object.entries(C).every(U=>{let[N,j]=U;return Array.isArray(j)?j.includes({...d,...b}[N]):{...d,...b}[N]===j})?[...g,w,S]:g},[]);return Zg(a,h,p,o?.class,o?.className)},WE="focus:outline-none focus:ring-0 focus-visible:border-ring",FE="focus:outline-none focus:ring-0 focus-visible:outline-none",e2=JE(`inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors ${FE} disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:bg-destructive/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:bg-accent focus-visible:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 focus-visible:bg-secondary/70",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline focus-visible:underline",subtle:"bg-muted text-muted-foreground hover:bg-muted/80 focus-visible:bg-muted/60"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),pt=y.forwardRef(({className:a,variant:r,size:o,asChild:s=!1,...u},d)=>{const h=s?K1:"button";return f.jsx(h,{className:Zt(e2({variant:r,size:o,className:a})),ref:d,...u})});pt.displayName="Button";const df=y.forwardRef(({className:a,...r},o)=>f.jsx("div",{ref:o,className:Zt("rounded-2xl border border-border/50 bg-card shadow-lg shadow-black/5 transition-all duration-200",a),...r}));df.displayName="Card";const Gs=y.forwardRef(({className:a,...r},o)=>f.jsx("div",{ref:o,className:Zt("flex flex-col gap-1 p-6",a),...r}));Gs.displayName="CardHeader";const Is=y.forwardRef(({className:a,...r},o)=>f.jsx("h3",{ref:o,className:Zt("text-2xl font-semibold tracking-tight",a),...r}));Is.displayName="CardTitle";const Vs=y.forwardRef(({className:a,...r},o)=>f.jsx("p",{ref:o,className:Zt("text-sm text-muted-foreground",a),...r}));Vs.displayName="CardDescription";const Yo=y.forwardRef(({className:a,...r},o)=>f.jsx("div",{ref:o,className:Zt("p-6 pt-0",a),...r}));Yo.displayName="CardContent";const t2=y.forwardRef(({className:a,...r},o)=>f.jsx("div",{ref:o,className:Zt("flex items-center p-6 pt-0",a),...r}));t2.displayName="CardFooter";var n2=Object.defineProperty,Br=(a,r)=>n2(a,"name",{value:r,configurable:!0}),Uy=!!(typeof window<"u"&&window.document&&window.document.createElement);function Za(a,r,{checkForDefaultPrevented:o=!0}={}){return Br(function(u){if(a?.(u),o===!1||!u||!u.defaultPrevented)return r?.(u)},"handleEvent")}Br(Za,"composeEventHandlers");function a2(a){if(!Uy)throw new Error("Cannot access window outside of the DOM");return a?.ownerDocument?.defaultView??window}Br(a2,"getOwnerWindow");function Ud(a){if(!Uy)throw new Error("Cannot access document outside of the DOM");return a?.ownerDocument??document}Br(Ud,"getOwnerDocument");function _y(a,r=!1){const{activeElement:o}=Ud(a);if(!o?.nodeName)return null;if(zy(o)&&o.contentDocument)return _y(o.contentDocument.body,r);if(r){const s=o.getAttribute("aria-activedescendant");if(s){const u=Ud(o).getElementById(s);if(u)return u}}return o}Br(_y,"getActiveElement");function zy(a){return a.tagName==="IFRAME"}Br(zy,"isFrame");var l2=Object.defineProperty,va=(a,r)=>l2(a,"name",{value:r,configurable:!0});function Oy(a,r){return y.useReducer((o,s)=>r[o][s]??o,a)}va(Oy,"useStateMachine");var Qs=va(a=>{const{present:r,children:o}=a,s=My(r),u=typeof o=="function"?o({present:s.isPresent}):y.Children.only(o),d=Ly(s.ref,Dy(u));return typeof o=="function"||s.isPresent?y.cloneElement(u,{ref:d}):null},"Presence");function My(a){const[r,o]=y.useState(),s=y.useRef(null),u=y.useRef(a),d=y.useRef("none"),h=y.useRef(void 0),b=a?"mounted":"unmounted",[p,g]=Oy(b,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{p==="mounted"?(d.current=h.current??Ur(s.current),h.current=void 0):d.current="none"},[p]),Td(()=>{const x=s.current,w=u.current;if(w!==a){const C=d.current,U=Ur(x);a?(h.current=U,g("MOUNT")):U==="none"||x?.display==="none"?g("UNMOUNT"):g(w&&C!==U?"ANIMATION_OUT":"UNMOUNT"),u.current=a}},[a,g]),Td(()=>{if(r){let x;const w=r.ownerDocument.defaultView??window,S=va(U=>{const j=Ur(s.current).includes(CSS.escape(U.animationName));if(U.target===r&&j&&(g("ANIMATION_END"),!u.current)){const I=r.style.animationFillMode;r.style.animationFillMode="forwards",x=w.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=I)})}},"handleAnimationEnd"),C=va(U=>{U.target===r&&(d.current=Ur(s.current))},"handleAnimationStart");return r.addEventListener("animationstart",C),r.addEventListener("animationcancel",S),r.addEventListener("animationend",S),()=>{w.clearTimeout(x),r.removeEventListener("animationstart",C),r.removeEventListener("animationcancel",S),r.removeEventListener("animationend",S)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:y.useCallback(x=>{if(x){const w=getComputedStyle(x);s.current=w,h.current=Ur(w)}else s.current=null;o(x)},[])}}va(My,"usePresence");function _d(a,r){if(typeof a=="function")return a(r);a!=null&&(a.current=r)}va(_d,"setRef");function Ly(...a){const r=y.useRef(a);return r.current=a,y.useCallback(o=>{const s=r.current;let u=!1;const d=s.map(h=>{const b=_d(h,o);return!u&&typeof b=="function"&&(u=!0),b});if(u)return()=>{for(let h=0;h<d.length;h++){const b=d[h];typeof b=="function"?b():_d(s[h],null)}}},[])}va(Ly,"useStableComposedRefs");function Ur(a){return a?.animationName||"none"}va(Ur,"getAnimationName");function Dy(a){let r=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?a.ref:(r=Object.getOwnPropertyDescriptor(a,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?a.props.ref:a.props.ref||a.ref)}va(Dy,"getElementRef");const ba=y.forwardRef(({className:a,type:r="text",...o},s)=>f.jsx("input",{ref:s,type:r,className:Zt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm transition-[border-color] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",WE,a),...o}));ba.displayName="Input";const zl=y.forwardRef(({className:a,...r},o)=>f.jsx("label",{ref:o,className:Zt("text-sm font-medium leading-none text-muted-foreground",a),...r}));zl.displayName="Label";var r2=Object.defineProperty,o2=(a,r)=>r2(a,"name",{value:r,configurable:!0}),i2=y.createContext(void 0);function ky(a){const r=y.useContext(i2);return a||r||"ltr"}o2(ky,"useDirection");var s2=Object.defineProperty,c2=(a,r)=>s2(a,"name",{value:r,configurable:!0});function By(a,[r,o]){return Math.min(o,Math.max(r,a))}c2(By,"clamp");var u2=Object.defineProperty,Ne=(a,r)=>u2(a,"name",{value:r,configurable:!0});function Hy(a,r){return y.useReducer((o,s)=>r[o][s]??o,a)}Ne(Hy,"useStateMachine");var qy="ScrollArea",[Yy,TC]=oy(qy),[d2,Rn]=Yy(qy),f2=y.forwardRef(Ne(function(r,o){const{__scopeScrollArea:s,type:u="hover",dir:d,scrollHideDelay:h=600,...b}=r,[p,g]=y.useState(null),[x,w]=y.useState(null),[S,C]=y.useState(null),[U,N]=y.useState(null),[j,I]=y.useState(null),[P,H]=y.useState(0),[ee,F]=y.useState(0),[se,Z]=y.useState(!1),[Y,ce]=y.useState(!1),ge=Wa(o,g),te=ky(d);return f.jsx(d2,{scope:s,type:u,dir:te,scrollHideDelay:h,scrollArea:p,viewport:x,onViewportChange:w,content:S,onContentChange:C,scrollbarX:U,onScrollbarXChange:N,scrollbarXEnabled:se,onScrollbarXEnabledChange:Z,scrollbarY:j,onScrollbarYChange:I,scrollbarYEnabled:Y,onScrollbarYEnabledChange:ce,onCornerWidthChange:H,onCornerHeightChange:F,children:f.jsx($o.div,{dir:te,...b,ref:ge,style:{position:"relative","--radix-scroll-area-corner-width":P+"px","--radix-scroll-area-corner-height":ee+"px",...r.style}})})},"ScrollArea")),m2="ScrollAreaViewport",h2=y.forwardRef(Ne(function(r,o){const{__scopeScrollArea:s,children:u,nonce:d,...h}=r,b=Rn(m2,s),p=y.useRef(null),g=Wa(o,p,b.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx(p2,{nonce:d}),f.jsx($o.div,{"data-radix-scroll-area-viewport":"",...h,ref:g,style:{overflowX:b.scrollbarXEnabled?"scroll":"hidden",overflowY:b.scrollbarYEnabled?"scroll":"hidden",...r.style},children:f.jsx("div",{ref:b.onContentChange,style:{minWidth:"100%",display:"table"},children:u})})]})},"ScrollAreaViewport")),p2=y.memo(Ne(function({nonce:r}){return f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r})},"ScrollAreaViewportStyle"),(a,r)=>a.nonce===r.nonce),xa="ScrollAreaScrollbar",Xy=y.forwardRef(Ne(function(r,o){const{forceMount:s,...u}=r,d=Rn(xa,r.__scopeScrollArea),{onScrollbarXEnabledChange:h,onScrollbarYEnabledChange:b}=d,p=r.orientation==="horizontal";return y.useEffect(()=>(p?h(!0):b(!0),()=>{p?h(!1):b(!1)}),[p,h,b]),d.type==="hover"?f.jsx(g2,{...u,ref:o,forceMount:s}):d.type==="scroll"?f.jsx(b2,{...u,ref:o,forceMount:s}):d.type==="auto"?f.jsx(Gy,{...u,ref:o,forceMount:s}):d.type==="always"?f.jsx(ff,{...u,ref:o,"data-state":"visible"}):null},"ScrollAreaScrollbar")),g2=y.forwardRef(Ne(function(r,o){const{forceMount:s,...u}=r,d=Rn(xa,r.__scopeScrollArea),[h,b]=y.useState(!1);return y.useEffect(()=>{const p=d.scrollArea;let g=0;if(p){const x=Ne(()=>{window.clearTimeout(g),b(!0)},"handlePointerEnter"),w=Ne(()=>{g=window.setTimeout(()=>b(!1),d.scrollHideDelay)},"handlePointerLeave");return p.addEventListener("pointerenter",x),p.addEventListener("pointerleave",w),()=>{window.clearTimeout(g),p.removeEventListener("pointerenter",x),p.removeEventListener("pointerleave",w)}}},[d.scrollArea,d.scrollHideDelay]),f.jsx(Qs,{present:s||h,children:f.jsx(Gy,{"data-state":h?"visible":"hidden",...u,ref:o})})},"ScrollAreaScrollbarHover")),b2=y.forwardRef(Ne(function(r,o){const{forceMount:s,...u}=r,d=Rn(xa,r.__scopeScrollArea),h=r.orientation==="horizontal",b=Jo(()=>g("SCROLL_END"),100),[p,g]=Hy("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(p==="idle"){const x=window.setTimeout(()=>g("HIDE"),d.scrollHideDelay);return()=>window.clearTimeout(x)}},[p,d.scrollHideDelay,g]),y.useEffect(()=>{const x=d.viewport,w=h?"scrollLeft":"scrollTop";if(x){let S=x[w];const C=Ne(()=>{const U=x[w];S!==U&&(g("SCROLL"),b()),S=U},"handleScroll");return x.addEventListener("scroll",C),()=>x.removeEventListener("scroll",C)}},[d.viewport,h,g,b]),f.jsx(Qs,{present:s||p!=="hidden",children:f.jsx(ff,{"data-state":p==="hidden"?"hidden":"visible",...u,ref:o,onPointerEnter:Za(r.onPointerEnter,()=>g("POINTER_ENTER")),onPointerLeave:Za(r.onPointerLeave,()=>g("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Gy=y.forwardRef(Ne(function(r,o){const s=Rn(xa,r.__scopeScrollArea),{forceMount:u,...d}=r,[h,b]=y.useState(!1),p=r.orientation==="horizontal",g=Jo(()=>{if(s.viewport){const x=s.viewport.offsetWidth<s.viewport.scrollWidth,w=s.viewport.offsetHeight<s.viewport.scrollHeight;b(p?x:w)}},10);return Ol(s.viewport,g),Ol(s.content,g),f.jsx(Qs,{present:u||h,children:f.jsx(ff,{"data-state":h?"visible":"hidden",...d,ref:o})})},"ScrollAreaScrollbarAuto")),ff=y.forwardRef(Ne(function(r,o){const{orientation:s="vertical",...u}=r,d=Rn(xa,r.__scopeScrollArea),h=y.useRef(null),b=y.useRef(0),[p,g]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),x=mf(p.viewport,p.content),w={...u,sizes:p,onSizesChange:g,hasThumb:x>0&&x<1,onThumbChange:Ne(C=>h.current=C,"onThumbChange"),onThumbPointerUp:Ne(()=>b.current=0,"onThumbPointerUp"),onThumbPointerDown:Ne(C=>b.current=C,"onThumbPointerDown")};function S(C,U){return Py(C,b.current,p,U)}return Ne(S,"getScrollPosition"),s==="horizontal"?f.jsx(y2,{...w,ref:o,onThumbPositionChange:()=>{if(d.viewport&&h.current){const C=d.viewport.scrollLeft,U=Od(C,p,d.dir);h.current.style.transform=`translate3d(${U}px, 0, 0)`}},onWheelScroll:C=>{d.viewport&&(d.viewport.scrollLeft=C)},onDragScroll:C=>{d.viewport&&(d.viewport.scrollLeft=S(C,d.dir))}}):s==="vertical"?f.jsx(v2,{...w,ref:o,onThumbPositionChange:()=>{if(d.viewport&&h.current){const C=d.viewport.scrollTop,U=Od(C,p);h.current.style.transform=`translate3d(0, ${U}px, 0)`}},onWheelScroll:C=>{d.viewport&&(d.viewport.scrollTop=C)},onDragScroll:C=>{d.viewport&&(d.viewport.scrollTop=S(C))}}):null},"ScrollAreaScrollbarVisible")),y2=y.forwardRef(Ne(function(r,o){const{sizes:s,onSizesChange:u,...d}=r,h=Rn(xa,r.__scopeScrollArea),[b,p]=y.useState(),g=y.useRef(null),x=Wa(o,g,h.onScrollbarXChange);return y.useEffect(()=>{g.current&&p(getComputedStyle(g.current))},[g]),f.jsx(Vy,{"data-orientation":"horizontal",...d,ref:x,sizes:s,style:{bottom:0,left:h.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:h.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ko(s)+"px",...r.style},onThumbPointerDown:w=>r.onThumbPointerDown(w.x),onDragScroll:w=>r.onDragScroll(w.x),onWheelScroll:(w,S)=>{if(h.viewport){const C=h.viewport.scrollLeft+w.deltaX;r.onWheelScroll(C),pf(C,S)&&w.preventDefault()}},onResize:()=>{g.current&&h.viewport&&b&&u({content:h.viewport.scrollWidth,viewport:h.viewport.offsetWidth,scrollbar:{size:g.current.clientWidth,paddingStart:Xo(b.paddingLeft),paddingEnd:Xo(b.paddingRight)}})}})},"ScrollAreaScrollbarX")),v2=y.forwardRef(Ne(function(r,o){const{sizes:s,onSizesChange:u,...d}=r,h=Rn(xa,r.__scopeScrollArea),[b,p]=y.useState(),g=y.useRef(null),x=Wa(o,g,h.onScrollbarYChange);return y.useEffect(()=>{g.current&&p(getComputedStyle(g.current))},[g]),f.jsx(Vy,{"data-orientation":"vertical",...d,ref:x,sizes:s,style:{top:0,right:h.dir==="ltr"?0:void 0,left:h.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ko(s)+"px",...r.style},onThumbPointerDown:w=>r.onThumbPointerDown(w.y),onDragScroll:w=>r.onDragScroll(w.y),onWheelScroll:(w,S)=>{if(h.viewport){const C=h.viewport.scrollTop+w.deltaY;r.onWheelScroll(C),pf(C,S)&&w.preventDefault()}},onResize:()=>{g.current&&h.viewport&&b&&u({content:h.viewport.scrollHeight,viewport:h.viewport.offsetHeight,scrollbar:{size:g.current.clientHeight,paddingStart:Xo(b.paddingTop),paddingEnd:Xo(b.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[x2,Iy]=Yy(xa),Vy=y.forwardRef(Ne(function(r,o){const{__scopeScrollArea:s,sizes:u,hasThumb:d,onThumbChange:h,onThumbPointerUp:b,onThumbPointerDown:p,onThumbPositionChange:g,onDragScroll:x,onWheelScroll:w,onResize:S,...C}=r,U=Rn(xa,s),[N,j]=y.useState(null),I=Wa(o,j),P=y.useRef(null),H=y.useRef(""),ee=U.viewport,F=u.content-u.viewport,se=Pa(w),Z=Pa(g),Y=Jo(S,10);function ce(ge){if(P.current){const te=ge.clientX-P.current.left,oe=ge.clientY-P.current.top;x({x:te,y:oe})}}return Ne(ce,"handleDragScroll"),y.useEffect(()=>{const ge=Ne(te=>{const oe=te.target;N?.contains(oe)&&se(te,F)},"handleWheel");return document.addEventListener("wheel",ge,{passive:!1}),()=>document.removeEventListener("wheel",ge,{passive:!1})},[ee,N,F,se]),y.useEffect(Z,[u,Z]),Ol(N,Y),Ol(U.content,Y),f.jsx(x2,{scope:s,scrollbar:N,hasThumb:d,onThumbChange:Pa(h),onThumbPointerUp:Pa(b),onThumbPositionChange:Z,onThumbPointerDown:Pa(p),children:f.jsx($o.div,{...C,ref:I,style:{position:"absolute",...C.style},onPointerDown:Za(r.onPointerDown,ge=>{ge.button===0&&(ge.target.setPointerCapture(ge.pointerId),P.current=N.getBoundingClientRect(),H.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",U.viewport&&(U.viewport.style.scrollBehavior="auto"),ce(ge))}),onPointerMove:Za(r.onPointerMove,ce),onPointerUp:Za(r.onPointerUp,ge=>{const te=ge.target;te.hasPointerCapture(ge.pointerId)&&te.releasePointerCapture(ge.pointerId),document.body.style.webkitUserSelect=H.current,U.viewport&&(U.viewport.style.scrollBehavior=""),P.current=null})})})},"ScrollAreaScrollbarImpl")),zd="ScrollAreaThumb",w2=y.forwardRef(Ne(function(r,o){const{forceMount:s,...u}=r,d=Iy(zd,r.__scopeScrollArea);return f.jsx(Qs,{present:s||d.hasThumb,children:f.jsx(S2,{ref:o,...u})})},"ScrollAreaThumb")),S2=y.forwardRef(Ne(function(r,o){const{__scopeScrollArea:s,style:u,...d}=r,h=Rn(zd,s),b=Iy(zd,s),{onThumbPositionChange:p}=b,g=Wa(o,b.onThumbChange),x=y.useRef(void 0),w=Jo(()=>{x.current&&(x.current(),x.current=void 0)},100);return y.useEffect(()=>{const S=h.viewport;if(S){const C=Ne(()=>{if(w(),!x.current){const U=C2(S,p);x.current=U,p()}},"handleScroll");return p(),S.addEventListener("scroll",C),()=>S.removeEventListener("scroll",C)}},[h.viewport,w,p]),f.jsx($o.div,{"data-state":b.hasThumb?"visible":"hidden",...d,ref:g,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...u},onPointerDownCapture:Za(r.onPointerDownCapture,S=>{const U=S.target.getBoundingClientRect(),N=S.clientX-U.left,j=S.clientY-U.top;b.onThumbPointerDown({x:N,y:j})}),onPointerUp:Za(r.onPointerUp,b.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Qy="ScrollAreaCorner",E2=y.forwardRef(Ne(function(r,o){const s=Rn(Qy,r.__scopeScrollArea),u=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&u?f.jsx(A2,{...r,ref:o}):null},"ScrollAreaCorner")),A2=y.forwardRef(Ne(function(r,o){const{__scopeScrollArea:s,...u}=r,d=Rn(Qy,s),[h,b]=y.useState(0),[p,g]=y.useState(0),x=!!(h&&p),{onCornerWidthChange:w,onCornerHeightChange:S}=d;return Ol(d.scrollbarX,()=>{const C=d.scrollbarX?.offsetHeight||0;d.onCornerHeightChange(C),g(C)}),Ol(d.scrollbarY,()=>{const C=d.scrollbarY?.offsetWidth||0;d.onCornerWidthChange(C),b(C)}),y.useEffect(()=>()=>{w(0),S(0)},[w,S]),x?f.jsx($o.div,{...u,ref:o,style:{width:h,height:p,position:"absolute",right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null},"ScrollAreaCornerImpl"));function Xo(a){return a?parseInt(a,10):0}Ne(Xo,"toInt");function mf(a,r){const o=a/r;return isNaN(o)?0:o}Ne(mf,"getThumbRatio");function Ko(a){const r=mf(a.viewport,a.content),o=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,s=(a.scrollbar.size-o)*r;return Math.max(s,18)}Ne(Ko,"getThumbSize");function Py(a,r,o,s="ltr"){const u=Ko(o),d=u/2,h=r||d,b=u-h,p=o.scrollbar.paddingStart+h,g=o.scrollbar.size-o.scrollbar.paddingEnd-b,x=o.content-o.viewport,w=s==="ltr"?[0,x]:[x*-1,0];return hf([p,g],w)(a)}Ne(Py,"getScrollPositionFromPointer");function Od(a,r,o="ltr"){const s=Ko(r),u=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,d=r.scrollbar.size-u,h=r.content-r.viewport,b=d-s,p=o==="ltr"?[0,h]:[h*-1,0],g=By(a,p);return hf([0,h],[0,b])(g)}Ne(Od,"getThumbOffsetFromScroll");function hf(a,r){return o=>{if(a[0]===a[1]||r[0]===r[1])return r[0];const s=(r[1]-r[0])/(a[1]-a[0]);return r[0]+s*(o-a[0])}}Ne(hf,"linearScale");function pf(a,r){return a>0&&a<r}Ne(pf,"isScrollingWithinScrollbarBounds");var C2=Ne((a,r=()=>{})=>{let o={left:a.scrollLeft,top:a.scrollTop},s=0;return Ne((function u(){const d={left:a.scrollLeft,top:a.scrollTop},h=o.left!==d.left,b=o.top!==d.top;(h||b)&&r(),o=d,s=window.requestAnimationFrame(u)}),"loop")(),()=>window.cancelAnimationFrame(s)},"addUnlinkedScrollListener");function Jo(a,r){const o=Pa(a),s=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),y.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(o,r)},[o,r])}Ne(Jo,"useDebounceCallback");function Ol(a,r){const o=Pa(r);Td(()=>{let s=0;if(a){const u=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(o)});return u.observe(a),()=>{window.cancelAnimationFrame(s),u.unobserve(a)}}},[a,o])}Ne(Ol,"useResizeObserver");var Zy=f2,T2=h2,R2=E2;const $y=y.forwardRef(({className:a,children:r,...o},s)=>f.jsxs(Zy,{ref:s,className:Zt("relative overflow-hidden",a),...o,children:[f.jsx(T2,{"data-scroll-area-viewport":"true",className:"h-full w-full overflow-x-hidden rounded-[inherit] [&>div]:!block [&>div]:!w-full [&>div]:!min-w-0",children:r}),f.jsx(Ky,{}),f.jsx(R2,{})]}));$y.displayName=Zy.displayName;const Ky=y.forwardRef(({className:a,orientation:r="vertical",...o},s)=>f.jsx(Xy,{ref:s,orientation:r,className:Zt("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...o,children:f.jsx(w2,{className:"relative flex-1 rounded-full bg-border"})}));Ky.displayName=Xy.displayName;function j2({frame:a,children:r}){return a==="bare"?f.jsx("div",{"data-account-credentials-frame":"bare",className:"w-full text-card-foreground",children:r}):f.jsx(df,{"data-account-credentials-frame":"card",className:"w-full border-border bg-card text-card-foreground",children:r})}function Mo(a,r,o,s,u){s({...a,[r]:o}),u?.(r,o)}function gf({id:a,message:r}){return r?f.jsxs("p",{id:a,role:"alert","aria-live":"polite",className:"flex items-center gap-1.5 text-sm text-destructive",children:[f.jsx(Xs,{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),r]}):null}function N2({id:a,label:r,error:o,children:s}){return f.jsxs("div",{className:"space-y-1.5",children:[f.jsxs("div",{"data-floating-field":"true",className:"relative",children:[s,f.jsx(zl,{htmlFor:a,className:"pointer-events-none absolute left-3 top-0 z-[1] -translate-y-1/2 bg-card px-1 text-xs leading-none text-muted-foreground transition-[color,font-size,top,transform] duration-150 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:-translate-y-1/2 peer-focus:text-xs peer-focus:text-ring peer-disabled:opacity-50 peer-aria-[invalid=true]:text-destructive",children:r})]}),f.jsx(gf,{id:`${a}-error`,message:o})]})}function U2({id:a,label:r,error:o,children:s}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx(zl,{htmlFor:a,children:r}),s,f.jsx(gf,{id:`${a}-error`,message:o})]})}function gs({id:a,label:r,error:o,floating:s,children:u}){const d=s?N2:U2;return f.jsx(d,{id:a,label:r,error:o,children:u})}function Jy({frame:a,testId:r,children:o}){return a==="bare"?f.jsx("div",{"data-testid":r,"data-account-auxiliary-frame":"bare",className:"w-full text-card-foreground",children:o}):f.jsx(df,{className:"w-full border-border bg-card text-card-foreground",children:f.jsx($y,{"data-testid":r,className:"max-h-[min(70vh,36rem)] overflow-y-auto",children:o})})}function _2({mode:a,values:r,onChange:o,onSubmit:s,onFieldChange:u,onModeChange:d,rememberAccount:h=!0,onRememberAccountChange:b,pending:p=!1,errors:g,usernameAvailability:x="idle",usernameSuggestions:w=[],copy:S,frame:C="card",showHeader:U=!0,presentation:N="standard"}){const[j,I]=y.useState(!1),[P,H]=y.useState(!1),ee=y.useId(),F=y.useId(),se=y.useId(),Z=y.useId(),Y=y.useId(),ce=a==="register",ge=typeof x=="string"?x:x.status,te=ce&&r.password.length>0&&r.confirmation!==void 0&&r.password!==r.confirmation,oe=te&&(j||P)?S.mismatchError:void 0,Ue=ce?S.registerAction:S.loginAction,ne=N==="compact",me=ne?"peer h-11 rounded-xl px-3 pb-2 pt-4":void 0,L=W=>{if(W?.preventDefault(),!p){if(ce&&te){I(!0);return}I(!1),s(r)}},Q=f.jsxs(f.Fragment,{children:[U?f.jsxs(Gs,{children:[f.jsx(Is,{children:ce?S.registerTitle:S.loginTitle}),f.jsx(Vs,{children:S.productName})]}):null,f.jsx(Yo,{className:Zt(C==="bare"?"p-0":U?void 0:"pt-6"),children:f.jsxs("form",{onSubmit:L,className:ne?"space-y-3":"space-y-4",children:[ce?f.jsxs("div",{className:"space-y-2",children:[f.jsx(gs,{floating:ne,id:ee,label:S.usernameLabel,error:g?.username,children:f.jsx(ba,{id:ee,name:"username",autoComplete:"username",placeholder:ne?" ":S.usernamePlaceholder,title:S.usernamePlaceholder,value:r.username??"",disabled:p,"aria-invalid":g?.username?!0:void 0,"aria-describedby":g?.username?`${ee}-error`:void 0,className:me,onChange:W=>Mo(r,"username",W.currentTarget.value,o,u)})}),ge==="checking"?f.jsxs("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:[f.jsx(_l,{"aria-hidden":"true",className:"mr-1 inline h-3.5 w-3.5 animate-spin"}),S.usernameChecking]}):null,ge==="available"?f.jsxs("p",{"aria-live":"polite",className:"flex items-center gap-1 text-sm text-primary",children:[f.jsx(x1,{"aria-hidden":"true",className:"h-4 w-4"}),S.usernameAvailable]}):null,ge==="unavailable"&&!g?.username?f.jsx("p",{"aria-live":"polite",className:"text-sm text-destructive",children:typeof x=="object"&&x.message?x.message:S.usernameUnavailable}):null,!ne&&w.length>0?f.jsxs("div",{className:"space-y-2","aria-label":S.suggestionsLabel,children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:S.suggestionsLabel}),f.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(W=>f.jsx(pt,{type:"button",variant:"outline",size:"sm",disabled:p,onClick:()=>Mo(r,"username",W,o,u),children:W},W))})]}):null]}):null,f.jsx(gs,{floating:ne,id:F,label:S.emailLabel,error:g?.email,children:f.jsx(ba,{id:F,name:"email",type:"email",autoComplete:"email",placeholder:ne?" ":S.emailPlaceholder,title:S.emailPlaceholder,value:r.email??"",disabled:p,"aria-invalid":g?.email?!0:void 0,"aria-describedby":g?.email?`${F}-error`:void 0,className:me,onChange:W=>Mo(r,"email",W.currentTarget.value,o,u)})}),f.jsx(gs,{floating:ne,id:se,label:S.passwordLabel,error:g?.password,children:f.jsx(ba,{id:se,name:"password",type:"password",autoComplete:ce?"new-password":"current-password",placeholder:ne?" ":S.passwordPlaceholder,title:S.passwordPlaceholder,value:r.password,disabled:p,"aria-invalid":g?.password?!0:void 0,"aria-describedby":g?.password?`${se}-error`:void 0,className:me,onChange:W=>Mo(r,"password",W.currentTarget.value,o,u)})}),ce?f.jsx(gs,{floating:ne,id:Z,label:S.confirmationLabel,error:oe??g?.confirmation,children:f.jsx(ba,{id:Z,name:"confirmation",type:"password",autoComplete:"new-password",placeholder:ne?" ":S.confirmationPlaceholder,title:S.confirmationPlaceholder,value:r.confirmation??"",onBlur:()=>H(!0),disabled:p,"aria-invalid":oe||g?.confirmation?!0:void 0,"aria-describedby":oe||g?.confirmation?`${Z}-error`:void 0,className:me,onChange:W=>{I(!1),Mo(r,"confirmation",W.currentTarget.value,o,u)}})}):null,!ce&&b?f.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[f.jsx("input",{type:"checkbox",name:"remember",checked:h,disabled:p,onChange:W=>b(W.currentTarget.checked)}),"记住账号"]}):null,f.jsx(gf,{id:Y,message:g?.form}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs(pt,{type:"submit",className:Zt("w-full",ne&&"h-10 rounded-xl"),disabled:p,children:[p?f.jsx(_l,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,Ue]}),d?f.jsx(pt,{type:"button",variant:"ghost",className:Zt("w-full",ne&&"h-9 rounded-lg text-xs"),disabled:p,onClick:()=>d(ce?"login":"register"),children:ce?S.switchToLogin:S.switchToRegister}):null]})]})})]});return f.jsx(j2,{frame:C,children:Q})}function z2({email:a,onEmailChange:r,onSubmit:o,onRecover:s,pending:u=!1,status:d="idle",error:h,copy:b,frame:p="card",showHeader:g=!0}){const x=y.useId(),w=u||d==="submitting",S=o??s,C=N=>{N.preventDefault(),w||S?.(a)},U=f.jsxs(f.Fragment,{children:[g?f.jsxs(Gs,{className:p==="bare"?"p-0 pb-4":void 0,children:[f.jsx(Is,{children:b.title}),b.description?f.jsx(Vs,{children:b.description}):null]}):null,f.jsx(Yo,{className:p==="bare"?"p-0":void 0,children:d==="success"?f.jsxs("div",{role:"status","aria-live":"polite",className:"space-y-2",children:[f.jsx("p",{className:"font-medium text-foreground",children:b.successTitle}),f.jsx("p",{className:"text-sm text-muted-foreground",children:b.successMessage})]}):f.jsxs("form",{onSubmit:C,className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(zl,{htmlFor:x,children:b.emailLabel}),f.jsx(ba,{id:x,type:"email",autoComplete:"email",placeholder:b.emailPlaceholder,value:a,disabled:w,onChange:N=>r(N.currentTarget.value)})]}),h?f.jsx("p",{role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:h}):null,f.jsxs(pt,{type:"submit",className:"w-full",disabled:w||!a.trim()||!S,children:[w?f.jsx(_l,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,b.actionLabel]})]})})]});return f.jsx(Jy,{frame:p,testId:"password-recovery-scroll",children:U})}function O2({password:a,confirmation:r,onPasswordChange:o,onConfirmationChange:s,onSubmit:u,onReset:d,pending:h=!1,status:b="idle",error:p,copy:g,frame:x="card",showHeader:w=!0}){const S=y.useId(),C=y.useId(),U=h||b==="submitting",N=u??d,j=a.length>0&&a!==r,I=H=>{H?.preventDefault(),!U&&(j||N?.({password:a,confirmation:r}))},P=b==="success"?f.jsx(Yo,{className:x==="bare"?"p-0":void 0,children:f.jsx("p",{role:"status","aria-live":"polite",children:g.successMessage})}):f.jsxs(f.Fragment,{children:[w?f.jsxs(Gs,{className:x==="bare"?"p-0 pb-4":void 0,children:[f.jsx(Is,{children:g.title}),g.description?f.jsx(Vs,{children:g.description}):null]}):null,f.jsx(Yo,{className:x==="bare"?"p-0":void 0,children:f.jsxs("form",{onSubmit:I,className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(zl,{htmlFor:S,children:g.passwordLabel}),f.jsx(ba,{id:S,type:"password",autoComplete:"new-password",placeholder:g.passwordPlaceholder,value:a,disabled:U,onChange:H=>o(H.currentTarget.value)})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(zl,{htmlFor:C,children:g.confirmationLabel}),f.jsx(ba,{id:C,type:"password",autoComplete:"new-password",placeholder:g.confirmationPlaceholder,value:r,disabled:U,"aria-invalid":j?!0:void 0,onChange:H=>s(H.currentTarget.value)})]}),p?f.jsx("p",{role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:p}):null,j?f.jsx("p",{role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:g.mismatchError}):null,f.jsxs(pt,{type:"submit",className:"w-full",disabled:U||!N,children:[U?f.jsx(_l,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,g.actionLabel]})]})})]});return f.jsx(Jy,{frame:x,testId:"password-reset-scroll",children:P})}function Wy(){return globalThis.xpodDesktop?"window":"document"}function Fy(a=!0,r="auth"){y.useEffect(()=>{if(a)return globalThis.xpodDesktop?.setWindowMode?.(r),()=>{globalThis.xpodDesktop?.setWindowMode?.("workspace")}},[a,r])}const M2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20fill='none'%3e%3cpath%20d='M32%207%2051%2016.5v13.8c0%2012.4-7.4%2021.2-19%2027.7-11.6-6.5-19-15.3-19-27.7V16.5L32%207Z'%20stroke='%238A72BE'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e",L2=[{icon:ly,title:"Your AI Secretary Never Stops",description:"Runs 24/7, even when you are not talking to it"},{icon:ry,title:"All Your Pieces, In One Place",description:"Data, memory, and context come back into one system"},{icon:Ts,title:"One Secretary, Many Agents",description:"One aligned layer that can direct many agents while keeping privacy and control inside your boundary."}];function bd({compact:a=!1}){return f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("img",{src:M2,alt:"",className:a?"h-9 w-9":"h-12 w-12"}),f.jsxs("div",{children:[f.jsx("p",{className:`${a?"text-xl":"text-2xl"} font-bold leading-tight`,children:"Xpod"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Personal Messages Platform"})]})]})}function ev({title:a,description:r,children:o,presentation:s="standard",host:u="document"}){const d=y.useId(),h=u==="window"&&s==="compact";return s==="compact"?f.jsx("main",{"data-testid":"web-account-page",className:h?"flex h-dvh w-full items-center justify-center overflow-hidden bg-background text-foreground":"flex min-h-dvh items-center justify-center bg-muted/30 p-4 text-foreground sm:p-6",children:f.jsxs("section",{role:"region","aria-labelledby":d,"data-testid":"web-account-panel","data-web-account-layout":"compact","data-web-account-host":h?"window":"document",className:h?"flex h-full w-full min-w-0 flex-col overflow-y-auto overscroll-contain px-5 py-5":"mx-auto flex h-[400px] w-[280px] max-h-[calc(100dvh-2rem)] max-w-[calc(100vw-2rem)] min-w-0 flex-col overflow-y-auto overscroll-contain rounded-xl border bg-card px-5 py-5 shadow-lg shadow-black/5",children:[f.jsx("div",{className:"mb-4 shrink-0",children:f.jsx(bd,{compact:!0})}),f.jsxs("header",{className:"mb-4 shrink-0 text-center",children:[f.jsx("h1",{id:d,className:"text-xl font-semibold tracking-tight",children:a}),r?f.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:r}):null]}),f.jsx("div",{className:"min-w-0 shrink-0",children:o})]})}):f.jsx("main",{"data-testid":"web-account-page",className:"flex min-h-dvh items-center justify-center bg-muted/30 p-4 text-foreground sm:p-8",children:f.jsxs("div",{className:"grid w-full max-w-6xl items-center gap-8 lg:grid-cols-2 lg:gap-16",children:[f.jsxs("aside",{"data-testid":"web-account-introduction","aria-label":"关于 Xpod",className:"hidden px-8 lg:block",children:[f.jsx(bd,{}),f.jsxs("h1",{className:"mb-4 mt-8 text-3xl font-bold leading-tight",children:["Simplify Life with ",f.jsx("span",{className:"text-primary",children:"Your AI Secretary"})]}),f.jsx("p",{className:"mb-10 text-sm leading-relaxed text-muted-foreground",children:"An AI that never stops, knows your whole life, works for you—while guarding your privacy."}),f.jsx("div",{className:"space-y-5",children:L2.map(({icon:b,title:p,description:g})=>f.jsxs("div",{className:"flex gap-3",children:[f.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border bg-card",children:f.jsx(b,{"aria-hidden":"true",className:"h-4 w-4 text-primary"})}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-sm font-medium",children:p}),f.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:g})]})]},p))}),f.jsxs("p",{className:"mt-12 text-xs text-muted-foreground",children:["Powered by ",f.jsx("a",{href:"https://solidproject.org",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"Solid Protocol"})]})]}),f.jsxs("section",{role:"region","aria-labelledby":d,"data-testid":"web-account-panel","data-web-account-layout":"standard",className:"mx-auto w-full min-w-0 max-w-md rounded-3xl border bg-card p-6 shadow-lg shadow-black/5 sm:p-8 lg:mx-0",children:[f.jsx("div",{className:"mb-8 lg:hidden",children:f.jsx(bd,{})}),f.jsxs("header",{className:"mb-6",children:[f.jsx("h2",{id:d,className:"text-2xl font-bold tracking-tight",children:a}),r?f.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:r}):null]}),o]})]})})}function Dl({title:a,children:r,presentation:o="compact"}){const s=Wy();return Fy(s==="window"&&o==="compact","account"),f.jsx(ev,{title:a,presentation:o,host:s,children:r})}function D2(a){const r=Wy(),o="compact";return Fy(r==="window"&&o==="compact","account"),f.jsxs(ev,{title:a.surfaceTitle,description:a.mode==="register"?"创建你的 Xpod 账号,开始使用个人存储空间。":"登录以继续使用你的身份与个人存储空间。",presentation:o,host:r,children:[f.jsx(_2,{...a,frame:"bare",showHeader:!1,presentation:o}),a.footer?f.jsx("div",{className:"mt-6 space-y-3 border-t pt-5",children:a.footer}):null]})}function k2(){return f.jsx(Dl,{title:"正在加载 Xpod",children:f.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-1 items-center justify-center p-5 text-sm text-muted-foreground",children:[f.jsx(_l,{"aria-hidden":"true",className:"mr-2 h-5 w-5 animate-spin"}),"正在加载…"]})})}function B2(){const[a,r]=y.useState(!1),[o,s]=y.useState(!1),u=y.useRef(!1);if(!window.xpodDesktop?.cancelLogin)return null;const d=async()=>{const h=window.xpodDesktop;if(!(u.current||!h?.cancelLogin)){u.current=!0,r(!0),s(!1);try{await h.cancelLogin()}catch{s(!0)}finally{u.current=!1,r(!1)}}};return f.jsxs("div",{className:"space-y-2",children:[o&&f.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"返回应用未完成,请重试。"}),f.jsx(pt,{type:"button",variant:"ghost",className:"w-full",disabled:a,"aria-busy":a,onClick:()=>{d()},children:a?"正在返回…":"返回应用"})]})}function H2({message:a,retry:r}){return f.jsx(Dl,{title:"账号服务暂时不可用",children:f.jsxs("div",{className:"space-y-6",children:[f.jsx("p",{role:"alert",className:"text-sm leading-relaxed text-muted-foreground",children:"无法读取账号服务信息。请重试当前步骤,无需重新注册或清除登录状态。"}),f.jsxs("details",{className:"text-xs text-muted-foreground",children:[f.jsx("summary",{className:"cursor-pointer",children:"技术详情"}),f.jsx("p",{className:"mt-2 break-words",children:a})]}),f.jsx(pt,{type:"button",className:"w-full",onClick:()=>r?void r():window.location.reload(),children:"重试"}),f.jsx(B2,{})]})})}const Md="xpod:returnTo";function ko(a){try{a&&sessionStorage.setItem(Md,a)}catch{return}}function bf(){try{const a=sessionStorage.getItem(Md);return a&&sessionStorage.removeItem(Md),a}catch{return null}}function q2(){try{const a=new URLSearchParams(window.location.search).get("returnTo");return!a||new URL(a,window.location.origin).origin!==window.location.origin?null:a}catch{return null}}function $g(a,r){return V(a?"/.account/oidc/consent/":bf()??r)}function Y2(a,r,o=!1){return a&&r&&!o}function Kg({children:a,allowOidcPending:r=!1}){const{controls:o,isLoggedIn:s,hasOidcPending:u}=kn(),d=cn();if(Y2(s,u,r))return f.jsx(Dn,{to:V("/.account/oidc/consent/"),replace:!0});if(!s){ko(d.pathname+d.search);const h=o?.html?.password?.login||o?.password?.login||V("/.account/login/password/");return f.jsx(Dn,{to:V(h),replace:!0})}return f.jsx(f.Fragment,{children:a})}const X2={productName:"Xpod 账号",loginTitle:"登录",registerTitle:"创建账号",usernameLabel:"Pod 名称",usernamePlaceholder:"选择 Pod 名称",emailLabel:"邮箱",emailPlaceholder:"you@example.com",passwordLabel:"密码",passwordPlaceholder:"输入密码",confirmationLabel:"确认密码",confirmationPlaceholder:"再次输入密码",loginAction:"登录",registerAction:"创建账号",switchToRegister:"切换用户",switchToLogin:"返回登录",usernameChecking:"正在检查 Pod 名称…",usernameAvailable:"Pod 名称可用",usernameUnavailable:"Pod 名称不可用",suggestionsLabel:"可用建议",mismatchError:"两次输入的密码不一致"},Jg={title:"找回密码",description:"如果这个邮箱已注册,我们会发送重置链接。",emailLabel:"邮箱",emailPlaceholder:"you@example.com",actionLabel:"发送重置链接",successTitle:"请查收邮件",successMessage:"如果该邮箱已注册,重置链接已经发出。"},Wg={title:"设置新密码",description:"为你的账号选择一个新密码。",passwordLabel:"新密码",passwordPlaceholder:"输入新密码",confirmationLabel:"确认密码",confirmationPlaceholder:"再次输入密码",actionLabel:"重设密码",successMessage:"密码已重设。",mismatchError:"两次输入的密码不一致"},Vn={loginSurfaceTitle:"登录",registerSurfaceTitle:"创建账号",recoverSurfaceTitle:"找回密码",resetSurfaceTitle:"重设密码",forgotPassword:"忘记密码?",backToSignIn:"返回登录",cancelAuthorization:"取消授权",cancellingAuthorization:"正在取消…",resend:"重新发送"},je={surfaceTitle:"授权",signInRequiredTitle:"需要先登录",signInRequiredDescription:"请先登录,再批准这次请求并选择要共享的 WebID。",goToSignIn:"去登录",unavailableTitle:"暂时无法授权",tryAgain:"重试",dismiss:"关闭",restoring:"正在恢复授权…",applicationFallback:"应用",title:"批准访问",description:a=>`${a} 请求访问你的账号数据。`,webIdLabel:"WebID",bindingLabel:"身份与存储空间",storageLabel:"Storage",rememberClientLabel:"记住这个应用",approveLabel:"批准",approvingLabel:"正在批准…",denyLabel:"拒绝",denyingLabel:"正在拒绝…",editAccountLabel:"管理账号",switchAccountLabel:"换一个账号",podNameLabel:"Pod 名称",prepareTitle:"准备存储空间",prepareDescription:"批准访问前,先准备存储空间。",creationMessage:"还没有可用的存储空间。",waitingMessage:"正在等待存储空间绑定。",readyMessage:"存储空间已就绪。",conflictMessage:"所选存储空间与当前身份不匹配。",errorMessage:"无法准备存储空间。",createLabel:"创建存储空间",continueLabel:"继续",retryLabel:"重试",cancelLabel:"取消"},jr={surfaceTitle:"准备存储空间",restoring:"正在检查存储空间…",creating:"正在准备存储空间…",unavailableTitle:"存储空间未准备好",waitingMessage:"正在等待 WebID 与存储空间绑定。",retryLabel:"重试"},on={usernameRequired:"请填写 Pod 名称",usernameLength:"Pod 名称需为 3-63 个字符",usernameCharset:"Pod 名称只能包含小写字母、数字和连字符",usernameHyphen:"Pod 名称不能以连字符开头或结尾",usernameUnavailable:"暂时无法检查 Pod 名称,请重试。",emailAlreadyRegistered:"该邮箱已注册,请登录或重置密码。",emailAlreadyRegisteredPasswordMismatch:"该邮箱已注册,但密码不正确,请登录或重置密码。",usernameAlreadyTaken:"Pod 名称已被占用。账号已创建,请登录后换一个名称。",choosePodName:"请填写 Pod 名称。",podNameTaken:"Pod 名称已被占用,请换一个。"};function Fg(a){return a===401||a===403?"邮箱或密码不正确。":a===429?"尝试次数过多,请稍后再试。":"登录失败,请重试。"}function G2(){return"无法完成注册,请重试。"}function eb(){return"取消授权失败,请重试。"}const be={invalidTransaction:"登录状态无效。",expiredInteraction:"本次授权请求已失效,请返回应用重新发起登录。",bindingUnavailable:"应用选择的身份与存储空间已不可用,请返回应用重新选择。",returnFailed:"无法返回应用,请重试。",signInRequired:"请先登录,再继续授权。",loadFailed:"无法加载授权信息,请重试。",clientUnavailable:"无法获取应用信息。",bindingsFailed:"无法加载 WebID 绑定,请重试。",signOutIncomplete:"退出未完成,请重试。",cancelFailed:"取消授权失败,请重试。",chooseStorage:"批准前请先选择存储空间。",cannotPersistStorage:"当前浏览器无法保存这次存储选择。",webIdSelectionFailed:"无法完成 WebID 选择,请重试。",authorizationFailed:"无法完成授权,请重试。",missingRedirect:"授权已完成,但没有返回跳转地址,请重新登录。",choosePodName:"创建存储空间前请先填写 Pod 名称。",storageCreationUnavailable:"暂时无法创建存储空间。",storageCreateFailed:"无法创建存储空间,请重试。"},Lt={checkFailed:"无法检查存储空间状态,请重试。",accountIdentityMissing:"当前账号信息不完整,无法自动准备本机存储空间。",createEndpointMissing:"找不到创建 Pod 的接口,请刷新后重试。",cloudRouteUnavailable:"本机 Xpod 还没有和 Cloud 打通,暂时不能准备存储空间。请保持 Xpod 运行,稍后重试。",storageCreateFailed:"无法创建存储空间,请重试。"};function tb(a){return a===429?"请求过多,请稍后再试。":"无法发送重置链接,请重试。"}function nb(a){return a===400||a===404?"重置链接无效或已过期。":"无法重设密码,请重试。"}const I2=3,Ld=63,V2=/^[a-z0-9-]+$/;function Ml(a){return a.trim().toLowerCase()}function Or(a){const r=Ml(a);if(!r)return on.usernameRequired;if(r.length<I2||r.length>Ld)return on.usernameLength;if(!V2.test(r))return on.usernameCharset;if(r.startsWith("-")||r.endsWith("-"))return on.usernameHyphen}function Q2(a,r=5){const s=Ml(a).replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,Ld-3)||"user",u=Array.from({length:Math.max(r,3)},(d,h)=>`${s}-${h+1}`);return Array.from(new Set(u.map(d=>d.slice(0,Ld)).filter(d=>!Or(d)))).slice(0,r)}function P2(a){if(typeof window<"u")return"/api/v1/identity";try{const r=new URL(a);return r.hostname.startsWith("id.")?`${r.protocol}//api.${r.hostname.slice(3)}/api/v1/identity`:`${r.origin}/api/v1/identity`}catch{return"/api/v1/identity"}}async function tv(a,r,o){const s=`${P2(r)}/${encodeURIComponent(a)}`;try{const u=await o(s,{headers:{Accept:"application/json"},credentials:"include"});if(u.status===404)return!1;if(u.ok||u.status===409)return!0}catch{}}async function Z2(a,r,o,s=3){const u=Q2(a,Math.max(s*2,5)),d=[];for(const h of u)if(await tv(h,r,o)===!1&&d.push(h),d.length>=s)break;return d}async function ab(a,r,o=fetch){const s=Ml(a),u=Or(s);if(u)return{available:!1,suggestions:[],error:u};const d=await tv(s,r,o);return d===!1?{available:!0,suggestions:[]}:d===void 0?{available:!1,suggestions:[],error:on.usernameUnavailable}:{available:!1,suggestions:await Z2(s,r,o)}}function Wo(a){return a!==a.trim()||/[\r\n\t]/.test(a)}class Mn extends Error{code;constructor(r,o){super(o),this.name="AccountStorageBindingsError",this.code=r}}async function Ps(a){const r=K2(a.origin),o=a.controls?.account?.bindings;if(typeof o!="string"||o.trim()==="")throw new Mn("missing-control","Account storage bindings control is unavailable");const s=a.fetchImpl??fetch,u=J2(o,r),d=u.origin===r?u.href:await Ut(u.href,s,a.trustedAccountIndex);if(!d)throw new Mn("cross-origin","Account storage bindings control is not hosted by this Xpod");const h=tt({Accept:"application/json",...a.headers});let b;try{b=await s(d,{headers:h,credentials:"include"})}catch(g){throw new Mn("request-failed",g instanceof Error?g.message:"Failed to load Account storage bindings")}if(b.status===401||b.status===403)throw new Mn("forbidden","Account storage bindings require an authenticated Account");if(!b.ok)throw new Mn("request-failed",`Account storage bindings request failed (${b.status})`);let p;try{p=await b.json()}catch{throw new Mn("invalid-response","Account storage bindings response is not valid JSON")}return $2(p,u.origin,eA(u,a.trustedAccountIndex,r))}function $2(a,r,o=!1){if(!lb(a)||!Array.isArray(a.bindings))throw new Mn("invalid-response","Account storage bindings response is malformed");const s=[],u=new Set;for(const d of a.bindings){if(!lb(d)||typeof d.webId!="string"||typeof d.storageUrl!="string")throw new Mn("invalid-response","Account storage binding row is malformed");const h=W2(d.webId),b=F2(d.storageUrl,o?void 0:r);if(!h||!b)throw new Mn("cross-origin","Account storage binding is outside the trusted storage scope");const p={webId:h,storageUrl:b,...typeof d.label=="string"?{label:d.label}:{}},g=`${p.webId}
|
|
12
|
-
${p.storageUrl}`;u.has(g)||(u.add(g),s.push(p))}return s}function K2(a){try{return new URL(a??(typeof window>"u"?"http://localhost":window.location.origin)).origin}catch{throw new Mn("cross-origin","Current Xpod origin is invalid")}}function J2(a,r){try{const o=new URL(a,r);if(!["http:","https:"].includes(o.protocol)||o.username||o.password||o.hash)throw new Error("unsafe control URL");return o}catch{throw new Mn("cross-origin","Account storage bindings control is not a valid URL")}}function W2(a){if(!Wo(a))try{const r=new URL(a);return!["http:","https:"].includes(r.protocol)||r.username||r.password?void 0:a}catch{return}}function F2(a,r){try{const o=new URL(a.trim());return r!==void 0&&o.origin!==r||!["http:","https:"].includes(o.protocol)||o.username||o.password||o.search||o.hash?void 0:(o.pathname=o.pathname.endsWith("/")?o.pathname:`${o.pathname}/`,o.href)}catch{return}}function eA(a,r,o){if(!r)return!1;try{const s=new URL(r,o);return s.pathname.startsWith("/.account/")&&a.origin===s.origin&&a.pathname.startsWith("/.account/")}catch{return!1}}function lb(a){return!!(a&&typeof a=="object"&&!Array.isArray(a))}function wa(a){return typeof a=="object"&&a!==null}function Dd(a){return wa(a)&&typeof a.message=="string"?a.message:""}function Bo(a,r){if(a)try{const o=new URL(r,globalThis.location?.origin??"http://localhost"),s=new URL(a,o);return s.origin===o.origin?s.href:new URL(`${s.pathname}${s.search}${s.hash}`,o.origin).href}catch{return}}class Ul extends Error{code;constructor(r,o){super(r),this.name="RegistrationError",this.code=o}}class Go extends Error{code="POD_CREATED_BUT_NOT_READY";createdPod=!0;constructor(r="Pod 已创建,但尚未确认 WebID 与存储绑定可用。请稍后重试确认,不要重复创建。"){super(r),this.name="RegistrationProvisioningNotReadyError"}}async function Ka(a){const r=await a.json().catch(()=>{});return r?.message||r?.error}async function rb(a){const r=await a.json().catch(()=>({}));return wa(r)?r:{}}function tA(a){return a.match(/There already is a resource at\s+(\S+)/iu)?.[1]}function nA(a,r){if(!a)return!1;const o=tA(a);if(o)return Mr(o,r);const s=a.match(/Pod name "([^"]+)" is already taken/iu)?.[1];return s?s===r:/Username already taken/i.test(a)}function aA(a){return a?/already is a login for this e-mail address/i.test(a)||/email(?: address)? is already/i.test(a)||/already registered/i.test(a):!1}function Mr(a,r){try{return new URL(a,"http://xpod.local").pathname.split("/").filter(Boolean)[0]===r}catch{return!1}}function lA(a,r){return Mr(a,r)}function Io(a,r){try{return new URL(a,globalThis.location?.origin??"http://localhost").pathname.split("/").filter(Boolean)[0]===r}catch{return!1}}function nv(a){return wa(a)&&!Array.isArray(a)&&Object.values(a).every(r=>typeof r=="string")}async function av(a){const r=await a.json().catch(()=>{});if(!wa(r)||!nv(r.pods))throw new Error("Account pod response is malformed");return{pods:r.pods}}async function lv(a){const r=await a.json().catch(()=>{});if(!wa(r)||!nv(r.webIdLinks))throw new Error("Account WebID response is malformed");return{webIdLinks:r.webIdLinks}}async function rA(a,r,o,s,u,d){if(d)return oA(a,o,s,u,d);const h=await a(V(r),{headers:Tn(u),credentials:"include"});if(!h.ok)throw new Error(await Ka(h)||`Account pod query failed (${h.status})`);const b=await av(h);return Object.keys(b.pods??{}).some(p=>Mr(p,s))}async function oA(a,r,o,s,u){if(!r)throw new Error("WebID listing endpoint not found. The account API did not expose controls.account.webId.");const d=await a(V(r),{headers:Tn(s),credentials:"include"});if(!d.ok)throw new Error(await Ka(d)||`Account WebID query failed (${d.status})`);const h=await lv(d),b=Object.keys(h.webIdLinks??{}).filter(g=>Io(g,o));return(await nf(a,b,u)??[]).some(g=>Io(g.webId,o)&&Mr(g.storageUrl,o))}async function iA(a){const r=a.fetchImpl??fetch;let o=await r(V(a.accountCreateUrl),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({})});if(!o.ok)throw new Error(Dd(await rb(o))||"Failed to create account");const s=await o.json().catch(()=>({})),u=typeof s.authorization=="string"?s.authorization:"";if(!u)throw new Error("Account token not returned");const d=new URL(a.accountCreateUrl,globalThis.location?.origin??"http://localhost"),h=new URL("/.account/",d).href;if(o=await r(V(h),{headers:Tn(u),credentials:"include"}),!o.ok)throw new Error(Dd(await rb(o))||"Failed to load account controls");const b=await o.json().catch(()=>({})),p=Bo(b.controls?.password?.create,h),g=Bo(b.controls?.password?.login,h);if(!p)throw new Error("Password endpoint not found");if(!g)throw new Error("Login endpoint not found");if(o=await r(V(p),{method:"POST",headers:{...Tn(u),"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:a.email,password:a.password})}),!o.ok){const x=await Ka(o);throw aA(x)?new Ul(on.emailAlreadyRegistered,"EMAIL_ALREADY_REGISTERED"):new Error(x||"Failed to set password")}return{accountToken:u,loginUrl:g}}async function sA(a){const o=await(a.fetchImpl??fetch)(V(a.loginUrl),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({email:a.email,password:a.password,...a.remember===void 0?{}:{remember:a.remember}})});if(!o.ok){const d=await Ka(o);throw a.duplicateEmailRecovery?new Ul(on.emailAlreadyRegisteredPasswordMismatch,"EMAIL_ALREADY_REGISTERED"):new Error(d||"Auto-login failed")}const s=await o.json().catch(()=>({})),u=typeof s.authorization=="string"?s.authorization:"";if(!u)throw new Error("Account token not returned after login");return{accountToken:u}}async function ob(a,r,o,s,u=15e3,d,h){const b=Date.now()+u;let p={bindings:o?.bindings,pod:o?.pod,webId:o?.webId};const g=await Ys(d),x=d??g.activeProvisionCode;for(;Date.now()<b;){try{if(!p.pod&&!p.webId){if(!s)throw new Error("Account token is required to load account controls");p=await vf(a,r,s)}if(!s||!h)throw new Error("Account token and username are required to check registration readiness");if(await rv(a,r,p,s,x,h,g?.storageRoot))return!0}catch{}await new Promise(w=>setTimeout(w,500))}return!1}async function yf(a,r,o,s,u,d){if(!o.bindings)return!1;const h=new URL(r,globalThis.location?.origin??"http://localhost"),b=h.pathname.startsWith("/.account/")?h.href:new URL("/.account/",h).href;return(await Ps({controls:{account:{bindings:o.bindings}},fetchImpl:a,headers:Tn(s),origin:h.origin,trustedAccountIndex:b})).some(g=>Io(g.webId,u)&&lA(g.storageUrl,u)&&(!d||$a(g.storageUrl,d)))}async function vf(a,r,o){const s=await a(V(r),{headers:Tn(o),credentials:"include"});if(!s.ok)throw new Error(await Ka(s)||`Failed to load account controls (${s.status})`);const u=await s.json().catch(()=>({}));return{bindings:Bo(u.controls?.account?.bindings,r),pod:Bo(u.controls?.account?.pod,r),webId:Bo(u.controls?.account?.webId,r)}}async function rv(a,r,o,s,u,d,h){if(await yf(a,r,o,s,d,h))return!0;if(h&&!u)return!1;if(o.webId){const g=await a(V(o.webId),{headers:Tn(s),credentials:"include"});if(!g.ok)throw new Error(await Ka(g)||`Account WebID query failed (${g.status})`);const x=await lv(g),w=Object.keys(x.webIdLinks??{}).filter(S=>Io(S,d));if(u)return(await nf(a,w,u)??[]).some(C=>Io(C.webId,d)&&Mr(C.storageUrl,d)&&(!h||$a(C.storageUrl,h)));if(w.length>0)return!0}if(u)throw new Error("WebID listing endpoint not found. The account API did not expose controls.account.webId.");if(!o.pod)throw new Error("Pod listing endpoint not found. The account API did not expose controls.account.pod.");const b=await a(V(o.pod),{headers:Tn(s),credentials:"include"});if(!b.ok)throw new Error(await Ka(b)||`Account pod query failed (${b.status})`);const p=await av(b);return Object.keys(p.pods??{}).some(g=>Mr(g,d))}async function cA(a){const r=a.fetchImpl??fetch,{accountIndexUrl:o,accountToken:s,username:u}=a,d=await vf(r,o,s),h=await Ys(a.provisionCode);if(await yf(r,o,d,s,u,h?.storageRoot))return{createdPod:!0,redirectedToConsent:await Ho(r,s)};let p;try{p=h.activeProvisionCode??await rf(a.provisionCode)}catch{throw new Go}if(!await rv(r,o,d,s,p,u,h?.storageRoot))throw new Go;return{createdPod:!0,redirectedToConsent:await Ho(r,s)}}async function uA(a){const r=a.fetchImpl??fetch,{accountIndexUrl:o,accountToken:s,username:u}=a,d=await vf(r,o,s),h=d.pod,b=d.webId;if(!h)throw new Error("Pod creation endpoint not found. The account API did not expose controls.account.pod.");const p=await Ys(a.provisionCode);if(await yf(r,o,d,s,u,p?.storageRoot))return{createdPod:!0,redirectedToConsent:await Ho(r,s)};const x=p.activeProvisionCode??await rf(a.provisionCode);if(await rA(r,h,b,u,s,x)){if(!await ob(r,o,d,s,15e3,x,u))throw new Go;return{createdPod:!0,redirectedToConsent:await Ho(r,s)}}const w=x?await tf(r,u,x):void 0,S=await r(V(h),{method:"POST",headers:{...Tn(s),"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(lf(u,w?.provisionCode??x,w?.provisionReceipt))});if(!S.ok){const C=await Ka(S);throw nA(C,u)?new Ul(on.usernameAlreadyTaken,"USERNAME_ALREADY_TAKEN"):new Error(C||"Failed to create pod")}if(await S.json().catch(()=>({})),!await ob(r,o,d,s,15e3,x,u))throw new Go;return{createdPod:!0,redirectedToConsent:await Ho(r,s)}}async function Ho(a,r){const o=await a(V("/.account/oidc/consent/"),{headers:Tn(r),credentials:"include"});return!!(o.ok&&(await o.json().catch(()=>({}))).client)}const dA=["/dashboard","/status","/network","/settings","/ai-config","/ai-connections"];function fA(a){if(a===void 0)return;if(typeof a!="string"||a.trim()==="")throw new TypeError("returnTo must be a non-empty application path");const r=a.trim(),o=mA(r),s=o.split(/[?#]/,1)[0];if(!r.startsWith("/")||r.startsWith("//")||r.includes("\\")||o.includes("\\")||/^[a-z][a-z\d+.-]*:/i.test(o)||o.startsWith("//")||s.split("/").some(u=>u==="..")||!dA.some(u=>s===u||s.startsWith(`${u}/`)))throw new TypeError("returnTo must be a safe path within the application allow-list");return r}function mA(a){let r=a;for(let o=0;o<4;o+=1){let s;try{s=decodeURIComponent(r)}catch{throw new TypeError("returnTo contains malformed percent encoding")}if(s===r)return r;r=s}return r}const hA="xpod-current-origin";function pA(a){return fA(a)}function gA(a,r){const o=Zb(a),s=new URL(r).origin,u=new URL(o.identityProvider.url).origin,d=o.storageProvider?new URL(o.storageProvider.url).origin:void 0;if(o.id!==hA||u!==s||d!==s||o.identityProvider.url!==o.storageProvider?.url)throw new TypeError("Xpod login route must use the current origin for identity and storage");return{...o,identityProvider:{...o.identityProvider,url:s},storageProvider:o.storageProvider?{...o.storageProvider,url:s}:void 0}}const xs="xpod.pending-account-email.v1",js="xpod.pending-account-issuer.v1";function ov(){if(!(typeof window>"u"))try{return window.localStorage}catch{return}}function bA(a,r=ov(),o){const s=sv(a);if(!(!r||!s))try{return r.setItem(xs,s),o?r.setItem(js,iv(o)):r.removeItem(js),s}catch{return}}function Ns(a=ov(),r){if(a)try{const o=sv(a.getItem(xs));if(r){const s=a.getItem(js);if(!s||s!==iv(r)){a.removeItem(xs),a.removeItem(js);return}}return o||a.removeItem(xs),o}catch{return}}function iv(a){try{const r=yA();return r?new URL(a,r).origin:new URL(a).origin}catch{return a.trim()}}function sv(a){if(typeof a!="string")return;const r=a.trim();return r&&r.length<=320&&r.includes("@")?r:void 0}function yA(){return typeof window>"u"?void 0:window.location.origin}function vA(a){return a instanceof Ul?a.message:G2()}function kd({initialIsRegister:a=!1}){const{controls:r,idpIndex:o,isLoggedIn:s,hasOidcPending:u}=kn(),d=Zn(),h=cn(),b=a,[p,g]=y.useState({username:"",email:Ns(void 0,o)??"",password:"",confirmation:""}),[x,w]=y.useState(!1),[S,C]=y.useState(!0),[U,N]=y.useState(!1),[j,I]=y.useState(!1),[P,H]=y.useState(null),[ee,F]=y.useState([]),[se,Z]=y.useState(null),[Y,ce]=y.useState(null),[ge,te]=y.useState(null),[oe,Ue]=y.useState(),ne=Ml(p.username??""),me=b?Or(ne):void 0;if(y.useEffect(()=>{const _=q2();_&&ko(_)},[]),y.useEffect(()=>{let _=!1;if(!b||!ne)return queueMicrotask(()=>{_||(I(!1),H(null),F([]),Z(null))}),()=>{_=!0};if(me)return queueMicrotask(()=>{_||(I(!1),H(!1),F([]),Z(me))}),()=>{_=!0};queueMicrotask(()=>{_||I(!0)});const G=window.setTimeout(async()=>{const $=await ab(ne,o);_||(I(!1),H($.available),F($.suggestions),Z($.error??null))},300);return()=>{_=!0,window.clearTimeout(G)}},[o,b,ne,me]),s&&!oe)return f.jsx(Dn,{to:V("/.account/create-pod/"),replace:!0,state:{next:V(u?"/.account/oidc/consent/":"/.account/account/")}});const L=_=>{g(_),_.email!==p.email&&ce(null),te(null)},Q=(_,G)=>{_==="email"&&ce(null),_==="username"&&Z(null),te(null),g($=>({...$,[_]:G}))},W=async(_,G)=>{const $={accountIndexUrl:await Ut(o,fetch,o)??V("/.account/"),accountToken:_,username:G};try{const K=await uA($);window.location.href=$g(K.redirectedToConsent,V("/.account/create-pod/"))}catch(K){if(!(K instanceof Go))throw K;Ue($),g(ue=>({...ue,password:"",confirmation:""}))}},xe=async()=>{if(!(!oe||x)){w(!0),te(null);try{const _=await cA(oe);window.location.href=$g(_.redirectedToConsent,V("/.account/account/"))}catch{te("暂时无法确认存储空间状态。账号和已创建的空间会保留,请稍后重试。")}finally{w(!1)}}},J=async _=>{if(x)return;w(!0),ce(null),te(null);const G=_.email?.trim()??"",$=_.password;try{if(b){const ke=Ml(_.username??""),wt=Or(ke);if(wt){H(!1),Z(wt);return}const St=await ab(ke,o),at=await Ut(r?.password?.login,fetch,o)??V("/.account/login/password/"),le=async($e=!1)=>{const gt=await sA({duplicateEmailRecovery:$e,email:G,fetchImpl:fetch,loginUrl:at,password:$,remember:!0});return dd(gt.accountToken),gt.accountToken};if(!St.available){let $e;try{$e=await le()}catch{}if($e){await W($e,ke);return}H(!1),F(St.suggestions),Z(St.error??"Pod 名称已被占用。");return}if(St.error){H(!1),Z(St.error);return}let we;const lt=await le().catch(()=>{});if(lt)we=lt;else try{we=(await iA({accountCreateUrl:await Ut(r?.account?.create,fetch,o)??V("/.account/account/"),email:G,password:$})).accountToken,dd(we)}catch($e){if(!($e instanceof Ul)||$e.code!=="EMAIL_ALREADY_REGISTERED")throw $e;we=await le(!0)}await W(we,ke);return}const K=await Ut(r?.password?.login,fetch,o)??V("/.account/login/password/"),ue=await fetch(V(K),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({email:G,password:$,remember:S})}),Ce=await ue.json().catch(()=>({}));if(!ue.ok){te(Fg(ue.status));return}dd(typeof Ce.authorization=="string"?Ce.authorization:void 0),bA(G,void 0,o);const fe=ue.headers.get("Location");if(typeof Ce.location=="string"&&Ce.location){window.location.href=V(Ce.location);return}if(fe){window.location.href=V(fe);return}const Ve=bf();if(Ve){window.location.href=V(Ve);return}try{if((await fetch(V("/.account/oidc/consent/"),{headers:tt(),credentials:"include"})).ok){window.location.href=V("/.account/oidc/consent/");return}}catch{}window.location.href=V("/.account/create-pod/")}catch(K){K instanceof Ul&&K.code==="EMAIL_ALREADY_REGISTERED"?ce(K.message):K instanceof Ul&&K.code==="USERNAME_ALREADY_TAKEN"?(H(!1),Z(K.message)):te(b?vA(K):Fg(500))}finally{w(!1)}},A=_=>{d({pathname:V(_==="register"?"/.account/login/password/register/":"/.account/login/password/"),search:h.search}),g({username:"",email:"",password:"",confirmation:""}),I(!1),H(null),F([]),Z(null),ce(null),te(null)},k=async()=>{const _=r?.oidc?.cancel;if(!(!_||!u||U)){N(!0),te(null);try{const G=await fetch(V(_),{method:"POST",headers:tt({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include"}),$=await G.json().catch(()=>({}));if(!G.ok||typeof $.location!="string"||!$.location){te(eb());return}window.location.href=V($.location)}catch{te(eb())}finally{N(!1)}}};return oe?f.jsx(Dl,{title:"正在确认存储空间",children:f.jsxs("div",{className:"space-y-6",children:[f.jsx("p",{role:"status","aria-live":"polite",className:"text-sm leading-relaxed text-muted-foreground",children:"账号和存储空间已创建,正在确认身份与存储的关联。无需重新注册或创建。"}),ge?f.jsx("p",{role:"alert",className:"text-sm text-destructive",children:ge}):null,f.jsx(pt,{type:"button",className:"w-full",disabled:x,onClick:()=>{xe()},children:x?"正在确认…":"重试确认"})]})}):f.jsx(D2,{surface:"page",surfaceTitle:b?Vn.registerSurfaceTitle:Vn.loginSurfaceTitle,mode:b?"register":"login",values:p,onChange:L,onFieldChange:Q,onSubmit:J,onModeChange:b?A:void 0,pending:x||U,rememberAccount:S,onRememberAccountChange:C,errors:{...Y?{email:Y}:{},...ge?{form:ge}:{},...b&&se&&!j?{username:se}:{}},usernameAvailability:j?"checking":P===!0?"available":P===!1?{status:"unavailable",message:se??void 0}:"idle",usernameSuggestions:ee,copy:X2,footer:b?void 0:f.jsxs(f.Fragment,{children:[!b&&u&&r?.oidc?.cancel?f.jsx(pt,{type:"button",variant:"outline",className:"w-full",disabled:x||U,onClick:k,children:U?Vn.cancellingAuthorization:Vn.cancelAuthorization}):null,b?null:f.jsxs("div",{className:"flex items-center justify-center gap-3 text-xs text-muted-foreground",children:[f.jsx(pt,{type:"button",variant:"ghost",className:"h-auto px-2 py-1 text-xs font-normal text-muted-foreground hover:text-foreground",disabled:x,onClick:()=>A("register"),children:"创建账号"}),f.jsx("span",{"aria-hidden":"true",className:"text-border",children:"·"}),f.jsx(pt,{type:"button",variant:"ghost",className:"h-auto px-2 py-1 text-xs font-normal text-muted-foreground hover:text-foreground",disabled:x,onClick:()=>d({pathname:V("/.account/login/password/forgot/"),search:h.search}),children:Vn.forgotPassword})]})]})})}function xA(){const{isLoggedIn:a,hasOidcPending:r}=kn();return a&&r?f.jsx(Dn,{to:V("/.account/oidc/consent/"),replace:!0}):a?f.jsx(Dn,{to:V("/.account/create-pod/"),replace:!0}):f.jsx(kd,{})}const ib="flex items-center justify-center rounded-xl bg-primary text-primary-foreground",yd="bg-card border border-border rounded-lg flex items-center justify-center shadow-sm",sb="flex items-center gap-3 p-3 bg-muted border border-border rounded-xl hover:border-primary/50 transition-colors group";function wA(){const a=Zn(),{isLoggedIn:r}=kn(),o=[{icon:ly,title:"Your AI Secretary Never Stops",desc:"Runs 24/7, even when you're not talking to it"},{icon:ry,title:"One Place for Your Whole Life",desc:"All your messages together in one place"},{icon:Ts,title:"One Secretary, Many Agents",desc:"Full power, full privacy"}];return f.jsxs("div",{className:"min-h-screen bg-background text-foreground font-sans flex items-center justify-center p-4 lg:p-8",children:[f.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[f.jsx("div",{className:"absolute top-0 left-1/4 w-[800px] h-[600px] bg-primary/5 rounded-full blur-[150px]"}),f.jsx("div",{className:"absolute bottom-0 right-1/4 w-[600px] h-[400px] bg-primary/5 rounded-full blur-[100px]"})]}),f.jsxs("div",{className:"w-full max-w-6xl grid lg:grid-cols-2 gap-8 lg:gap-16 items-center relative z-10",children:[f.jsx("div",{className:"hidden lg:block px-8",children:f.jsxs("div",{className:"max-w-md ml-auto",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[f.jsx("div",{className:`w-12 h-12 shadow-lg shadow-primary/20 ${ib}`,children:f.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground rounded opacity-90"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-2xl font-bold leading-tight",children:"Xpod"}),f.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight",children:"Personal Messages Platform"})]})]}),f.jsxs("h1",{className:"text-2xl xl:text-3xl font-bold leading-tight mb-4",children:["Simplify Life with ",f.jsx("span",{className:"text-primary",children:"Your AI Secretary"})]}),f.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-10",children:"An AI that never stops, knows your whole life, works for you—while guarding your privacy."}),f.jsx("div",{className:"space-y-4",children:f.jsx("div",{className:"space-y-3",children:o.map(({icon:s,title:u,desc:d})=>f.jsxs("div",{className:"flex gap-3",children:[f.jsx("div",{className:`w-8 h-8 shrink-0 ${yd}`,children:f.jsx(s,{className:"w-4 h-4 text-primary"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-xs font-medium text-foreground",children:u}),f.jsx("p",{className:"text-[10px] text-muted-foreground",children:d})]})]},u))})}),f.jsx("div",{className:"mt-12",children:f.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["Powered by ",f.jsx("a",{href:"https://solidproject.org",target:"_blank",rel:"noopener",className:"text-primary hover:text-primary/80",children:"Solid Protocol"})]})})]})}),f.jsx("div",{className:"w-full max-w-sm mx-auto lg:mx-0",children:f.jsxs("div",{className:"bg-card border border-border rounded-3xl p-6 lg:p-8 shadow-xl shadow-black/10",children:[f.jsxs("div",{className:"lg:hidden flex items-center gap-3 mb-8",children:[f.jsx("div",{className:`w-10 h-10 ${ib}`,children:f.jsx("div",{className:"w-5 h-5 border-2 border-primary-foreground rounded opacity-90"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-xl font-bold leading-tight",children:"Xpod"}),f.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight",children:"Personal Messages Platform"})]})]}),f.jsxs("div",{className:"lg:hidden mb-8",children:[f.jsxs("h1",{className:"text-xl font-bold leading-tight mb-3",children:["Simplify Life with ",f.jsx("span",{className:"text-primary",children:"Your AI Secretary"})]}),f.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed mb-6",children:"An AI that never stops, knows your whole life, works for you—while guarding your privacy."}),f.jsx("div",{className:"space-y-2",children:o.map(({icon:s,title:u,desc:d})=>f.jsxs("div",{className:"flex gap-2",children:[f.jsx(s,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),f.jsxs("div",{children:[f.jsx("span",{className:"text-xs font-medium text-foreground",children:u}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[" - ",d]})]})]},u))})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("h2",{className:"text-xl font-bold",children:"About Xpod"}),f.jsx("p",{className:"text-muted-foreground text-xs mt-1",children:"Learn more about the platform and resources."})]}),f.jsxs("div",{className:"space-y-3 mb-6",children:[f.jsxs("a",{href:"https://solidproject.org",target:"_blank",rel:"noopener noreferrer",className:sb,children:[f.jsx("div",{className:`w-8 h-8 ${yd}`,children:f.jsx(Bg,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium text-foreground",children:"Solid Project"}),f.jsx("div",{className:"text-xs text-muted-foreground",children:"Learn about the protocol"})]})]}),f.jsxs("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer",className:sb,children:[f.jsx("div",{className:`w-8 h-8 ${yd}`,children:f.jsx(Bg,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium text-foreground",children:"GitHub"}),f.jsx("div",{className:"text-xs text-muted-foreground",children:"View source code"})]})]})]}),f.jsxs("div",{className:"pt-4 border-t border-border",children:[f.jsx("p",{className:"text-[10px] text-muted-foreground mb-4",children:"Version 0.1.0 · Built with Solid Protocol"}),f.jsxs("button",{onClick:()=>a(V(r?"/.account/account/":"/.account/login/password/")),className:"w-full py-3 border border-border hover:bg-muted text-foreground rounded-xl text-sm font-medium flex items-center justify-center gap-2 transition-colors",children:[f.jsx(f1,{className:"w-4 h-4"}),r?"Back to Dashboard":"Back to Login"]})]})]})})]})]})}function cv(a){return a.replace(/\/+$/u,"")+"/"}function Ja(a){if(a)try{return new URL(a)}catch{return}}function Bd(a,r){const o=Ja(a),s=Ja(r);if(!o||!s||o.origin!==s.origin)return!1;const u=TA(s.pathname);return o.pathname===u||o.pathname.startsWith(u)}function Vo(a,r){const o=Ja(a),s=Ja(r);return!o||!s?"custom":o.origin===s.origin?"cloud":"local"}function SA(a){const r=Zo(a);return r?{root:r.storageRoot,lookupUrl:r.lookupUrl,serviceToken:r.serviceToken,mode:"local"}:void 0}function EA(a,r){const o=SA(r);if(o)return o}async function AA(a,r,o){if(r.length===0)return[];if(!o.lookupUrl||!o.serviceToken)throw new Error("Local storage lookup context is incomplete");return(await Wb(a,r,{lookupUrl:o.lookupUrl,storageRoot:o.root,serviceToken:o.serviceToken})).map(u=>({webId:u.webId,storageUrl:cv(u.storageUrl),storageMode:u.storageMode??Vo(u.webId,u.storageUrl)}))}function CA(a,r,o){const s=r.filter(d=>Bd(d,o.root));if(s.length===0)return[];const u=[];for(const d of a){const h=Vo(d,o.root);if(o.mode!=="local"&&h!==o.mode)continue;const b=h==="cloud"?s.filter(p=>RA(p,d)):s.filter(p=>jA(p,d));for(const p of b)u.push({webId:d,storageUrl:cv(p),storageMode:Vo(d,p)})}return uv(u)}function uv(a){const r=new Set,o=[];for(const s of a){const u=`${s.webId}
|
|
13
|
-
${s.storageUrl}`;r.has(u)||(r.add(u),o.push(s))}return o}function TA(a){return!a||a==="/"?"/":a.endsWith("/")?a:`${a}/`}function RA(a,r){const o=Ja(a),s=Ja(r);if(!o||!s||o.origin!==s.origin)return!1;const[u]=o.pathname.split("/").filter(Boolean),[d]=s.pathname.split("/").filter(Boolean);return!!(u&&d&&u===d)}function jA(a,r){const o=Ja(a),s=Ja(r);if(!o||!s)return!1;const[u]=o.pathname.split("/").filter(Boolean),[d]=s.pathname.split("/").filter(Boolean);return!!(u&&d&&u===d)}function dv(a){try{const o=new URL(a).pathname.split("/").filter(Boolean);return o[o.length-1]}catch{return}}function NA(a){const r=a?.pods;return!r||typeof r!="object"?[]:Object.entries(r).map(([o,s])=>({id:o,resourceUrl:s,name:dv(o)}))}function cb(a){const r=new Set,o=[];for(const s of a)r.has(s.storageUrl)||(r.add(s.storageUrl),o.push({id:s.storageUrl,name:dv(s.storageUrl),storageMode:s.storageMode??Vo(s.webId,s.storageUrl)}));return o}function UA(a){try{const r=new URL(a).pathname.split("/").filter(Boolean);return r[r.length-1]??a}catch{return a.split("/").filter(Boolean).pop()??a}}function _A(a,r){const o=a instanceof Error?a.message:"";return o==="fetch failed"||o.includes("Failed to fetch")||o.includes("Cloud storage is not ready")||o.includes("provision_refresh_failed")||o.includes("provision_refresh_unavailable")?Lt.cloudRouteUnavailable:r}function Rl(a,r){const o=a instanceof Error?a.message:"";return o.startsWith("Pod name is already taken.")?o:r}async function ub(a,r){const o=await a.json().catch(()=>({}));return Rl(typeof o.message=="string"?new Error(o.message):void 0,r)}const zA="flex items-center justify-center rounded-lg bg-primary text-primary-foreground",Cl="bg-card border border-border rounded-xl shadow-sm",vd="w-4 h-4 text-muted-foreground shrink-0",db="block text-xs text-muted-foreground mb-1",Lo="bg-primary hover:bg-primary/90 text-primary-foreground transition-colors disabled:opacity-50",fb="text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",bs="text-sm font-semibold text-foreground flex items-center gap-2",xd="bg-background border border-input rounded-lg text-sm text-foreground focus:border-primary focus:outline-none",mb="text-xs font-mono text-primary hover:text-primary/80 truncate",hb="p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted rounded transition-colors shrink-0",pb="p-2 text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded-lg transition-colors";function OA(){const{controls:a,refetchControls:r,hasOidcPending:o,idpIndex:s}=kn(),u=Zn(),[d,h]=y.useState(!1),[b,p]=y.useState([]),[g,x]=y.useState([]),[w,S]=y.useState(!1),[C,U]=y.useState(""),[N,j]=y.useState([]),[I,P]=y.useState(null),[H,ee]=y.useState(!1),[F,se]=y.useState(""),[Z,Y]=y.useState(""),[ce,ge]=y.useState(null),[te,oe]=y.useState(!1),[Ue,ne]=y.useState(null),me=y.useRef(null),[L,Q]=y.useState(),[W,xe]=y.useState(),[J,A]=y.useState(),[k,_]=y.useState(),[G,$]=y.useState(),K=ef(a?.password?.forgot)??V("/.account/login/password/forgot/");y.useEffect(()=>{let le=!0;return Promise.all([Ut(a?.account?.webId,fetch,s),Ut(a?.account?.pod,fetch,s),Ut(a?.account?.bindings,fetch,s),Ut(a?.account?.clientCredentials,fetch,s),Ut(a?.account?.logout,fetch,s)]).then(([we,lt,$e,gt,ut])=>{le&&(Q(we),xe(lt),A($e),_(gt),$(ut))}),()=>{le=!1}},[a,s]),y.useEffect(()=>{const le=we=>{me.current&&!me.current.contains(we.target)&&oe(!1)};return document.addEventListener("mousedown",le),()=>document.removeEventListener("mousedown",le)},[]);const ue=async(le,we)=>{try{await navigator.clipboard.writeText(le),ge(we),setTimeout(()=>ge(null),2e3)}catch{}},Ce=y.useCallback(async()=>{try{const le=Hs(),we=EA(window.location.origin,le);let lt=null,$e=[],gt=[],ut=[],Dt=[];if(J){const Ke=await Ps({controls:{account:{bindings:J}},origin:window.location.origin,trustedAccountIndex:s});gt=Ke.map(Be=>Be.webId),ut=cb(Ke.map(Be=>({webId:Be.webId,storageUrl:Be.storageUrl,storageMode:Vo(Be.webId,Be.storageUrl)})))}if(L){const Ke=await fetch(V(L),{headers:tt(),credentials:"include"});if(Ke.ok){const Nn=(await Ke.json()).webIdLinks||{};gt=Array.from(new Set([...gt,...Object.keys(Nn)]))}}if(W){const Ke=await fetch(V(W),{headers:tt(),credentials:"include"});if(Ke.ok){const Be=await Ke.json(),Nn=new Set(ut.map($t=>$t.id));ut=[...ut,...NA(Be).filter($t=>!Nn.has($t.id))]}}if(we)if(we.serviceToken)try{Dt=await AA(fetch,gt,we)}catch(Ke){Dt=[],lt=_A(Ke,Lt.checkFailed)}else Dt=CA(gt,ut.map(Ke=>Ke.id),we);Dt=uv(Dt),$e=gt;const jn=we?.serviceToken?cb(Dt):we?ut.filter(Ke=>Bd(Ke.id,we?.root)).map(Ke=>({...Ke,storageMode:Dt.find(Be=>Bd(Ke.id,Be.storageUrl))?.storageMode})):ut;if(p($e),x(jn),k){const Ke=await fetch(V(k),{headers:tt(),credentials:"include"});if(Ke.ok){const Nn=(await Ke.json()).clientCredentials||{},$t=new Set($e),kl=await Promise.all(Object.entries(Nn).map(async([Tt,Bl])=>{const Un=await Ut(Tt,fetch,s);return Un?{id:UA(Un),resourceUrl:Un,webId:typeof Bl=="string"?Bl:void 0}:void 0}));j(kl.filter(Tt=>Tt!==void 0).filter(Tt=>Tt.webId&&$t.has(Tt.webId)))}else j([])}else j([]);ne(lt)}catch(le){console.error("Failed to fetch account data:",le),p([]),x([]),j([]),ne(Rl(le,"无法加载账号信息,请重试。"))}},[J,k,W,L,s]);y.useEffect(()=>{let le=!0;return Promise.resolve().then(()=>{le&&Ce()}),()=>{le=!1}},[Ce]);const fe=async()=>{if(G){h(!0),ne(null);try{(await fetch(V(G),{method:"POST",headers:tt(),credentials:"include"})).ok?(af(),Cs(),await r(),u(V("/.account/"))):ne("退出登录失败,请重试。")}catch(le){ne(Rl(le,"退出登录失败,请重试。"))}finally{h(!1)}}},Ve=async le=>{if(le.preventDefault(),!(!W||!C.trim())){h(!0),ne(null);try{const we=await qs(),lt=await tf(fetch,C.trim(),we),$e=await fetch(V(W),{method:"POST",headers:tt({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",body:JSON.stringify(lf(C,lt?.provisionCode??we,lt?.provisionReceipt))});$e.ok?(U(""),S(!1),await r(),await Ce(),o&&u(V("/.account/oidc/consent/"))):ne(await ub($e,"无法创建存储空间,请重试。"))}catch(we){ne(Rl(we,"无法创建存储空间,请重试。"))}finally{h(!1)}}},ke=async le=>{const we=await Ut(le.resourceUrl,fetch,s);if(we&&confirm(`Delete pod ${le.id}? This cannot be undone.`)){h(!0),ne(null);try{(await fetch(V(we),{method:"DELETE",headers:tt(),credentials:"include"})).ok?await Ce():ne("无法删除存储空间,请重试。")}catch(lt){ne(Rl(lt,"无法删除存储空间,请重试。"))}finally{h(!1)}}},wt=async le=>{if(le.preventDefault(),!(!k||!F||!Z.trim())){h(!0),ne(null);try{const we=await fetch(V(k),{method:"POST",headers:tt({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",body:JSON.stringify({name:Z.trim(),webId:F})});if(we.ok){const lt=await we.json();P({id:lt.id,secret:lt.secret}),ee(!1),se(""),Y(""),await Ce()}else ne(await ub(we,"无法创建客户端凭据,请重试。"))}catch(we){ne(Rl(we,"无法创建客户端凭据,请重试。"))}finally{h(!1)}}},St=()=>{if(b.length===0){ne("请先创建存储空间,再创建客户端凭据。");return}se(b[0]),Y(""),ee(!0)},at=async le=>{const we=await Ut(le.resourceUrl,fetch,s);if(we&&confirm("Delete this credential? This cannot be undone.")){h(!0),ne(null);try{(await fetch(V(we),{method:"DELETE",headers:tt(),credentials:"include"})).ok?await Ce():ne("无法撤销客户端凭据,请重试。")}catch(lt){ne(Rl(lt,"无法撤销客户端凭据,请重试。"))}finally{h(!1)}}};return f.jsxs("div",{className:"min-h-screen bg-background text-foreground font-sans",children:[f.jsx("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:f.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-primary/5 rounded-full blur-[120px]"})}),f.jsx("header",{className:"relative z-10 border-b border-border bg-background/80 backdrop-blur",children:f.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-4 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:`w-8 h-8 ${zA}`,children:f.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground rounded opacity-80"})}),f.jsxs("div",{children:[f.jsx("div",{className:"font-semibold leading-tight",children:"Xpod"}),f.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight",children:"Personal Messages Platform"})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(As,{to:V("/.account/about/"),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs ${fb}`,children:[f.jsx(_1,{className:"w-3.5 h-3.5"}),"About"]}),f.jsxs("button",{onClick:fe,disabled:d,className:`flex items-center gap-2 px-3 py-1.5 text-xs ${fb}`,children:[f.jsx(D1,{className:"w-3.5 h-3.5"}),"Sign out"]})]})]})}),f.jsxs("main",{className:"relative z-10 max-w-2xl mx-auto px-4 py-8 space-y-8",children:[Ue?f.jsxs("div",{role:"alert",className:"flex items-start gap-3 rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-destructive",children:[f.jsx(Xs,{className:"mt-0.5 h-4 w-4 shrink-0"}),f.jsx("p",{className:"min-w-0 flex-1 text-sm leading-5",children:Ue}),f.jsx("button",{type:"button",onClick:()=>ne(null),className:"rounded p-1 text-destructive/70 transition-colors hover:bg-destructive/10 hover:text-destructive","aria-label":"关闭错误提示",children:f.jsx(G1,{className:"h-4 w-4"})})]}):null,o&&f.jsx("div",{className:"p-4 bg-primary/10 border border-primary/30 rounded-xl",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"p-2 bg-primary/20 rounded-lg",children:f.jsx(Ts,{className:"w-5 h-5 text-primary"})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-foreground",children:"Authorization Pending"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"An application is waiting for your authorization"})]})]}),f.jsxs(As,{to:V("/.account/oidc/consent/"),className:`flex items-center gap-2 px-4 py-2 ${Lo} text-sm font-medium rounded-lg`,children:["Continue",f.jsx(h1,{className:"w-4 h-4"})]})]})}),f.jsx("h1",{className:"text-2xl font-bold",children:"Account Dashboard"}),f.jsxs("section",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-1",children:[f.jsxs("h2",{className:bs,children:[f.jsx(N1,{className:"w-4 h-4 text-primary"}),"Storage"]}),W&&f.jsxs("button",{onClick:()=>S(!0),className:`flex items-center gap-1.5 px-3 py-1.5 ${Lo} text-xs rounded-lg`,children:[f.jsx(Hg,{className:"w-3.5 h-3.5"}),"Add Pod"]})]}),f.jsx("p",{className:"text-[11px] text-muted-foreground mb-3",children:"Your personal data stores (Pods). You own and control all data stored here."}),w&&f.jsxs("form",{onSubmit:Ve,className:`mb-4 p-4 ${Cl}`,children:[f.jsx("label",{className:"block text-xs text-muted-foreground mb-2",children:"Pod Name"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",value:C,onChange:le=>U(le.target.value),placeholder:"my-pod",className:`flex-1 px-3 py-2 ${xd}`,required:!0}),f.jsx("button",{type:"submit",disabled:d,className:`px-4 py-2 ${Lo} text-xs rounded-lg`,children:d?"Creating...":"Create"}),f.jsx("button",{type:"button",onClick:()=>S(!1),className:"px-3 py-2 text-muted-foreground hover:text-foreground text-xs",children:"Cancel"})]})]}),f.jsx("div",{className:Cl,children:g.length===0?f.jsx("div",{className:"p-4",children:f.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:b.length>0?"This device has no Pod yet. Create one to store data here.":"No Pods found. Create one to get started."})}):f.jsx("ul",{className:"divide-y divide-border",children:g.map(le=>f.jsxs("li",{className:"p-3 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[f.jsx(A1,{className:vd}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("a",{href:le.id,target:"_blank",rel:"noopener",className:`${mb} block`,children:le.id}),le.name&&f.jsxs("p",{className:"text-[11px] text-muted-foreground truncate",children:["Pod: ",le.name]})]})]}),le.resourceUrl?f.jsx("button",{onClick:()=>ke(le),className:pb,title:"Delete Pod",children:f.jsx(qg,{className:"w-4 h-4"})}):null]},le.id))})})]}),f.jsxs("section",{children:[f.jsx("div",{className:"flex items-center mb-1",children:f.jsxs("h2",{className:bs,children:[f.jsx(Y1,{className:"w-4 h-4 text-primary"}),"Identity"]})}),f.jsx("p",{className:"text-[11px] text-muted-foreground mb-3",children:"Your unique decentralized identifiers (WebIDs). This is your identity on the Solid network."}),f.jsx("div",{className:Cl,children:b.length===0?f.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"No WebIDs found. Create a Pod first to get a WebID."}):f.jsx("ul",{className:"divide-y divide-border",children:b.map(le=>f.jsxs("li",{className:"p-3 flex items-center gap-3",children:[f.jsx(R1,{className:vd}),f.jsx("a",{href:le,target:"_blank",rel:"noopener",className:mb,children:le})]},le))})})]}),f.jsxs("section",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-1",children:[f.jsxs("h2",{className:bs,children:[f.jsx(pd,{className:"w-4 h-4 text-primary"}),"Solid Client Credentials"]}),k&&f.jsxs("button",{onClick:St,disabled:d,className:`flex items-center gap-1.5 px-3 py-1.5 ${Lo} text-xs rounded-lg`,children:[f.jsx(Hg,{className:"w-3.5 h-3.5"}),"New Credential"]})]}),f.jsx("p",{className:"text-[11px] text-muted-foreground mb-3",children:"Solid credentials for clients that need direct Pod access. Xpod API Keys are managed in AI Connections."}),k?f.jsxs(f.Fragment,{children:[H&&f.jsxs("form",{onSubmit:wt,className:`mb-4 p-4 ${Cl} space-y-3`,children:[f.jsxs("div",{children:[f.jsx("label",{className:db,children:"Credential Name"}),f.jsx("input",{type:"text",value:Z,onChange:le=>Y(le.target.value),placeholder:"my-solid-client",className:`w-full px-3 py-2 ${xd}`,required:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:db,children:"WebID"}),f.jsxs("div",{className:"relative",ref:me,children:[f.jsxs("button",{type:"button",onClick:()=>oe(!te),className:`w-full px-3 py-2 ${xd} text-left flex items-center justify-between`,children:[f.jsx("span",{className:"truncate text-foreground",children:F||"Select WebID"}),f.jsx(b1,{className:`w-4 h-4 text-muted-foreground transition-transform ${te?"rotate-180":""}`})]}),te&&f.jsx("div",{className:"absolute z-10 mt-1 w-full bg-popover text-popover-foreground border border-border rounded-lg shadow-lg max-h-48 overflow-auto",children:b.map(le=>f.jsx("button",{type:"button",onClick:()=>{se(le),oe(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-muted truncate ${F===le?"bg-primary/10 text-primary":"text-foreground"}`,children:le},le))}),f.jsx("input",{type:"hidden",name:"webId",value:F,required:!0})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end",children:[f.jsx("button",{type:"button",onClick:()=>ee(!1),className:"px-3 py-2 text-muted-foreground hover:text-foreground text-xs",children:"Cancel"}),f.jsx("button",{type:"submit",disabled:d,className:`px-4 py-2 ${Lo} text-xs rounded-lg`,children:d?"Creating...":"Create"})]})]}),I&&f.jsx("div",{className:"mb-4 p-4 bg-emerald-500/10 border border-emerald-500/30 rounded-xl",children:f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:"p-2 bg-emerald-500/15 rounded-lg",children:f.jsx(pd,{className:"w-4 h-4 text-emerald-600 dark:text-emerald-300"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-emerald-700 dark:text-emerald-300 mb-1",children:"New Solid Client Credential Created"}),f.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Copy the Client ID and Client Secret now. The secret will not be shown again."}),f.jsxs("div",{className:"space-y-3 text-xs font-mono bg-card p-3 rounded-lg border border-border",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"Client ID"}),f.jsx("p",{className:"text-foreground truncate",children:I.id})]}),f.jsx("button",{onClick:()=>ue(I.id,"id"),className:hb,title:"Copy Client ID",children:ce==="id"?f.jsx(Dg,{className:"w-3.5 h-3.5 text-emerald-500"}):f.jsx(kg,{className:"w-3.5 h-3.5"})})]}),f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"Client Secret"}),f.jsx("p",{className:"text-foreground break-all",children:I.secret})]}),f.jsx("button",{onClick:()=>ue(I.secret,"secret"),className:hb,title:"Copy Client Secret",children:ce==="secret"?f.jsx(Dg,{className:"w-3.5 h-3.5 text-emerald-500"}):f.jsx(kg,{className:"w-3.5 h-3.5"})})]})]}),f.jsx("button",{onClick:()=>P(null),className:"mt-2 text-xs text-muted-foreground hover:text-foreground font-medium",children:"Done"})]})]})}),f.jsx("div",{className:Cl,children:N.length===0?f.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"No client credentials found."}):f.jsx("ul",{className:"divide-y divide-border",children:N.map(le=>f.jsxs("li",{className:"p-3 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[f.jsx(pd,{className:vd}),f.jsx("span",{className:"text-xs font-mono text-foreground truncate",children:le.id})]}),f.jsx("button",{onClick:()=>at(le),className:pb,title:"Revoke Credential",children:f.jsx(qg,{className:"w-4 h-4"})})]},le.id))})})]}):f.jsx("div",{className:`${Cl} p-4`,children:f.jsx("p",{className:"text-xs text-muted-foreground",children:"Client credential endpoint not configured."})})]}),f.jsxs("section",{children:[f.jsxs("h2",{className:`${bs} mb-3`,children:[f.jsx(Ts,{className:"w-4 h-4 text-primary"}),"Security"]}),f.jsxs("div",{className:`${Cl} p-4 flex items-center justify-between`,children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-xs font-medium mb-1",children:"Password"}),f.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Update your account password"})]}),f.jsx("a",{href:K,className:"px-3 py-1.5 bg-secondary hover:bg-secondary/80 text-secondary-foreground text-xs rounded-lg transition-colors",children:"Change Password"})]})]})]})]})}function Us({label:a="正在恢复登录状态…",accountName:r}){return f.jsxs("div",{role:"status","aria-live":"polite",className:"flex min-h-44 flex-col items-center justify-center gap-3 px-5 py-8 text-center",children:[f.jsx(_l,{"aria-hidden":"true",className:"h-6 w-6 animate-spin text-primary"}),r?f.jsx("p",{className:"text-sm font-medium text-foreground",children:r}):null,f.jsx("p",{className:"text-sm text-muted-foreground",children:a})]})}function ws({title:a="操作未完成",description:r,primaryLabel:o="重试",onPrimary:s,secondaryLabel:u="返回",onSecondary:d,pending:h=!1}){return f.jsxs("div",{className:"flex min-h-44 flex-col items-center justify-center gap-4 px-5 py-8 text-center",children:[f.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-destructive/10",children:f.jsx(Xs,{"aria-hidden":"true",className:"h-5 w-5 text-destructive"})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-base font-semibold text-foreground",children:a}),r?f.jsx("p",{role:"alert",className:"text-sm leading-6 text-muted-foreground",children:r}):null]}),f.jsxs("div",{className:"flex w-full flex-col gap-2 sm:max-w-xs",children:[f.jsx("button",{type:"button",disabled:h,onClick:s,className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:o}),d?f.jsx("button",{type:"button",disabled:h,onClick:d,className:"h-9 rounded-lg border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus:outline-none focus-visible:border-ring",children:u}):null]})]})}function MA({error:a,onDismiss:r,dismissLabel:o="关闭"}){return a?f.jsxs("div",{role:"alert","aria-live":"polite",className:"flex items-start gap-2 rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[f.jsx(Xs,{"aria-hidden":"true",className:"mt-0.5 h-4 w-4 shrink-0"}),f.jsx("p",{className:"min-w-0 flex-1 leading-6",children:a}),r?f.jsx("button",{type:"button","aria-label":o,onClick:r,className:"rounded-md px-1 text-lg leading-none text-destructive/70 transition-colors hover:text-destructive focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring",children:"×"}):null]}):null}function gb({id:a,label:r,value:o,options:s,disabled:u,onChange:d}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{htmlFor:a,className:"text-sm font-medium text-foreground",children:r}),f.jsxs("select",{id:a,value:o,disabled:u||!d,onChange:h=>d?.(h.currentTarget.value),className:"h-10 w-full rounded-xl border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50",children:[o?null:f.jsx("option",{value:"",disabled:!0,children:r}),s.map(h=>f.jsx("option",{value:h.id,children:h.label},h.id))]})]})}function bb({label:a,option:r}){return r?f.jsxs("div",{className:"rounded-xl border border-border/60 bg-muted/30 px-3 py-2",children:[f.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:a}),f.jsx("p",{className:"mt-1 break-all text-sm font-medium text-foreground",children:r.webId??r.label}),r.description?f.jsx("p",{className:"mt-1 break-words text-sm text-muted-foreground",children:r.description}):null,r.storageUrl?f.jsx("p",{className:"mt-1 break-all text-xs text-muted-foreground",children:r.storageUrl}):null]}):null}function LA({client:a,webIds:r,storageOptions:o,selectedWebIdId:s,selectedStorageId:u,rememberClient:d,onWebIdChange:h,onStorageChange:b,onRememberClientChange:p,onApprove:g,onDeny:x,onEditAccount:w,onSwitchAccount:S,pending:C=!1,showIdentitySelection:U=!0,copy:N}){const j="oidc-consent-webid",I="oidc-consent-storage",P=y.useId(),H=s??"",ee=u??"",F=o??[],se=r.find(te=>te.id===H),Z=F.find(te=>te.id===ee),Y=F.length>0,ce=C||!se||Y&&!Z,ge=()=>{g({webIdId:H,storageId:ee||void 0,rememberClient:d})};return f.jsxs("div",{className:"space-y-4 text-card-foreground",children:[f.jsx("div",{className:"space-y-2",children:f.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:N.description})}),f.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 px-3 py-2",children:[f.jsx("p",{className:"text-sm font-medium text-foreground",children:a.name}),a.description?f.jsx("p",{className:"mt-1 break-words text-xs text-muted-foreground",children:a.description}):null]}),U&&r.length>1?f.jsx(gb,{id:j,label:N.webIdLabel,value:H,options:r,disabled:C,onChange:h}):f.jsx(bb,{label:N.webIdLabel,option:se??r[0]}),U&&Y?F.length>1?f.jsx(gb,{id:I,label:N.storageLabel,value:ee,options:F,disabled:C,onChange:b}):f.jsx(bb,{label:N.storageLabel,option:Z??F[0]}):null,f.jsxs("label",{htmlFor:P,className:"inline-flex min-h-6 cursor-pointer items-center gap-2 text-sm text-muted-foreground",children:[f.jsx("input",{id:P,type:"checkbox",checked:d,disabled:C||!p,onChange:te=>p?.(te.currentTarget.checked),className:"m-0 h-4 w-4 shrink-0 accent-primary disabled:cursor-not-allowed disabled:opacity-50"}),f.jsx("span",{children:N.rememberClientLabel})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.jsx("button",{type:"button",disabled:ce,onClick:ge,className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:N.approveLabel}),f.jsx("button",{type:"button",disabled:C,onClick:()=>{x()},className:"h-10 rounded-xl border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50",children:N.denyLabel}),w&&N.editAccountLabel?f.jsx("button",{type:"button",disabled:C,onClick:()=>{w()},className:"h-9 rounded-lg px-4 text-sm text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground focus:outline-none focus-visible:bg-muted/40 disabled:cursor-not-allowed disabled:opacity-50",children:N.editAccountLabel}):null,S&&N.switchAccountLabel?f.jsx("button",{type:"button",disabled:C,onClick:()=>{S()},className:"h-9 rounded-lg px-4 text-sm text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground focus:outline-none focus-visible:bg-muted/40 disabled:cursor-not-allowed disabled:opacity-50",children:N.switchAccountLabel}):null]})]})}function DA(a){return typeof a=="string"?{status:a}:a}function kA({state:a,copy:r,pending:o=!1,onCreate:s,onContinue:u,onRetry:d,onCancel:h}){const b=DA(a),p=b.status==="creation",g=b.status==="creating",x=b.status==="waiting"||b.status==="waiting_for_binding",w=b.status==="conflict"||b.status==="error",S=g||x||p&&o,C=b.message??(p||g?r.creationMessage:x?r.waitingMessage:b.status==="ready"?r.readyMessage:b.status==="conflict"?r.conflictMessage:r.errorMessage);return f.jsxs("div",{className:"space-y-5 text-card-foreground",children:[r.title||r.description?f.jsxs("div",{className:"space-y-2",children:[r.title?f.jsx("p",{className:"text-base font-semibold text-foreground",children:r.title}):null,r.description?f.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:r.description}):null]}):null,w?f.jsx("div",{role:"alert","aria-live":"polite",className:"rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm leading-6 text-destructive",children:C}):S?f.jsxs("div",{role:"status","aria-live":"polite",className:"flex items-start gap-2 text-sm leading-6 text-muted-foreground",children:[f.jsx(_l,{"aria-hidden":"true",className:"mt-1 h-4 w-4 shrink-0 animate-spin text-primary"}),f.jsx("span",{children:C})]}):f.jsx("p",{role:"status","aria-live":"polite",className:"text-sm leading-6 text-foreground",children:C}),f.jsxs("div",{className:"flex flex-col gap-2",children:[p&&s?f.jsx("button",{type:"button",disabled:o,onClick:()=>{s()},className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:r.createLabel}):null,b.status==="ready"&&u?f.jsx("button",{type:"button",disabled:o,onClick:()=>{u()},className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:r.continueLabel}):null,w&&d?f.jsx("button",{type:"button",disabled:o,onClick:()=>{d()},className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:r.retryLabel}):null,(x||g)&&h?f.jsx("button",{type:"button",disabled:o,onClick:()=>{h()},className:"h-10 rounded-xl border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50",children:r.cancelLabel}):null]})]})}async function yb(a){const r=Math.max(1,a.maxAttempts??20);for(let o=0;o<r;o+=1){const s=(await Ps(a)).filter(u=>$a(u.storageUrl,a.storageRoot));if(s.length>0)return s;o+1<r&&await new Promise(u=>setTimeout(u,Math.max(0,a.pollIntervalMs??500)))}throw new Error("Current Local storage binding is not committed yet")}const BA="已有 Pod 的身份绑定尚未确认。请重试读取绑定或返回账号,不需要重新创建 Pod。",HA="暂时无法确认已有 Pod,请重试读取或返回账号。";class An extends Error{code;constructor(r){super(r==="binding-missing"?BA:r==="inventory-unavailable"?HA:"账号已切换,请返回当前账号重新操作。"),this.name="FirstPodReadinessError",this.code=r}}function qA(a){const r=jl(),o=Tn(r,{...a.headers}),s=new Headers(o).get("Authorization"),u=()=>{try{a.assertCurrentAccount?.()}catch{throw new An("account-changed")}if(jl()!==r||s?.startsWith("CSS-Account-Token ")&&s!==(r?`CSS-Account-Token ${r}`:void 0))throw new An("account-changed")},d=a.fetchImpl??fetch;return{headers:o,assertCurrentAccount:u,fetch:async(b,p)=>{u();const g=await d(b,p);try{u()}catch(C){throw g.body?.cancel().catch(()=>{}),C}const x=async C=>{u();const U=await C();return u(),U},w=g.json.bind(g),S=g.text.bind(g);return g.json=()=>x(w),g.text=()=>x(S),g}}}async function YA(a,r,o,s){s.assertCurrentAccount();let u;try{const b=await a(V(r),{headers:{...s.headers,Accept:"application/json"},credentials:"include"});if(!b.ok)throw new An("inventory-unavailable");u=await b.json()}catch{throw s.assertCurrentAccount(),new An("inventory-unavailable")}if(s.assertCurrentAccount(),!qd(u)||!qd(u.pods))throw new An("inventory-unavailable");const d=Object.entries(u.pods);if(d.some(([b,p])=>!pv(b)||typeof p!="string"||!p))throw new An("inventory-unavailable");const h=Zo(o);if(d.some(([b])=>!h||$a(b,h.storageRoot)))throw new An("binding-missing")}function Hd(a){for(const r of a){if(!r)continue;const o=PA(r);if(!o)continue;const s=Ml(o).replace(/[^a-z0-9-]/gu,"-").replace(/-+/gu,"-").replace(/^-+|-+$/gu,"");if(s&&!Or(s))return s}return""}async function fv(a){const r=qA(a),o=r.fetch,s=Ml(a.username),u=Or(s);if(u)throw new Error(u);const d=await rf(a.provisionCode),h=await Ut(a.createPodUrl,o,a.trustedAccountIndex);if(!h)throw new Error("Pod creation control is not hosted by this Xpod");await YA(o,h,d,r);const b=await VA(o,s,d);r.assertCurrentAccount();const p=await o(V(h),{method:"POST",headers:{...r.headers,Accept:"application/json","Content-Type":"application/json"},credentials:"include",body:JSON.stringify(lf(s,b?.provisionCode??d,b?.provisionReceipt))});if(r.assertCurrentAccount(),!p.ok){const S=await IA(p);throw p.status===409||mv(S)?new Error(on.podNameTaken):new Error(S||"Failed to create Pod")}const g=await p.json().catch(_s);r.assertCurrentAccount();const x=QA(g);if(!a.pickWebIdUrl)return x;const w=await XA({fetchImpl:o,headers:r.headers,maxAttempts:a.maxAttempts,pickWebIdUrl:a.pickWebIdUrl,pollIntervalMs:a.pollIntervalMs});return r.assertCurrentAccount(),w.length>0?w:x}async function XA(a){const r=a.fetchImpl??fetch,o=Math.max(1,a.maxAttempts??30),s=Math.max(0,a.pollIntervalMs??500);for(let u=0;u<o;u+=1){const d=await GA(r,a.pickWebIdUrl,a.headers);if(d.length>0)return d;u<o-1&&s>0&&await new Promise(h=>setTimeout(h,s))}return[]}function _s(a){if(a instanceof An)throw a}async function GA(a,r,o){const s=await a(V(r),{headers:o,credentials:"include"}).catch(_s);if(!s?.ok)return[];const u=await s.json().catch(_s);if(!Array.isArray(u?.entries))return[];const d=new Set,h=[];for(const b of u.entries){if(!qd(b)||typeof b.webId!="string"||typeof b.storageUrl!="string")continue;const p=hv(b.webId,b.storageUrl);if(!p)continue;const g=`${p.webId}
|
|
14
|
-
${
|
|
15
|
-
${u.storageUrl}`,h=o.find(b=>`${b.webId}
|
|
16
|
-
${b.storageUrl}`===d);h?h.label!==void 0&&u.label!==void 0&&h.label!==u.label&&o.push(u):o.push(u)}return o}function ZA(a,r,o){return a.length>0?a:o?[]:r?[r]:[]}function $A(a,r){return a?.oidc?.cancel||`${r}oidc/cancel`}async function KA(a){const r=a.fetchImpl??fetch,o=a.timeoutMs??15e3,s=o>0?new AbortController:null;let u;s&&(u=setTimeout(()=>s.abort(),o));try{const d=await r(a.cancelUrl,{method:"POST",headers:a.headers,credentials:"include",body:JSON.stringify({}),signal:s?.signal});return await JA(d)}catch(d){throw WA(d,"AbortError")?new Error("Authorization cancellation timed out. Please close this tab and retry login."):d}finally{u&&clearTimeout(u)}}async function JA(a){const r=await a.json().catch(()=>null);if(!a.ok)throw _r(r,Dd(r)||`Authorization cancellation failed (${a.status}).`);const o=wa(r)&&typeof r.location=="string"?r.location.trim():"",s=a.headers.get("Location")?.trim()||"",u=o||s;if(!u)throw new Error("Authorization cancellation did not return a redirect URL.");return u}function _r(a,r){return wa(a)&&(a.errorCode==="E0002"||a.message==="Invalid OIDC interaction"||a.message==="This action can only be performed as part of an OIDC authentication flow.")?new Error(be.expiredInteraction):new Error(r)}function WA(a,r){return wa(a)&&a.name===r}function FA(a,r,o){if(!Wo(a))try{const s=new URL(a),u=new URL(r.trim());return!["http:","https:"].includes(s.protocol)||!["http:","https:"].includes(u.protocol)||s.username||s.password||u.username||u.password||u.search||u.hash?void 0:(u.pathname=u.pathname.endsWith("/")?u.pathname:`${u.pathname}/`,{webId:a,storageUrl:u.href,...o?{label:o}:{}})}catch{return}}function eC(a,r){if(a instanceof An)return a.message;const o=a instanceof Error?a.message:"";return o==="fetch failed"||o.includes("Failed to fetch")||o.includes("Cloud storage is not ready")||o.includes("provision_refresh_failed")||o.includes("provision_refresh_unavailable")||o===Lt.cloudRouteUnavailable?Lt.cloudRouteUnavailable:o.startsWith("Pod name is already taken.")||o===on.choosePodName||o===on.podNameTaken?o:r}function tC({onReady:a}={}){const{bindAccountCapability:r,controls:o,hasOidcPending:s,idpIndex:u,identity:d,refetchControls:h}=kn(),b=Zn(),[p,g]=y.useState({status:"checking"}),[x,w]=y.useState(0),S=!a&&s?new URL("oidc/pick-webid/",u).href:void 0;return y.useEffect(()=>{let C=!1;return(async()=>{try{const U=r?.(),N=S?await nC(S):void 0;if(C)return;if(N?.bindings.length){b(V("/.account/oidc/consent/"),{replace:!0});return}const j=await Ys();if(C)return;const I=N?{allWebIds:N.webIds,currentStorageWebIds:[],currentBindings:[],durable:!1}:await aC({accountBindingsUrl:o?.account?.bindings,accountWebIdUrl:o?.account?.webId,idpIndex:u,provisionCode:j.activeProvisionCode,provisionStorageRoot:j.storageRoot});if(C)return;if(!N&&I.currentStorageWebIds.length>0&&(!a||I.durable)){if(a){if(!j.storageRoot)throw new Error(Lt.cloudRouteUnavailable);await yb({controls:{account:{bindings:o?.account?.bindings}},trustedAccountIndex:u,storageRoot:j.storageRoot}),C||a()}else b(V("/.account/account/"),{replace:!0});return}if(j.storageRoot&&!j.activeProvisionCode)throw new Error(Lt.cloudRouteUnavailable);const P=await qs(j.activeProvisionCode);if(C)return;const ee=(a&&I.currentBindings.length>0?rC(I.currentBindings,j.storageRoot):void 0)??(Hd([o?.account?.username,d?.username,d?.displayName,d?.webId,...I.allWebIds,Ns(void 0,u)])||o?.account?.username),F=o?.account?.pod;if(!ee)throw new Error(Lt.accountIdentityMissing);if(!F)throw new Error(Lt.createEndpointMissing);g({status:"creating"});const se=await fv({createPodUrl:F,assertCurrentAccount:U,headers:tt(),pickWebIdUrl:S,provisionCode:P,trustedAccountIndex:u,username:ee});if(C)return;if(!a&&s&&se.length===0){g({status:"waiting"});return}if(a){if(!j.storageRoot)throw new Error(Lt.cloudRouteUnavailable);g({status:"waiting"}),await yb({controls:{account:{bindings:o?.account?.bindings}},trustedAccountIndex:u,storageRoot:j.storageRoot}),C||a();return}if(await h(),C)return;b(V(s?"/.account/oidc/consent/":"/.account/account/"),{replace:!0})}catch(U){if(!C){const N=eC(U,Lt.checkFailed);g({status:"error",message:N})}}})(),()=>{C=!0}},[r,o?.account?.bindings,o?.account?.pod,o?.account?.username,o?.account?.webId,s,d?.displayName,d?.username,d?.webId,u,b,a,S,h,x]),f.jsx(Dl,{title:jr.surfaceTitle,children:f.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:p.status==="checking"?f.jsx(Us,{label:jr.restoring}):p.status==="creating"||p.status==="waiting"?f.jsx(Us,{label:p.status==="creating"?jr.creating:jr.waitingMessage}):p.status==="error"?f.jsx(ws,{title:jr.unavailableTitle,description:p.message,secondaryLabel:"返回账号",onSecondary:()=>window.location.assign(V("/.account/account/")),primaryLabel:jr.retryLabel,onPrimary:()=>{g({status:"checking"}),w(C=>C+1)}}):null})})}async function nC(a){const r=await fetch(V(a),{headers:tt(),credentials:"include"});if(!r.ok)throw new Error(be.bindingsFailed);const o=await r.json().catch(()=>{});if(!o||!Array.isArray(o.entries))throw new Error(be.bindingsFailed);if(o.entries.length>0){for(const u of o.entries)if(zs([u]).length!==1)throw new Error(be.bindingsFailed)}const s=Array.isArray(o.webIds)?o.webIds.filter(u=>typeof u=="string"&&u.length>0):[];return{bindings:zs(o.entries,s),webIds:s}}async function aC(a){let r;a.accountBindingsUrl&&(r=await Ps({controls:{account:{bindings:a.accountBindingsUrl}},origin:window.location.origin,trustedAccountIndex:a.idpIndex}));const o=a.provisionStorageRoot&&r&&r.length>0?r.filter(p=>$a(p.storageUrl,a.provisionStorageRoot)).map(p=>p.webId):[];if(o.length>0)return{allWebIds:Array.from(new Set(r.map(p=>p.webId))),currentStorageWebIds:Array.from(new Set(o)),currentBindings:r.filter(p=>$a(p.storageUrl,a.provisionStorageRoot)),durable:!0};const s=r&&r.length>0?[]:await lC(a.accountWebIdUrl,a.idpIndex),u=Array.from(new Set([...r?.map(p=>p.webId)??[],...s]));if(a.provisionStorageRoot&&!a.provisionCode)return{allWebIds:u,currentStorageWebIds:[],currentBindings:[],durable:!1};if(!Zo(a.provisionCode))return{allWebIds:u,currentStorageWebIds:u,currentBindings:r??[],durable:!!r?.length};const h=await nf(fetch,u,a.provisionCode),b=Array.from(new Set((h??[]).map(p=>p.webId)));return{allWebIds:u,currentStorageWebIds:b,currentBindings:h??[],durable:!1}}async function lC(a,r){const o=await Ut(a,fetch,r);if(!o)throw new Error(Lt.checkFailed);const s=await fetch(V(o),{headers:tt({Accept:"application/json"}),credentials:"include"}).catch(()=>{});if(!s?.ok)throw new Error(Lt.checkFailed);const u=await s.json().catch(()=>{});if(!u?.webIdLinks||typeof u.webIdLinks!="object"||Array.isArray(u.webIdLinks))throw new Error(Lt.checkFailed);return Object.keys(u.webIdLinks).filter(d=>{try{const h=new URL(d);return["http:","https:"].includes(h.protocol)&&!h.username&&!h.password}catch{return!1}})}function rC(a,r){const o=[...new Set(a.map(h=>h.storageUrl))];if(!r||o.length!==1)throw new Error(Lt.checkFailed);const s=o[0];if(!$a(s,r))throw new Error(Lt.checkFailed);const u=new URL(r).pathname.replace(/\/?$/u,"/"),d=new URL(s).pathname.slice(u.length).split("/").filter(Boolean);if(d.length!==1)throw new Error(Lt.checkFailed);return decodeURIComponent(d[0])}const gv=1,oC="xpod.auth.transaction.v1",iC=600*1e3;class rt extends Error{code;constructor(r,o){super(o),this.name="XpodLoginTransactionError",this.code=r}}function sC(){const a=globalThis.crypto;if(typeof a?.randomUUID=="function")return a.randomUUID();if(typeof a?.getRandomValues=="function"){const r=new Uint8Array(24);return a.getRandomValues(r),`xpod-${Array.from(r,o=>o.toString(16).padStart(2,"0")).join("")}`}throw new rt("storage_unavailable","Secure transaction id generation is unavailable")}function cC(a={}){const r=a.storage??dC(),o=new URL(a.origin??fC()).origin,s=a.now??(()=>Date.now()),u=a.ttlMs??iC,d=a.prefix??oC,h=`${d}.active`,b=S=>`${d}.record.${S}`,p=S=>`${d}.consumed.${S}`,g=S=>{r.getItem(h)===S&&r.removeItem(h),r.removeItem(b(S))},x=(S,C=!0)=>{if(!xb(S))throw new rt("malformed","Transaction id is malformed");if(r.getItem(p(S))==="1")throw new rt("consumed","Transaction has already been consumed");if(C&&r.getItem(h)!==S)throw new rt("unknown","Transaction is not the active Xpod login transaction");const U=r.getItem(b(S));if(!U)throw C&&r.getItem(h)===S&&r.removeItem(h),new rt("unknown","Xpod login transaction was not found");let N;try{N=JSON.parse(U)}catch{throw g(S),new rt("malformed","Xpod login transaction is malformed")}if(!uC(N)||N.transaction.id!==S)throw g(S),new rt("malformed","Xpod login transaction is malformed");if(N.expiresAt<=s())throw g(S),new rt("expired","Xpod login transaction has expired");try{const j=vb({...N.transaction,authorizationSurface:"redirect",discovery:"strict"},o);return N.transaction={id:j.id,route:j.route,...j.returnTo===void 0?{}:{returnTo:j.returnTo},...j.prompt===void 0?{}:{prompt:j.prompt},...j.selectedStorage===void 0?{}:{selectedStorage:j.selectedStorage}},N}catch(j){throw g(S),j instanceof rt?j:new rt("malformed","Xpod login transaction is malformed")}};return{begin:S=>{const C=r.getItem(h);if(C){try{x(C)}catch(H){if(!(H instanceof rt&&(H.code==="expired"||H.code==="malformed"||H.code==="unknown")))throw H}if(r.getItem(h)===C)throw new rt("already_active","An Xpod login transaction is already pending in this tab")}const U=xb(S.id)?S.id:sC(),N=vb({...S,id:U},o),j=s(),I=j+u,P={version:gv,createdAt:j,expiresAt:I,transaction:{id:N.id,route:N.route,...N.returnTo===void 0?{}:{returnTo:N.returnTo},...N.prompt===void 0?{}:{prompt:N.prompt},...N.selectedStorage===void 0?{}:{selectedStorage:N.selectedStorage}}};return r.setItem(b(N.id),JSON.stringify(P)),r.setItem(h,N.id),N},readSinglePending(){const S=r.getItem(h);if(S)return wd(x(S).transaction)},updateSelectedStorage(S,C){const U=x(S),N=wd(U.transaction),j=bv(C,o,N.route.storageProvider?.url),I={...U,transaction:{...U.transaction,selectedStorage:j}};r.setItem(b(S),JSON.stringify(I))},consume(S){const C=x(S),U=wd(C.transaction);return r.removeItem(h),r.removeItem(b(S)),r.setItem(p(S),"1"),U},cancel(S){x(S),r.removeItem(h),r.removeItem(b(S)),r.setItem(p(S),"1")}}}function vb(a,r){let o;try{o=DS(a)}catch(d){throw new rt("malformed",d instanceof Error?d.message:"Transaction is malformed")}let s;try{s=gA(o.route,r)}catch(d){throw new rt("cross_origin",d instanceof Error?d.message:"Transaction route is not local")}let u;try{u=pA(o.returnTo)}catch(d){throw new rt("mismatch",d instanceof Error?d.message:"Transaction return path is unsafe")}if(o.selectedStorage!==void 0)try{const d=bv(o.selectedStorage,r,s.storageProvider?.url);return{id:o.id,route:s,selectedStorage:d,authorizationSurface:"redirect",discovery:"strict",...u===void 0?{}:{returnTo:u},...o.prompt===void 0?{}:{prompt:o.prompt}}}catch(d){throw d instanceof rt?d:new rt("mismatch","Selected storage binding is invalid")}return{id:o.id,route:s,authorizationSurface:"redirect",discovery:"strict",...u===void 0?{}:{returnTo:u},...o.prompt===void 0?{}:{prompt:o.prompt}}}function bv(a,r,o){if(!a||typeof a.storageUrl!="string"||typeof a.webId!="string"||Wo(a.webId))throw new rt("malformed","Selected storage binding is malformed");let s,u;try{s=new URL(a.storageUrl),u=new URL(a.webId)}catch{throw new rt("malformed","Selected storage binding is malformed")}if(!["http:","https:"].includes(s.protocol)||!["http:","https:"].includes(u.protocol))throw new rt("cross_origin","Selected storage binding must use web URLs");if(s.origin!==r||u.origin!==r||o&&s.origin!==new URL(o).origin)throw new rt("cross_origin","Selected storage binding is not local to this Xpod");if(s.username||s.password||s.hash||u.username||u.password)throw new rt("malformed","Selected storage binding contains unsafe URL data");return{storageUrl:s.href,webId:a.webId,...a.label===void 0?{}:{label:a.label}}}function wd(a){return{id:a.id,route:a.route,authorizationSurface:"redirect",discovery:"strict",...a.returnTo===void 0?{}:{returnTo:a.returnTo},...a.prompt===void 0?{}:{prompt:a.prompt},...a.selectedStorage===void 0?{}:{selectedStorage:a.selectedStorage}}}function xb(a){return typeof a=="string"&&/^[A-Za-z0-9_-]{16,128}$/.test(a)}function uC(a){if(!a||typeof a!="object")return!1;const r=a;return r.version===gv&&typeof r.createdAt=="number"&&typeof r.expiresAt=="number"&&!!(r.transaction&&typeof r.transaction=="object")}function dC(){try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage}catch{}throw new rt("storage_unavailable","Session storage is unavailable")}function fC(){return typeof window<"u"&&window.location.origin!=="null"?window.location.origin:"http://localhost"}function wb(a){if(a.error!==void 0)return{status:"error",message:"Unable to enumerate Account storage bindings."};if(a.bindings===void 0)return{status:"loading"};if(!Array.isArray(a.bindings))return{status:"error",message:"Account storage bindings are malformed."};const r=[],o=new Map;for(const s of a.bindings){const u=Yd(s);if(!u)return{status:"error",message:"Account storage bindings are malformed."};const d=rn(u),h=o.get(d);if(h){if(!mC(h,u))return{status:"conflict",message:`Storage binding ${u.storageUrl} is duplicated with incompatible metadata`};if(h.label===void 0&&u.label!==void 0){const b=r.indexOf(h),p={...h,label:u.label};o.set(d,p),r[b]=p}continue}o.set(d,u),r.push(u)}if(a.remembered){const s=Yd(a.remembered);if(s){const u=r.find(d=>rn(d)===rn(s));if(u)return{status:"ready",selected:{...u}}}}return r.length===0?{status:"empty"}:r.length===1?{status:"ready",selected:{...r[0]}}:{status:"selecting",candidates:r.map(s=>({...s}))}}function rn(a){const r=Yd(a);if(!r)throw new TypeError("Storage binding is malformed");return`${r.webId}|${r.storageUrl}`}function Yd(a){if(!(!a||typeof a.webId!="string"||typeof a.storageUrl!="string"||Wo(a.webId)))try{const r=new URL(a.webId),o=new URL(a.storageUrl.trim());return!["http:","https:"].includes(r.protocol)||!["http:","https:"].includes(o.protocol)||r.username||r.password||o.username||o.password||o.hash||o.search?void 0:(o.pathname=o.pathname.endsWith("/")?o.pathname:`${o.pathname}/`,{webId:a.webId,storageUrl:o.href,...typeof a.label=="string"?{label:a.label}:{}})}catch{return}}function mC(a,r){return a.label===void 0||r.label===void 0||a.label===r.label}function Nr(a,r){if(a instanceof An)return a.message;const o=a instanceof Error?a.message:"";return o==="Invalid OIDC interaction"||o==="This action can only be performed as part of an OIDC authentication flow."||o===be.expiredInteraction?be.expiredInteraction:o==="fetch failed"||o.includes("Failed to fetch")||o.includes("Cloud storage is not ready")||o.includes("provision_refresh_failed")||o.includes("provision_refresh_unavailable")?Lt.cloudRouteUnavailable:o===be.chooseStorage||o===be.cannotPersistStorage||o===be.missingRedirect||o===be.webIdSelectionFailed||o===be.authorizationFailed||o===be.bindingsFailed||o===on.podNameTaken||o.startsWith("Pod name is already taken.")?o:r}function hC(a){if(!Array.isArray(a.entries))throw new Error(be.bindingsFailed);const r=Array.isArray(a.webIds)?a.webIds.filter(o=>typeof o=="string"&&o.length>0):[];for(const o of a.entries)if(zs([o]).length!==1)throw new Error(be.bindingsFailed);return{exactBindings:zs(a.entries,r),rawIds:r,hasExplicitEmptyEntries:a.entries.length===0}}function pC(){const{bindAccountCapability:a,idpIndex:r,isLoggedIn:o,controls:s,logout:u,refetchControls:d}=kn(),h=Zn(),[b,p]=y.useState(!0),[g,x]=y.useState(null),[w,S]=y.useState(null),[C,U]=y.useState([]),[N,j]=y.useState([]),[I,P]=y.useState(""),[H,ee]=y.useState({status:"loading"}),[F,se]=y.useState(),[Z,Y]=y.useState(""),[ce,ge]=y.useState(""),[te,oe]=y.useState(null),[Ue,ne]=y.useState("load"),[me,L]=y.useState(!0),[Q,W]=y.useState(()=>Hs()),[xe,J]=y.useState(!1),[A,k]=y.useState(!1),[_,G]=y.useState(!1),[$,K]=y.useState(!1),[ue,Ce]=y.useState(!1),[fe,Ve]=y.useState("load"),ke=y.useRef(void 0),[wt,St]=y.useState(!1),at=y.useRef(!1),le=y.useRef(void 0),[we,lt]=y.useState(),[$e,gt]=y.useState("idle"),ut=y.useMemo(()=>{try{return cC({origin:window.location.origin,storage:window.sessionStorage})}catch{return}},[]),Dt=`${r}oidc/consent/`,jn=`${r}oidc/pick-webid/`,Ke=$A(s,r),Be=y.useCallback(async ye=>{let Me;Ve("load");try{Me=ut?.readSinglePending()}catch(Rt){se(void 0),ee({status:"error",message:Nr(Rt,be.invalidTransaction)})}se(Me),(!le.current||le.current.transactionId!==Me?.id)&&(le.current={transactionId:Me?.id,binding:Me?.selectedStorage},lt(Me?.selectedStorage));const Qe=await fetch(V(Dt),{headers:tt(),credentials:"include"});if(Qe.status===401||Qe.status===403)return await d().catch(()=>{}),oe(be.signInRequired),[];if(!Qe.ok)throw _r(await Qe.json().catch(()=>({})),be.loadFailed);const Pe=await Qe.json().catch(()=>({}));if(!Pe.client||typeof Pe.client!="object"||typeof Pe.client.client_name!="string"&&typeof Pe.client.client_id!="string")throw new Error(be.clientUnavailable);x(Pe.client),S(Pe.webId||null);const Ht=await fetch(V(jn),{headers:tt(),credentials:"include"});if(!Ht.ok){const Rt=_r(await Ht.json().catch(()=>({})),be.bindingsFailed);if(Rt.message===be.expiredInteraction)throw Rt;return[401,403,404].includes(Ht.status)&&(await d().catch(()=>{}))?.status==="anonymous"?(oe(be.signInRequired),[]):(U([]),j([]),Y(""),Ve("load"),ee({status:"error",message:be.bindingsFailed}),[])}const Kt=await Ht.json().catch(()=>({})),{exactBindings:ot,rawIds:ft,hasExplicitEmptyEntries:Et}=hC(Kt);if(ot.length===0&&Et){const Rt=await qs(Q);W(Rt)}const Fe=le.current.binding??(ot.length===1?ot[0]:void 0);Me&&!Me.selectedStorage&&Fe&&ut&&(ut.updateSelectedStorage(Me.id,Fe),Me={...Me,selectedStorage:Fe},se(Me));const Jt=Fe?ot.filter(Rt=>rn(Rt)===rn(Fe)):ot,dn=le.current.binding&&Jt.length===0?{status:"conflict",message:be.bindingUnavailable}:wb({bindings:Jt,remembered:ye});j(ot),ot.length===0&&ke.current?(oe(ke.current),ee({status:"error",message:ke.current})):(ke.current=void 0,ee(dn));const Sa=ot.length>0?Array.from(new Set(ot.map(Rt=>Rt.webId))):ft;if(U(Sa),dn.status==="ready"?(Y(dn.selected.webId),P(dn.selected.storageUrl)):Pe.webId&&Sa.includes(Pe.webId)?(Y(Pe.webId),P("")):Sa.length>0?(Y(dn.status==="selecting"||Sa.length>1?"":Sa.at(0)??""),P("")):(Y(""),P("")),o&&typeof Kt.resumeWebId=="string"&&ot.length===1&&dn.status==="ready"&&dn.selected.webId===Kt.resumeWebId&&!at.current){at.current=!0,gt("pending");try{const Rt=await fetch(V(jn),{method:"POST",headers:tt({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",redirect:"manual",body:JSON.stringify({webId:Kt.resumeWebId,remember:!0})}),Hn=await Rt.json().catch(()=>({}));if(!Rt.ok)throw _r(Hn,be.webIdSelectionFailed);const Gl=typeof Hn.location=="string"?Hn.location.trim():"";if(!Gl)throw new Error(be.missingRedirect);window.location.assign(V(Gl))}catch(Rt){throw gt("failed"),Rt}}return Sa},[Dt,o,jn,Q,d,ut]),Nn=y.useCallback((ye=!0)=>{at.current=!ye,gt("idle"),ne("load"),p(!0),oe(null),Be(H.status==="ready"?H.selected:void 0).catch(Me=>{oe(Nr(Me,be.loadFailed))}).finally(()=>p(!1))},[Be,H]);y.useEffect(()=>{ko(window.location.href),(async()=>{try{await Be()}catch(ye){oe(Nr(ye,be.loadFailed))}finally{p(!1)}})()},[Be]);const $t=async()=>{G(!0);try{await u(),h(V("/.account/login/password/"))}catch{ne("switch"),oe(be.signOutIncomplete)}finally{G(!1)}},kl=()=>{ko(window.location.href),h(V("/.account/login/password/"))},Tt=async()=>{if(window.xpodDesktop?.cancelLogin){K(!0);try{await window.xpodDesktop.cancelLogin()}catch{ne("return"),oe(te===be.expiredInteraction?te:be.returnFailed)}finally{K(!1)}return}bf(),window.location.assign(new URL("/.account/",window.location.origin).href)},Bl=()=>{at.current=!0,gt("idle"),oe(null)},Un=y.useCallback(async()=>{try{k(!0);const ye=await KA({cancelUrl:V(Ke),headers:tt({"Content-Type":"application/json",Accept:"application/json"})});window.location.href=V(ye)}catch(ye){ne("cancel"),oe(Nr(ye,be.cancelFailed))}finally{k(!1)}},[Ke]),Hl=y.useCallback(async(ye,Me)=>{if(!ye){await Un();return}try{J(!0),oe(null);let Qe,Pe=Z,Ht=I;if(Me){const Fe=N.find(Jt=>rn(Jt)===Me.webIdId||rn(Jt)===Me.storageId);Fe&&(Pe=Fe.webId,Ht=Fe.storageUrl,Y(Fe.webId),P(Fe.storageUrl))}if(F){if(H.status!=="ready")throw new Error(be.chooseStorage);if(Qe=H.selected,!ut)throw new Error(be.cannotPersistStorage);ut.updateSelectedStorage(F.id,Qe)}else if(N.length>0){if(H.status!=="ready")throw new Error(be.chooseStorage);if(Qe=N.find(Fe=>Fe.webId===Pe&&(!Ht||Fe.storageUrl===Ht)),!Qe)throw new Error(be.chooseStorage)}if(Pe&&Pe!==w){const Fe=await fetch(V(jn),{method:"POST",headers:tt({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",redirect:"manual",body:JSON.stringify({webId:Pe,remember:!0})}),Jt=await Fe.json().catch(()=>({}));if(!Fe.ok)throw _r(Jt,be.webIdSelectionFailed);const dn=typeof Jt.location=="string"?Jt.location.trim():"";if(!dn)throw new Error(be.missingRedirect);window.location.assign(V(dn));return}const Kt=await fetch(V(Dt),{method:"POST",headers:tt({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",redirect:"manual",body:JSON.stringify({remember:me})}),ot=await Kt.json().catch(()=>({}));if(!Kt.ok)throw _r(ot,be.authorizationFailed);const ft=Kt.headers.get("Location"),Et=ot.location||ft;Et?window.location.assign(V(Et)):(oe(be.missingRedirect),ne("authorize"),p(!1))}catch(Qe){ne("authorize"),oe(Nr(Qe,be.authorizationFailed))}finally{J(!1)}},[N,Dt,w,Un,F,jn,me,I,Z,H,ut]),el=y.useCallback(async()=>{const ye=s?.account?.pod,Me=Hd([w,s?.account?.username,Ns()])||s?.account?.username||ce.trim();if(!ye||!Me){oe(be.choosePodName),Ve("create"),ee({status:"error",message:be.storageCreationUnavailable});return}try{const Qe=a?.();Ce(!0),oe(null),Ve("create"),ee({status:"creating"});const Pe=await fv({createPodUrl:ye,assertCurrentAccount:Qe,headers:tt(),pickWebIdUrl:jn,provisionCode:Q,username:Me});j(Pe),U(Array.from(new Set(Pe.map(Kt=>Kt.webId))));const Ht=wb({bindings:Pe});ee(Ht),Ht.status==="ready"&&(Y(Ht.selected.webId),P(Ht.selected.storageUrl))}catch(Qe){const Pe=Nr(Qe,be.storageCreateFailed);oe(Pe),Qe instanceof An&&Qe.code==="binding-missing"&&(ke.current=Pe),Ve(Qe instanceof An?"load":"create"),ee({status:"error",message:Pe})}finally{Ce(!1)}},[a,s?.account?.pod,s?.account?.username,w,jn,ce,Q]),tl=y.useCallback(()=>{if(fe==="create"){el();return}Nn()},[el,Nn,fe]),kt=ZA(C,w,!!Q),dt=we?N.filter(ye=>rn(ye)===rn(we)):N,Bt=Hd([w,s?.account?.username,Ns()]),Zs=dt.length===0&&!Bt&&!s?.account?.username,Hr=!!(!b&&!wt&&!te&&g&&dt.length===0&&H.status==="empty"&&s?.account?.pod&&(Bt||s?.account?.username)),un=xe||A||ue||_||$,ql=H.status==="conflict",nl=dt.length>0?dt.map(ye=>({id:rn(ye),label:ye.label??`${ye.webId} · ${ye.storageUrl}`,webId:ye.webId,storageUrl:ye.storageUrl})):kt.map(ye=>({id:ye,label:ye,webId:ye})),al=dt.find(ye=>ye.webId===Z&&ye.storageUrl===I)??dt.find(ye=>ye.webId===Z),$n=dt.length>1&&H.status!=="ready"?"":al?rn(al):Z,Yl=H.status==="loading"?"waiting":H.status==="empty"?"creation":H.status==="creating"?"creating":H.status==="waiting_for_binding"||H.status==="selecting"?"waiting_for_binding":H.status==="ready"?"ready":H.status==="conflict"?{status:"conflict",message:H.message}:{status:"error",message:H.message},Kn=ql||dt.length===0&&(kt.length===0||H.status==="empty"||H.status==="creating"||H.status==="waiting_for_binding"||H.status==="selecting"||H.status==="error");y.useEffect(()=>{!Hr||wt||ue||queueMicrotask(()=>{St(!0),el()})},[wt,el,ue,Hr]);const ll=te===be.expiredInteraction,rl=!o||te===be.signInRequired,ol=!!(te&&(ll||Ue!=="load"||$e==="failed"||!g)),Jn=!!(g&&nl.length>0&&!ll&&!rl),Xl=window.xpodDesktop?.cancelLogin?"返回应用":"返回账号",Fo=()=>{Ue==="cancel"?Un():Ue==="switch"?$t():Ue==="return"?Tt():Nn(Ue!=="authorize")};return f.jsx(Dl,{title:je.surfaceTitle,presentation:"compact",children:f.jsxs("div",{className:"space-y-4",children:[ll?f.jsx(ws,{title:"授权请求已失效",description:te,primaryLabel:Ue==="return"?"重试返回":Xl,onPrimary:()=>{Tt()},pending:un}):rl&&!(te&&Ue!=="load")?f.jsx(ws,{title:je.signInRequiredTitle,description:je.signInRequiredDescription,primaryLabel:je.goToSignIn,onPrimary:kl,secondaryLabel:Xl,onSecondary:()=>{Tt()},pending:un}):ol?f.jsx(ws,{title:je.unavailableTitle,description:te,primaryLabel:Ue==="cancel"?"重试取消":Ue==="return"?"重试返回":je.tryAgain,onPrimary:Fo,secondaryLabel:Jn?"返回授权":Xl,onSecondary:Jn?Bl:()=>{Tt()},pending:un||b}):te&&!Kn?f.jsx(MA,{error:te,onDismiss:()=>oe(null),dismissLabel:je.dismiss}):null,(ol||rl)&&!ll?f.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[f.jsx(pt,{type:"button",variant:"ghost",disabled:un||b,onClick:()=>{Un()},children:A?"正在取消…":"取消授权"}),o?f.jsx(pt,{type:"button",variant:"ghost",disabled:un||b,onClick:()=>{$t()},children:je.switchAccountLabel}):null,Jn&&window.xpodDesktop?.cancelLogin?f.jsx(pt,{type:"button",variant:"ghost",disabled:un||b,onClick:()=>{Tt()},children:Xl}):null]}):null,!rl&&!ll?b||$e==="pending"?f.jsx(Us,{label:je.restoring}):Hr||ue?f.jsx(Us,{label:je.waitingMessage}):ol?null:f.jsxs("div",{className:"space-y-4",children:[Kn?null:f.jsx(LA,{client:{name:g?.client_name||je.applicationFallback,description:g?.client_uri},webIds:nl,storageOptions:[],selectedWebIdId:$n,showIdentitySelection:dt.length>1,rememberClient:me,onWebIdChange:ye=>{const Me=dt.find(Qe=>rn(Qe)===ye);Me?(Y(Me.webId),P(Me.storageUrl),ee({status:"ready",selected:Me})):(Y(ye),P(""))},onStorageChange:ye=>{const Me=dt.find(Qe=>rn(Qe)===ye);Me&&(Y(Me.webId),P(Me.storageUrl),ee({status:"ready",selected:Me}))},onRememberClientChange:L,onApprove:ye=>{Hl(!0,ye)},onDeny:()=>{Hl(!1)},onEditAccount:async()=>{ko(window.location.href),h(V("/.account/account/"))},onSwitchAccount:$t,pending:un,copy:{description:je.description(g?.client_name||je.applicationFallback),webIdLabel:dt.length>1?je.bindingLabel:je.webIdLabel,storageLabel:je.storageLabel,rememberClientLabel:je.rememberClientLabel,approveLabel:xe?je.approvingLabel:je.approveLabel,denyLabel:A?je.denyingLabel:je.denyLabel,editAccountLabel:je.editAccountLabel,switchAccountLabel:je.switchAccountLabel}}),Kn?f.jsxs(f.Fragment,{children:[Zs?f.jsxs("div",{className:"space-y-2",children:[f.jsx(zl,{htmlFor:"consent-pod-name",children:je.podNameLabel}),f.jsx(ba,{id:"consent-pod-name",autoComplete:"username",value:ce,disabled:ue,onChange:ye=>ge(ye.currentTarget.value)})]}):null,f.jsx(kA,{state:te?{status:"error",message:te}:Yl,pending:ue,onCreate:el,onRetry:tl,copy:{title:je.prepareTitle,description:je.prepareDescription,creationMessage:je.creationMessage,waitingMessage:je.waitingMessage,readyMessage:je.readyMessage,conflictMessage:je.conflictMessage,errorMessage:je.errorMessage,createLabel:je.createLabel,continueLabel:je.continueLabel,retryLabel:je.retryLabel,cancelLabel:je.cancelLabel}}),f.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[f.jsx(pt,{type:"button",variant:"ghost",disabled:un,onClick:()=>{Hl(!1)},children:je.denyLabel}),f.jsx(pt,{type:"button",variant:"ghost",disabled:un,onClick:$t,children:je.switchAccountLabel}),window.xpodDesktop?.cancelLogin?f.jsx(pt,{type:"button",variant:"ghost",disabled:un,onClick:()=>{Tt()},children:"返回应用"}):null]})]}):null]}):null]})})}function gC(){const{controls:a,idpIndex:r,isLoggedIn:o}=kn(),s=Zn(),[u]=Ib(),[d,h]=y.useState(""),[b,p]=y.useState("idle"),[g,x]=y.useState(),w=u.get("returnTo"),S=w?`?${new URLSearchParams({returnTo:w})}`:"";if(o)return f.jsx(Dn,{to:V("/.account/account/"),replace:!0});const C=async U=>{if(b!=="submitting"){p("submitting"),x(void 0);try{const N=await Ut(a?.password?.forgot||"/.account/login/password/forgot/",fetch,r);if(!N)throw new Error("Account recovery control unavailable");const j=await fetch(N,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({email:U.trim()})});if(!j.ok){x(tb(j.status)),p("error");return}p("success")}catch{x(tb()),p("error")}}};return f.jsx(Dl,{title:Vn.recoverSurfaceTitle,children:f.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col justify-center px-5 pb-5 pt-4",children:[f.jsx("p",{className:"mb-4 text-sm leading-5 text-muted-foreground",children:Jg.description}),f.jsx(z2,{email:d,onEmailChange:U=>{h(U),x(void 0),b==="error"&&p("idle")},onSubmit:C,pending:b==="submitting",status:b,error:g,copy:Jg,frame:"bare",showHeader:!1}),f.jsxs("div",{className:"mt-3 flex gap-2",children:[f.jsx(pt,{type:"button",variant:"outline",className:"flex-1",onClick:()=>s({pathname:V("/.account/login/password/"),search:S}),children:Vn.backToSignIn}),b==="success"?f.jsx(pt,{type:"button",className:"flex-1",onClick:()=>{p("idle"),x(void 0)},children:Vn.resend}):null]})]})})}function bC(){const{controls:a,idpIndex:r,isLoggedIn:o}=kn(),s=Zn(),[u]=Ib(),[d,h]=y.useState(""),[b,p]=y.useState(""),[g,x]=y.useState("idle"),[w,S]=y.useState(),C=u.get("rid")||u.get("token"),U=u.get("returnTo"),N=U?`?${new URLSearchParams({returnTo:U})}`:"";if(o)return f.jsx(Dn,{to:V("/.account/account/"),replace:!0});if(!C)return f.jsx(Dn,{to:{pathname:V("/.account/login/password/forgot/"),search:N},replace:!0});const j=async I=>{if(g!=="submitting"){x("submitting"),S(void 0);try{const P=await Ut(a?.password?.reset||"/.account/login/password/reset/",fetch,r);if(!P)throw new Error("Account recovery control unavailable");const H=await fetch(P,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({recordId:C,password:I.password})});if(!H.ok){S(nb(H.status)),x("error");return}x("success")}catch{S(nb()),x("error")}}};return f.jsx(Dl,{title:Vn.resetSurfaceTitle,children:f.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col justify-center px-5 pb-5 pt-4",children:[f.jsx("p",{className:"mb-4 text-sm leading-5 text-muted-foreground",children:Wg.description}),f.jsx(O2,{password:d,confirmation:b,onPasswordChange:I=>{h(I),S(void 0)},onConfirmationChange:I=>{p(I),S(void 0)},onSubmit:j,pending:g==="submitting",status:g,error:w,copy:Wg,frame:"bare",showHeader:!1}),f.jsx(pt,{type:"button",variant:"ghost",className:"mt-3 w-full",onClick:()=>s({pathname:V("/.account/login/password/"),search:N}),children:Vn.backToSignIn})]})})}function yC(){const{controls:a,isLoggedIn:r,hasOidcPending:o}=kn();if(r)return f.jsx(Dn,{to:V(o?"/.account/oidc/consent/":"/.account/account/"),replace:!0});const s=a?.html?.password?.login||a?.password?.login,u=ef(s),d=u?new URL(u):new URL(V("/.account/login/password/"),window.location.origin),h=d.pathname===V("/.account/login/")?V("/.account/login/password/"):`${d.pathname}${d.search}${d.hash}`;return f.jsx(Dn,{to:V(h),replace:!0})}function vC(){const{isInitializing:a,initError:r,retry:o}=kn();return a?f.jsx(k2,{}):r?f.jsx(H2,{message:r,retry:o}):f.jsxs(Xw,{children:[f.jsx(Sn,{path:V("/.account/"),element:f.jsx(xA,{})}),f.jsx(Sn,{path:V("/.account/about/"),element:f.jsx(wA,{})}),f.jsx(Sn,{path:V("/.account/account/"),element:f.jsx(Kg,{children:f.jsx(OA,{})})}),f.jsx(Sn,{path:V("/.account/create-pod/"),element:f.jsx(Kg,{allowOidcPending:!0,children:f.jsx(tC,{})})}),f.jsx(Sn,{path:V("/.account/login/"),element:f.jsx(yC,{})}),f.jsx(Sn,{path:V("/.account/login/password/"),element:f.jsx(kd,{initialIsRegister:!1},"login")}),f.jsx(Sn,{path:V("/.account/login/password/register/"),element:f.jsx(kd,{initialIsRegister:!0},"register")}),f.jsx(Sn,{path:V("/.account/login/password/forgot/"),element:f.jsx(gC,{})}),f.jsx(Sn,{path:V("/.account/login/password/reset/"),element:f.jsx(bC,{})}),f.jsx(Sn,{path:V("/.account/oidc/consent/"),element:f.jsx(pC,{})}),f.jsx(Sn,{path:"*",element:f.jsx(Dn,{to:V("/.account/"),replace:!0})})]})}function xC(){return y.useEffect(()=>{globalThis.xpodDesktop?.setWindowMode?.("workspace")},[]),f.jsx(mS,{children:f.jsx(r1,{children:f.jsx(vC,{})})})}const Xd="xpod.theme",wC="(prefers-color-scheme: dark)";function yv(a=Gd()){try{const r=a?.getItem(Xd);return r==="light"||r==="dark"?r:"system"}catch{return"system"}}function vv(a,r=wv()){return a!=="system"?a:r?.matches?"dark":"light"}function xv(a,r=typeof document>"u"?void 0:document.documentElement){r&&(r.classList.toggle("light",a==="light"),r.classList.toggle("dark",a==="dark"),r.dataset.theme=a,r.style.colorScheme=a)}function SC(){const a=yv(),r=vv(a);return xv(r),{preference:a,resolvedTheme:r}}function wv(){return typeof window>"u"||typeof window.matchMedia!="function"?void 0:window.matchMedia(wC)}function Gd(){try{return typeof window>"u"?void 0:window.localStorage}catch{return}}const EC=y.createContext(null);function AC({children:a}){const[r,o]=y.useState(()=>yv()),[s,u]=y.useState(()=>vv("system")),d=r==="system"?s:r;y.useEffect(()=>{const b=wv();if(!b)return;const p=g=>{u(g.matches?"dark":"light")};return typeof b.addEventListener=="function"?(b.addEventListener("change",p),()=>b.removeEventListener("change",p)):(b.addListener?.(p),()=>b.removeListener?.(p))},[]),y.useEffect(()=>{xv(d)},[d]);const h=y.useMemo(()=>({preference:r,resolvedTheme:d,setPreference(b){o(b);try{b==="system"?Gd()?.removeItem(Xd):Gd()?.setItem(Xd,b)}catch{}}}),[r,d]);return f.jsx(EC.Provider,{value:h,children:a})}SC();try{$S()}catch{}Xx.createRoot(document.getElementById("root")).render(f.jsx(Sb.StrictMode,{children:f.jsx(AC,{children:f.jsx(xC,{})})}));
|
|
11
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let x=nn(),w;if(r){let _=typeof r=="string"?hr(r):r;We(p==="/"||_.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${_.pathname}" was given in the \`location\` prop.`),w=_}else w=x;let S=w.pathname||"/",T=S;if(p!=="/"){let _=p.replace(/^\//,"").split("/");T="/"+S.replace(/^\//,"").split("/").slice(_.length).join("/")}let j=i&&i.state.matches.length?i.state.matches.map(_=>Object.assign(_,{route:i.manifest[_.route.id]||_.route})):ev(a,{pathname:T});vn(g||j!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),vn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=aw(j&&j.map(_=>Object.assign({},_,{params:Object.assign({},h,_.params),pathname:Tn([p,s.encodeLocation?s.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?p:Tn([p,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),u,i);return r&&N?y.createElement(No.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...w},navigationType:"POP"}},N):N}function Fx(){let a=sw(),r=Bx(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),i=a instanceof Error?a.stack:null,s="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",a),h=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:d},"ErrorBoundary")," or"," ",y.createElement("code",{style:d},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),i?y.createElement("pre",{style:u},i):null,h)}var ew=y.createElement(Fx,null),pv=class extends y.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,r){return r.location!==a.location||r.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:r.error,location:r.location,revalidation:a.revalidation||r.revalidation}}componentDidCatch(a,r){this.props.onError?this.props.onError(a,r):console.error("React Router caught the following error during render",a)}render(){let a=this.state.error;if(this.context&&typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){const i=Kx(a.digest);i&&(a=i)}let r=a!==void 0?y.createElement(Hn.Provider,{value:this.props.routeContext},y.createElement(Cd.Provider,{value:a,children:this.props.component})):this.props.children;return this.context?y.createElement(tw,{error:a},r):r}};pv.contextType=cv;var Xu=new WeakMap;function tw({children:a,error:r}){let{basename:i}=y.useContext(tn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let s=$x(r.digest);if(s){let u=Xu.get(r);if(u)throw u;let d=iv(s.location,i),h=d.absoluteURL||d.to;if(Xx(h))throw new Error("Invalid redirect location");if(ov&&!Xu.get(r))if(d.isExternal||s.reloadDocument)window.location.href=h;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw Xu.set(r,v),v}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return a}function nw({routeContext:a,match:r,children:i}){let s=y.useContext(pr);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Hn.Provider,{value:a},i)}function aw(a,r=[],i){let s=i?.state;if(a==null){if(!s)return null;if(s.errors)a=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)a=s.matches;else return null}let u=a,d=s?.errors;if(d!=null){let x=u.findIndex(w=>w.route.id&&d?.[w.route.id]!==void 0);We(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),u=u.slice(0,Math.min(u.length,x+1))}let h=!1,v=-1;if(i&&s){h=s.renderFallback;for(let x=0;x<u.length;x++){let w=u[x];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(v=x),w.route.id){let{loaderData:S,errors:T}=s,j=w.route.loader&&!S.hasOwnProperty(w.route.id)&&(!T||T[w.route.id]===void 0);if(w.route.lazy||j){i.isStatic&&(h=!0),v>=0?u=u.slice(0,v+1):u=[u[0]];break}}}}let p=i?.onError,g=s&&p?(x,w)=>{p(x,{location:s.location,params:s.matches?.[0]?.params??{},pattern:Hx(s.matches),errorInfo:w})}:void 0;return u.reduceRight((x,w,S)=>{let T,j=!1,N=null,_=null;s&&(T=d&&w.route.id?d[w.route.id]:void 0,N=w.route.errorElement||ew,h&&(v<0&&S===0?(gv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,_=null):v===S&&(j=!0,_=w.route.hydrateFallbackElement||null)));let Q=r.concat(u.slice(0,S+1)),Z=()=>{let G;return T?G=N:j?G=_:w.route.Component?G=y.createElement(w.route.Component,null):w.route.element?G=w.route.element:G=x,y.createElement(nw,{match:w,routeContext:{outlet:x,matches:Q,isDataRoute:s!=null},children:G})};return s&&(w.route.ErrorBoundary||w.route.errorElement||S===0)?y.createElement(pv,{location:s.location,revalidation:s.revalidation,component:N,error:T,children:Z(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:g}):Z()},null)}function Td(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lw(a){let r=y.useContext(pr);return We(r,Td(a)),r}function rw(a){let r=y.useContext(ms);return We(r,Td(a)),r}function ow(a){let r=y.useContext(Hn);return We(r,Td(a)),r}function Rd(a){let r=ow(a),i=r.matches[r.matches.length-1];return We(i.route.id,`${a} can only be used on routes that contain a unique "id"`),i.route.id}function iw(){return Rd("useRouteId")}function sw(){let a=y.useContext(Cd),r=rw("useRouteError"),i=Rd("useRouteError");return a!==void 0?a:r.errors?.[i]}function cw(){let{router:a}=lw("useNavigate"),r=Rd("useNavigate"),i=y.useRef(!1);return mv(()=>{i.current=!0}),y.useCallback(async(u,d={})=>{vn(i.current,fv),i.current&&(typeof u=="number"?await a.navigate(u):await a.navigate(u,{fromRouteId:r,...d}))},[a,r])}var ng={};function gv(a,r,i){!r&&!ng[a]&&(ng[a]=!0,vn(!1,i))}y.memo(uw);function uw({routes:a,manifest:r,future:i,state:s,isStatic:u,onError:d}){return hv(a,void 0,{manifest:r,state:s,isStatic:u,onError:d})}function Rn({to:a,replace:r,state:i,relative:s}){We(gr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=y.useContext(tn);vn(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=y.useContext(Hn),{pathname:h}=nn(),v=qn(),p=fs(a,Ad(d),h,s==="path"),g=JSON.stringify(p);return y.useEffect(()=>{v(JSON.parse(g),{replace:r,state:i,relative:s})},[v,g,s,r,i]),null}function pn(a){We(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function dw({basename:a="/",children:r=null,location:i,navigationType:s="POP",navigator:u,static:d=!1,useTransitions:h}){We(!gr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=a.replace(/^\/*/,"/"),p=y.useMemo(()=>({basename:v,navigator:u,static:d,useTransitions:h,future:{}}),[v,u,d,h]);typeof i=="string"&&(i=hr(i));let{pathname:g="/",search:x="",hash:w="",state:S=null,key:T="default",mask:j}=i,N=y.useMemo(()=>{let _=sa(g,v);return _==null?null:{location:{pathname:_,search:x,hash:w,state:S,key:T,mask:j},navigationType:s}},[v,g,x,w,S,T,s,j]);return vn(N!=null,`<Router basename="${v}"> is not able to match the URL "${g}${x}${w}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:y.createElement(tn.Provider,{value:p},y.createElement(No.Provider,{children:r,value:N}))}function fw({children:a,location:r}){return Wx(td(a),r)}function td(a,r=[]){let i=[];return y.Children.forEach(a,(s,u)=>{if(!y.isValidElement(s))return;let d=[...r,u];if(s.type===y.Fragment){i.push.apply(i,td(s.props.children,d));return}We(s.type===pn,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),We(!s.props.index||!s.props.children,"An index route cannot have child routes.");let h={id:s.props.id||d.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(h.children=td(s.props.children,d)),i.push(h)}),i}var Fi="get",es="application/x-www-form-urlencoded";function hs(a){return typeof HTMLElement<"u"&&a instanceof HTMLElement}function mw(a){return hs(a)&&a.tagName.toLowerCase()==="button"}function hw(a){return hs(a)&&a.tagName.toLowerCase()==="form"}function pw(a){return hs(a)&&a.tagName.toLowerCase()==="input"}function gw(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function vw(a,r){return a.button===0&&(!r||r==="_self")&&!gw(a)}function nd(a=""){return new URLSearchParams(typeof a=="string"||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce((r,i)=>{let s=a[i];return r.concat(Array.isArray(s)?s.map(u=>[i,u]):[[i,s]])},[]))}function yw(a,r){let i=nd(a);return r&&r.forEach((s,u)=>{i.has(u)||r.getAll(u).forEach(d=>{i.append(u,d)})}),i}var Ii=null;function bw(){if(Ii===null)try{new FormData(document.createElement("form"),0),Ii=!1}catch{Ii=!0}return Ii}var xw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gu(a){return a!=null&&!xw.has(a)?(vn(!1,`"${a}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${es}"`),null):a}function ww(a,r){let i,s,u,d,h;if(hw(a)){let v=a.getAttribute("action");s=v?sa(v,r):null,i=a.getAttribute("method")||Fi,u=Gu(a.getAttribute("enctype"))||es,d=new FormData(a)}else if(mw(a)||pw(a)&&(a.type==="submit"||a.type==="image")){let v=a.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=a.getAttribute("formaction")||v.getAttribute("action");if(s=p?sa(p,r):null,i=a.getAttribute("formmethod")||v.getAttribute("method")||Fi,u=Gu(a.getAttribute("formenctype"))||Gu(v.getAttribute("enctype"))||es,d=new FormData(v,a),!bw()){let{name:g,type:x,value:w}=a;if(x==="image"){let S=g?`${g}.`:"";d.append(`${S}x`,"0"),d.append(`${S}y`,"0")}else g&&d.append(g,w)}}else{if(hs(a))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Fi,s=null,u=es,h=a}return d&&u==="text/plain"&&(h=d,d=void 0),{action:s,method:i.toLowerCase(),encType:u,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nd(a,r){if(a===!1||a===null||typeof a>"u")throw new Error(r)}function vv(a,r,i,s){let u=typeof a=="string"?new URL(a,typeof window>"u"?"server://singlefetch/":window.location.origin):a;return i?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${s}`:u.pathname=`${u.pathname}.${s}`:u.pathname==="/"?u.pathname=`_root.${s}`:r&&sa(u.pathname,r)==="/"?u.pathname=`${as(r)}/_root.${s}`:u.pathname=`${as(u.pathname)}.${s}`,u}async function Sw(a,r){if(a.id in r)return r[a.id];try{let i=await import(a.module);return r[a.id]=i,i}catch(i){return console.error(`Error loading route module \`${a.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ew(a){return a==null?!1:a.href==null?a.rel==="preload"&&typeof a.imageSrcSet=="string"&&typeof a.imageSizes=="string":typeof a.rel=="string"&&typeof a.href=="string"}async function Aw(a,r,i){let s=await Promise.all(a.map(async u=>{let d=r.routes[u.route.id];if(d){let h=await Sw(d,i);return h.links?h.links():[]}return[]}));return Nw(s.flat(1).filter(Ew).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function ag(a,r,i,s,u,d){let h=(p,g)=>i[g]?p.route.id!==i[g].route.id:!0,v=(p,g)=>i[g].pathname!==p.pathname||i[g].route.path?.endsWith("*")&&i[g].params["*"]!==p.params["*"];return d==="assets"?r.filter((p,g)=>h(p,g)||v(p,g)):d==="data"?r.filter((p,g)=>{let x=s.routes[p.route.id];if(!x||!x.hasLoader)return!1;if(h(p,g)||v(p,g))return!0;if(p.route.shouldRevalidate){let w=p.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(a,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function Cw(a,r,{includeHydrateFallback:i}={}){return Tw(a.map(s=>{let u=r.routes[s.route.id];if(!u)return[];let d=[u.module];return u.clientActionModule&&(d=d.concat(u.clientActionModule)),u.clientLoaderModule&&(d=d.concat(u.clientLoaderModule)),i&&u.hydrateFallbackModule&&(d=d.concat(u.hydrateFallbackModule)),u.imports&&(d=d.concat(u.imports)),d}).flat(1))}function Tw(a){return[...new Set(a)]}function Rw(a){let r={},i=Object.keys(a).sort();for(let s of i)r[s]=a[s];return r}function Nw(a,r){let i=new Set;return new Set(r),a.reduce((s,u)=>{let d=JSON.stringify(Rw(u));return i.has(d)||(i.add(d),s.push({key:d,link:u})),s},[])}function jd(){let a=y.useContext(pr);return Nd(a,"You must render this element inside a <DataRouterContext.Provider> element"),a}function jw(){let a=y.useContext(ms);return Nd(a,"You must render this element inside a <DataRouterStateContext.Provider> element"),a}var _d=y.createContext(void 0);_d.displayName="FrameworkContext";function ps(){let a=y.useContext(_d);return Nd(a,"You must render this element inside a <HydratedRouter> element"),a}function _w(a,r){let i=y.useContext(_d),[s,u]=y.useState(!1),[d,h]=y.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:g,onMouseLeave:x,onTouchStart:w}=r,S=y.useRef(null);y.useEffect(()=>{if(a==="render"&&h(!0),a==="viewport"){let N=Q=>{Q.forEach(Z=>{h(Z.isIntersecting)})},_=new IntersectionObserver(N,{threshold:.5});return S.current&&_.observe(S.current),()=>{_.disconnect()}}},[a]),y.useEffect(()=>{if(s){let N=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(N)}}},[s]);let T=()=>{u(!0)},j=()=>{u(!1),h(!1)};return i?a!=="intent"?[d,S,{}]:[d,S,{onFocus:go(v,T),onBlur:go(p,j),onMouseEnter:go(g,T),onMouseLeave:go(x,j),onTouchStart:go(w,T)}]:[!1,S,{}]}function go(a,r){return i=>{a&&a(i),i.defaultPrevented||r(i)}}function zw({page:a,...r}){let i=Gx(),{nonce:s}=ps(),{router:u}=jd(),d=y.useMemo(()=>ev(u.routes,a,u.basename),[u.routes,a,u.basename]);return d?(r.nonce==null&&s&&(r={...r,nonce:s}),i?y.createElement(Ow,{page:a,matches:d,...r}):y.createElement(Mw,{page:a,matches:d,...r})):null}function Uw(a){let{manifest:r,routeModules:i}=ps(),[s,u]=y.useState([]);return y.useEffect(()=>{let d=!1;return Aw(a,r,i).then(h=>{d||u(h)}),()=>{d=!0}},[a,r,i]),s}function Ow({page:a,matches:r,...i}){let s=nn(),{future:u}=ps(),{basename:d}=jd(),h=y.useMemo(()=>{if(a===s.pathname+s.search+s.hash)return[];let v=vv(a,d,u.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let x of r)typeof x.route.shouldRevalidate=="function"?p=!0:g.push(x.route.id);return p&&g.length>0&&v.searchParams.set("_routes",g.join(",")),[v.pathname+v.search]},[d,u.v8_trailingSlashAwareDataRequests,a,s,r]);return y.createElement(y.Fragment,null,h.map(v=>y.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...i})))}function Mw({page:a,matches:r,...i}){let s=nn(),{future:u,manifest:d,routeModules:h}=ps(),{basename:v}=jd(),{loaderData:p,matches:g}=jw(),x=y.useMemo(()=>ag(a,r,g,d,s,"data"),[a,r,g,d,s]),w=y.useMemo(()=>ag(a,r,g,d,s,"assets"),[a,r,g,d,s]),S=y.useMemo(()=>{if(a===s.pathname+s.search+s.hash)return[];let N=new Set,_=!1;if(r.forEach(Z=>{let G=d.routes[Z.route.id];!G||!G.hasLoader||(!x.some(oe=>oe.route.id===Z.route.id)&&Z.route.id in p&&h[Z.route.id]?.shouldRevalidate||G.hasClientLoader?_=!0:N.add(Z.route.id))}),N.size===0)return[];let Q=vv(a,v,u.v8_trailingSlashAwareDataRequests,"data");return _&&N.size>0&&Q.searchParams.set("_routes",r.filter(Z=>N.has(Z.route.id)).map(Z=>Z.route.id).join(",")),[Q.pathname+Q.search]},[v,u.v8_trailingSlashAwareDataRequests,p,s,d,x,r,a,h]),T=y.useMemo(()=>Cw(w,d),[w,d]),j=Uw(w);return y.createElement(y.Fragment,null,S.map(N=>y.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...i})),T.map(N=>y.createElement("link",{key:N,rel:"modulepreload",href:N,...i})),j.map(({key:N,link:_})=>y.createElement("link",{key:N,nonce:i.nonce,..._,crossOrigin:_.crossOrigin??i.crossOrigin})))}function Lw(...a){return r=>{a.forEach(i=>{typeof i=="function"?i(r):i!=null&&(i.current=r)})}}var Dw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Dw&&(window.__reactRouterVersion="7.18.2")}catch{}function kw({basename:a,children:r,useTransitions:i,window:s}){let u=y.useRef();u.current==null&&(u.current=px({window:s,v5Compat:!0}));let d=u.current,[h,v]=y.useState({action:d.action,location:d.location}),p=y.useCallback(g=>{i===!1?v(g):y.startTransition(()=>v(g))},[i]);return y.useLayoutEffect(()=>d.listen(p),[d,p]),y.createElement(dw,{basename:a,children:r,location:h.location,navigationType:h.action,navigator:d,useTransitions:i})}var ls=y.forwardRef(function({onClick:r,discover:i="render",prefetch:s="none",relative:u,reloadDocument:d,replace:h,mask:v,state:p,target:g,to:x,preventScrollReset:w,viewTransition:S,defaultShouldRevalidate:T,...j},N){let{basename:_,navigator:Q,useTransitions:Z}=y.useContext(tn),G=typeof x=="string"&&Ed.test(x),oe=iv(x,_);x=oe.to;let ne=Px(x,{relative:u}),se=nn(),I=null;if(v){let he=fs(v,[],se.mask?se.mask.pathname:"/",!0);_!=="/"&&(he.pathname=he.pathname==="/"?_:Tn([_,he.pathname])),I=Q.createHref(he)}let[q,ee,te]=_w(s,j),ie=Yw(x,{replace:h,mask:v,state:p,target:g,preventScrollReset:w,relative:u,viewTransition:S,defaultShouldRevalidate:T,useTransitions:Z});function me(he){r&&r(he),he.defaultPrevented||ie(he)}let De=!(oe.isExternal||d),ve=y.createElement("a",{...j,...te,href:(De?I:void 0)||oe.absoluteURL||ne,onClick:De?me:r,ref:Lw(N,ee),target:g,"data-discover":!G&&i==="render"?"true":void 0});return q&&!G?y.createElement(y.Fragment,null,ve,y.createElement(zw,{page:ne})):ve});ls.displayName="Link";var Bw=y.forwardRef(function({"aria-current":r="page",caseSensitive:i=!1,className:s="",end:u=!1,style:d,to:h,viewTransition:v,children:p,...g},x){let w=jo(h,{relative:g.relative}),S=nn(),T=y.useContext(ms),{navigator:j,basename:N}=y.useContext(tn),_=T!=null&&Iw(w)&&v===!0,Q=j.encodeLocation?j.encodeLocation(w).pathname:w.pathname,Z=S.pathname,G=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(Z=Z.toLowerCase(),G=G?G.toLowerCase():null,Q=Q.toLowerCase()),G&&N&&(G=sa(G,N)||G);const oe=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let ne=Z===Q||!u&&Z.startsWith(Q)&&Z.charAt(oe)==="/",se=G!=null&&(G===Q||!u&&G.startsWith(Q)&&G.charAt(Q.length)==="/"),I={isActive:ne,isPending:se,isTransitioning:_},q=ne?r:void 0,ee;typeof s=="function"?ee=s(I):ee=[s,ne?"active":null,se?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let te=typeof d=="function"?d(I):d;return y.createElement(ls,{...g,"aria-current":q,className:ee,ref:x,style:te,to:h,viewTransition:v},typeof p=="function"?p(I):p)});Bw.displayName="NavLink";var Hw=y.forwardRef(({discover:a="render",fetcherKey:r,navigate:i,reloadDocument:s,replace:u,state:d,method:h=Fi,action:v,onSubmit:p,relative:g,preventScrollReset:x,viewTransition:w,defaultShouldRevalidate:S,...T},j)=>{let{useTransitions:N}=y.useContext(tn),_=Vw(),Q=Qw(v,{relative:g}),Z=h.toLowerCase()==="get"?"get":"post",G=typeof v=="string"&&Ed.test(v),oe=ne=>{if(p&&p(ne),ne.defaultPrevented)return;ne.preventDefault();let se=ne.nativeEvent.submitter,I=se?.getAttribute("formmethod")||h,q=()=>_(se||ne.currentTarget,{fetcherKey:r,method:I,navigate:i,replace:u,state:d,relative:g,preventScrollReset:x,viewTransition:w,defaultShouldRevalidate:S});N&&i!==!1?y.startTransition(()=>q()):q()};return y.createElement("form",{ref:j,method:Z,action:Q,onSubmit:s?p:oe,...T,"data-discover":!G&&a==="render"?"true":void 0})});Hw.displayName="Form";function qw(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yv(a){let r=y.useContext(pr);return We(r,qw(a)),r}function Yw(a,{target:r,replace:i,mask:s,state:u,preventScrollReset:d,relative:h,viewTransition:v,defaultShouldRevalidate:p,useTransitions:g}={}){let x=qn(),w=nn(),S=jo(a,{relative:h});return y.useCallback(T=>{if(vw(T,r)){T.preventDefault();let j=i!==void 0?i:Eo(w)===Eo(S),N=()=>x(a,{replace:j,mask:s,state:u,preventScrollReset:d,relative:h,viewTransition:v,defaultShouldRevalidate:p});g?y.startTransition(()=>N()):N()}},[w,x,S,i,s,u,r,a,d,h,v,p,g])}function bv(a){vn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let r=y.useRef(nd(a)),i=y.useRef(!1),s=nn(),u=y.useMemo(()=>yw(s.search,i.current?null:r.current),[s.search]),d=qn(),h=y.useCallback((v,p)=>{const g=nd(typeof v=="function"?v(new URLSearchParams(u)):v);i.current=!0,d("?"+g,p)},[d,u]);return[u,h]}var Xw=0,Gw=()=>`__${String(++Xw)}__`;function Vw(){let{router:a}=yv("useSubmit"),{basename:r}=y.useContext(tn),i=iw(),s=a.fetch,u=a.navigate;return y.useCallback(async(d,h={})=>{let{action:v,method:p,encType:g,formData:x,body:w}=ww(d,r);if(h.navigate===!1){let S=h.fetcherKey||Gw();await s(S,i,h.action||v,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:w,formMethod:h.method||p,formEncType:h.encType||g,flushSync:h.flushSync})}else await u(h.action||v,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:x,body:w,formMethod:h.method||p,formEncType:h.encType||g,replace:h.replace,state:h.state,fromRouteId:i,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,u,r,i])}function Qw(a,{relative:r}={}){let{basename:i}=y.useContext(tn),s=y.useContext(Hn);We(s,"useFormAction must be used inside a RouteContext");let[u]=s.matches.slice(-1),d={...jo(a||".",{relative:r})},h=nn();if(a==null){d.search=h.search;let v=new URLSearchParams(d.search),p=v.getAll("index");if(p.some(x=>x==="")){v.delete("index"),p.filter(w=>w).forEach(w=>v.append("index",w));let x=v.toString();d.search=x?`?${x}`:""}}return(!a||a===".")&&u.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:Tn([i,d.pathname])),Eo(d)}function Iw(a,{relative:r}={}){let i=y.useContext(uv);We(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=yv("useViewTransitionState"),u=jo(a,{relative:r});if(!i.isTransitioning)return!1;let d=sa(i.currentLocation.pathname,s)||i.currentLocation.pathname,h=sa(i.nextLocation.pathname,s)||i.nextLocation.pathname;return ns(u.pathname,h)!=null||ns(u.pathname,d)!=null}var Zw=Wg();const zd="css-account",lg="xpod.cssAccountToken",ad="xpod.cssAccountAuthority",$w="CSS-Account-Token";function gs(){return typeof window<"u"&&typeof document<"u"}function xv(){if(!gs())return;const a=document.cookie.split(";");for(const r of a){const[i,...s]=r.trim().split("=");if(i===zd){const u=s.join("=");try{return u?decodeURIComponent(u):void 0}catch{return}}}}function Kw(a){gs()&&(document.cookie=`${zd}=${encodeURIComponent(a)}; Path=/; SameSite=Lax`)}function Pw(){gs()&&(document.cookie=`${zd}=; Path=/; SameSite=Lax; Max-Age=0`)}function Jw(){if(!(typeof window>"u")){try{window.localStorage.removeItem(lg)}catch{}try{window.sessionStorage.removeItem(lg)}catch{}}}function Ww(a){if(!gs())return!1;const r=wv(a),i=window.localStorage.getItem(ad),s=i!==null?i!==r:new URL(r).origin!==window.location.origin;return window.localStorage.setItem(ad,r),s&&rs(),s}function wv(a){const r=new URL(a,window.location.origin);if(!["http:","https:"].includes(r.protocol)||r.username||r.password||r.pathname!=="/.account/"||r.search||r.hash)throw new Error("Invalid Account authority");return r.href}function Vu(a){!a||xv()===a||Kw(a)}function rs(){Jw(),Pw()}function wo(){return xv()}function ld(a,r={Accept:"application/json"}){const i={...r};return a&&!Fw(i,"Authorization")&&(i.Authorization=`${$w} ${a}`),i}function st(a={Accept:"application/json"},r){if(r)try{if(window.localStorage.getItem(ad)!==wv(r))return{...a}}catch{return{...a}}return ld(wo(),a)}function Fw(a,r){const i=r.toLowerCase();return Object.keys(a).some(s=>s.toLowerCase()===i)}const Sv=new Set(["http:","https:"]),eS=new Set(["state","redirect_uri","client_id","response_type","code_challenge","code_challenge_method"]);function rg(a,r){if(!a||typeof a.url!="string"||a.url.trim()==="")throw new TypeError(`${r}.url must be a non-empty absolute URL`);if(typeof a.label!="string")throw new TypeError(`${r}.label must be a string`);let i;try{i=new URL(a.url.trim())}catch{throw new TypeError(`${r}.url must be a valid absolute URL`)}if(!Sv.has(i.protocol))throw new TypeError(`${r}.url must use http or https`);if(i.username||i.password)throw new TypeError(`${r}.url must not contain credentials`);if(i.hash)throw new TypeError(`${r}.url must not contain a fragment`);return{url:i.href,label:a.label}}function tS(a){if(typeof a!="string"||a===""||/[\s\u0000-\u001f\u007f-\u009f]/u.test(a))throw new TypeError("webId must be a non-empty identifier without whitespace or control characters");return a}function nS(a){if(!a||typeof a.storageUrl!="string"||a.storageUrl.trim()==="")throw new TypeError("selectedStorage.storageUrl must be a non-empty absolute URL");tS(a.webId);let r;try{r=new URL(a.storageUrl.trim())}catch{throw new TypeError("selectedStorage.storageUrl must be a valid absolute URL")}if(!Sv.has(r.protocol))throw new TypeError("selectedStorage.storageUrl must use http or https");if(r.username||r.password)throw new TypeError("selectedStorage.storageUrl must not contain credentials");if(r.hash)throw new TypeError("selectedStorage.storageUrl must not contain a fragment");return{storageUrl:r.href,webId:a.webId,...a.label===void 0?{}:{label:a.label}}}function So(a,r,i){if(!r.includes(a))throw new TypeError(`${i} has an unsupported value`);return a}function Ev(a){if(!a||typeof a.id!="string"||a.id.trim()==="")throw new TypeError("route.id must be a non-empty opaque identifier");if(typeof a.label!="string")throw new TypeError("route.label must be a string");return{id:a.id.trim(),label:a.label,...a.description===void 0?{}:{description:a.description},...a.badge===void 0?{}:{badge:{label:a.badge.label,tone:So(a.badge.tone,["neutral","primary","success","warning","danger"],"route.badge.tone")}},identityProvider:rg(a.identityProvider,"route.identityProvider"),...a.storageProvider===void 0?{}:{storageProvider:rg(a.storageProvider,"route.storageProvider")},availability:So(a.availability,["ready","starting","unavailable"],"route.availability"),...a.unavailableReason===void 0?{}:{unavailableReason:a.unavailableReason}}}function aS(a){let r=a;for(let i=0;i<4;i+=1){let s;try{s=decodeURIComponent(r)}catch{throw new TypeError("returnTo contains malformed percent encoding")}if(s===r)return r;r=s}return r}function lS(a,r){return r.some(i=>{if(i==="/")return a.startsWith("/");const s=i.endsWith("/")?i.slice(0,-1):i;return a===s||a.startsWith(`${s}/`)})}function rS(a,r){if(a===void 0)return;if(typeof a!="string"||a.trim()==="")throw new TypeError("returnTo must be a non-empty application path");const i=a.trim(),s=aS(i),u=s.split(/[?#]/,1)[0];if(!i.startsWith("/")||i.startsWith("//")||i.includes("\\")||s.includes("\\")||/^[a-z][a-z\d+.-]*:/i.test(s)||s.startsWith("//")||u.split("/").some(d=>d==="..")||!lS(u,r))throw new TypeError("returnTo must be a safe path within the application allow-list");return i}function oS(a){if(!a||typeof a.id!="string"||a.id.trim()==="")throw new TypeError("transaction.id must be a non-empty opaque identifier");const r=a.authorizationParameters===void 0?void 0:{...a.authorizationParameters};if(r){for(const s of Object.keys(r))if(eS.has(s.toLowerCase()))throw new TypeError(`authorizationParameters cannot override ${s}`)}const i=a.prompt===void 0?void 0:So(a.prompt,["login","consent","select_account"],"transaction.prompt");return{id:a.id,route:Ev(a.route),...a.selectedStorage===void 0?{}:{selectedStorage:nS(a.selectedStorage)},authorizationSurface:So(a.authorizationSurface,["redirect","popup","embedded","external"],"transaction.authorizationSurface"),...i===void 0?{}:{prompt:i},discovery:So(a.discovery,["standard","strict"],"transaction.discovery"),...r===void 0?{}:{authorizationParameters:r},...a.returnTo===void 0?{}:{returnTo:rS(a.returnTo,["/"])}}}async function iS(a){let r;try{r=await a.fetch.call(globalThis,a.statusUrl??"/provision/status",{credentials:"include",headers:{accept:"application/json"}})}catch{return}if(!r?.ok)return;const i=await r.json().catch(()=>{});if(typeof i?.publicUrl=="string")try{return Av({canonicalBaseUrl:i.publicUrl,localBaseUrl:a.localBaseUrl})}catch{return}}function og(a,r){let i;try{i=a instanceof URL?new URL(a.href):new URL(a)}catch{return}const s=r.map(Av).filter(u=>sS(i,u.canonicalBaseUrl)).sort((u,d)=>d.canonicalBaseUrl.length-u.canonicalBaseUrl.length)[0];return s?cS(i,s):void 0}function Av(a){return{canonicalBaseUrl:ig(a.canonicalBaseUrl),localBaseUrl:ig(a.localBaseUrl)}}function ig(a){const r=new URL(a);if(r.protocol!=="http:"&&r.protocol!=="https:")throw new TypeError("Solid local routes must use http or https");return r.search="",r.hash="",r.href.endsWith("/")?r.href:`${r.href}/`}function sS(a,r){const i=new URL(r);return a.origin===i.origin&&a.pathname.startsWith(i.pathname)}function cS(a,r){const i=new URL(r.canonicalBaseUrl),s=new URL(r.localBaseUrl),u=a.pathname.slice(i.pathname.length),d=new URL(u,s);return d.search=a.search,d.hash=a.hash,d}let Qu,sg;function Ud(a){if(typeof window>"u"||typeof a!="string"||!a.trim())return;const r=a.trim();try{const i=new URL(r,window.location.origin);return i.origin!==window.location.origin||!["http:","https:"].includes(i.protocol)||i.username||i.password?void 0:K(i)}catch{return}}async function zt(a,r=fetch,i){if(typeof window>"u"||typeof a!="string"||!a.trim())return;if(i)try{const g=new URL(i,window.location.origin),x=new URL(a.trim(),g);if(x.origin===g.origin&&g.pathname.startsWith("/.account/")&&x.pathname.startsWith("/.account/")&&["http:","https:"].includes(x.protocol)&&!x.username&&!x.password)return K(x)}catch{}const s=Ud(a);if(s)return s;let u;try{u=new URL(a)}catch{return}if(!["http:","https:"].includes(u.protocol)||u.username||u.password||!u.pathname.startsWith("/.account/"))return;if(Qu&&sg===window.location.origin){const g=og(u,[Qu]);if(g)return K(g)}const d={localBaseUrl:`${window.location.origin}/`,statusUrl:new URL("/provision/status",window.location.origin).href},h=await Promise.resolve(r.call(globalThis,d.statusUrl,{credentials:"include",headers:{accept:"application/json"}})).catch(()=>{}),v=h?await iS({...d,fetch:async()=>h.clone()}):void 0;v&&(Qu=v,sg=window.location.origin);const p=v?og(u,[v]):void 0;return p?K(p):void 0}const Cv=y.createContext(null);function Nn(){const a=y.useContext(Cv);if(!a)throw new Error("useAuth must be used within AuthProvider");return a}function uS(a){const r=Tv(a);if(!r)return;const i=typeof r.serviceAccessToken=="string"?r.serviceAccessToken:typeof r.serviceToken=="string"?r.serviceToken:void 0;if(!(typeof r.spUrl!="string"||!i)&&!(typeof r.exp=="number"&&r.exp<Math.floor(Date.now()/1e3))&&!(typeof r.serviceAccessTokenExp=="number"&&r.serviceAccessTokenExp<Math.floor(Date.now()/1e3)))return{spUrl:Bn(r.spUrl),serviceToken:i,serviceAccessToken:typeof r.serviceAccessToken=="string"?r.serviceAccessToken:void 0,serviceAccessTokenExp:typeof r.serviceAccessTokenExp=="number"?r.serviceAccessTokenExp:void 0,spDomain:typeof r.spDomain=="string"?r.spDomain:void 0,exp:typeof r.exp=="number"?r.exp:void 0}}function Tv(a){if(!a)return;const r=a.split(".")[0];if(r)try{const i=r.replace(/-/g,"+").replace(/_/g,"/"),s=i.padEnd(Math.ceil(i.length/4)*4,"=");if(typeof globalThis.atob!="function")return;const u=Uint8Array.from(globalThis.atob(s),d=>d.charCodeAt(0));return JSON.parse(new TextDecoder().decode(u))}catch{return}}function Od(a){const r=uS(a);if(!r)return;const i=r.spDomain?Bn(`https://${r.spDomain}`):Bn(r.spUrl);return{lookupUrl:i,storageRoot:i,serviceToken:r.serviceToken}}function nr(a){const r=Tv(a);if(typeof r?.spUrl=="string")return{storageRoot:r.spDomain?Bn(`https://${r.spDomain}`):Bn(r.spUrl)}}async function dS(a,r,i){const s=Od(i);return s?(await Rv(a,r,s)).map(d=>({webId:d.webId,podUrl:typeof d.podUrl=="string"?Bn(d.podUrl):void 0,storageUrl:Bn(d.storageUrl)})):void 0}async function Rv(a,r,i){const s=Array.from(new Set(r.filter(p=>typeof p=="string"&&p.length>0)));if(s.length===0)return[];const u=fS(i),d=await a(new URL("/provision/webids",u).toString(),{method:"POST",headers:{Authorization:`Bearer ${i.serviceToken}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({webIds:s})});if(!d.ok)throw new Error(`Local storage bindings request failed (${d.status})`);const h=await d.json().catch(()=>{});if(!Array.isArray(h?.entries)||h.entries.some(p=>!p||typeof p.webId!="string"||!p.webId||typeof p.storageUrl!="string"||!p.storageUrl))throw new Error("Local storage bindings response is malformed");const v=new Set(s);return h.entries.filter(p=>p&&typeof p.webId=="string"&&v.has(p.webId)).filter(p=>typeof p.storageUrl=="string"&&p.storageUrl.length>0).filter(p=>os(p.storageUrl,i.storageRoot))}function fS(a){return(vS()?mS():void 0)??a.lookupUrl}function mS(){if(!(typeof window>"u"))try{const a=new URL(window.location.href);return hS(a.hostname)?Bn(a.origin):void 0}catch{return}}function hS(a){return a==="localhost"||a==="::1"||a==="[::1]"||/^127(?:\.\d{1,3}){3}$/u.test(a)}function os(a,r){const i=gS(a),s=pS(r);return!!(i&&s&&i.startsWith(s))}function pS(a){if(a)try{return Bn(new URL(a).toString())}catch{return}}function gS(a){try{return Bn(new URL(a).toString())}catch{return}}function Bn(a){return a.replace(/\/+$/u,"")+"/"}const Nv="Cloud storage is not ready. Please wait for Xpod to reconnect and try again.",vs=new WeakMap;function vS(){return typeof window<"u"&&vs.has(window)}function Iu(){typeof window<"u"&&vs.delete(window)}function yS(a){typeof window<"u"&&vs.set(window,a)}function jv(){try{const a=sessionStorage.getItem("provisionCode")?.trim();return a||void 0}catch{return}}function bS(a){const r=a.split(".")[0];if(!r)return!0;try{const i=r.replace(/-/g,"+").replace(/_/g,"/"),s=i.padEnd(Math.ceil(i.length/4)*4,"=");if(typeof globalThis.atob!="function")return!0;const u=JSON.parse(globalThis.atob(s));return typeof u.exp=="number"?u.exp>Math.floor(Date.now()/1e3):!0}catch{return!0}}function dl(a){const r=a?.trim();if(r)return bS(r)?r:void 0}function Md(){return dl(jv())}function xS(a=typeof window<"u"?window.location.search:"",r=typeof window<"u"?window.__XPOD__:void 0){const i=typeof r?.provisionCode=="string"?r.provisionCode.trim():void 0;if(r?.authenticating===!0){if(i)return ur(i),dl(i);Ld();return}try{const s=new URLSearchParams(a).get("provisionCode")?.trim();if(s)return ur(s),dl(s)}catch{}return i?(ur(i),dl(i)):Md()}function ur(a){try{sessionStorage.setItem("provisionCode",a)}catch{}}function Ld(){try{sessionStorage.removeItem("provisionCode")}catch{}}async function wS(a){const r=await _v(a);if(r.activeProvisionCode)return r.activeProvisionCode;if(r.hasProvisionOperation)throw new Error(Nv)}async function SS(a){const{hasProvisionOperation:r,...i}=await _v(a);return i}async function _v(a){const r=typeof window<"u"?window.__XPOD__:void 0;if(r?.authenticating===!0){const h=typeof r.provisionCode=="string"?r.provisionCode.trim():void 0,v=dl(h);return v?(ur(v),{activeProvisionCode:v,hasProvisionOperation:!0,storageRoot:nr(v)?.storageRoot}):(Ld(),h?{hasProvisionOperation:!0,storageRoot:nr(h)?.storageRoot}:{hasProvisionOperation:!1})}const i=a?.trim()||(typeof r?.provisionCode=="string"?r.provisionCode.trim():void 0),s=typeof window<"u"?vs.get(window):void 0;if(!i&&s){const h=await s(),v=dl(h);return v?(ur(v),{activeProvisionCode:v,hasProvisionOperation:!0,storageRoot:nr(v)?.storageRoot}):{hasProvisionOperation:!0,storageRoot:nr(h)?.storageRoot}}const u=i||jv(),d=dl(u);return d?{activeProvisionCode:d,hasProvisionOperation:!0,storageRoot:nr(d)?.storageRoot}:u?{hasProvisionOperation:!0,storageRoot:nr(u)?.storageRoot}:{hasProvisionOperation:!1}}const vo="/.account/";function ES(a){return!!a&&typeof a=="object"&&!Array.isArray(a)}async function cg(a=fetch){if(typeof window>"u")return vo;if(!CS(window.location.hostname)){const s=window.__XPOD__?.idpIndex;if(s!==void 0){try{const u=new URL(s,window.location.origin);if(typeof s=="string"&&s.trim()&&["http:","https:"].includes(u.protocol)&&u.pathname===vo&&!u.username&&!u.password&&!u.search&&!u.hash)return Iu(),u.href}catch{}throw new Error("Server bootstrap did not expose a valid Account index")}}const r=await a(new URL("/provision/status",window.location.origin),{credentials:"include",headers:{accept:"application/json"}});if(r.status===404)return Iu(),new URL(vo,window.location.origin).href;if(!r.ok)throw new Error(`Local provisioning status request failed (${r.status})`);let i;try{i=await r.json()}catch{throw new Error("Local provisioning status response was not valid JSON")}if(!ES(i)||typeof i.managed!="boolean")throw new Error("Local provisioning status response was not valid");if(i.managed===!1)return Iu(),new URL(vo,window.location.origin).href;if(typeof i.oidcIssuer=="string")try{const s=new URL(i.oidcIssuer);if(["http:","https:"].includes(s.protocol)&&!s.username&&!s.password)return AS(a),typeof i.provisionCode=="string"&&ur(i.provisionCode),new URL(vo,s).href}catch{}throw new Error("Local provisioning status did not expose a valid OIDC issuer")}function AS(a){const r=new URL("/provision/status",window.location.origin);yS(async()=>{const i=await a(r,{credentials:"include",headers:{accept:"application/json"}}),s=i.ok?await i.json().catch(()=>{}):void 0;if(s?.managed!==!0||s?.registered!==!0||typeof s?.provisionCode!="string")throw new Error(Nv);return s.provisionCode})}function CS(a){return a==="localhost"||a==="::1"||a==="[::1]"||/^127(?:\.\d{1,3}){3}$/u.test(a)}const TS="/.account/",ul="Xpod 登录服务暂时不可用,请稍后重试。",Zu=[250,750,1500],RS=300,NS=3e3;function jS(){if(typeof window>"u")return!1;const a=window.location.pathname;return a==="/.account"||a.startsWith("/.account/")}function _S(a){const r=a?.account;if(!r)return;const i={...typeof r.id=="string"?{id:r.id}:{},...typeof r.username=="string"?{username:r.username}:{},...typeof r.displayName=="string"?{displayName:r.displayName}:{}};return Object.keys(i).length>0?i:void 0}function ug(a){return a?.account?.logout?{status:"authenticated"}:{status:"anonymous",mode:"login"}}function zS(a){return a===502||a===503||a===504}function dg(a){return a?{status:"error",mode:"login",message:ul}:{status:"initializing"}}function fg(a){return new Promise(r=>setTimeout(r,a))}function US({children:a}){const[r,i]=y.useState(),[s,u]=y.useState(null),[d,h]=y.useState(!0),[v,p]=y.useState(null),[g,x]=y.useState(!1),[w,S]=y.useState({status:"initializing"}),T=y.useRef(0),j=y.useRef(!0),N=y.useRef(0),_=y.useRef(void 0),Q=y.useRef(null),Z=y.useRef(void 0),G=y.useRef(0),oe=y.useRef(0),ne=y.useRef(!1),se=y.useCallback(()=>{const L=Q.current?.account;return L?.logout?JSON.stringify([_.current,L.id,L.logout,L.clientCredentials]):void 0},[]),I=y.useCallback(()=>{G.current+=1,ne.current=!0},[]),q=y.useCallback((L,V)=>{const J=se(),W=Z.current;Q.current=L,Z.current=V,(J!==se()||W!==V)&&I(),ne.current=!se()},[se,I]),ee=y.useCallback(()=>{const L=se(),V=G.current,J=wo();let W=!!L&&J===Z.current&&!ne.current&&oe.current===0;return()=>{if(!W||!j.current||ne.current||oe.current>0||V!==G.current||L!==se()||J!==wo())throw W=!1,new Error("Account 登录状态已改变,请重新打开客户端凭据操作。")}},[se]),te=w.status==="authenticated",ie=d||w.status==="submitting",me=y.useRef(!1),De=y.useCallback(L=>{(Ww(L)||_.current&&_.current!==L)&&(N.current+=1,T.current+=1,me.current=!1,q(null),u(null),x(!1),S({status:"initializing"})),_.current=L,i(L)},[q]),ve=y.useCallback(async()=>{h(!0),p(null),S(L=>L.status==="authenticated"?L:{status:"initializing"});try{const L=await cg();return j.current?(De(L),L):void 0}catch{if(!j.current)return;q(null),u(null),x(!1),p(ul),S({status:"error",mode:"login",message:ul}),h(!1);return}},[De,q]);y.useEffect(()=>{let L=!0;return cg().then(V=>{L&&j.current&&De(V)}).catch(()=>{!L||!j.current||(q(null),u(null),x(!1),p(ul),S({status:"error",mode:"login",message:ul}),h(!1))}),()=>{L=!1}},[De,q]),y.useEffect(()=>(j.current=!0,()=>{j.current=!1,I(),N.current+=1}),[I]);const he=y.useCallback(L=>j.current&&L===N.current,[]),M=y.useCallback(async()=>{const L=new AbortController,V=setTimeout(()=>L.abort(),NS);try{const J=_.current;if(!J)return!1;const W=await fetch(K(new URL("oidc/consent/",J)),{headers:st(void 0,J),credentials:"include",signal:L.signal});return W.ok?!!(await W.json()).client:!1}catch{return!1}finally{clearTimeout(V)}},[]),$=y.useCallback(async({exposeTransientError:L,generation:V,confirmUnauthenticated:J})=>{const W=_.current;if(!W)return"stale";const ue=wo(),Be=()=>ue===wo()?!0:(I(),!1);try{const de=await fetch(K(W),{headers:st(void 0,W),credentials:"include"});if(!he(V))return"stale";if(!Be())return"transient-error";if(de.ok){const F=await de.json();if(!he(V))return"stale";if(!Be())return"transient-error";if(!F?.controls||typeof F.controls!="object"||Array.isArray(F.controls))throw new Error("Invalid CSS Account controls response");const ge=F.controls,Ne=++T.current;x(!1),q(ge,ue),u(ge),p(null);const $e=ug(ge);return me.current=$e.status==="anonymous",S($e),ge.account?.logout&&jS()&&M().then(Oe=>{he(V)&&Ne===T.current&&x(Oe)}),"ok"}else{if(de.status===401||de.status===403)return J?(T.current+=1,rs(),me.current=!0,x(!1),q({}),u({}),S({status:"anonymous",mode:"login"}),p(null),"ok"):"unauthenticated";if(T.current+=1,x(!1),zS(de.status))return p(null),S(ge=>ge.status==="authenticated"?ge:dg(L)),"transient-error";I();const F=`Failed to load account controls (Status: ${de.status})`;return p(F),S({status:"error",mode:"login",message:F}),"terminal-error"}}catch{return he(V)?(T.current+=1,x(!1),p(null),S(de=>de.status==="authenticated"?de:dg(L)),"transient-error"):"stale"}},[q,M,he,I]),P=y.useCallback(async()=>{const L=++N.current;for(let V=0;V<=Zu.length;V+=1){const J=V===Zu.length,W=await $({exposeTransientError:J,generation:L});if(W==="unauthenticated")return!he(L)||(await fg(RS),!he(L))?"stale":$({exposeTransientError:!0,generation:L,confirmUnauthenticated:!0});if(W!=="transient-error")return W;if(!he(L)||!J&&(S(ue=>ue.status==="authenticated"?ue:{status:"initializing"}),await fg(Zu[V]),!he(L)))return"stale"}return"transient-error"},[$,he]);y.useEffect(()=>{if(!r)return;let L=!0;return(async()=>(await P(),L&&j.current&&h(!1)))(),()=>{L=!1}},[P,r]);const ye=y.useCallback(async()=>{const L=await ve();if(L&&L===r){const V=await P();if(j.current&&h(!1),V==="ok")return ug(Q.current)}return{status:"error",mode:"login",message:ul}},[P,r,ve]),X=y.useCallback(async()=>{await ye()},[ye]),A=y.useCallback(async()=>{oe.current+=1;try{I(),N.current+=1,T.current+=1,Q.current?.account?.logout||(me.current=!1,(_.current??await ve())&&await P());const L=_.current,V=Q.current?.account?.logout,J=await zt(V,fetch,L);let W=!J&&(!!V||!me.current);if(J)try{const ue=await fetch(K(J),{method:"POST",headers:st(void 0,L),credentials:"include"});W=!ue.ok&&ue.status!==401&&ue.status!==403}catch{W=!0}if(W){S({status:"error",mode:"login",message:ul});return}N.current+=1,T.current+=1,me.current=!0,h(!1),rs(),x(!1),q({}),u({}),p(null),S({status:"anonymous",mode:"login"})}finally{oe.current-=1}},[q,P,ve,I]),k=y.useMemo(()=>_S(s),[s]);return f.jsx(Cv.Provider,{value:{controls:s,isInitializing:d,initError:v,idpIndex:r??TS,isLoggedIn:te,isAnonymous:()=>me.current,bindAccountCapability:ee,authenticating:ie,hasOidcPending:g,refetchControls:ye,retry:X,logout:A,accountState:w,identity:k},children:a})}const zv=(...a)=>a.filter((r,i,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===i).join(" ").trim();const OS=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const MS=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,i,s)=>s?s.toUpperCase():i.toLowerCase());const mg=a=>{const r=MS(a);return r.charAt(0).toUpperCase()+r.slice(1)};var LS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const DS=a=>{for(const r in a)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const kS=y.forwardRef(({color:a="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:u="",children:d,iconNode:h,...v},p)=>y.createElement("svg",{ref:p,...LS,width:r,height:r,stroke:a,strokeWidth:s?Number(i)*24/Number(r):i,className:zv("lucide",u),...!d&&!DS(v)&&{"aria-hidden":"true"},...v},[...h.map(([g,x])=>y.createElement(g,x)),...Array.isArray(d)?d:[d]]));const lt=(a,r)=>{const i=y.forwardRef(({className:s,...u},d)=>y.createElement(kS,{ref:d,iconNode:r,className:zv(`lucide-${OS(mg(a))}`,`lucide-${a}`,s),...u}));return i.displayName=mg(a),i};const BS=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],HS=lt("arrow-left",BS);const qS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],YS=lt("arrow-right",qS);const XS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hg=lt("check",XS);const GS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],VS=lt("chevron-down",GS);const QS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ys=lt("circle-alert",QS);const IS=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ZS=lt("circle-check-big",IS);const $S=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Uv=lt("clock",$S);const KS=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],pg=lt("copy",KS);const PS=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],JS=lt("database",PS);const WS=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],gg=lt("external-link",WS);const FS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],e1=lt("globe",FS);const t1=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],n1=lt("hard-drive",t1);const a1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],l1=lt("info",a1);const r1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],$u=lt("key",r1);const o1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ov=lt("layers",o1);const i1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fr=lt("loader-circle",i1);const s1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],c1=lt("log-out",s1);const u1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vg=lt("plus",u1);const d1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],is=lt("shield",d1);const f1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],yg=lt("trash-2",f1);const m1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],h1=lt("user",m1);const p1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],g1=lt("x",p1);var v1=Object.defineProperty,gn=(a,r)=>v1(a,"name",{value:r,configurable:!0});function y1(a,r){const i=y.createContext(r);i.displayName=a+"Context";const s=gn(d=>{const{children:h,...v}=d,p=y.useMemo(()=>v,Object.values(v));return f.jsx(i.Provider,{value:p,children:h})},"Provider");s.displayName=a+"Provider";function u(d,h={}){const{optional:v=!1}=h,p=y.useContext(i);if(p)return p;if(r!==void 0)return r;if(!v)throw new Error(`\`${d}\` must be used within \`${a}\``)}return gn(u,"useContext"),[s,u]}gn(y1,"createContext");function Mv(a,r=[]){let i=[];function s(d,h){const v=y.createContext(h);v.displayName=d+"Context";const p=i.length;i=[...i,h];const g=gn(w=>{const{scope:S,children:T,...j}=w,N=S?.[a]?.[p]||v,_=y.useMemo(()=>j,Object.values(j));return f.jsx(N.Provider,{value:_,children:T})},"Provider");g.displayName=d+"Provider";function x(w,S,T={}){const{optional:j=!1}=T,N=S?.[a]?.[p]||v,_=y.useContext(N);if(_)return _;if(h!==void 0)return h;if(!j)throw new Error(`\`${w}\` must be used within \`${d}\``)}return gn(x,"useContext"),[g,x]}gn(s,"createContext");const u=gn(()=>{const d=i.map(h=>y.createContext(h));return gn(function(v){const p=v?.[a]||d;return y.useMemo(()=>({[`__scope${a}`]:{...v,[a]:p}}),[v,p])},"useScope")},"createScope");return u.scopeName=a,[s,Lv(u,...r)]}gn(Mv,"createContextScope");function Lv(...a){const r=a[0];if(a.length===1)return r;const i=gn(()=>{const s=a.map(u=>({useScope:u(),scopeName:u.scopeName}));return gn(function(d){const h=s.reduce((v,{useScope:p,scopeName:g})=>{const w=p(d)[`__scope${g}`];return{...v,...w}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:h}),[h])},"useComposedScopes")},"createScope");return i.scopeName=r.scopeName,i}gn(Lv,"composeContextScopes");var b1=Object.defineProperty,x1=(a,r)=>b1(a,"name",{value:r,configurable:!0});function Ba(a){const r=y.useRef(a);return y.useEffect(()=>{r.current=a}),y.useMemo(()=>((...i)=>r.current?.(...i)),[])}x1(Ba,"useCallbackRef");var rd=globalThis?.document?y.useLayoutEffect:()=>{},w1=Object.defineProperty,Dd=(a,r)=>w1(a,"name",{value:r,configurable:!0});function od(a,r){if(typeof a=="function")return a(r);a!=null&&(a.current=r)}Dd(od,"setRef");function Dv(...a){return r=>{let i=!1;const s=a.map(u=>{const d=od(u,r);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let u=0;u<s.length;u++){const d=s[u];typeof d=="function"?d():od(a[u],null)}}}}Dd(Dv,"composeRefs");function Xa(...a){return y.useCallback(Dv(...a),a)}Dd(Xa,"useComposedRefs");var S1=Object.defineProperty,jn=(a,r)=>S1(a,"name",{value:r,configurable:!0});function kd(a){const r=y.forwardRef((i,s)=>{let{children:u,...d}=i,h=null,v=!1;const p=[];id(u)&&typeof Zi=="function"&&(u=Zi(u._payload)),y.Children.forEach(u,S=>{if(qv(S)){v=!0;const T=S;let j="child"in T.props?T.props.child:T.props.children;id(j)&&typeof Zi=="function"&&(j=Zi(j._payload)),h=C1(T,j),p.push(h?.props?.children)}else p.push(S)}),h?h=y.cloneElement(h,void 0,p):!v&&y.Children.count(u)===1&&y.isValidElement(u)&&(h=u);const g=h?Hv(h):void 0,x=Xa(s,g);if(!h){if(u||u===0)throw new Error(v?N1(a):R1(a));return u}const w=Bv(d,h.props??{});return h.type!==y.Fragment&&(w.ref=s?x:g),y.cloneElement(h,w)});return r.displayName=`${a}.Slot`,r}jn(kd,"createSlot");var E1=kd("Slot"),kv=Symbol.for("radix.slottable");function A1(a){const r=jn(i=>"child"in i?i.children(i.child):i.children,"Slottable");return r.displayName=`${a}.Slottable`,r.__radixId=kv,r}jn(A1,"createSlottable");var C1=jn((a,r)=>{if("child"in a.props){const i=a.props.child;return y.isValidElement(i)?y.cloneElement(i,void 0,a.props.children(i.props.children)):null}return y.isValidElement(r)?r:null},"getSlottableElementFromSlottable");function Bv(a,r){const i={...r};for(const s in r){const u=a[s],d=r[s];/^on[A-Z]/.test(s)?u&&d?i[s]=(...v)=>{const p=d(...v);return u(...v),p}:u&&(i[s]=u):s==="style"?i[s]={...u,...d}:s==="className"&&(i[s]=[u,d].filter(Boolean).join(" "))}return{...a,...i}}jn(Bv,"mergeProps");function Hv(a){let r=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,i=r&&"isReactWarning"in r&&r.isReactWarning;return i?a.ref:(r=Object.getOwnPropertyDescriptor(a,"ref")?.get,i=r&&"isReactWarning"in r&&r.isReactWarning,i?a.props.ref:a.props.ref||a.ref)}jn(Hv,"getElementRef");function qv(a){return y.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===kv}jn(qv,"isSlottable");var T1=Symbol.for("react.lazy");function id(a){return a!=null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===T1&&"_payload"in a&&Yv(a._payload)}jn(id,"isLazyComponent");function Yv(a){return typeof a=="object"&&a!==null&&"then"in a}jn(Yv,"isPromiseLike");var R1=jn(a=>`${a} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),N1=jn(a=>`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Zi=ox[" use ".trim().toString()],j1=Object.defineProperty,_1=(a,r)=>j1(a,"name",{value:r,configurable:!0}),z1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=z1.reduce((a,r)=>{const i=kd(`Primitive.${r}`),s=y.forwardRef((u,d)=>{const{asChild:h,...v}=u,p=h?i:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(p,{...v,ref:d})});return s.displayName=`Primitive.${r}`,{...a,[r]:s}},{});function U1(a,r){a&&Zw.flushSync(()=>a.dispatchEvent(r))}_1(U1,"dispatchDiscreteCustomEvent");function Xv(a){var r,i,s="";if(typeof a=="string"||typeof a=="number")s+=a;else if(typeof a=="object")if(Array.isArray(a)){var u=a.length;for(r=0;r<u;r++)a[r]&&(i=Xv(a[r]))&&(s&&(s+=" "),s+=i)}else for(i in a)a[i]&&(s&&(s+=" "),s+=i);return s}function Gv(){for(var a,r,i=0,s="",u=arguments.length;i<u;i++)(a=arguments[i])&&(r=Xv(a))&&(s&&(s+=" "),s+=r);return s}const O1=(a,r)=>{const i=new Array(a.length+r.length);for(let s=0;s<a.length;s++)i[s]=a[s];for(let s=0;s<r.length;s++)i[a.length+s]=r[s];return i},M1=(a,r)=>({classGroupId:a,validator:r}),Vv=(a=new Map,r=null,i)=>({nextPart:a,validators:r,classGroupId:i}),ss="-",bg=[],L1="arbitrary..",D1=a=>{const r=B1(a),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=a;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return k1(h);const v=h.split(ss),p=v[0]===""&&v.length>1?1:0;return Qv(v,p,r)},getConflictingClassGroupIds:(h,v)=>{if(v){const p=s[h],g=i[h];return p?g?O1(g,p):p:g||bg}return i[h]||bg}}},Qv=(a,r,i)=>{if(a.length-r===0)return i.classGroupId;const u=a[r],d=i.nextPart.get(u);if(d){const g=Qv(a,r+1,d);if(g)return g}const h=i.validators;if(h===null)return;const v=r===0?a.join(ss):a.slice(r).join(ss),p=h.length;for(let g=0;g<p;g++){const x=h[g];if(x.validator(v))return x.classGroupId}},k1=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=a.slice(1,-1),i=r.indexOf(":"),s=r.slice(0,i);return s?L1+s:void 0})(),B1=a=>{const{theme:r,classGroups:i}=a;return H1(i,r)},H1=(a,r)=>{const i=Vv();for(const s in a){const u=a[s];Bd(u,i,s,r)}return i},Bd=(a,r,i,s)=>{const u=a.length;for(let d=0;d<u;d++){const h=a[d];q1(h,r,i,s)}},q1=(a,r,i,s)=>{if(typeof a=="string"){Y1(a,r,i);return}if(typeof a=="function"){X1(a,r,i,s);return}G1(a,r,i,s)},Y1=(a,r,i)=>{const s=a===""?r:Iv(r,a);s.classGroupId=i},X1=(a,r,i,s)=>{if(V1(a)){Bd(a(s),r,i,s);return}r.validators===null&&(r.validators=[]),r.validators.push(M1(i,a))},G1=(a,r,i,s)=>{const u=Object.entries(a),d=u.length;for(let h=0;h<d;h++){const[v,p]=u[h];Bd(p,Iv(r,v),i,s)}},Iv=(a,r)=>{let i=a;const s=r.split(ss),u=s.length;for(let d=0;d<u;d++){const h=s[d];let v=i.nextPart.get(h);v||(v=Vv(),i.nextPart.set(h,v)),i=v}return i},V1=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,Q1=a=>{if(a<1)return{get:()=>{},set:()=>{}};let r=0,i=Object.create(null),s=Object.create(null);const u=(d,h)=>{i[d]=h,r++,r>a&&(r=0,s=i,i=Object.create(null))};return{get(d){let h=i[d];if(h!==void 0)return h;if((h=s[d])!==void 0)return u(d,h),h},set(d,h){d in i?i[d]=h:u(d,h)}}},sd="!",xg=":",I1=[],wg=(a,r,i,s,u)=>({modifiers:a,hasImportantModifier:r,baseClassName:i,maybePostfixModifierPosition:s,isExternal:u}),Z1=a=>{const{prefix:r,experimentalParseClassName:i}=a;let s=u=>{const d=[];let h=0,v=0,p=0,g;const x=u.length;for(let N=0;N<x;N++){const _=u[N];if(h===0&&v===0){if(_===xg){d.push(u.slice(p,N)),p=N+1;continue}if(_==="/"){g=N;continue}}_==="["?h++:_==="]"?h--:_==="("?v++:_===")"&&v--}const w=d.length===0?u:u.slice(p);let S=w,T=!1;w.endsWith(sd)?(S=w.slice(0,-1),T=!0):w.startsWith(sd)&&(S=w.slice(1),T=!0);const j=g&&g>p?g-p:void 0;return wg(d,T,S,j)};if(r){const u=r+xg,d=s;s=h=>h.startsWith(u)?d(h.slice(u.length)):wg(I1,!1,h,void 0,!0)}if(i){const u=s;s=d=>i({className:d,parseClassName:u})}return s},$1=a=>{const r=new Map;return a.orderSensitiveModifiers.forEach((i,s)=>{r.set(i,1e6+s)}),i=>{const s=[];let u=[];for(let d=0;d<i.length;d++){const h=i[d],v=h[0]==="[",p=r.has(h);v||p?(u.length>0&&(u.sort(),s.push(...u),u=[]),s.push(h)):u.push(h)}return u.length>0&&(u.sort(),s.push(...u)),s}},K1=a=>({cache:Q1(a.cacheSize),parseClassName:Z1(a),sortModifiers:$1(a),postfixLookupClassGroupIds:P1(a),...D1(a)}),P1=a=>{const r=Object.create(null),i=a.postfixLookupClassGroups;if(i)for(let s=0;s<i.length;s++)r[i[s]]=!0;return r},J1=/\s+/,W1=(a,r)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:h}=r,v=[],p=a.trim().split(J1);let g="";for(let x=p.length-1;x>=0;x-=1){const w=p[x],{isExternal:S,modifiers:T,hasImportantModifier:j,baseClassName:N,maybePostfixModifierPosition:_}=i(w);if(S){g=w+(g.length>0?" "+g:g);continue}let Q=!!_,Z;if(Q){const I=N.substring(0,_);Z=s(I);const q=Z&&h[Z]?s(N):void 0;q&&q!==Z&&(Z=q,Q=!1)}else Z=s(N);if(!Z){if(!Q){g=w+(g.length>0?" "+g:g);continue}if(Z=s(N),!Z){g=w+(g.length>0?" "+g:g);continue}Q=!1}const G=T.length===0?"":T.length===1?T[0]:d(T).join(":"),oe=j?G+sd:G,ne=oe+Z;if(v.indexOf(ne)>-1)continue;v.push(ne);const se=u(Z,Q);for(let I=0;I<se.length;++I){const q=se[I];v.push(oe+q)}g=w+(g.length>0?" "+g:g)}return g},F1=(...a)=>{let r=0,i,s,u="";for(;r<a.length;)(i=a[r++])&&(s=Zv(i))&&(u&&(u+=" "),u+=s);return u},Zv=a=>{if(typeof a=="string")return a;let r,i="";for(let s=0;s<a.length;s++)a[s]&&(r=Zv(a[s]))&&(i&&(i+=" "),i+=r);return i},eE=(a,...r)=>{let i,s,u,d;const h=p=>{const g=r.reduce((x,w)=>w(x),a());return i=K1(g),s=i.cache.get,u=i.cache.set,d=v,v(p)},v=p=>{const g=s(p);if(g)return g;const x=W1(p,i);return u(p,x),x};return d=h,(...p)=>d(F1(...p))},tE=[],gt=a=>{const r=i=>i[a]||tE;return r.isThemeGetter=!0,r},$v=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,aE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ka=a=>nE.test(a),Ae=a=>!!a&&!Number.isNaN(Number(a)),Mn=a=>!!a&&Number.isInteger(Number(a)),Ku=a=>a.endsWith("%")&&Ae(a.slice(0,-1)),ia=a=>aE.test(a),Pv=()=>!0,sE=a=>lE.test(a)&&!rE.test(a),Hd=()=>!1,cE=a=>oE.test(a),uE=a=>iE.test(a),dE=a=>!ae(a)&&!le(a),fE=a=>a.startsWith("@container")&&(a[10]==="/"&&a[11]!==void 0||a[11]==="s"&&a[16]!==void 0&&a.startsWith("-size/",10)||a[11]==="n"&&a[18]!==void 0&&a.startsWith("-normal/",10)),mE=a=>Ga(a,Fv,Hd),ae=a=>$v.test(a),cl=a=>Ga(a,ey,sE),Sg=a=>Ga(a,wE,Ae),hE=a=>Ga(a,ny,Pv),pE=a=>Ga(a,ty,Hd),Eg=a=>Ga(a,Jv,Hd),gE=a=>Ga(a,Wv,uE),$i=a=>Ga(a,ay,cE),le=a=>Kv.test(a),yo=a=>ml(a,ey),vE=a=>ml(a,ty),Ag=a=>ml(a,Jv),yE=a=>ml(a,Fv),bE=a=>ml(a,Wv),Ki=a=>ml(a,ay,!0),xE=a=>ml(a,ny,!0),Ga=(a,r,i)=>{const s=$v.exec(a);return s?s[1]?r(s[1]):i(s[2]):!1},ml=(a,r,i=!1)=>{const s=Kv.exec(a);return s?s[1]?r(s[1]):i:!1},Jv=a=>a==="position"||a==="percentage",Wv=a=>a==="image"||a==="url",Fv=a=>a==="length"||a==="size"||a==="bg-size",ey=a=>a==="length",wE=a=>a==="number",ty=a=>a==="family-name",ny=a=>a==="number"||a==="weight",ay=a=>a==="shadow",SE=()=>{const a=gt("color"),r=gt("font"),i=gt("text"),s=gt("font-weight"),u=gt("tracking"),d=gt("leading"),h=gt("breakpoint"),v=gt("container"),p=gt("spacing"),g=gt("radius"),x=gt("shadow"),w=gt("inset-shadow"),S=gt("text-shadow"),T=gt("drop-shadow"),j=gt("blur"),N=gt("perspective"),_=gt("aspect"),Q=gt("ease"),Z=gt("animate"),G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ne=()=>[...oe(),le,ae],se=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],q=()=>[le,ae,p],ee=()=>[ka,"full","auto",...q()],te=()=>[Mn,"none","subgrid",le,ae],ie=()=>["auto",{span:["full",Mn,le,ae]},Mn,le,ae],me=()=>[Mn,"auto",le,ae],De=()=>["auto","min","max","fr",le,ae],ve=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...q()],$=()=>[ka,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...q()],P=()=>[ka,"screen","full","dvw","lvw","svw","min","max","fit",...q()],ye=()=>[ka,"screen","full","lh","dvh","lvh","svh","min","max","fit",...q()],X=()=>[a,le,ae],A=()=>[...oe(),Ag,Eg,{position:[le,ae]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",yE,mE,{size:[le,ae]}],V=()=>[Ku,yo,cl],J=()=>["","none","full",g,le,ae],W=()=>["",Ae,yo,cl],ue=()=>["solid","dashed","dotted","double"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Ae,Ku,Ag,Eg],F=()=>["","none",j,le,ae],ge=()=>["none",Ae,le,ae],Ne=()=>["none",Ae,le,ae],$e=()=>[Ae,le,ae],Oe=()=>[ka,"full",...q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ia],breakpoint:[ia],color:[Pv],container:[ia],"drop-shadow":[ia],ease:["in","out","in-out"],font:[dE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ia],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ia],shadow:[ia],spacing:["px",Ae],text:[ia],"text-shadow":[ia],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ka,ae,le,_]}],container:["container"],"container-type":[{"@container":["","normal","size",le,ae]}],"container-named":[fE],columns:[{columns:[Ae,ae,le,v]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:ne()}],overflow:[{overflow:se()}],"overflow-x":[{"overflow-x":se()}],"overflow-y":[{"overflow-y":se()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Mn,"auto",le,ae]}],basis:[{basis:[ka,"full","auto",v,...q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,ka,"auto","initial","none",ae]}],grow:[{grow:["",Ae,le,ae]}],shrink:[{shrink:["",Ae,le,ae]}],order:[{order:[Mn,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":De()}],"auto-rows":[{"auto-rows":De()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...ve(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ve()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ve()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:q()}],px:[{px:q()}],py:[{py:q()}],ps:[{ps:q()}],pe:[{pe:q()}],pbs:[{pbs:q()}],pbe:[{pbe:q()}],pt:[{pt:q()}],pr:[{pr:q()}],pb:[{pb:q()}],pl:[{pl:q()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":q()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...P()]}],"min-inline-size":[{"min-inline":["auto",...P()]}],"max-inline-size":[{"max-inline":["none",...P()]}],"block-size":[{block:["auto",...ye()]}],"min-block-size":[{"min-block":["auto",...ye()]}],"max-block-size":[{"max-block":["none",...ye()]}],w:[{w:[v,"screen",...$()]}],"min-w":[{"min-w":[v,"screen","none",...$()]}],"max-w":[{"max-w":[v,"screen","none","prose",{screen:[h]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",i,yo,cl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,xE,hE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ku,ae]}],"font-family":[{font:[vE,pE,r]}],"font-features":[{"font-features":[ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,le,ae]}],"line-clamp":[{"line-clamp":[Ae,"none",le,Sg]}],leading:[{leading:[d,...q()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",le,cl]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[Ae,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:q()}],"tab-size":[{tab:[Mn,le,ae]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mn,le,ae],radial:["",le,ae],conic:[Mn,le,ae]},bE,gE]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,le,ae]}],"outline-w":[{outline:["",Ae,yo,cl]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",x,Ki,$i]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",w,Ki,$i]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[Ae,cl]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",S,Ki,$i]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[Ae,le,ae]}],"mix-blend":[{"mix-blend":[...Be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":oe()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:F()}],brightness:[{brightness:[Ae,le,ae]}],contrast:[{contrast:[Ae,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",T,Ki,$i]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",Ae,le,ae]}],"hue-rotate":[{"hue-rotate":[Ae,le,ae]}],invert:[{invert:["",Ae,le,ae]}],saturate:[{saturate:[Ae,le,ae]}],sepia:[{sepia:["",Ae,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",Ae,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":q()}],"border-spacing-x":[{"border-spacing-x":q()}],"border-spacing-y":[{"border-spacing-y":q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",le,ae]}],ease:[{ease:["linear","initial",Q,le,ae]}],delay:[{delay:[Ae,le,ae]}],animate:[{animate:["none",Z,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,le,ae]}],"perspective-origin":[{"perspective-origin":ne()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:ne()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],zoom:[{zoom:[Mn,le,ae]}],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":X()}],"scrollbar-track-color":[{"scrollbar-track":X()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mbs":[{"scroll-mbs":q()}],"scroll-mbe":[{"scroll-mbe":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pbs":[{"scroll-pbs":q()}],"scroll-pbe":[{"scroll-pbe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ae]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[Ae,yo,cl,Sg]}],stroke:[{stroke:["none",...X()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},EE=eE(SE);function Gt(...a){return EE(Gv(a))}const Cg=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,Tg=Gv,AE=(a,r)=>i=>{var s;if(r?.variants==null)return Tg(a,i?.class,i?.className);const{variants:u,defaultVariants:d}=r,h=Object.keys(u).map(g=>{const x=i?.[g],w=d?.[g];if(x===null)return null;const S=Cg(x)||Cg(w);return u[g][S]}),v=i&&Object.entries(i).reduce((g,x)=>{let[w,S]=x;return S===void 0||(g[w]=S),g},{}),p=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((g,x)=>{let{class:w,className:S,...T}=x;return Object.entries(T).every(j=>{let[N,_]=j;return Array.isArray(_)?_.includes({...d,...v}[N]):{...d,...v}[N]===_})?[...g,w,S]:g},[]);return Tg(a,h,p,i?.class,i?.className)},CE="focus:outline-none focus:ring-0 focus-visible:border-ring",TE="focus:outline-none focus:ring-0 focus-visible:outline-none",RE=AE(`inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors ${TE} disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:bg-destructive/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:bg-accent focus-visible:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 focus-visible:bg-secondary/70",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline focus-visible:underline",subtle:"bg-muted text-muted-foreground hover:bg-muted/80 focus-visible:bg-muted/60"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),jt=y.forwardRef(({className:a,variant:r,size:i,asChild:s=!1,...u},d)=>{const h=s?E1:"button";return f.jsx(h,{className:Gt(RE({variant:r,size:i,className:a})),ref:d,...u})});jt.displayName="Button";const qd=y.forwardRef(({className:a,...r},i)=>f.jsx("div",{ref:i,className:Gt("rounded-2xl border border-border/50 bg-card shadow-lg shadow-black/5 transition-all duration-200",a),...r}));qd.displayName="Card";const bs=y.forwardRef(({className:a,...r},i)=>f.jsx("div",{ref:i,className:Gt("flex flex-col gap-1 p-6",a),...r}));bs.displayName="CardHeader";const xs=y.forwardRef(({className:a,...r},i)=>f.jsx("h3",{ref:i,className:Gt("text-2xl font-semibold tracking-tight",a),...r}));xs.displayName="CardTitle";const ws=y.forwardRef(({className:a,...r},i)=>f.jsx("p",{ref:i,className:Gt("text-sm text-muted-foreground",a),...r}));ws.displayName="CardDescription";const Ao=y.forwardRef(({className:a,...r},i)=>f.jsx("div",{ref:i,className:Gt("p-6 pt-0",a),...r}));Ao.displayName="CardContent";const NE=y.forwardRef(({className:a,...r},i)=>f.jsx("div",{ref:i,className:Gt("flex items-center p-6 pt-0",a),...r}));NE.displayName="CardFooter";var jE=Object.defineProperty,vr=(a,r)=>jE(a,"name",{value:r,configurable:!0}),ly=!!(typeof window<"u"&&window.document&&window.document.createElement);function qa(a,r,{checkForDefaultPrevented:i=!0}={}){return vr(function(u){if(a?.(u),i===!1||!u||!u.defaultPrevented)return r?.(u)},"handleEvent")}vr(qa,"composeEventHandlers");function _E(a){if(!ly)throw new Error("Cannot access window outside of the DOM");return a?.ownerDocument?.defaultView??window}vr(_E,"getOwnerWindow");function cd(a){if(!ly)throw new Error("Cannot access document outside of the DOM");return a?.ownerDocument??document}vr(cd,"getOwnerDocument");function ry(a,r=!1){const{activeElement:i}=cd(a);if(!i?.nodeName)return null;if(oy(i)&&i.contentDocument)return ry(i.contentDocument.body,r);if(r){const s=i.getAttribute("aria-activedescendant");if(s){const u=cd(i).getElementById(s);if(u)return u}}return i}vr(ry,"getActiveElement");function oy(a){return a.tagName==="IFRAME"}vr(oy,"isFrame");var zE=Object.defineProperty,ca=(a,r)=>zE(a,"name",{value:r,configurable:!0});function iy(a,r){return y.useReducer((i,s)=>r[i][s]??i,a)}ca(iy,"useStateMachine");var Ss=ca(a=>{const{present:r,children:i}=a,s=sy(r),u=typeof i=="function"?i({present:s.isPresent}):y.Children.only(i),d=cy(s.ref,uy(u));return typeof i=="function"||s.isPresent?y.cloneElement(u,{ref:d}):null},"Presence");function sy(a){const[r,i]=y.useState(),s=y.useRef(null),u=y.useRef(a),d=y.useRef("none"),h=y.useRef(void 0),v=a?"mounted":"unmounted",[p,g]=iy(v,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{p==="mounted"?(d.current=h.current??rr(s.current),h.current=void 0):d.current="none"},[p]),rd(()=>{const x=s.current,w=u.current;if(w!==a){const T=d.current,j=rr(x);a?(h.current=j,g("MOUNT")):j==="none"||x?.display==="none"?g("UNMOUNT"):g(w&&T!==j?"ANIMATION_OUT":"UNMOUNT"),u.current=a}},[a,g]),rd(()=>{if(r){let x;const w=r.ownerDocument.defaultView??window,S=ca(j=>{const _=rr(s.current).includes(CSS.escape(j.animationName));if(j.target===r&&_&&(g("ANIMATION_END"),!u.current)){const Q=r.style.animationFillMode;r.style.animationFillMode="forwards",x=w.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=Q)})}},"handleAnimationEnd"),T=ca(j=>{j.target===r&&(d.current=rr(s.current))},"handleAnimationStart");return r.addEventListener("animationstart",T),r.addEventListener("animationcancel",S),r.addEventListener("animationend",S),()=>{w.clearTimeout(x),r.removeEventListener("animationstart",T),r.removeEventListener("animationcancel",S),r.removeEventListener("animationend",S)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:y.useCallback(x=>{if(x){const w=getComputedStyle(x);s.current=w,h.current=rr(w)}else s.current=null;i(x)},[])}}ca(sy,"usePresence");function ud(a,r){if(typeof a=="function")return a(r);a!=null&&(a.current=r)}ca(ud,"setRef");function cy(...a){const r=y.useRef(a);return r.current=a,y.useCallback(i=>{const s=r.current;let u=!1;const d=s.map(h=>{const v=ud(h,i);return!u&&typeof v=="function"&&(u=!0),v});if(u)return()=>{for(let h=0;h<d.length;h++){const v=d[h];typeof v=="function"?v():ud(s[h],null)}}},[])}ca(cy,"useStableComposedRefs");function rr(a){return a?.animationName||"none"}ca(rr,"getAnimationName");function uy(a){let r=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,i=r&&"isReactWarning"in r&&r.isReactWarning;return i?a.ref:(r=Object.getOwnPropertyDescriptor(a,"ref")?.get,i=r&&"isReactWarning"in r&&r.isReactWarning,i?a.props.ref:a.props.ref||a.ref)}ca(uy,"getElementRef");const Ha=y.forwardRef(({className:a,type:r="text",...i},s)=>f.jsx("input",{ref:s,type:r,className:Gt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm transition-[border-color] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",CE,a),...i}));Ha.displayName="Input";const mr=y.forwardRef(({className:a,...r},i)=>f.jsx("label",{ref:i,className:Gt("text-sm font-medium leading-none text-muted-foreground",a),...r}));mr.displayName="Label";var UE=Object.defineProperty,OE=(a,r)=>UE(a,"name",{value:r,configurable:!0}),ME=y.createContext(void 0);function dy(a){const r=y.useContext(ME);return a||r||"ltr"}OE(dy,"useDirection");var LE=Object.defineProperty,DE=(a,r)=>LE(a,"name",{value:r,configurable:!0});function fy(a,[r,i]){return Math.min(i,Math.max(r,a))}DE(fy,"clamp");var kE=Object.defineProperty,Re=(a,r)=>kE(a,"name",{value:r,configurable:!0});function my(a,r){return y.useReducer((i,s)=>r[i][s]??i,a)}Re(my,"useStateMachine");var hy="ScrollArea",[py,qA]=Mv(hy),[BE,yn]=py(hy),HE=y.forwardRef(Re(function(r,i){const{__scopeScrollArea:s,type:u="hover",dir:d,scrollHideDelay:h=600,...v}=r,[p,g]=y.useState(null),[x,w]=y.useState(null),[S,T]=y.useState(null),[j,N]=y.useState(null),[_,Q]=y.useState(null),[Z,G]=y.useState(0),[oe,ne]=y.useState(0),[se,I]=y.useState(!1),[q,ee]=y.useState(!1),te=Xa(i,g),ie=dy(d);return f.jsx(BE,{scope:s,type:u,dir:ie,scrollHideDelay:h,scrollArea:p,viewport:x,onViewportChange:w,content:S,onContentChange:T,scrollbarX:j,onScrollbarXChange:N,scrollbarXEnabled:se,onScrollbarXEnabledChange:I,scrollbarY:_,onScrollbarYChange:Q,scrollbarYEnabled:q,onScrollbarYEnabledChange:ee,onCornerWidthChange:G,onCornerHeightChange:ne,children:f.jsx(_o.div,{dir:ie,...v,ref:te,style:{position:"relative","--radix-scroll-area-corner-width":Z+"px","--radix-scroll-area-corner-height":oe+"px",...r.style}})})},"ScrollArea")),qE="ScrollAreaViewport",YE=y.forwardRef(Re(function(r,i){const{__scopeScrollArea:s,children:u,nonce:d,...h}=r,v=yn(qE,s),p=y.useRef(null),g=Xa(i,p,v.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx(XE,{nonce:d}),f.jsx(_o.div,{"data-radix-scroll-area-viewport":"",...h,ref:g,style:{overflowX:v.scrollbarXEnabled?"scroll":"hidden",overflowY:v.scrollbarYEnabled?"scroll":"hidden",...r.style},children:f.jsx("div",{ref:v.onContentChange,style:{minWidth:"100%",display:"table"},children:u})})]})},"ScrollAreaViewport")),XE=y.memo(Re(function({nonce:r}){return f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r})},"ScrollAreaViewportStyle"),(a,r)=>a.nonce===r.nonce),ua="ScrollAreaScrollbar",gy=y.forwardRef(Re(function(r,i){const{forceMount:s,...u}=r,d=yn(ua,r.__scopeScrollArea),{onScrollbarXEnabledChange:h,onScrollbarYEnabledChange:v}=d,p=r.orientation==="horizontal";return y.useEffect(()=>(p?h(!0):v(!0),()=>{p?h(!1):v(!1)}),[p,h,v]),d.type==="hover"?f.jsx(GE,{...u,ref:i,forceMount:s}):d.type==="scroll"?f.jsx(VE,{...u,ref:i,forceMount:s}):d.type==="auto"?f.jsx(vy,{...u,ref:i,forceMount:s}):d.type==="always"?f.jsx(Yd,{...u,ref:i,"data-state":"visible"}):null},"ScrollAreaScrollbar")),GE=y.forwardRef(Re(function(r,i){const{forceMount:s,...u}=r,d=yn(ua,r.__scopeScrollArea),[h,v]=y.useState(!1);return y.useEffect(()=>{const p=d.scrollArea;let g=0;if(p){const x=Re(()=>{window.clearTimeout(g),v(!0)},"handlePointerEnter"),w=Re(()=>{g=window.setTimeout(()=>v(!1),d.scrollHideDelay)},"handlePointerLeave");return p.addEventListener("pointerenter",x),p.addEventListener("pointerleave",w),()=>{window.clearTimeout(g),p.removeEventListener("pointerenter",x),p.removeEventListener("pointerleave",w)}}},[d.scrollArea,d.scrollHideDelay]),f.jsx(Ss,{present:s||h,children:f.jsx(vy,{"data-state":h?"visible":"hidden",...u,ref:i})})},"ScrollAreaScrollbarHover")),VE=y.forwardRef(Re(function(r,i){const{forceMount:s,...u}=r,d=yn(ua,r.__scopeScrollArea),h=r.orientation==="horizontal",v=Uo(()=>g("SCROLL_END"),100),[p,g]=my("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(p==="idle"){const x=window.setTimeout(()=>g("HIDE"),d.scrollHideDelay);return()=>window.clearTimeout(x)}},[p,d.scrollHideDelay,g]),y.useEffect(()=>{const x=d.viewport,w=h?"scrollLeft":"scrollTop";if(x){let S=x[w];const T=Re(()=>{const j=x[w];S!==j&&(g("SCROLL"),v()),S=j},"handleScroll");return x.addEventListener("scroll",T),()=>x.removeEventListener("scroll",T)}},[d.viewport,h,g,v]),f.jsx(Ss,{present:s||p!=="hidden",children:f.jsx(Yd,{"data-state":p==="hidden"?"hidden":"visible",...u,ref:i,onPointerEnter:qa(r.onPointerEnter,()=>g("POINTER_ENTER")),onPointerLeave:qa(r.onPointerLeave,()=>g("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),vy=y.forwardRef(Re(function(r,i){const s=yn(ua,r.__scopeScrollArea),{forceMount:u,...d}=r,[h,v]=y.useState(!1),p=r.orientation==="horizontal",g=Uo(()=>{if(s.viewport){const x=s.viewport.offsetWidth<s.viewport.scrollWidth,w=s.viewport.offsetHeight<s.viewport.scrollHeight;v(p?x:w)}},10);return fl(s.viewport,g),fl(s.content,g),f.jsx(Ss,{present:u||h,children:f.jsx(Yd,{"data-state":h?"visible":"hidden",...d,ref:i})})},"ScrollAreaScrollbarAuto")),Yd=y.forwardRef(Re(function(r,i){const{orientation:s="vertical",...u}=r,d=yn(ua,r.__scopeScrollArea),h=y.useRef(null),v=y.useRef(0),[p,g]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),x=Xd(p.viewport,p.content),w={...u,sizes:p,onSizesChange:g,hasThumb:x>0&&x<1,onThumbChange:Re(T=>h.current=T,"onThumbChange"),onThumbPointerUp:Re(()=>v.current=0,"onThumbPointerUp"),onThumbPointerDown:Re(T=>v.current=T,"onThumbPointerDown")};function S(T,j){return wy(T,v.current,p,j)}return Re(S,"getScrollPosition"),s==="horizontal"?f.jsx(QE,{...w,ref:i,onThumbPositionChange:()=>{if(d.viewport&&h.current){const T=d.viewport.scrollLeft,j=fd(T,p,d.dir);h.current.style.transform=`translate3d(${j}px, 0, 0)`}},onWheelScroll:T=>{d.viewport&&(d.viewport.scrollLeft=T)},onDragScroll:T=>{d.viewport&&(d.viewport.scrollLeft=S(T,d.dir))}}):s==="vertical"?f.jsx(IE,{...w,ref:i,onThumbPositionChange:()=>{if(d.viewport&&h.current){const T=d.viewport.scrollTop,j=fd(T,p);h.current.style.transform=`translate3d(0, ${j}px, 0)`}},onWheelScroll:T=>{d.viewport&&(d.viewport.scrollTop=T)},onDragScroll:T=>{d.viewport&&(d.viewport.scrollTop=S(T))}}):null},"ScrollAreaScrollbarVisible")),QE=y.forwardRef(Re(function(r,i){const{sizes:s,onSizesChange:u,...d}=r,h=yn(ua,r.__scopeScrollArea),[v,p]=y.useState(),g=y.useRef(null),x=Xa(i,g,h.onScrollbarXChange);return y.useEffect(()=>{g.current&&p(getComputedStyle(g.current))},[g]),f.jsx(by,{"data-orientation":"horizontal",...d,ref:x,sizes:s,style:{bottom:0,left:h.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:h.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":zo(s)+"px",...r.style},onThumbPointerDown:w=>r.onThumbPointerDown(w.x),onDragScroll:w=>r.onDragScroll(w.x),onWheelScroll:(w,S)=>{if(h.viewport){const T=h.viewport.scrollLeft+w.deltaX;r.onWheelScroll(T),Vd(T,S)&&w.preventDefault()}},onResize:()=>{g.current&&h.viewport&&v&&u({content:h.viewport.scrollWidth,viewport:h.viewport.offsetWidth,scrollbar:{size:g.current.clientWidth,paddingStart:Co(v.paddingLeft),paddingEnd:Co(v.paddingRight)}})}})},"ScrollAreaScrollbarX")),IE=y.forwardRef(Re(function(r,i){const{sizes:s,onSizesChange:u,...d}=r,h=yn(ua,r.__scopeScrollArea),[v,p]=y.useState(),g=y.useRef(null),x=Xa(i,g,h.onScrollbarYChange);return y.useEffect(()=>{g.current&&p(getComputedStyle(g.current))},[g]),f.jsx(by,{"data-orientation":"vertical",...d,ref:x,sizes:s,style:{top:0,right:h.dir==="ltr"?0:void 0,left:h.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":zo(s)+"px",...r.style},onThumbPointerDown:w=>r.onThumbPointerDown(w.y),onDragScroll:w=>r.onDragScroll(w.y),onWheelScroll:(w,S)=>{if(h.viewport){const T=h.viewport.scrollTop+w.deltaY;r.onWheelScroll(T),Vd(T,S)&&w.preventDefault()}},onResize:()=>{g.current&&h.viewport&&v&&u({content:h.viewport.scrollHeight,viewport:h.viewport.offsetHeight,scrollbar:{size:g.current.clientHeight,paddingStart:Co(v.paddingTop),paddingEnd:Co(v.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[ZE,yy]=py(ua),by=y.forwardRef(Re(function(r,i){const{__scopeScrollArea:s,sizes:u,hasThumb:d,onThumbChange:h,onThumbPointerUp:v,onThumbPointerDown:p,onThumbPositionChange:g,onDragScroll:x,onWheelScroll:w,onResize:S,...T}=r,j=yn(ua,s),[N,_]=y.useState(null),Q=Xa(i,_),Z=y.useRef(null),G=y.useRef(""),oe=j.viewport,ne=u.content-u.viewport,se=Ba(w),I=Ba(g),q=Uo(S,10);function ee(te){if(Z.current){const ie=te.clientX-Z.current.left,me=te.clientY-Z.current.top;x({x:ie,y:me})}}return Re(ee,"handleDragScroll"),y.useEffect(()=>{const te=Re(ie=>{const me=ie.target;N?.contains(me)&&se(ie,ne)},"handleWheel");return document.addEventListener("wheel",te,{passive:!1}),()=>document.removeEventListener("wheel",te,{passive:!1})},[oe,N,ne,se]),y.useEffect(I,[u,I]),fl(N,q),fl(j.content,q),f.jsx(ZE,{scope:s,scrollbar:N,hasThumb:d,onThumbChange:Ba(h),onThumbPointerUp:Ba(v),onThumbPositionChange:I,onThumbPointerDown:Ba(p),children:f.jsx(_o.div,{...T,ref:Q,style:{position:"absolute",...T.style},onPointerDown:qa(r.onPointerDown,te=>{te.button===0&&(te.target.setPointerCapture(te.pointerId),Z.current=N.getBoundingClientRect(),G.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j.viewport&&(j.viewport.style.scrollBehavior="auto"),ee(te))}),onPointerMove:qa(r.onPointerMove,ee),onPointerUp:qa(r.onPointerUp,te=>{const ie=te.target;ie.hasPointerCapture(te.pointerId)&&ie.releasePointerCapture(te.pointerId),document.body.style.webkitUserSelect=G.current,j.viewport&&(j.viewport.style.scrollBehavior=""),Z.current=null})})})},"ScrollAreaScrollbarImpl")),dd="ScrollAreaThumb",$E=y.forwardRef(Re(function(r,i){const{forceMount:s,...u}=r,d=yy(dd,r.__scopeScrollArea);return f.jsx(Ss,{present:s||d.hasThumb,children:f.jsx(KE,{ref:i,...u})})},"ScrollAreaThumb")),KE=y.forwardRef(Re(function(r,i){const{__scopeScrollArea:s,style:u,...d}=r,h=yn(dd,s),v=yy(dd,s),{onThumbPositionChange:p}=v,g=Xa(i,v.onThumbChange),x=y.useRef(void 0),w=Uo(()=>{x.current&&(x.current(),x.current=void 0)},100);return y.useEffect(()=>{const S=h.viewport;if(S){const T=Re(()=>{if(w(),!x.current){const j=WE(S,p);x.current=j,p()}},"handleScroll");return p(),S.addEventListener("scroll",T),()=>S.removeEventListener("scroll",T)}},[h.viewport,w,p]),f.jsx(_o.div,{"data-state":v.hasThumb?"visible":"hidden",...d,ref:g,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...u},onPointerDownCapture:qa(r.onPointerDownCapture,S=>{const j=S.target.getBoundingClientRect(),N=S.clientX-j.left,_=S.clientY-j.top;v.onThumbPointerDown({x:N,y:_})}),onPointerUp:qa(r.onPointerUp,v.onThumbPointerUp)})},"ScrollAreaThumbImpl")),xy="ScrollAreaCorner",PE=y.forwardRef(Re(function(r,i){const s=yn(xy,r.__scopeScrollArea),u=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&u?f.jsx(JE,{...r,ref:i}):null},"ScrollAreaCorner")),JE=y.forwardRef(Re(function(r,i){const{__scopeScrollArea:s,...u}=r,d=yn(xy,s),[h,v]=y.useState(0),[p,g]=y.useState(0),x=!!(h&&p),{onCornerWidthChange:w,onCornerHeightChange:S}=d;return fl(d.scrollbarX,()=>{const T=d.scrollbarX?.offsetHeight||0;d.onCornerHeightChange(T),g(T)}),fl(d.scrollbarY,()=>{const T=d.scrollbarY?.offsetWidth||0;d.onCornerWidthChange(T),v(T)}),y.useEffect(()=>()=>{w(0),S(0)},[w,S]),x?f.jsx(_o.div,{...u,ref:i,style:{width:h,height:p,position:"absolute",right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null},"ScrollAreaCornerImpl"));function Co(a){return a?parseInt(a,10):0}Re(Co,"toInt");function Xd(a,r){const i=a/r;return isNaN(i)?0:i}Re(Xd,"getThumbRatio");function zo(a){const r=Xd(a.viewport,a.content),i=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,s=(a.scrollbar.size-i)*r;return Math.max(s,18)}Re(zo,"getThumbSize");function wy(a,r,i,s="ltr"){const u=zo(i),d=u/2,h=r||d,v=u-h,p=i.scrollbar.paddingStart+h,g=i.scrollbar.size-i.scrollbar.paddingEnd-v,x=i.content-i.viewport,w=s==="ltr"?[0,x]:[x*-1,0];return Gd([p,g],w)(a)}Re(wy,"getScrollPositionFromPointer");function fd(a,r,i="ltr"){const s=zo(r),u=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,d=r.scrollbar.size-u,h=r.content-r.viewport,v=d-s,p=i==="ltr"?[0,h]:[h*-1,0],g=fy(a,p);return Gd([0,h],[0,v])(g)}Re(fd,"getThumbOffsetFromScroll");function Gd(a,r){return i=>{if(a[0]===a[1]||r[0]===r[1])return r[0];const s=(r[1]-r[0])/(a[1]-a[0]);return r[0]+s*(i-a[0])}}Re(Gd,"linearScale");function Vd(a,r){return a>0&&a<r}Re(Vd,"isScrollingWithinScrollbarBounds");var WE=Re((a,r=()=>{})=>{let i={left:a.scrollLeft,top:a.scrollTop},s=0;return Re((function u(){const d={left:a.scrollLeft,top:a.scrollTop},h=i.left!==d.left,v=i.top!==d.top;(h||v)&&r(),i=d,s=window.requestAnimationFrame(u)}),"loop")(),()=>window.cancelAnimationFrame(s)},"addUnlinkedScrollListener");function Uo(a,r){const i=Ba(a),s=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),y.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(i,r)},[i,r])}Re(Uo,"useDebounceCallback");function fl(a,r){const i=Ba(r);rd(()=>{let s=0;if(a){const u=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(i)});return u.observe(a),()=>{window.cancelAnimationFrame(s),u.unobserve(a)}}},[a,i])}Re(fl,"useResizeObserver");var Sy=HE,FE=YE,e2=PE;const Ey=y.forwardRef(({className:a,children:r,...i},s)=>f.jsxs(Sy,{ref:s,className:Gt("relative overflow-hidden",a),...i,children:[f.jsx(FE,{"data-scroll-area-viewport":"true",className:"h-full w-full overflow-x-hidden rounded-[inherit] [&>div]:!block [&>div]:!w-full [&>div]:!min-w-0",children:r}),f.jsx(Ay,{}),f.jsx(e2,{})]}));Ey.displayName=Sy.displayName;const Ay=y.forwardRef(({className:a,orientation:r="vertical",...i},s)=>f.jsx(gy,{ref:s,orientation:r,className:Gt("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...i,children:f.jsx($E,{className:"relative flex-1 rounded-full bg-border"})}));Ay.displayName=gy.displayName;function t2({frame:a,children:r}){return a==="bare"?f.jsx("div",{"data-account-credentials-frame":"bare",className:"w-full text-card-foreground",children:r}):f.jsx(qd,{"data-account-credentials-frame":"card",className:"w-full border-border bg-card text-card-foreground",children:r})}function bo(a,r,i,s,u){s({...a,[r]:i}),u?.(r,i)}function Qd({id:a,message:r}){return r?f.jsxs("p",{id:a,role:"alert","aria-live":"polite",className:"flex items-center gap-1.5 text-sm text-destructive",children:[f.jsx(ys,{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),r]}):null}function n2({id:a,label:r,error:i,children:s}){return f.jsxs("div",{className:"space-y-1.5",children:[f.jsxs("div",{"data-floating-field":"true",className:"relative",children:[s,f.jsx(mr,{htmlFor:a,className:"pointer-events-none absolute left-3 top-0 z-[1] -translate-y-1/2 bg-card px-1 text-xs leading-none text-muted-foreground transition-[color,font-size,top,transform] duration-150 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:-translate-y-1/2 peer-focus:text-xs peer-focus:text-ring peer-disabled:opacity-50 peer-aria-[invalid=true]:text-destructive",children:r})]}),f.jsx(Qd,{id:`${a}-error`,message:i})]})}function a2({id:a,label:r,error:i,children:s}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx(mr,{htmlFor:a,children:r}),s,f.jsx(Qd,{id:`${a}-error`,message:i})]})}function Pi({id:a,label:r,error:i,floating:s,children:u}){const d=s?n2:a2;return f.jsx(d,{id:a,label:r,error:i,children:u})}function Cy({frame:a,testId:r,children:i}){return a==="bare"?f.jsx("div",{"data-testid":r,"data-account-auxiliary-frame":"bare",className:"w-full text-card-foreground",children:i}):f.jsx(qd,{className:"w-full border-border bg-card text-card-foreground",children:f.jsx(Ey,{"data-testid":r,className:"max-h-[min(70vh,36rem)] overflow-y-auto",children:i})})}function l2({mode:a,values:r,onChange:i,onSubmit:s,onFieldChange:u,onModeChange:d,rememberAccount:h=!0,onRememberAccountChange:v,pending:p=!1,errors:g,usernameAvailability:x="idle",usernameSuggestions:w=[],copy:S,frame:T="card",showHeader:j=!0,presentation:N="standard"}){const[_,Q]=y.useState(!1),[Z,G]=y.useState(!1),oe=y.useId(),ne=y.useId(),se=y.useId(),I=y.useId(),q=y.useId(),ee=a==="register",te=typeof x=="string"?x:x.status,ie=ee&&r.password.length>0&&r.confirmation!==void 0&&r.password!==r.confirmation,me=ie&&(_||Z)?S.mismatchError:void 0,De=ee?S.registerAction:S.loginAction,ve=N==="compact",he=ve?"peer h-11 rounded-xl px-3 pb-2 pt-4":void 0,M=P=>{if(P?.preventDefault(),!p){if(ee&&ie){Q(!0);return}Q(!1),s(r)}},$=f.jsxs(f.Fragment,{children:[j?f.jsxs(bs,{children:[f.jsx(xs,{children:ee?S.registerTitle:S.loginTitle}),f.jsx(ws,{children:S.productName})]}):null,f.jsx(Ao,{className:Gt(T==="bare"?"p-0":j?void 0:"pt-6"),children:f.jsxs("form",{onSubmit:M,className:ve?"space-y-3":"space-y-4",children:[ee?f.jsxs("div",{className:"space-y-2",children:[f.jsx(Pi,{floating:ve,id:oe,label:S.usernameLabel,error:g?.username,children:f.jsx(Ha,{id:oe,name:"username",autoComplete:"username",placeholder:ve?" ":S.usernamePlaceholder,title:S.usernamePlaceholder,value:r.username??"",disabled:p,"aria-invalid":g?.username?!0:void 0,"aria-describedby":g?.username?`${oe}-error`:void 0,className:he,onChange:P=>bo(r,"username",P.currentTarget.value,i,u)})}),te==="checking"?f.jsxs("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:[f.jsx(fr,{"aria-hidden":"true",className:"mr-1 inline h-3.5 w-3.5 animate-spin"}),S.usernameChecking]}):null,te==="available"?f.jsxs("p",{"aria-live":"polite",className:"flex items-center gap-1 text-sm text-primary",children:[f.jsx(ZS,{"aria-hidden":"true",className:"h-4 w-4"}),S.usernameAvailable]}):null,te==="unavailable"&&!g?.username?f.jsx("p",{"aria-live":"polite",className:"text-sm text-destructive",children:typeof x=="object"&&x.message?x.message:S.usernameUnavailable}):null,!ve&&w.length>0?f.jsxs("div",{className:"space-y-2","aria-label":S.suggestionsLabel,children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:S.suggestionsLabel}),f.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(P=>f.jsx(jt,{type:"button",variant:"outline",size:"sm",disabled:p,onClick:()=>bo(r,"username",P,i,u),children:P},P))})]}):null]}):null,f.jsx(Pi,{floating:ve,id:ne,label:S.emailLabel,error:g?.email,children:f.jsx(Ha,{id:ne,name:"email",type:"email",autoComplete:"email",placeholder:ve?" ":S.emailPlaceholder,title:S.emailPlaceholder,value:r.email??"",disabled:p,"aria-invalid":g?.email?!0:void 0,"aria-describedby":g?.email?`${ne}-error`:void 0,className:he,onChange:P=>bo(r,"email",P.currentTarget.value,i,u)})}),f.jsx(Pi,{floating:ve,id:se,label:S.passwordLabel,error:g?.password,children:f.jsx(Ha,{id:se,name:"password",type:"password",autoComplete:ee?"new-password":"current-password",placeholder:ve?" ":S.passwordPlaceholder,title:S.passwordPlaceholder,value:r.password,disabled:p,"aria-invalid":g?.password?!0:void 0,"aria-describedby":g?.password?`${se}-error`:void 0,className:he,onChange:P=>bo(r,"password",P.currentTarget.value,i,u)})}),ee?f.jsx(Pi,{floating:ve,id:I,label:S.confirmationLabel,error:me??g?.confirmation,children:f.jsx(Ha,{id:I,name:"confirmation",type:"password",autoComplete:"new-password",placeholder:ve?" ":S.confirmationPlaceholder,title:S.confirmationPlaceholder,value:r.confirmation??"",onBlur:()=>G(!0),disabled:p,"aria-invalid":me||g?.confirmation?!0:void 0,"aria-describedby":me||g?.confirmation?`${I}-error`:void 0,className:he,onChange:P=>{Q(!1),bo(r,"confirmation",P.currentTarget.value,i,u)}})}):null,!ee&&v?f.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[f.jsx("input",{type:"checkbox",name:"remember",checked:h,disabled:p,onChange:P=>v(P.currentTarget.checked)}),"记住账号"]}):null,f.jsx(Qd,{id:q,message:g?.form}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs(jt,{type:"submit",className:Gt("w-full",ve&&"h-10 rounded-xl"),disabled:p,children:[p?f.jsx(fr,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,De]}),d?f.jsx(jt,{type:"button",variant:"ghost",className:Gt("w-full",ve&&"h-9 rounded-lg text-xs"),disabled:p,onClick:()=>d(ee?"login":"register"),children:ee?S.switchToLogin:S.switchToRegister}):null]})]})})]});return f.jsx(t2,{frame:T,children:$})}function r2({email:a,onEmailChange:r,onSubmit:i,onRecover:s,pending:u=!1,status:d="idle",error:h,copy:v,frame:p="card",showHeader:g=!0}){const x=y.useId(),w=u||d==="submitting",S=i??s,T=N=>{N.preventDefault(),w||S?.(a)},j=f.jsxs(f.Fragment,{children:[g?f.jsxs(bs,{className:p==="bare"?"p-0 pb-4":void 0,children:[f.jsx(xs,{children:v.title}),v.description?f.jsx(ws,{children:v.description}):null]}):null,f.jsx(Ao,{className:p==="bare"?"p-0":void 0,children:d==="success"?f.jsxs("div",{role:"status","aria-live":"polite",className:"space-y-2",children:[f.jsx("p",{className:"font-medium text-foreground",children:v.successTitle}),f.jsx("p",{className:"text-sm text-muted-foreground",children:v.successMessage})]}):f.jsxs("form",{onSubmit:T,className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(mr,{htmlFor:x,children:v.emailLabel}),f.jsx(Ha,{id:x,type:"email",autoComplete:"email",placeholder:v.emailPlaceholder,value:a,disabled:w,onChange:N=>r(N.currentTarget.value)})]}),h?f.jsx("p",{role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:h}):null,f.jsxs(jt,{type:"submit",className:"w-full",disabled:w||!a.trim()||!S,children:[w?f.jsx(fr,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,v.actionLabel]})]})})]});return f.jsx(Cy,{frame:p,testId:"password-recovery-scroll",children:j})}function o2({password:a,confirmation:r,onPasswordChange:i,onConfirmationChange:s,onSubmit:u,onReset:d,pending:h=!1,status:v="idle",error:p,copy:g,frame:x="card",showHeader:w=!0}){const S=y.useId(),T=y.useId(),j=h||v==="submitting",N=u??d,_=a.length>0&&a!==r,Q=G=>{G?.preventDefault(),!j&&(_||N?.({password:a,confirmation:r}))},Z=v==="success"?f.jsx(Ao,{className:x==="bare"?"p-0":void 0,children:f.jsx("p",{role:"status","aria-live":"polite",children:g.successMessage})}):f.jsxs(f.Fragment,{children:[w?f.jsxs(bs,{className:x==="bare"?"p-0 pb-4":void 0,children:[f.jsx(xs,{children:g.title}),g.description?f.jsx(ws,{children:g.description}):null]}):null,f.jsx(Ao,{className:x==="bare"?"p-0":void 0,children:f.jsxs("form",{onSubmit:Q,className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(mr,{htmlFor:S,children:g.passwordLabel}),f.jsx(Ha,{id:S,type:"password",autoComplete:"new-password",placeholder:g.passwordPlaceholder,value:a,disabled:j,onChange:G=>i(G.currentTarget.value)})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(mr,{htmlFor:T,children:g.confirmationLabel}),f.jsx(Ha,{id:T,type:"password",autoComplete:"new-password",placeholder:g.confirmationPlaceholder,value:r,disabled:j,"aria-invalid":_?!0:void 0,onChange:G=>s(G.currentTarget.value)})]}),p?f.jsx("p",{role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:p}):null,_?f.jsx("p",{role:"alert","aria-live":"polite",className:"text-sm text-destructive",children:g.mismatchError}):null,f.jsxs(jt,{type:"submit",className:"w-full",disabled:j||!N,children:[j?f.jsx(fr,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,g.actionLabel]})]})})]});return f.jsx(Cy,{frame:x,testId:"password-reset-scroll",children:Z})}function Ty(){return globalThis.xpodDesktop?"window":"document"}function Ry(a=!0,r="auth"){y.useEffect(()=>{if(a)return globalThis.xpodDesktop?.setWindowMode?.(r),()=>{globalThis.xpodDesktop?.setWindowMode?.("workspace")}},[a,r])}const i2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20fill='none'%3e%3cpath%20d='M32%207%2051%2016.5v13.8c0%2012.4-7.4%2021.2-19%2027.7-11.6-6.5-19-15.3-19-27.7V16.5L32%207Z'%20stroke='%238A72BE'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e",s2=[{icon:Uv,title:"Your AI Secretary Never Stops",description:"Runs 24/7, even when you are not talking to it"},{icon:Ov,title:"All Your Pieces, In One Place",description:"Data, memory, and context come back into one system"},{icon:is,title:"One Secretary, Many Agents",description:"One aligned layer that can direct many agents while keeping privacy and control inside your boundary."}];function Pu({compact:a=!1}){return f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("img",{src:i2,alt:"",className:a?"h-9 w-9":"h-12 w-12"}),f.jsxs("div",{children:[f.jsx("p",{className:`${a?"text-xl":"text-2xl"} font-bold leading-tight`,children:"Xpod"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Personal Messages Platform"})]})]})}function Ny({title:a,description:r,children:i,presentation:s="standard",host:u="document"}){const d=y.useId(),h=u==="window"&&s==="compact";return s==="compact"?f.jsx("main",{"data-testid":"web-account-page",className:h?"flex h-dvh w-full items-center justify-center overflow-hidden bg-background text-foreground":"flex min-h-dvh items-center justify-center bg-muted/30 p-4 text-foreground sm:p-6",children:f.jsxs("section",{role:"region","aria-labelledby":d,"data-testid":"web-account-panel","data-web-account-layout":"compact","data-web-account-host":h?"window":"document",className:h?"flex h-full w-full min-w-0 flex-col overflow-y-auto overscroll-contain px-5 py-5":"mx-auto flex h-[400px] w-[280px] max-h-[calc(100dvh-2rem)] max-w-[calc(100vw-2rem)] min-w-0 flex-col overflow-y-auto overscroll-contain rounded-xl border bg-card px-5 py-5 shadow-lg shadow-black/5",children:[f.jsx("div",{className:"mb-4 shrink-0",children:f.jsx(Pu,{compact:!0})}),f.jsxs("header",{className:"mb-4 shrink-0 text-center",children:[f.jsx("h1",{id:d,className:"text-xl font-semibold tracking-tight",children:a}),r?f.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:r}):null]}),f.jsx("div",{className:"min-w-0 shrink-0",children:i})]})}):f.jsx("main",{"data-testid":"web-account-page",className:"flex min-h-dvh items-center justify-center bg-muted/30 p-4 text-foreground sm:p-8",children:f.jsxs("div",{className:"grid w-full max-w-6xl items-center gap-8 lg:grid-cols-2 lg:gap-16",children:[f.jsxs("aside",{"data-testid":"web-account-introduction","aria-label":"关于 Xpod",className:"hidden px-8 lg:block",children:[f.jsx(Pu,{}),f.jsxs("h1",{className:"mb-4 mt-8 text-3xl font-bold leading-tight",children:["Simplify Life with ",f.jsx("span",{className:"text-primary",children:"Your AI Secretary"})]}),f.jsx("p",{className:"mb-10 text-sm leading-relaxed text-muted-foreground",children:"An AI that never stops, knows your whole life, works for you—while guarding your privacy."}),f.jsx("div",{className:"space-y-5",children:s2.map(({icon:v,title:p,description:g})=>f.jsxs("div",{className:"flex gap-3",children:[f.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border bg-card",children:f.jsx(v,{"aria-hidden":"true",className:"h-4 w-4 text-primary"})}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-sm font-medium",children:p}),f.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:g})]})]},p))}),f.jsxs("p",{className:"mt-12 text-xs text-muted-foreground",children:["Powered by ",f.jsx("a",{href:"https://solidproject.org",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"Solid Protocol"})]})]}),f.jsxs("section",{role:"region","aria-labelledby":d,"data-testid":"web-account-panel","data-web-account-layout":"standard",className:"mx-auto w-full min-w-0 max-w-md rounded-3xl border bg-card p-6 shadow-lg shadow-black/5 sm:p-8 lg:mx-0",children:[f.jsx("div",{className:"mb-8 lg:hidden",children:f.jsx(Pu,{})}),f.jsxs("header",{className:"mb-6",children:[f.jsx("h2",{id:d,className:"text-2xl font-bold tracking-tight",children:a}),r?f.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:r}):null]}),i]})]})})}function yr({title:a,children:r,presentation:i="compact"}){const s=Ty();return Ry(s==="window"&&i==="compact","account"),f.jsx(Ny,{title:a,presentation:i,host:s,children:r})}function c2(a){const r=Ty(),i="compact";return Ry(r==="window"&&i==="compact","account"),f.jsxs(Ny,{title:a.surfaceTitle,description:a.mode==="register"?"创建你的 Xpod 账号,开始使用个人存储空间。":"登录以继续使用你的身份与个人存储空间。",presentation:i,host:r,children:[f.jsx(l2,{...a,frame:"bare",showHeader:!1,presentation:i}),a.footer?f.jsx("div",{className:"mt-6 space-y-3 border-t pt-5",children:a.footer}):null]})}function u2(){return f.jsx(yr,{title:"正在加载 Xpod",children:f.jsxs("div",{role:"status","aria-live":"polite",className:"flex flex-1 items-center justify-center p-5 text-sm text-muted-foreground",children:[f.jsx(fr,{"aria-hidden":"true",className:"mr-2 h-5 w-5 animate-spin"}),"正在加载…"]})})}function d2(){const[a,r]=y.useState(!1),[i,s]=y.useState(!1),u=y.useRef(!1);if(!window.xpodDesktop?.cancelLogin)return null;const d=async()=>{const h=window.xpodDesktop;if(!(u.current||!h?.cancelLogin)){u.current=!0,r(!0),s(!1);try{await h.cancelLogin()}catch{s(!0)}finally{u.current=!1,r(!1)}}};return f.jsxs("div",{className:"space-y-2",children:[i&&f.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"返回应用未完成,请重试。"}),f.jsx(jt,{type:"button",variant:"ghost",className:"w-full",disabled:a,"aria-busy":a,onClick:()=>{d()},children:a?"正在返回…":"返回应用"})]})}function f2({message:a,retry:r}){return f.jsx(yr,{title:"账号服务暂时不可用",children:f.jsxs("div",{className:"space-y-6",children:[f.jsx("p",{role:"alert",className:"text-sm leading-relaxed text-muted-foreground",children:"无法读取账号服务信息。请重试当前步骤,无需重新注册或清除登录状态。"}),f.jsxs("details",{className:"text-xs text-muted-foreground",children:[f.jsx("summary",{className:"cursor-pointer",children:"技术详情"}),f.jsx("p",{className:"mt-2 break-words",children:a})]}),f.jsx(jt,{type:"button",className:"w-full",onClick:()=>r?void r():window.location.reload(),children:"重试"}),f.jsx(d2,{})]})})}const md="xpod:returnTo";function cr(a){try{a&&sessionStorage.setItem(md,a)}catch{return}}function Id(){try{const a=sessionStorage.getItem(md);return a&&sessionStorage.removeItem(md),a}catch{return null}}function m2(){try{const a=new URLSearchParams(window.location.search).get("returnTo");return!a||new URL(a,window.location.origin).origin!==window.location.origin?null:a}catch{return null}}function h2(a,r){return K(a?"/.account/oidc/consent/":Id()??r)}function p2(a,r,i=!1){return a&&r&&!i}function Rg({children:a,allowOidcPending:r=!1}){const{controls:i,isLoggedIn:s,hasOidcPending:u}=Nn(),d=nn();if(p2(s,u,r))return f.jsx(Rn,{to:K("/.account/oidc/consent/"),replace:!0});if(!s){cr(d.pathname+d.search);const h=i?.html?.password?.login||i?.password?.login||K("/.account/login/password/");return f.jsx(Rn,{to:K(h),replace:!0})}return f.jsx(f.Fragment,{children:a})}const g2={productName:"Xpod 账号",loginTitle:"登录",registerTitle:"创建账号",usernameLabel:"Pod 名称",usernamePlaceholder:"选择 Pod 名称",emailLabel:"邮箱",emailPlaceholder:"you@example.com",passwordLabel:"密码",passwordPlaceholder:"输入密码",confirmationLabel:"确认密码",confirmationPlaceholder:"再次输入密码",loginAction:"登录",registerAction:"创建账号",switchToRegister:"切换用户",switchToLogin:"返回登录",usernameChecking:"正在检查 Pod 名称…",usernameAvailable:"Pod 名称可用",usernameUnavailable:"Pod 名称不可用",suggestionsLabel:"可用建议",mismatchError:"两次输入的密码不一致"},Ng={title:"找回密码",description:"如果这个邮箱已注册,我们会发送重置链接。",emailLabel:"邮箱",emailPlaceholder:"you@example.com",actionLabel:"发送重置链接",successTitle:"请查收邮件",successMessage:"如果该邮箱已注册,重置链接已经发出。"},jg={title:"设置新密码",description:"为你的账号选择一个新密码。",passwordLabel:"新密码",passwordPlaceholder:"输入新密码",confirmationLabel:"确认密码",confirmationPlaceholder:"再次输入密码",actionLabel:"重设密码",successMessage:"密码已重设。",mismatchError:"两次输入的密码不一致"},Ln={loginSurfaceTitle:"登录",registerSurfaceTitle:"创建账号",recoverSurfaceTitle:"找回密码",resetSurfaceTitle:"重设密码",forgotPassword:"忘记密码?",backToSignIn:"返回登录",cancelAuthorization:"取消授权",cancellingAuthorization:"正在取消…",resend:"重新发送"},He={surfaceTitle:"授权",signInRequiredTitle:"需要先登录",signInRequiredDescription:"请先登录,再批准这次请求并选择要共享的 WebID。",goToSignIn:"去登录",unavailableTitle:"暂时无法授权",tryAgain:"重试",dismiss:"关闭",restoring:"正在恢复授权…",applicationFallback:"应用",title:"批准访问",description:a=>`${a} 请求访问你的账号数据。`,webIdLabel:"WebID",bindingLabel:"身份与存储空间",storageLabel:"Storage",rememberClientLabel:"记住这个应用",approveLabel:"批准",approvingLabel:"正在批准…",denyLabel:"拒绝",denyingLabel:"正在拒绝…",editAccountLabel:"管理账号",switchAccountLabel:"换一个账号",podNameLabel:"Pod 名称",prepareTitle:"准备存储空间",prepareDescription:"批准访问前,先准备存储空间。",creationMessage:"还没有可用的存储空间。",waitingMessage:"正在等待存储空间绑定。",readyMessage:"存储空间已就绪。",conflictMessage:"所选存储空间与当前身份不匹配。",errorMessage:"无法准备存储空间。",createLabel:"创建存储空间",continueLabel:"继续",retryLabel:"重试",cancelLabel:"取消",missingPodTitle:"还没有可用的存储空间",missingPodDescription:"批准访问前需要一个属于当前身份的存储空间。请先在 Pod 管理中创建或绑定,再回到这里继续授权。",goToPodManagementLabel:"前往 Pod 管理"},ar={surfaceTitle:"准备存储空间",restoring:"正在检查存储空间…",creating:"正在准备存储空间…",unavailableTitle:"存储空间未准备好",waitingMessage:"正在等待 WebID 与存储空间绑定。",retryLabel:"重试"},Dn={usernameRequired:"请填写 Pod 名称",usernameLength:"Pod 名称需为 3-63 个字符",usernameCharset:"Pod 名称只能包含小写字母、数字和连字符",usernameHyphen:"Pod 名称不能以连字符开头或结尾",usernameUnavailable:"暂时无法检查 Pod 名称,请重试。",emailAlreadyRegistered:"该邮箱已注册,请登录或重置密码。",emailAlreadyRegisteredPasswordMismatch:"该邮箱已注册,但密码不正确,请登录或重置密码。",choosePodName:"请填写 Pod 名称。",podNameTaken:"Pod 名称已被占用,请换一个。"};function _g(a){return a===401||a===403?"邮箱或密码不正确。":a===429?"尝试次数过多,请稍后再试。":"登录失败,请重试。"}function v2(){return"无法完成注册,请重试。"}function zg(){return"取消授权失败,请重试。"}const we={invalidTransaction:"登录状态无效。",expiredInteraction:"本次授权请求已失效,请返回应用重新发起登录。",bindingUnavailable:"应用选择的身份与存储空间已不可用,请返回应用重新选择。",returnFailed:"无法返回应用,请重试。",signInRequired:"请先登录,再继续授权。",loadFailed:"无法加载授权信息,请重试。",clientUnavailable:"无法获取应用信息。",bindingsFailed:"无法加载 WebID 绑定,请重试。",signOutIncomplete:"退出未完成,请重试。",cancelFailed:"取消授权失败,请重试。",chooseStorage:"批准前请先选择存储空间。",cannotPersistStorage:"当前浏览器无法保存这次存储选择。",webIdSelectionFailed:"无法完成 WebID 选择,请重试。",authorizationFailed:"无法完成授权,请重试。",missingRedirect:"授权已完成,但没有返回跳转地址,请重新登录。",choosePodName:"创建存储空间前请先填写 Pod 名称。",storageCreationUnavailable:"暂时无法创建存储空间。",storageCreateFailed:"无法创建存储空间,请重试。"},kn={checkFailed:"无法检查存储空间状态,请重试。",accountIdentityMissing:"当前账号信息不完整,无法自动准备本机存储空间。",createEndpointMissing:"找不到创建 Pod 的接口,请刷新后重试。",cloudRouteUnavailable:"本机 Xpod 还没有和 Cloud 打通,暂时不能准备存储空间。请保持 Xpod 运行,稍后重试。",storageCreateFailed:"无法创建存储空间,请重试。"};function Ug(a){return a===429?"请求过多,请稍后再试。":"无法发送重置链接,请重试。"}function Og(a){return a===400||a===404?"重置链接无效或已过期。":"无法重设密码,请重试。"}const y2=3,hd=63,b2=/^[a-z0-9-]+$/;function To(a){return a.trim().toLowerCase()}function cs(a){const r=To(a);if(!r)return Dn.usernameRequired;if(r.length<y2||r.length>hd)return Dn.usernameLength;if(!b2.test(r))return Dn.usernameCharset;if(r.startsWith("-")||r.endsWith("-"))return Dn.usernameHyphen}function x2(a,r=5){const s=To(a).replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,hd-3)||"user",u=Array.from({length:Math.max(r,3)},(d,h)=>`${s}-${h+1}`);return Array.from(new Set(u.map(d=>d.slice(0,hd)).filter(d=>!cs(d)))).slice(0,r)}function w2(a){if(typeof window<"u")return"/api/v1/identity";try{const r=new URL(a);return r.hostname.startsWith("id.")?`${r.protocol}//api.${r.hostname.slice(3)}/api/v1/identity`:`${r.origin}/api/v1/identity`}catch{return"/api/v1/identity"}}async function jy(a,r,i){const s=`${w2(r)}/${encodeURIComponent(a)}`;try{const u=await i(s,{headers:{Accept:"application/json"},credentials:"include"});if(u.status===404)return!1;if(u.ok||u.status===409)return!0}catch{}}async function S2(a,r,i,s=3){const u=x2(a,Math.max(s*2,5)),d=[];for(const h of u)if(await jy(h,r,i)===!1&&d.push(h),d.length>=s)break;return d}async function Mg(a,r,i=fetch){const s=To(a),u=cs(s);if(u)return{available:!1,suggestions:[],error:u};const d=await jy(s,r,i);return d===!1?{available:!0,suggestions:[]}:d===void 0?{available:!1,suggestions:[],error:Dn.usernameUnavailable}:{available:!1,suggestions:await S2(s,r,i)}}function Es(a){return a!==a.trim()||/[\r\n\t]/.test(a)}class Cn extends Error{code;constructor(r,i){super(i),this.name="AccountStorageBindingsError",this.code=r}}async function Zd(a){const r=A2(a.origin),i=a.controls?.account?.bindings;if(typeof i!="string"||i.trim()==="")throw new Cn("missing-control","Account storage bindings control is unavailable");const s=a.fetchImpl??fetch,u=C2(i,r),d=u.origin===r?u.href:await zt(u.href,s,a.trustedAccountIndex);if(!d)throw new Cn("cross-origin","Account storage bindings control is not hosted by this Xpod");const h=st({Accept:"application/json",...a.headers});let v;try{v=await s(d,{headers:h,credentials:"include"})}catch(g){throw new Cn("request-failed",g instanceof Error?g.message:"Failed to load Account storage bindings")}if(v.status===401||v.status===403)throw new Cn("forbidden","Account storage bindings require an authenticated Account");if(!v.ok)throw new Cn("request-failed",`Account storage bindings request failed (${v.status})`);let p;try{p=await v.json()}catch{throw new Cn("invalid-response","Account storage bindings response is not valid JSON")}return E2(p,u.origin,N2(u,a.trustedAccountIndex,r))}function E2(a,r,i=!1){if(!Lg(a)||!Array.isArray(a.bindings))throw new Cn("invalid-response","Account storage bindings response is malformed");const s=[],u=new Set;for(const d of a.bindings){if(!Lg(d)||typeof d.webId!="string"||typeof d.storageUrl!="string")throw new Cn("invalid-response","Account storage binding row is malformed");const h=T2(d.webId),v=R2(d.storageUrl,i?void 0:r);if(!h||!v)throw new Cn("cross-origin","Account storage binding is outside the trusted storage scope");const p={webId:h,storageUrl:v,...typeof d.label=="string"?{label:d.label}:{}},g=`${p.webId}
|
|
12
|
+
${p.storageUrl}`;u.has(g)||(u.add(g),s.push(p))}return s}function A2(a){try{return new URL(a??(typeof window>"u"?"http://localhost":window.location.origin)).origin}catch{throw new Cn("cross-origin","Current Xpod origin is invalid")}}function C2(a,r){try{const i=new URL(a,r);if(!["http:","https:"].includes(i.protocol)||i.username||i.password||i.hash)throw new Error("unsafe control URL");return i}catch{throw new Cn("cross-origin","Account storage bindings control is not a valid URL")}}function T2(a){if(!Es(a))try{const r=new URL(a);return!["http:","https:"].includes(r.protocol)||r.username||r.password?void 0:a}catch{return}}function R2(a,r){try{const i=new URL(a.trim());return r!==void 0&&i.origin!==r||!["http:","https:"].includes(i.protocol)||i.username||i.password||i.search||i.hash?void 0:(i.pathname=i.pathname.endsWith("/")?i.pathname:`${i.pathname}/`,i.href)}catch{return}}function N2(a,r,i){if(!r)return!1;try{const s=new URL(r,i);return s.pathname.startsWith("/.account/")&&a.origin===s.origin&&a.pathname.startsWith("/.account/")}catch{return!1}}function Lg(a){return!!(a&&typeof a=="object"&&!Array.isArray(a))}function br(a){return typeof a=="object"&&a!==null}function pd(a){return br(a)&&typeof a.message=="string"?a.message:""}function Dg(a,r){if(a)try{const i=new URL(r,globalThis.location?.origin??"http://localhost"),s=new URL(a,i);return s.origin===i.origin?s.href:new URL(`${s.pathname}${s.search}${s.hash}`,i.origin).href}catch{return}}class dr extends Error{code;constructor(r,i){super(r),this.name="RegistrationError",this.code=i}}async function _y(a){const r=await a.json().catch(()=>{});return r?.message||r?.error}async function kg(a){const r=await a.json().catch(()=>({}));return br(r)?r:{}}function j2(a){return a?/already is a login for this e-mail address/i.test(a)||/email(?: address)? is already/i.test(a)||/already registered/i.test(a):!1}async function _2(a){const r=a.fetchImpl??fetch;let i=await r(K(a.accountCreateUrl),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({})});if(!i.ok)throw new Error(pd(await kg(i))||"Failed to create account");const s=await i.json().catch(()=>({})),u=typeof s.authorization=="string"?s.authorization:"";if(!u)throw new Error("Account token not returned");const d=new URL(a.accountCreateUrl,globalThis.location?.origin??"http://localhost"),h=new URL("/.account/",d).href;if(i=await r(K(h),{headers:ld(u),credentials:"include"}),!i.ok)throw new Error(pd(await kg(i))||"Failed to load account controls");const v=await i.json().catch(()=>({})),p=Dg(v.controls?.password?.create,h),g=Dg(v.controls?.password?.login,h);if(!p)throw new Error("Password endpoint not found");if(!g)throw new Error("Login endpoint not found");if(i=await r(K(p),{method:"POST",headers:{...ld(u),"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:a.email,password:a.password})}),!i.ok){const x=await _y(i);throw j2(x)?new dr(Dn.emailAlreadyRegistered,"EMAIL_ALREADY_REGISTERED"):new Error(x||"Failed to set password")}return{accountToken:u,loginUrl:g}}async function z2(a){const i=await(a.fetchImpl??fetch)(K(a.loginUrl),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({email:a.email,password:a.password,...a.remember===void 0?{}:{remember:a.remember}})});if(!i.ok){const d=await _y(i);throw a.duplicateEmailRecovery?new dr(Dn.emailAlreadyRegisteredPasswordMismatch,"EMAIL_ALREADY_REGISTERED"):new Error(d||"Auto-login failed")}const s=await i.json().catch(()=>({})),u=typeof s.authorization=="string"?s.authorization:"";if(!u)throw new Error("Account token not returned after login");return{accountToken:u}}const U2=["/dashboard","/status","/network","/settings","/ai-config","/ai-connections"];function O2(a){if(a===void 0)return;if(typeof a!="string"||a.trim()==="")throw new TypeError("returnTo must be a non-empty application path");const r=a.trim(),i=M2(r),s=i.split(/[?#]/,1)[0];if(!r.startsWith("/")||r.startsWith("//")||r.includes("\\")||i.includes("\\")||/^[a-z][a-z\d+.-]*:/i.test(i)||i.startsWith("//")||s.split("/").some(u=>u==="..")||!U2.some(u=>s===u||s.startsWith(`${u}/`)))throw new TypeError("returnTo must be a safe path within the application allow-list");return r}function M2(a){let r=a;for(let i=0;i<4;i+=1){let s;try{s=decodeURIComponent(r)}catch{throw new TypeError("returnTo contains malformed percent encoding")}if(s===r)return r;r=s}return r}const L2="xpod-current-origin";function D2(a){return O2(a)}function k2(a,r){const i=Ev(a),s=new URL(r).origin,u=new URL(i.identityProvider.url).origin,d=i.storageProvider?new URL(i.storageProvider.url).origin:void 0;if(i.id!==L2||u!==s||d!==s||i.identityProvider.url!==i.storageProvider?.url)throw new TypeError("Xpod login route must use the current origin for identity and storage");return{...i,identityProvider:{...i.identityProvider,url:s},storageProvider:i.storageProvider?{...i.storageProvider,url:s}:void 0}}const ts="xpod.pending-account-email.v1",us="xpod.pending-account-issuer.v1";function zy(){if(!(typeof window>"u"))try{return window.localStorage}catch{return}}function B2(a,r=zy(),i){const s=Oy(a);if(!(!r||!s))try{return r.setItem(ts,s),i?r.setItem(us,Uy(i)):r.removeItem(us),s}catch{return}}function H2(a=zy(),r){if(a)try{const i=Oy(a.getItem(ts));if(r){const s=a.getItem(us);if(!s||s!==Uy(r)){a.removeItem(ts),a.removeItem(us);return}}return i||a.removeItem(ts),i}catch{return}}function Uy(a){try{const r=q2();return r?new URL(a,r).origin:new URL(a).origin}catch{return a.trim()}}function Oy(a){if(typeof a!="string")return;const r=a.trim();return r&&r.length<=320&&r.includes("@")?r:void 0}function q2(){return typeof window>"u"?void 0:window.location.origin}function Y2(a){return a instanceof dr?a.message:v2()}function gd({initialIsRegister:a=!1}){const{controls:r,idpIndex:i,isLoggedIn:s,hasOidcPending:u}=Nn(),d=qn(),h=nn(),v=a,[p,g]=y.useState({username:"",email:H2(void 0,i)??"",password:"",confirmation:""}),[x,w]=y.useState(!1),[S,T]=y.useState(!0),[j,N]=y.useState(!1),[_,Q]=y.useState(!1),[Z,G]=y.useState(null),[oe,ne]=y.useState([]),[se,I]=y.useState(null),[q,ee]=y.useState(null),[te,ie]=y.useState(null),me=To(p.username??""),De=v?cs(me):void 0;if(y.useEffect(()=>{const X=m2();X&&cr(X)},[]),y.useEffect(()=>{let X=!1;if(!v||!me)return queueMicrotask(()=>{X||(Q(!1),G(null),ne([]),I(null))}),()=>{X=!0};if(De)return queueMicrotask(()=>{X||(Q(!1),G(!1),ne([]),I(De))}),()=>{X=!0};queueMicrotask(()=>{X||Q(!0)});const A=window.setTimeout(async()=>{const k=await Mg(me,i);X||(Q(!1),G(k.available),ne(k.suggestions),I(k.error??null))},300);return()=>{X=!0,window.clearTimeout(A)}},[i,v,me,De]),s)return f.jsx(Rn,{to:K("/.account/account/"),replace:!0,state:{next:K(u?"/.account/oidc/consent/":"/.account/account/")}});const ve=X=>{g(X),X.email!==p.email&&ee(null),ie(null)},he=(X,A)=>{X==="email"&&ee(null),X==="username"&&I(null),ie(null),g(k=>({...k,[X]:A}))},M=()=>{window.location.href=h2(u,K("/.account/account/"))},$=async X=>{if(x)return;w(!0),ee(null),ie(null);const A=X.email?.trim()??"",k=X.password;try{if(v){const Be=To(X.username??""),de=cs(Be);if(de){G(!1),I(de);return}const F=await Mg(Be,i),ge=await zt(r?.password?.login,fetch,i)??K("/.account/login/password/"),Ne=async(Ze=!1)=>{const mt=await z2({duplicateEmailRecovery:Ze,email:A,fetchImpl:fetch,loginUrl:ge,password:k,remember:!0});return Vu(mt.accountToken),mt.accountToken};if(!F.available){let Ze;try{Ze=await Ne()}catch{}if(Ze){M();return}G(!1),ne(F.suggestions),I(F.error??"Pod 名称已被占用。");return}if(F.error){G(!1),I(F.error);return}let $e;const Oe=await Ne().catch(()=>{});if(Oe)$e=Oe;else try{$e=(await _2({accountCreateUrl:await zt(r?.account?.create,fetch,i)??K("/.account/account/"),email:A,password:k})).accountToken,Vu($e)}catch(Ze){if(!(Ze instanceof dr)||Ze.code!=="EMAIL_ALREADY_REGISTERED")throw Ze;$e=await Ne(!0)}M();return}const L=await zt(r?.password?.login,fetch,i)??K("/.account/login/password/"),V=await fetch(K(L),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({email:A,password:k,remember:S})}),J=await V.json().catch(()=>({}));if(!V.ok){ie(_g(V.status));return}Vu(typeof J.authorization=="string"?J.authorization:void 0),B2(A,void 0,i);const W=V.headers.get("Location");if(typeof J.location=="string"&&J.location){window.location.href=K(J.location);return}if(W){window.location.href=K(W);return}const ue=Id();if(ue){window.location.href=K(ue);return}try{if((await fetch(K("/.account/oidc/consent/"),{headers:st(),credentials:"include"})).ok){window.location.href=K("/.account/oidc/consent/");return}}catch{}window.location.href=K("/.account/account/")}catch(L){L instanceof dr&&L.code==="EMAIL_ALREADY_REGISTERED"?ee(L.message):L instanceof dr&&L.code==="USERNAME_ALREADY_TAKEN"?(G(!1),I(L.message)):ie(v?Y2(L):_g(500))}finally{w(!1)}},P=X=>{d({pathname:K(X==="register"?"/.account/login/password/register/":"/.account/login/password/"),search:h.search}),g({username:"",email:"",password:"",confirmation:""}),Q(!1),G(null),ne([]),I(null),ee(null),ie(null)},ye=async()=>{const X=r?.oidc?.cancel;if(!(!X||!u||j)){N(!0),ie(null);try{const A=await fetch(K(X),{method:"POST",headers:st({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include"}),k=await A.json().catch(()=>({}));if(!A.ok||typeof k.location!="string"||!k.location){ie(zg());return}window.location.href=K(k.location)}catch{ie(zg())}finally{N(!1)}}};return f.jsx(c2,{surface:"page",surfaceTitle:v?Ln.registerSurfaceTitle:Ln.loginSurfaceTitle,mode:v?"register":"login",values:p,onChange:ve,onFieldChange:he,onSubmit:$,onModeChange:v?P:void 0,pending:x||j,rememberAccount:S,onRememberAccountChange:T,errors:{...q?{email:q}:{},...te?{form:te}:{},...v&&se&&!_?{username:se}:{}},usernameAvailability:_?"checking":Z===!0?"available":Z===!1?{status:"unavailable",message:se??void 0}:"idle",usernameSuggestions:oe,copy:g2,footer:v?void 0:f.jsxs(f.Fragment,{children:[!v&&u&&r?.oidc?.cancel?f.jsx(jt,{type:"button",variant:"outline",className:"w-full",disabled:x||j,onClick:ye,children:j?Ln.cancellingAuthorization:Ln.cancelAuthorization}):null,v?null:f.jsxs("div",{className:"flex items-center justify-center gap-3 text-xs text-muted-foreground",children:[f.jsx(jt,{type:"button",variant:"ghost",className:"h-auto px-2 py-1 text-xs font-normal text-muted-foreground hover:text-foreground",disabled:x,onClick:()=>P("register"),children:"创建账号"}),f.jsx("span",{"aria-hidden":"true",className:"text-border",children:"·"}),f.jsx(jt,{type:"button",variant:"ghost",className:"h-auto px-2 py-1 text-xs font-normal text-muted-foreground hover:text-foreground",disabled:x,onClick:()=>d({pathname:K("/.account/login/password/forgot/"),search:h.search}),children:Ln.forgotPassword})]})]})})}function X2(){const{isLoggedIn:a,hasOidcPending:r}=Nn();return a&&r?f.jsx(Rn,{to:K("/.account/oidc/consent/"),replace:!0}):a?f.jsx(Rn,{to:K("/.account/account/"),replace:!0}):f.jsx(gd,{})}const Bg="flex items-center justify-center rounded-xl bg-primary text-primary-foreground",Ju="bg-card border border-border rounded-lg flex items-center justify-center shadow-sm",Hg="flex items-center gap-3 p-3 bg-muted border border-border rounded-xl hover:border-primary/50 transition-colors group";function G2(){const a=qn(),{isLoggedIn:r}=Nn(),i=[{icon:Uv,title:"Your AI Secretary Never Stops",desc:"Runs 24/7, even when you're not talking to it"},{icon:Ov,title:"One Place for Your Whole Life",desc:"All your messages together in one place"},{icon:is,title:"One Secretary, Many Agents",desc:"Full power, full privacy"}];return f.jsxs("div",{className:"min-h-screen bg-background text-foreground font-sans flex items-center justify-center p-4 lg:p-8",children:[f.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[f.jsx("div",{className:"absolute top-0 left-1/4 w-[800px] h-[600px] bg-primary/5 rounded-full blur-[150px]"}),f.jsx("div",{className:"absolute bottom-0 right-1/4 w-[600px] h-[400px] bg-primary/5 rounded-full blur-[100px]"})]}),f.jsxs("div",{className:"w-full max-w-6xl grid lg:grid-cols-2 gap-8 lg:gap-16 items-center relative z-10",children:[f.jsx("div",{className:"hidden lg:block px-8",children:f.jsxs("div",{className:"max-w-md ml-auto",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[f.jsx("div",{className:`w-12 h-12 shadow-lg shadow-primary/20 ${Bg}`,children:f.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground rounded opacity-90"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-2xl font-bold leading-tight",children:"Xpod"}),f.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight",children:"Personal Messages Platform"})]})]}),f.jsxs("h1",{className:"text-2xl xl:text-3xl font-bold leading-tight mb-4",children:["Simplify Life with ",f.jsx("span",{className:"text-primary",children:"Your AI Secretary"})]}),f.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-10",children:"An AI that never stops, knows your whole life, works for you—while guarding your privacy."}),f.jsx("div",{className:"space-y-4",children:f.jsx("div",{className:"space-y-3",children:i.map(({icon:s,title:u,desc:d})=>f.jsxs("div",{className:"flex gap-3",children:[f.jsx("div",{className:`w-8 h-8 shrink-0 ${Ju}`,children:f.jsx(s,{className:"w-4 h-4 text-primary"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-xs font-medium text-foreground",children:u}),f.jsx("p",{className:"text-[10px] text-muted-foreground",children:d})]})]},u))})}),f.jsx("div",{className:"mt-12",children:f.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["Powered by ",f.jsx("a",{href:"https://solidproject.org",target:"_blank",rel:"noopener",className:"text-primary hover:text-primary/80",children:"Solid Protocol"})]})})]})}),f.jsx("div",{className:"w-full max-w-sm mx-auto lg:mx-0",children:f.jsxs("div",{className:"bg-card border border-border rounded-3xl p-6 lg:p-8 shadow-xl shadow-black/10",children:[f.jsxs("div",{className:"lg:hidden flex items-center gap-3 mb-8",children:[f.jsx("div",{className:`w-10 h-10 ${Bg}`,children:f.jsx("div",{className:"w-5 h-5 border-2 border-primary-foreground rounded opacity-90"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-xl font-bold leading-tight",children:"Xpod"}),f.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight",children:"Personal Messages Platform"})]})]}),f.jsxs("div",{className:"lg:hidden mb-8",children:[f.jsxs("h1",{className:"text-xl font-bold leading-tight mb-3",children:["Simplify Life with ",f.jsx("span",{className:"text-primary",children:"Your AI Secretary"})]}),f.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed mb-6",children:"An AI that never stops, knows your whole life, works for you—while guarding your privacy."}),f.jsx("div",{className:"space-y-2",children:i.map(({icon:s,title:u,desc:d})=>f.jsxs("div",{className:"flex gap-2",children:[f.jsx(s,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),f.jsxs("div",{children:[f.jsx("span",{className:"text-xs font-medium text-foreground",children:u}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[" - ",d]})]})]},u))})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("h2",{className:"text-xl font-bold",children:"About Xpod"}),f.jsx("p",{className:"text-muted-foreground text-xs mt-1",children:"Learn more about the platform and resources."})]}),f.jsxs("div",{className:"space-y-3 mb-6",children:[f.jsxs("a",{href:"https://solidproject.org",target:"_blank",rel:"noopener noreferrer",className:Hg,children:[f.jsx("div",{className:`w-8 h-8 ${Ju}`,children:f.jsx(gg,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium text-foreground",children:"Solid Project"}),f.jsx("div",{className:"text-xs text-muted-foreground",children:"Learn about the protocol"})]})]}),f.jsxs("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer",className:Hg,children:[f.jsx("div",{className:`w-8 h-8 ${Ju}`,children:f.jsx(gg,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium text-foreground",children:"GitHub"}),f.jsx("div",{className:"text-xs text-muted-foreground",children:"View source code"})]})]})]}),f.jsxs("div",{className:"pt-4 border-t border-border",children:[f.jsx("p",{className:"text-[10px] text-muted-foreground mb-4",children:"Version 0.1.0 · Built with Solid Protocol"}),f.jsxs("button",{onClick:()=>a(K(r?"/.account/account/":"/.account/login/password/")),className:"w-full py-3 border border-border hover:bg-muted text-foreground rounded-xl text-sm font-medium flex items-center justify-center gap-2 transition-colors",children:[f.jsx(HS,{className:"w-4 h-4"}),r?"Back to Dashboard":"Back to Login"]})]})]})})]})]})}function My(a){return a.replace(/\/+$/u,"")+"/"}function Ya(a){if(a)try{return new URL(a)}catch{return}}function vd(a,r){const i=Ya(a),s=Ya(r);if(!i||!s||i.origin!==s.origin)return!1;const u=$2(s.pathname);return i.pathname===u||i.pathname.startsWith(u)}function Ro(a,r){const i=Ya(a),s=Ya(r);return!i||!s?"custom":i.origin===s.origin?"cloud":"local"}function V2(a){const r=Od(a);return r?{root:r.storageRoot,lookupUrl:r.lookupUrl,serviceToken:r.serviceToken,mode:"local"}:void 0}function Q2(a,r){const i=V2(r);if(i)return i}async function I2(a,r,i){if(r.length===0)return[];if(!i.lookupUrl||!i.serviceToken)throw new Error("Local storage lookup context is incomplete");return(await Rv(a,r,{lookupUrl:i.lookupUrl,storageRoot:i.root,serviceToken:i.serviceToken})).map(u=>({webId:u.webId,storageUrl:My(u.storageUrl),storageMode:u.storageMode??Ro(u.webId,u.storageUrl)}))}function Z2(a,r,i){const s=r.filter(d=>vd(d,i.root));if(s.length===0)return[];const u=[];for(const d of a){const h=Ro(d,i.root);if(i.mode!=="local"&&h!==i.mode)continue;const v=h==="cloud"?s.filter(p=>K2(p,d)):s.filter(p=>P2(p,d));for(const p of v)u.push({webId:d,storageUrl:My(p),storageMode:Ro(d,p)})}return Ly(u)}function Ly(a){const r=new Set,i=[];for(const s of a){const u=`${s.webId}
|
|
13
|
+
${s.storageUrl}`;r.has(u)||(r.add(u),i.push(s))}return i}function $2(a){return!a||a==="/"?"/":a.endsWith("/")?a:`${a}/`}function K2(a,r){const i=Ya(a),s=Ya(r);if(!i||!s||i.origin!==s.origin)return!1;const[u]=i.pathname.split("/").filter(Boolean),[d]=s.pathname.split("/").filter(Boolean);return!!(u&&d&&u===d)}function P2(a,r){const i=Ya(a),s=Ya(r);if(!i||!s)return!1;const[u]=i.pathname.split("/").filter(Boolean),[d]=s.pathname.split("/").filter(Boolean);return!!(u&&d&&u===d)}function Dy(a){try{const i=new URL(a).pathname.split("/").filter(Boolean);return i[i.length-1]}catch{return}}function J2(a){const r=a?.pods;return!r||typeof r!="object"?[]:Object.entries(r).map(([i,s])=>({id:i,resourceUrl:s,name:Dy(i)}))}function qg(a){const r=new Set,i=[];for(const s of a)r.has(s.storageUrl)||(r.add(s.storageUrl),i.push({id:s.storageUrl,name:Dy(s.storageUrl),storageMode:s.storageMode??Ro(s.webId,s.storageUrl)}));return i}function W2(a){try{const r=new URL(a).pathname.split("/").filter(Boolean);return r[r.length-1]??a}catch{return a.split("/").filter(Boolean).pop()??a}}function F2(a,r){const i=a instanceof Error?a.message:"";return i==="fetch failed"||i.includes("Failed to fetch")||i.includes("Cloud storage is not ready")||i.includes("provision_refresh_failed")||i.includes("provision_refresh_unavailable")?kn.cloudRouteUnavailable:r}function or(a,r){const i=a instanceof Error?a.message:"";return i.startsWith("Pod name is already taken.")?i:r}async function eA(a,r){const i=await a.json().catch(()=>({}));return or(typeof i.message=="string"?new Error(i.message):void 0,r)}const tA="flex items-center justify-center rounded-lg bg-primary text-primary-foreground",lr="bg-card border border-border rounded-xl shadow-sm",Wu="w-4 h-4 text-muted-foreground shrink-0",Yg="block text-xs text-muted-foreground mb-1",Ji="bg-primary hover:bg-primary/90 text-primary-foreground transition-colors disabled:opacity-50",Xg="text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",Wi="text-sm font-semibold text-foreground flex items-center gap-2",Gg="bg-background border border-input rounded-lg text-sm text-foreground focus:border-primary focus:outline-none",Vg="text-xs font-mono text-primary hover:text-primary/80 truncate",Qg="p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted rounded transition-colors shrink-0",Ig="p-2 text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded-lg transition-colors";function nA(){const{controls:a,refetchControls:r,hasOidcPending:i,idpIndex:s}=Nn(),u=qn(),[d,h]=y.useState(!1),[v,p]=y.useState([]),[g,x]=y.useState([]),[w,S]=y.useState([]),[T,j]=y.useState(null),[N,_]=y.useState(!1),[Q,Z]=y.useState(""),[G,oe]=y.useState(""),[ne,se]=y.useState(null),[I,q]=y.useState(!1),[ee,te]=y.useState(null),ie=y.useRef(null),[me,De]=y.useState(),[ve,he]=y.useState(),[M,$]=y.useState(),[P,ye]=y.useState(),[X,A]=y.useState(),k=Ud(a?.password?.forgot)??K("/.account/login/password/forgot/");y.useEffect(()=>{let F=!0;return Promise.all([zt(a?.account?.webId,fetch,s),zt(a?.account?.pod,fetch,s),zt(a?.account?.bindings,fetch,s),zt(a?.account?.clientCredentials,fetch,s),zt(a?.account?.logout,fetch,s)]).then(([ge,Ne,$e,Oe,Ze])=>{F&&(De(ge),he(Ne),$($e),ye(Oe),A(Ze))}),()=>{F=!1}},[a,s]),y.useEffect(()=>{const F=ge=>{ie.current&&!ie.current.contains(ge.target)&&q(!1)};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]);const L=async(F,ge)=>{try{await navigator.clipboard.writeText(F),se(ge),setTimeout(()=>se(null),2e3)}catch{}},V=y.useCallback(async()=>{try{const F=Md(),ge=Q2(window.location.origin,F);let Ne=null,$e=[],Oe=[],Ze=[],mt=[];if(M){const Xe=await Zd({controls:{account:{bindings:M}},origin:window.location.origin,trustedAccountIndex:s});Oe=Xe.map(vt=>vt.webId),Ze=qg(Xe.map(vt=>({webId:vt.webId,storageUrl:vt.storageUrl,storageMode:Ro(vt.webId,vt.storageUrl)})))}if(me){const Xe=await fetch(K(me),{headers:st(),credentials:"include"});if(Xe.ok){const Ut=(await Xe.json()).webIdLinks||{};Oe=Array.from(new Set([...Oe,...Object.keys(Ut)]))}}if(ve){const Xe=await fetch(K(ve),{headers:st(),credentials:"include"});if(Xe.ok){const vt=await Xe.json(),Ut=new Set(Ze.map(bn=>bn.id));Ze=[...Ze,...J2(vt).filter(bn=>!Ut.has(bn.id))]}}if(ge)if(ge.serviceToken)try{mt=await I2(fetch,Oe,ge)}catch(Xe){mt=[],Ne=F2(Xe,kn.checkFailed)}else mt=Z2(Oe,Ze.map(Xe=>Xe.id),ge);mt=Ly(mt),$e=Oe;const hl=ge?.serviceToken?qg(mt):ge?Ze.filter(Xe=>vd(Xe.id,ge?.root)).map(Xe=>({...Xe,storageMode:mt.find(vt=>vd(Xe.id,vt.storageUrl))?.storageMode})):Ze;if(p($e),x(hl),P){const Xe=await fetch(K(P),{headers:st(),credentials:"include"});if(Xe.ok){const Ut=(await Xe.json()).clientCredentials||{},bn=new Set($e),Yn=await Promise.all(Object.entries(Ut).map(async([xn,yt])=>{const St=await zt(xn,fetch,s);return St?{id:W2(St),resourceUrl:St,webId:typeof yt=="string"?yt:void 0}:void 0}));S(Yn.filter(xn=>xn!==void 0).filter(xn=>xn.webId&&bn.has(xn.webId)))}else S([])}else S([]);te(Ne)}catch(F){console.error("Failed to fetch account data:",F),p([]),x([]),S([]),te(or(F,"无法加载账号信息,请重试。"))}},[M,P,ve,me,s]);y.useEffect(()=>{let F=!0;return Promise.resolve().then(()=>{F&&V()}),()=>{F=!1}},[V]);const J=async()=>{if(X){h(!0),te(null);try{(await fetch(K(X),{method:"POST",headers:st(),credentials:"include"})).ok?(Ld(),rs(),await r(),u(K("/.account/"))):te("退出登录失败,请重试。")}catch(F){te(or(F,"退出登录失败,请重试。"))}finally{h(!1)}}},W=async F=>{const ge=await zt(F.resourceUrl,fetch,s);if(ge&&confirm(`Delete pod ${F.id}? This cannot be undone.`)){h(!0),te(null);try{(await fetch(K(ge),{method:"DELETE",headers:st(),credentials:"include"})).ok?await V():te("无法删除存储空间,请重试。")}catch(Ne){te(or(Ne,"无法删除存储空间,请重试。"))}finally{h(!1)}}},ue=async F=>{if(F.preventDefault(),!(!P||!Q||!G.trim())){h(!0),te(null);try{const ge=await fetch(K(P),{method:"POST",headers:st({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",body:JSON.stringify({name:G.trim(),webId:Q})});if(ge.ok){const Ne=await ge.json();j({id:Ne.id,secret:Ne.secret}),_(!1),Z(""),oe(""),await V()}else te(await eA(ge,"无法创建客户端凭据,请重试。"))}catch(ge){te(or(ge,"无法创建客户端凭据,请重试。"))}finally{h(!1)}}},Be=()=>{if(v.length===0){te("请先创建存储空间,再创建客户端凭据。");return}Z(v[0]),oe(""),_(!0)},de=async F=>{const ge=await zt(F.resourceUrl,fetch,s);if(ge&&confirm("Delete this credential? This cannot be undone.")){h(!0),te(null);try{(await fetch(K(ge),{method:"DELETE",headers:st(),credentials:"include"})).ok?await V():te("无法撤销客户端凭据,请重试。")}catch(Ne){te(or(Ne,"无法撤销客户端凭据,请重试。"))}finally{h(!1)}}};return f.jsxs("div",{className:"min-h-screen bg-background text-foreground font-sans",children:[f.jsx("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:f.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-primary/5 rounded-full blur-[120px]"})}),f.jsx("header",{className:"relative z-10 border-b border-border bg-background/80 backdrop-blur",children:f.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-4 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:`w-8 h-8 ${tA}`,children:f.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground rounded opacity-80"})}),f.jsxs("div",{children:[f.jsx("div",{className:"font-semibold leading-tight",children:"Xpod"}),f.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight",children:"Personal Messages Platform"})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs(ls,{to:K("/.account/about/"),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs ${Xg}`,children:[f.jsx(l1,{className:"w-3.5 h-3.5"}),"About"]}),f.jsxs("button",{onClick:J,disabled:d,className:`flex items-center gap-2 px-3 py-1.5 text-xs ${Xg}`,children:[f.jsx(c1,{className:"w-3.5 h-3.5"}),"Sign out"]})]})]})}),f.jsxs("main",{className:"relative z-10 max-w-2xl mx-auto px-4 py-8 space-y-8",children:[ee?f.jsxs("div",{role:"alert",className:"flex items-start gap-3 rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-destructive",children:[f.jsx(ys,{className:"mt-0.5 h-4 w-4 shrink-0"}),f.jsx("p",{className:"min-w-0 flex-1 text-sm leading-5",children:ee}),f.jsx("button",{type:"button",onClick:()=>te(null),className:"rounded p-1 text-destructive/70 transition-colors hover:bg-destructive/10 hover:text-destructive","aria-label":"关闭错误提示",children:f.jsx(g1,{className:"h-4 w-4"})})]}):null,i&&f.jsx("div",{className:"p-4 bg-primary/10 border border-primary/30 rounded-xl",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"p-2 bg-primary/20 rounded-lg",children:f.jsx(is,{className:"w-5 h-5 text-primary"})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-medium text-foreground",children:"Authorization Pending"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"An application is waiting for your authorization"})]})]}),f.jsxs(ls,{to:K("/.account/oidc/consent/"),className:`flex items-center gap-2 px-4 py-2 ${Ji} text-sm font-medium rounded-lg`,children:["Continue",f.jsx(YS,{className:"w-4 h-4"})]})]})}),f.jsx("h1",{className:"text-2xl font-bold",children:"Account Dashboard"}),f.jsxs("section",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-1",children:[f.jsxs("h2",{className:Wi,children:[f.jsx(n1,{className:"w-4 h-4 text-primary"}),"Storage"]}),ve&&f.jsxs("button",{type:"button",onClick:()=>{window.location.href="/settings/pod"},className:`flex items-center gap-1.5 px-3 py-1.5 ${Ji} text-xs rounded-lg`,children:[f.jsx(vg,{className:"w-3.5 h-3.5"}),"Manage Pods"]})]}),f.jsx("p",{className:"text-[11px] text-muted-foreground mb-3",children:"Your personal data stores (Pods). You own and control all data stored here."}),f.jsx("div",{className:lr,children:g.length===0?f.jsx("div",{className:"p-4",children:f.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:v.length>0?"This device has no Pod yet. Create one to store data here.":"No Pods found. Create one to get started."})}):f.jsx("ul",{className:"divide-y divide-border",children:g.map(F=>f.jsxs("li",{className:"p-3 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[f.jsx(JS,{className:Wu}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("a",{href:F.id,target:"_blank",rel:"noopener",className:`${Vg} block`,children:F.id}),F.name&&f.jsxs("p",{className:"text-[11px] text-muted-foreground truncate",children:["Pod: ",F.name]})]})]}),F.resourceUrl?f.jsx("button",{onClick:()=>W(F),className:Ig,title:"Delete Pod",children:f.jsx(yg,{className:"w-4 h-4"})}):null]},F.id))})})]}),f.jsxs("section",{children:[f.jsx("div",{className:"flex items-center mb-1",children:f.jsxs("h2",{className:Wi,children:[f.jsx(h1,{className:"w-4 h-4 text-primary"}),"Identity"]})}),f.jsx("p",{className:"text-[11px] text-muted-foreground mb-3",children:"Your unique decentralized identifiers (WebIDs). This is your identity on the Solid network."}),f.jsx("div",{className:lr,children:v.length===0?f.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"No WebIDs found. Create a Pod first to get a WebID."}):f.jsx("ul",{className:"divide-y divide-border",children:v.map(F=>f.jsxs("li",{className:"p-3 flex items-center gap-3",children:[f.jsx(e1,{className:Wu}),f.jsx("a",{href:F,target:"_blank",rel:"noopener",className:Vg,children:F})]},F))})})]}),f.jsxs("section",{children:[f.jsxs("div",{className:"flex justify-between items-center mb-1",children:[f.jsxs("h2",{className:Wi,children:[f.jsx($u,{className:"w-4 h-4 text-primary"}),"Solid Client Credentials"]}),P&&f.jsxs("button",{onClick:Be,disabled:d,className:`flex items-center gap-1.5 px-3 py-1.5 ${Ji} text-xs rounded-lg`,children:[f.jsx(vg,{className:"w-3.5 h-3.5"}),"New Credential"]})]}),f.jsx("p",{className:"text-[11px] text-muted-foreground mb-3",children:"Solid credentials for clients that need direct Pod access. Xpod API Keys are managed in AI Connections."}),P?f.jsxs(f.Fragment,{children:[N&&f.jsxs("form",{onSubmit:ue,className:`mb-4 p-4 ${lr} space-y-3`,children:[f.jsxs("div",{children:[f.jsx("label",{className:Yg,children:"Credential Name"}),f.jsx("input",{type:"text",value:G,onChange:F=>oe(F.target.value),placeholder:"my-solid-client",className:`w-full px-3 py-2 ${Gg}`,required:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:Yg,children:"WebID"}),f.jsxs("div",{className:"relative",ref:ie,children:[f.jsxs("button",{type:"button",onClick:()=>q(!I),className:`w-full px-3 py-2 ${Gg} text-left flex items-center justify-between`,children:[f.jsx("span",{className:"truncate text-foreground",children:Q||"Select WebID"}),f.jsx(VS,{className:`w-4 h-4 text-muted-foreground transition-transform ${I?"rotate-180":""}`})]}),I&&f.jsx("div",{className:"absolute z-10 mt-1 w-full bg-popover text-popover-foreground border border-border rounded-lg shadow-lg max-h-48 overflow-auto",children:v.map(F=>f.jsx("button",{type:"button",onClick:()=>{Z(F),q(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-muted truncate ${Q===F?"bg-primary/10 text-primary":"text-foreground"}`,children:F},F))}),f.jsx("input",{type:"hidden",name:"webId",value:Q,required:!0})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end",children:[f.jsx("button",{type:"button",onClick:()=>_(!1),className:"px-3 py-2 text-muted-foreground hover:text-foreground text-xs",children:"Cancel"}),f.jsx("button",{type:"submit",disabled:d,className:`px-4 py-2 ${Ji} text-xs rounded-lg`,children:d?"Creating...":"Create"})]})]}),T&&f.jsx("div",{className:"mb-4 p-4 bg-emerald-500/10 border border-emerald-500/30 rounded-xl",children:f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:"p-2 bg-emerald-500/15 rounded-lg",children:f.jsx($u,{className:"w-4 h-4 text-emerald-600 dark:text-emerald-300"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm font-medium text-emerald-700 dark:text-emerald-300 mb-1",children:"New Solid Client Credential Created"}),f.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Copy the Client ID and Client Secret now. The secret will not be shown again."}),f.jsxs("div",{className:"space-y-3 text-xs font-mono bg-card p-3 rounded-lg border border-border",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"Client ID"}),f.jsx("p",{className:"text-foreground truncate",children:T.id})]}),f.jsx("button",{onClick:()=>L(T.id,"id"),className:Qg,title:"Copy Client ID",children:ne==="id"?f.jsx(hg,{className:"w-3.5 h-3.5 text-emerald-500"}):f.jsx(pg,{className:"w-3.5 h-3.5"})})]}),f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"Client Secret"}),f.jsx("p",{className:"text-foreground break-all",children:T.secret})]}),f.jsx("button",{onClick:()=>L(T.secret,"secret"),className:Qg,title:"Copy Client Secret",children:ne==="secret"?f.jsx(hg,{className:"w-3.5 h-3.5 text-emerald-500"}):f.jsx(pg,{className:"w-3.5 h-3.5"})})]})]}),f.jsx("button",{onClick:()=>j(null),className:"mt-2 text-xs text-muted-foreground hover:text-foreground font-medium",children:"Done"})]})]})}),f.jsx("div",{className:lr,children:w.length===0?f.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"No client credentials found."}):f.jsx("ul",{className:"divide-y divide-border",children:w.map(F=>f.jsxs("li",{className:"p-3 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[f.jsx($u,{className:Wu}),f.jsx("span",{className:"text-xs font-mono text-foreground truncate",children:F.id})]}),f.jsx("button",{onClick:()=>de(F),className:Ig,title:"Revoke Credential",children:f.jsx(yg,{className:"w-4 h-4"})})]},F.id))})})]}):f.jsx("div",{className:`${lr} p-4`,children:f.jsx("p",{className:"text-xs text-muted-foreground",children:"Client credential endpoint not configured."})})]}),f.jsxs("section",{children:[f.jsxs("h2",{className:`${Wi} mb-3`,children:[f.jsx(is,{className:"w-4 h-4 text-primary"}),"Security"]}),f.jsxs("div",{className:`${lr} p-4 flex items-center justify-between`,children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-xs font-medium mb-1",children:"Password"}),f.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Update your account password"})]}),f.jsx("a",{href:k,className:"px-3 py-1.5 bg-secondary hover:bg-secondary/80 text-secondary-foreground text-xs rounded-lg transition-colors",children:"Change Password"})]})]})]})]})}function yd({label:a="正在恢复登录状态…",accountName:r}){return f.jsxs("div",{role:"status","aria-live":"polite",className:"flex min-h-44 flex-col items-center justify-center gap-3 px-5 py-8 text-center",children:[f.jsx(fr,{"aria-hidden":"true",className:"h-6 w-6 animate-spin text-primary"}),r?f.jsx("p",{className:"text-sm font-medium text-foreground",children:r}):null,f.jsx("p",{className:"text-sm text-muted-foreground",children:a})]})}function ir({title:a="操作未完成",description:r,primaryLabel:i="重试",onPrimary:s,secondaryLabel:u="返回",onSecondary:d,pending:h=!1}){return f.jsxs("div",{className:"flex min-h-44 flex-col items-center justify-center gap-4 px-5 py-8 text-center",children:[f.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-destructive/10",children:f.jsx(ys,{"aria-hidden":"true",className:"h-5 w-5 text-destructive"})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-base font-semibold text-foreground",children:a}),r?f.jsx("p",{role:"alert",className:"text-sm leading-6 text-muted-foreground",children:r}):null]}),f.jsxs("div",{className:"flex w-full flex-col gap-2 sm:max-w-xs",children:[f.jsx("button",{type:"button",disabled:h,onClick:s,className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:i}),d?f.jsx("button",{type:"button",disabled:h,onClick:d,className:"h-9 rounded-lg border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus:outline-none focus-visible:border-ring",children:u}):null]})]})}function aA({error:a,onDismiss:r,dismissLabel:i="关闭"}){return a?f.jsxs("div",{role:"alert","aria-live":"polite",className:"flex items-start gap-2 rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[f.jsx(ys,{"aria-hidden":"true",className:"mt-0.5 h-4 w-4 shrink-0"}),f.jsx("p",{className:"min-w-0 flex-1 leading-6",children:a}),r?f.jsx("button",{type:"button","aria-label":i,onClick:r,className:"rounded-md px-1 text-lg leading-none text-destructive/70 transition-colors hover:text-destructive focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring",children:"×"}):null]}):null}function Zg({id:a,label:r,value:i,options:s,disabled:u,onChange:d}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{htmlFor:a,className:"text-sm font-medium text-foreground",children:r}),f.jsxs("select",{id:a,value:i,disabled:u||!d,onChange:h=>d?.(h.currentTarget.value),className:"h-10 w-full rounded-xl border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50",children:[i?null:f.jsx("option",{value:"",disabled:!0,children:r}),s.map(h=>f.jsx("option",{value:h.id,children:h.label},h.id))]})]})}function $g({label:a,option:r}){return r?f.jsxs("div",{className:"rounded-xl border border-border/60 bg-muted/30 px-3 py-2",children:[f.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:a}),f.jsx("p",{className:"mt-1 break-all text-sm font-medium text-foreground",children:r.webId??r.label}),r.description?f.jsx("p",{className:"mt-1 break-words text-sm text-muted-foreground",children:r.description}):null,r.storageUrl?f.jsx("p",{className:"mt-1 break-all text-xs text-muted-foreground",children:r.storageUrl}):null]}):null}function lA({client:a,webIds:r,storageOptions:i,selectedWebIdId:s,selectedStorageId:u,rememberClient:d,onWebIdChange:h,onStorageChange:v,onRememberClientChange:p,onApprove:g,onDeny:x,onEditAccount:w,onSwitchAccount:S,pending:T=!1,showIdentitySelection:j=!0,copy:N}){const _="oidc-consent-webid",Q="oidc-consent-storage",Z=y.useId(),G=s??"",oe=u??"",ne=i??[],se=r.find(ie=>ie.id===G),I=ne.find(ie=>ie.id===oe),q=ne.length>0,ee=T||!se||q&&!I,te=()=>{g({webIdId:G,storageId:oe||void 0,rememberClient:d})};return f.jsxs("div",{className:"space-y-4 text-card-foreground",children:[f.jsx("div",{className:"space-y-2",children:f.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:N.description})}),f.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 px-3 py-2",children:[f.jsx("p",{className:"text-sm font-medium text-foreground",children:a.name}),a.description?f.jsx("p",{className:"mt-1 break-words text-xs text-muted-foreground",children:a.description}):null]}),j&&r.length>1?f.jsx(Zg,{id:_,label:N.webIdLabel,value:G,options:r,disabled:T,onChange:h}):f.jsx($g,{label:N.webIdLabel,option:se??r[0]}),j&&q?ne.length>1?f.jsx(Zg,{id:Q,label:N.storageLabel,value:oe,options:ne,disabled:T,onChange:v}):f.jsx($g,{label:N.storageLabel,option:I??ne[0]}):null,f.jsxs("label",{htmlFor:Z,className:"inline-flex min-h-6 cursor-pointer items-center gap-2 text-sm text-muted-foreground",children:[f.jsx("input",{id:Z,type:"checkbox",checked:d,disabled:T||!p,onChange:ie=>p?.(ie.currentTarget.checked),className:"m-0 h-4 w-4 shrink-0 accent-primary disabled:cursor-not-allowed disabled:opacity-50"}),f.jsx("span",{children:N.rememberClientLabel})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.jsx("button",{type:"button",disabled:ee,onClick:te,className:"h-10 rounded-xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus:outline-none focus-visible:bg-primary/80 disabled:cursor-not-allowed disabled:opacity-50",children:N.approveLabel}),f.jsx("button",{type:"button",disabled:T,onClick:()=>{x()},className:"h-10 rounded-xl border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50",children:N.denyLabel}),w&&N.editAccountLabel?f.jsx("button",{type:"button",disabled:T,onClick:()=>{w()},className:"h-9 rounded-lg px-4 text-sm text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground focus:outline-none focus-visible:bg-muted/40 disabled:cursor-not-allowed disabled:opacity-50",children:N.editAccountLabel}):null,S&&N.switchAccountLabel?f.jsx("button",{type:"button",disabled:T,onClick:()=>{S()},className:"h-9 rounded-lg px-4 text-sm text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground focus:outline-none focus-visible:bg-muted/40 disabled:cursor-not-allowed disabled:opacity-50",children:N.switchAccountLabel}):null]})]})}async function rA(a){const r=Math.max(1,a.maxAttempts??20);for(let i=0;i<r;i+=1){const s=(await Zd(a)).filter(u=>os(u.storageUrl,a.storageRoot));if(s.length>0)return s;i+1<r&&await new Promise(u=>setTimeout(u,Math.max(0,a.pollIntervalMs??500)))}throw new Error("Current Local storage binding is not committed yet")}const oA="已有 Pod 的身份绑定尚未确认。请重试读取绑定或返回账号,不需要重新创建 Pod。",iA="暂时无法确认已有 Pod,请重试读取或返回账号。";class ky extends Error{code;constructor(r){super(r==="binding-missing"?oA:r==="inventory-unavailable"?iA:"账号已切换,请返回当前账号重新操作。"),this.name="FirstPodReadinessError",this.code=r}}function ds(a,r=[]){if(!Array.isArray(a))return[];const i=[];for(const s of a){if(!br(s)||typeof s.webId!="string"||typeof s.storageUrl!="string")continue;const u=mA(s.webId,s.storageUrl,typeof s.label=="string"?s.label:void 0);if(!u)continue;const d=`${u.webId}
|
|
14
|
+
${u.storageUrl}`,h=i.find(v=>`${v.webId}
|
|
15
|
+
${v.storageUrl}`===d);h?h.label!==void 0&&u.label!==void 0&&h.label!==u.label&&i.push(u):i.push(u)}return i}function sA(a,r,i){return a.length>0?a:i?[]:r?[r]:[]}function cA(a,r){return a?.oidc?.cancel||`${r}oidc/cancel`}async function uA(a){const r=a.fetchImpl??fetch,i=a.timeoutMs??15e3,s=i>0?new AbortController:null;let u;s&&(u=setTimeout(()=>s.abort(),i));try{const d=await r(a.cancelUrl,{method:"POST",headers:a.headers,credentials:"include",body:JSON.stringify({}),signal:s?.signal});return await dA(d)}catch(d){throw fA(d,"AbortError")?new Error("Authorization cancellation timed out. Please close this tab and retry login."):d}finally{u&&clearTimeout(u)}}async function dA(a){const r=await a.json().catch(()=>null);if(!a.ok)throw sr(r,pd(r)||`Authorization cancellation failed (${a.status}).`);const i=br(r)&&typeof r.location=="string"?r.location.trim():"",s=a.headers.get("Location")?.trim()||"",u=i||s;if(!u)throw new Error("Authorization cancellation did not return a redirect URL.");return u}function sr(a,r){return br(a)&&(a.errorCode==="E0002"||a.message==="Invalid OIDC interaction"||a.message==="This action can only be performed as part of an OIDC authentication flow.")?new Error(we.expiredInteraction):new Error(r)}function fA(a,r){return br(a)&&a.name===r}function mA(a,r,i){if(!Es(a))try{const s=new URL(a),u=new URL(r.trim());return!["http:","https:"].includes(s.protocol)||!["http:","https:"].includes(u.protocol)||s.username||s.password||u.username||u.password||u.search||u.hash?void 0:(u.pathname=u.pathname.endsWith("/")?u.pathname:`${u.pathname}/`,{webId:a,storageUrl:u.href,...i?{label:i}:{}})}catch{return}}function hA(a,r){if(a instanceof ky)return a.message;const i=a instanceof Error?a.message:"";return i==="fetch failed"||i.includes("Failed to fetch")||i.includes("Cloud storage is not ready")||i.includes("provision_refresh_failed")||i.includes("provision_refresh_unavailable")||i===kn.cloudRouteUnavailable?kn.cloudRouteUnavailable:i.startsWith("Pod name is already taken.")||i===Dn.choosePodName||i===Dn.podNameTaken?i:r}function pA({onReady:a}={}){const{bindAccountCapability:r,controls:i,hasOidcPending:s,idpIndex:u,identity:d,refetchControls:h}=Nn(),v=qn(),[p,g]=y.useState({status:"checking"}),[x,w]=y.useState(0),S=!a&&s?new URL("oidc/pick-webid/",u).href:void 0;return y.useEffect(()=>{let T=!1;return(async()=>{try{const j=S?await gA(S):void 0;if(T)return;if(j?.bindings.length){v(K("/.account/oidc/consent/"),{replace:!0});return}const N=await SS();if(T)return;const _=j?{allWebIds:j.webIds,currentStorageWebIds:[],currentBindings:[],durable:!1}:await vA({accountBindingsUrl:i?.account?.bindings,accountWebIdUrl:i?.account?.webId,idpIndex:u,provisionCode:N.activeProvisionCode,provisionStorageRoot:N.storageRoot});if(T)return;if(!j&&_.currentStorageWebIds.length>0&&(!a||_.durable)){if(a){if(!N.storageRoot)throw new Error(kn.cloudRouteUnavailable);await rA({controls:{account:{bindings:i?.account?.bindings}},trustedAccountIndex:u,storageRoot:N.storageRoot}),T||a()}else v(K("/.account/account/"),{replace:!0});return}if(a){a();return}v(K("/.account/account/"),{replace:!0})}catch(j){if(!T){const N=hA(j,kn.checkFailed);g({status:"error",message:N})}}})(),()=>{T=!0}},[r,i?.account?.bindings,i?.account?.pod,i?.account?.username,i?.account?.webId,s,d?.displayName,d?.username,d?.webId,u,v,a,S,h,x]),f.jsx(yr,{title:ar.surfaceTitle,children:f.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:p.status==="checking"?f.jsx(yd,{label:ar.restoring}):p.status==="creating"||p.status==="waiting"?f.jsx(yd,{label:p.status==="creating"?ar.creating:ar.waitingMessage}):p.status==="error"?f.jsx(ir,{title:ar.unavailableTitle,description:p.message,secondaryLabel:"返回账号",onSecondary:()=>window.location.assign(K("/.account/account/")),primaryLabel:ar.retryLabel,onPrimary:()=>{g({status:"checking"}),w(T=>T+1)}}):null})})}async function gA(a){const r=await fetch(K(a),{headers:st(),credentials:"include"});if(!r.ok)throw new Error(we.bindingsFailed);const i=await r.json().catch(()=>{});if(!i||!Array.isArray(i.entries))throw new Error(we.bindingsFailed);if(i.entries.length>0){for(const u of i.entries)if(ds([u]).length!==1)throw new Error(we.bindingsFailed)}const s=Array.isArray(i.webIds)?i.webIds.filter(u=>typeof u=="string"&&u.length>0):[];return{bindings:ds(i.entries,s),webIds:s}}async function vA(a){let r;a.accountBindingsUrl&&(r=await Zd({controls:{account:{bindings:a.accountBindingsUrl}},origin:window.location.origin,trustedAccountIndex:a.idpIndex}));const i=a.provisionStorageRoot&&r&&r.length>0?r.filter(p=>os(p.storageUrl,a.provisionStorageRoot)).map(p=>p.webId):[];if(i.length>0)return{allWebIds:Array.from(new Set(r.map(p=>p.webId))),currentStorageWebIds:Array.from(new Set(i)),currentBindings:r.filter(p=>os(p.storageUrl,a.provisionStorageRoot)),durable:!0};const s=r&&r.length>0?[]:await yA(a.accountWebIdUrl,a.idpIndex),u=Array.from(new Set([...r?.map(p=>p.webId)??[],...s]));if(a.provisionStorageRoot&&!a.provisionCode)return{allWebIds:u,currentStorageWebIds:[],currentBindings:[],durable:!1};if(!Od(a.provisionCode))return{allWebIds:u,currentStorageWebIds:u,currentBindings:r??[],durable:!!r?.length};const h=await dS(fetch,u,a.provisionCode),v=Array.from(new Set((h??[]).map(p=>p.webId)));return{allWebIds:u,currentStorageWebIds:v,currentBindings:h??[],durable:!1}}async function yA(a,r){const i=await zt(a,fetch,r);if(!i)throw new Error(kn.checkFailed);const s=await fetch(K(i),{headers:st({Accept:"application/json"}),credentials:"include"}).catch(()=>{});if(!s?.ok)throw new Error(kn.checkFailed);const u=await s.json().catch(()=>{});if(!u?.webIdLinks||typeof u.webIdLinks!="object"||Array.isArray(u.webIdLinks))throw new Error(kn.checkFailed);return Object.keys(u.webIdLinks).filter(d=>{try{const h=new URL(d);return["http:","https:"].includes(h.protocol)&&!h.username&&!h.password}catch{return!1}})}const By=1,bA="xpod.auth.transaction.v1",xA=600*1e3;class tt extends Error{code;constructor(r,i){super(i),this.name="XpodLoginTransactionError",this.code=r}}function wA(){const a=globalThis.crypto;if(typeof a?.randomUUID=="function")return a.randomUUID();if(typeof a?.getRandomValues=="function"){const r=new Uint8Array(24);return a.getRandomValues(r),`xpod-${Array.from(r,i=>i.toString(16).padStart(2,"0")).join("")}`}throw new tt("storage_unavailable","Secure transaction id generation is unavailable")}function SA(a={}){const r=a.storage??AA(),i=new URL(a.origin??CA()).origin,s=a.now??(()=>Date.now()),u=a.ttlMs??xA,d=a.prefix??bA,h=`${d}.active`,v=S=>`${d}.record.${S}`,p=S=>`${d}.consumed.${S}`,g=S=>{r.getItem(h)===S&&r.removeItem(h),r.removeItem(v(S))},x=(S,T=!0)=>{if(!Pg(S))throw new tt("malformed","Transaction id is malformed");if(r.getItem(p(S))==="1")throw new tt("consumed","Transaction has already been consumed");if(T&&r.getItem(h)!==S)throw new tt("unknown","Transaction is not the active Xpod login transaction");const j=r.getItem(v(S));if(!j)throw T&&r.getItem(h)===S&&r.removeItem(h),new tt("unknown","Xpod login transaction was not found");let N;try{N=JSON.parse(j)}catch{throw g(S),new tt("malformed","Xpod login transaction is malformed")}if(!EA(N)||N.transaction.id!==S)throw g(S),new tt("malformed","Xpod login transaction is malformed");if(N.expiresAt<=s())throw g(S),new tt("expired","Xpod login transaction has expired");try{const _=Kg({...N.transaction,authorizationSurface:"redirect",discovery:"strict"},i);return N.transaction={id:_.id,route:_.route,..._.returnTo===void 0?{}:{returnTo:_.returnTo},..._.prompt===void 0?{}:{prompt:_.prompt},..._.selectedStorage===void 0?{}:{selectedStorage:_.selectedStorage}},N}catch(_){throw g(S),_ instanceof tt?_:new tt("malformed","Xpod login transaction is malformed")}};return{begin:S=>{const T=r.getItem(h);if(T){try{x(T)}catch(G){if(!(G instanceof tt&&(G.code==="expired"||G.code==="malformed"||G.code==="unknown")))throw G}if(r.getItem(h)===T)throw new tt("already_active","An Xpod login transaction is already pending in this tab")}const j=Pg(S.id)?S.id:wA(),N=Kg({...S,id:j},i),_=s(),Q=_+u,Z={version:By,createdAt:_,expiresAt:Q,transaction:{id:N.id,route:N.route,...N.returnTo===void 0?{}:{returnTo:N.returnTo},...N.prompt===void 0?{}:{prompt:N.prompt},...N.selectedStorage===void 0?{}:{selectedStorage:N.selectedStorage}}};return r.setItem(v(N.id),JSON.stringify(Z)),r.setItem(h,N.id),N},readSinglePending(){const S=r.getItem(h);if(S)return Fu(x(S).transaction)},updateSelectedStorage(S,T){const j=x(S),N=Fu(j.transaction),_=Hy(T,i,N.route.storageProvider?.url),Q={...j,transaction:{...j.transaction,selectedStorage:_}};r.setItem(v(S),JSON.stringify(Q))},consume(S){const T=x(S),j=Fu(T.transaction);return r.removeItem(h),r.removeItem(v(S)),r.setItem(p(S),"1"),j},cancel(S){x(S),r.removeItem(h),r.removeItem(v(S)),r.setItem(p(S),"1")}}}function Kg(a,r){let i;try{i=oS(a)}catch(d){throw new tt("malformed",d instanceof Error?d.message:"Transaction is malformed")}let s;try{s=k2(i.route,r)}catch(d){throw new tt("cross_origin",d instanceof Error?d.message:"Transaction route is not local")}let u;try{u=D2(i.returnTo)}catch(d){throw new tt("mismatch",d instanceof Error?d.message:"Transaction return path is unsafe")}if(i.selectedStorage!==void 0)try{const d=Hy(i.selectedStorage,r,s.storageProvider?.url);return{id:i.id,route:s,selectedStorage:d,authorizationSurface:"redirect",discovery:"strict",...u===void 0?{}:{returnTo:u},...i.prompt===void 0?{}:{prompt:i.prompt}}}catch(d){throw d instanceof tt?d:new tt("mismatch","Selected storage binding is invalid")}return{id:i.id,route:s,authorizationSurface:"redirect",discovery:"strict",...u===void 0?{}:{returnTo:u},...i.prompt===void 0?{}:{prompt:i.prompt}}}function Hy(a,r,i){if(!a||typeof a.storageUrl!="string"||typeof a.webId!="string"||Es(a.webId))throw new tt("malformed","Selected storage binding is malformed");let s,u;try{s=new URL(a.storageUrl),u=new URL(a.webId)}catch{throw new tt("malformed","Selected storage binding is malformed")}if(!["http:","https:"].includes(s.protocol)||!["http:","https:"].includes(u.protocol))throw new tt("cross_origin","Selected storage binding must use web URLs");if(s.origin!==r||u.origin!==r||i&&s.origin!==new URL(i).origin)throw new tt("cross_origin","Selected storage binding is not local to this Xpod");if(s.username||s.password||s.hash||u.username||u.password)throw new tt("malformed","Selected storage binding contains unsafe URL data");return{storageUrl:s.href,webId:a.webId,...a.label===void 0?{}:{label:a.label}}}function Fu(a){return{id:a.id,route:a.route,authorizationSurface:"redirect",discovery:"strict",...a.returnTo===void 0?{}:{returnTo:a.returnTo},...a.prompt===void 0?{}:{prompt:a.prompt},...a.selectedStorage===void 0?{}:{selectedStorage:a.selectedStorage}}}function Pg(a){return typeof a=="string"&&/^[A-Za-z0-9_-]{16,128}$/.test(a)}function EA(a){if(!a||typeof a!="object")return!1;const r=a;return r.version===By&&typeof r.createdAt=="number"&&typeof r.expiresAt=="number"&&!!(r.transaction&&typeof r.transaction=="object")}function AA(){try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage}catch{}throw new tt("storage_unavailable","Session storage is unavailable")}function CA(){return typeof window<"u"&&window.location.origin!=="null"?window.location.origin:"http://localhost"}function TA(a){if(a.error!==void 0)return{status:"error",message:"Unable to enumerate Account storage bindings."};if(a.bindings===void 0)return{status:"loading"};if(!Array.isArray(a.bindings))return{status:"error",message:"Account storage bindings are malformed."};const r=[],i=new Map;for(const s of a.bindings){const u=bd(s);if(!u)return{status:"error",message:"Account storage bindings are malformed."};const d=en(u),h=i.get(d);if(h){if(!RA(h,u))return{status:"conflict",message:`Storage binding ${u.storageUrl} is duplicated with incompatible metadata`};if(h.label===void 0&&u.label!==void 0){const v=r.indexOf(h),p={...h,label:u.label};i.set(d,p),r[v]=p}continue}i.set(d,u),r.push(u)}if(a.remembered){const s=bd(a.remembered);if(s){const u=r.find(d=>en(d)===en(s));if(u)return{status:"ready",selected:{...u}}}}return r.length===0?{status:"empty"}:r.length===1?{status:"ready",selected:{...r[0]}}:{status:"selecting",candidates:r.map(s=>({...s}))}}function en(a){const r=bd(a);if(!r)throw new TypeError("Storage binding is malformed");return`${r.webId}|${r.storageUrl}`}function bd(a){if(!(!a||typeof a.webId!="string"||typeof a.storageUrl!="string"||Es(a.webId)))try{const r=new URL(a.webId),i=new URL(a.storageUrl.trim());return!["http:","https:"].includes(r.protocol)||!["http:","https:"].includes(i.protocol)||r.username||r.password||i.username||i.password||i.hash||i.search?void 0:(i.pathname=i.pathname.endsWith("/")?i.pathname:`${i.pathname}/`,{webId:a.webId,storageUrl:i.href,...typeof a.label=="string"?{label:a.label}:{}})}catch{return}}function RA(a,r){return a.label===void 0||r.label===void 0||a.label===r.label}function xo(a,r){if(a instanceof ky)return a.message;const i=a instanceof Error?a.message:"";return i==="Invalid OIDC interaction"||i==="This action can only be performed as part of an OIDC authentication flow."||i===we.expiredInteraction?we.expiredInteraction:i==="fetch failed"||i.includes("Failed to fetch")||i.includes("Cloud storage is not ready")||i.includes("provision_refresh_failed")||i.includes("provision_refresh_unavailable")?kn.cloudRouteUnavailable:i===we.chooseStorage||i===we.cannotPersistStorage||i===we.missingRedirect||i===we.webIdSelectionFailed||i===we.authorizationFailed||i===we.bindingsFailed||i===Dn.podNameTaken||i.startsWith("Pod name is already taken.")?i:r}function NA(a){if(!Array.isArray(a.entries))throw new Error(we.bindingsFailed);const r=Array.isArray(a.webIds)?a.webIds.filter(i=>typeof i=="string"&&i.length>0):[];for(const i of a.entries)if(ds([i]).length!==1)throw new Error(we.bindingsFailed);return{exactBindings:ds(a.entries,r),rawIds:r,hasExplicitEmptyEntries:a.entries.length===0}}function jA(){const{idpIndex:a,isLoggedIn:r,isAnonymous:i,controls:s,logout:u,refetchControls:d}=Nn(),h=qn(),[v,p]=y.useState(!0),[g,x]=y.useState(null),[w,S]=y.useState(null),[T,j]=y.useState([]),[N,_]=y.useState([]),[Q,Z]=y.useState(""),[G,oe]=y.useState({status:"loading"}),[ne,se]=y.useState(),[I,q]=y.useState(""),[ee,te]=y.useState(null),[ie,me]=y.useState("load"),[De,ve]=y.useState(!0),[he,M]=y.useState(()=>Md()),[$,P]=y.useState(!1),[ye,X]=y.useState(!1),[A,k]=y.useState(!1),[L,V]=y.useState(!1),J=y.useRef(void 0),W=y.useRef(!1),ue=y.useRef(void 0),[Be,de]=y.useState(),[F,ge]=y.useState("idle"),Ne=y.useMemo(()=>{try{return SA({origin:window.location.origin,storage:window.sessionStorage})}catch{return}},[]),$e=`${a}oidc/consent/`,Oe=`${a}oidc/pick-webid/`,Ze=cA(s,a),mt=y.useCallback(async Se=>{let Ue;try{Ue=Ne?.readSinglePending()}catch(bt){se(void 0),oe({status:"error",message:xo(bt,we.invalidTransaction)})}se(Ue),(!ue.current||ue.current.transactionId!==Ue?.id)&&(ue.current={transactionId:Ue?.id,binding:Ue?.selectedStorage},de(Ue?.selectedStorage));const rt=await fetch(K($e),{headers:st(),credentials:"include"});if(rt.status===401||rt.status===403)return await d().catch(()=>{}),te(we.signInRequired),[];if(!rt.ok)throw sr(await rt.json().catch(()=>({})),we.loadFailed);const Fe=await rt.json().catch(()=>({}));if(!Fe.client||typeof Fe.client!="object"||typeof Fe.client.client_name!="string"&&typeof Fe.client.client_id!="string")throw new Error(we.clientUnavailable);x(Fe.client),S(Fe.webId||null);const Qt=await fetch(K(Oe),{headers:st(),credentials:"include"});if(!Qt.ok){const bt=sr(await Qt.json().catch(()=>({})),we.bindingsFailed);if(bt.message===we.expiredInteraction)throw bt;return[401,403,404].includes(Qt.status)&&(await d().catch(()=>{}))?.status==="anonymous"?(te(we.signInRequired),[]):(j([]),_([]),q(""),oe({status:"error",message:we.bindingsFailed}),[])}const Lt=await Qt.json().catch(()=>({})),{exactBindings:Ot,rawIds:gl,hasExplicitEmptyEntries:da}=NA(Lt);if(Ot.length===0&&da){const bt=await wS(he);M(bt)}const et=ue.current.binding??(Ot.length===1?Ot[0]:void 0);Ue&&!Ue.selectedStorage&&et&&Ne&&(Ne.updateSelectedStorage(Ue.id,et),Ue={...Ue,selectedStorage:et},se(Ue));const wn=et?Ot.filter(bt=>en(bt)===en(et)):Ot,It=ue.current.binding&&wn.length===0?{status:"conflict",message:we.bindingUnavailable}:TA({bindings:wn,remembered:Se});_(Ot),Ot.length===0&&J.current?(te(J.current),oe({status:"error",message:J.current})):(J.current=void 0,oe(It));const Xn=Ot.length>0?Array.from(new Set(Ot.map(bt=>bt.webId))):gl;if(j(Xn),It.status==="ready"?(q(It.selected.webId),Z(It.selected.storageUrl)):Fe.webId&&Xn.includes(Fe.webId)?(q(Fe.webId),Z("")):Xn.length>0?(q(It.status==="selecting"||Xn.length>1?"":Xn.at(0)??""),Z("")):(q(""),Z("")),r&&typeof Lt.resumeWebId=="string"&&Ot.length===1&&It.status==="ready"&&It.selected.webId===Lt.resumeWebId&&!W.current){W.current=!0,ge("pending");try{const bt=await fetch(K(Oe),{method:"POST",headers:st({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",redirect:"manual",body:JSON.stringify({webId:Lt.resumeWebId,remember:!0})}),fa=await bt.json().catch(()=>({}));if(!bt.ok)throw sr(fa,we.webIdSelectionFailed);const vl=typeof fa.location=="string"?fa.location.trim():"";if(!vl)throw new Error(we.missingRedirect);window.location.assign(K(vl))}catch(bt){throw ge("failed"),bt}}return Xn},[$e,r,Oe,he,d,Ne]),hl=y.useCallback((Se=!0)=>{W.current=!Se,ge("idle"),me("load"),p(!0),te(null),mt(G.status==="ready"?G.selected:void 0).catch(Ue=>{te(xo(Ue,we.loadFailed))}).finally(()=>p(!1))},[mt,G]);y.useEffect(()=>{cr(window.location.href),(async()=>{try{await mt()}catch(Se){te(xo(Se,we.loadFailed))}finally{p(!1)}})()},[mt]);const Xe=async()=>{k(!0);try{if(await u(),i&&!i())throw new Error("Account sign-out did not complete");h(K("/.account/login/password/"))}catch{me("switch"),te(we.signOutIncomplete)}finally{k(!1)}},vt=()=>{cr(window.location.href),h(K("/.account/login/password/"))},Ut=async()=>{if(window.xpodDesktop?.cancelLogin){V(!0);try{await window.xpodDesktop.cancelLogin()}catch{me("return"),te(ee===we.expiredInteraction?ee:we.returnFailed)}finally{V(!1)}return}Id(),window.location.assign(new URL("/.account/",window.location.origin).href)},bn=()=>{W.current=!0,ge("idle"),te(null)},Yn=y.useCallback(async()=>{try{X(!0);const Se=await uA({cancelUrl:K(Ze),headers:st({"Content-Type":"application/json",Accept:"application/json"})});window.location.href=K(Se)}catch(Se){me("cancel"),te(xo(Se,we.cancelFailed))}finally{X(!1)}},[Ze]),xn=y.useCallback(async(Se,Ue)=>{if(!Se){await Yn();return}try{P(!0),te(null);let rt,Fe=I,Qt=Q;if(Ue){const et=N.find(wn=>en(wn)===Ue.webIdId||en(wn)===Ue.storageId);et&&(Fe=et.webId,Qt=et.storageUrl,q(et.webId),Z(et.storageUrl))}if(ne){if(G.status!=="ready")throw new Error(we.chooseStorage);if(rt=G.selected,!Ne)throw new Error(we.cannotPersistStorage);Ne.updateSelectedStorage(ne.id,rt)}else if(N.length>0){if(G.status!=="ready")throw new Error(we.chooseStorage);if(rt=N.find(et=>et.webId===Fe&&(!Qt||et.storageUrl===Qt)),!rt)throw new Error(we.chooseStorage)}if(Fe&&Fe!==w){const et=await fetch(K(Oe),{method:"POST",headers:st({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",redirect:"manual",body:JSON.stringify({webId:Fe,remember:!0})}),wn=await et.json().catch(()=>({}));if(!et.ok)throw sr(wn,we.webIdSelectionFailed);const It=typeof wn.location=="string"?wn.location.trim():"";if(!It)throw new Error(we.missingRedirect);window.location.assign(K(It));return}const Lt=await fetch(K($e),{method:"POST",headers:st({"Content-Type":"application/json",Accept:"application/json"}),credentials:"include",redirect:"manual",body:JSON.stringify({remember:De})}),Ot=await Lt.json().catch(()=>({}));if(!Lt.ok)throw sr(Ot,we.authorizationFailed);const gl=Lt.headers.get("Location"),da=Ot.location||gl;da?window.location.assign(K(da)):(te(we.missingRedirect),me("authorize"),p(!1))}catch(rt){me("authorize"),te(xo(rt,we.authorizationFailed))}finally{P(!1)}},[N,$e,w,Yn,ne,Oe,De,Q,I,G,Ne]),yt=sA(T,w,!!he),St=Be?N.filter(Se=>en(Se)===en(Be)):N,xr=!!(!v&&!ee&&g&&St.length===0&&G.status==="empty"),an=$||ye||A||L,Va=G.status==="conflict",Oo=St.length>0?St.map(Se=>({id:en(Se),label:Se.label??`${Se.webId} · ${Se.storageUrl}`,webId:Se.webId,storageUrl:Se.storageUrl})):yt.map(Se=>({id:Se,label:Se,webId:Se})),wr=St.find(Se=>Se.webId===I&&Se.storageUrl===Q)??St.find(Se=>Se.webId===I),As=St.length>1&&G.status!=="ready"?"":wr?en(wr):I,Sr=Va||St.length===0&&G.status==="error",Qa=()=>{cr(window.location.href),h("/settings/pod")},ht=ee===we.expiredInteraction,Vt=!r||ee===we.signInRequired,Et=!!(ee&&(ht||ie!=="load"||F==="failed"||!g)),Er=!!(g&&Oo.length>0&&!ht&&!Vt),pl=window.xpodDesktop?.cancelLogin?"返回应用":"返回账号",Cs=()=>{ie==="cancel"?Yn():ie==="switch"?Xe():ie==="return"?Ut():hl(ie!=="authorize")};return f.jsx(yr,{title:He.surfaceTitle,presentation:"compact",children:f.jsxs("div",{className:"space-y-4",children:[ht?f.jsx(ir,{title:"授权请求已失效",description:ee,primaryLabel:ie==="return"?"重试返回":pl,onPrimary:()=>{Ut()},pending:an}):Vt&&!(ee&&ie!=="load")?f.jsx(ir,{title:He.signInRequiredTitle,description:He.signInRequiredDescription,primaryLabel:He.goToSignIn,onPrimary:vt,secondaryLabel:pl,onSecondary:()=>{Ut()},pending:an}):Et?f.jsx(ir,{title:He.unavailableTitle,description:ee,primaryLabel:ie==="cancel"?"重试取消":ie==="return"?"重试返回":He.tryAgain,onPrimary:Cs,secondaryLabel:Er?"返回授权":pl,onSecondary:Er?bn:()=>{Ut()},pending:an||v}):ee&&!Sr?f.jsx(aA,{error:ee,onDismiss:()=>te(null),dismissLabel:He.dismiss}):null,(Et||Vt)&&!ht?f.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[f.jsx(jt,{type:"button",variant:"ghost",disabled:an||v,onClick:()=>{Yn()},children:ye?"正在取消…":"取消授权"}),r?f.jsx(jt,{type:"button",variant:"ghost",disabled:an||v,onClick:()=>{Xe()},children:He.switchAccountLabel}):null,Er&&window.xpodDesktop?.cancelLogin?f.jsx(jt,{type:"button",variant:"ghost",disabled:an||v,onClick:()=>{Ut()},children:pl}):null]}):null,!Vt&&!ht?v||F==="pending"?f.jsx(yd,{label:He.restoring}):xr?f.jsx(ir,{title:He.missingPodTitle,description:He.missingPodDescription,primaryLabel:He.goToPodManagementLabel,onPrimary:Qa,secondaryLabel:He.denyLabel,onSecondary:()=>{Yn()},pending:an}):Et?null:f.jsxs("div",{className:"space-y-4",children:[Sr?null:f.jsx(lA,{client:{name:g?.client_name||He.applicationFallback,description:g?.client_uri},webIds:Oo,storageOptions:[],selectedWebIdId:As,showIdentitySelection:St.length>1,rememberClient:De,onWebIdChange:Se=>{const Ue=St.find(rt=>en(rt)===Se);Ue?(q(Ue.webId),Z(Ue.storageUrl),oe({status:"ready",selected:Ue})):(q(Se),Z(""))},onStorageChange:Se=>{const Ue=St.find(rt=>en(rt)===Se);Ue&&(q(Ue.webId),Z(Ue.storageUrl),oe({status:"ready",selected:Ue}))},onRememberClientChange:ve,onApprove:Se=>{xn(!0,Se)},onDeny:()=>{xn(!1)},onEditAccount:async()=>{cr(window.location.href),h(K("/.account/account/"))},onSwitchAccount:Xe,pending:an,copy:{description:He.description(g?.client_name||He.applicationFallback),webIdLabel:St.length>1?He.bindingLabel:He.webIdLabel,storageLabel:He.storageLabel,rememberClientLabel:He.rememberClientLabel,approveLabel:$?He.approvingLabel:He.approveLabel,denyLabel:ye?He.denyingLabel:He.denyLabel,editAccountLabel:He.editAccountLabel,switchAccountLabel:He.switchAccountLabel}}),Sr?f.jsx(ir,{title:Va?He.conflictMessage:He.unavailableTitle,description:G.status==="conflict"||G.status==="error"?G.message:ee,primaryLabel:He.retryLabel,onPrimary:()=>hl(!0),secondaryLabel:He.switchAccountLabel,onSecondary:Xe,pending:an}):null]}):null]})})}function _A(){const{controls:a,idpIndex:r,isLoggedIn:i}=Nn(),s=qn(),[u]=bv(),[d,h]=y.useState(""),[v,p]=y.useState("idle"),[g,x]=y.useState(),w=u.get("returnTo"),S=w?`?${new URLSearchParams({returnTo:w})}`:"";if(i)return f.jsx(Rn,{to:K("/.account/account/"),replace:!0});const T=async j=>{if(v!=="submitting"){p("submitting"),x(void 0);try{const N=await zt(a?.password?.forgot||"/.account/login/password/forgot/",fetch,r);if(!N)throw new Error("Account recovery control unavailable");const _=await fetch(N,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({email:j.trim()})});if(!_.ok){x(Ug(_.status)),p("error");return}p("success")}catch{x(Ug()),p("error")}}};return f.jsx(yr,{title:Ln.recoverSurfaceTitle,children:f.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col justify-center px-5 pb-5 pt-4",children:[f.jsx("p",{className:"mb-4 text-sm leading-5 text-muted-foreground",children:Ng.description}),f.jsx(r2,{email:d,onEmailChange:j=>{h(j),x(void 0),v==="error"&&p("idle")},onSubmit:T,pending:v==="submitting",status:v,error:g,copy:Ng,frame:"bare",showHeader:!1}),f.jsxs("div",{className:"mt-3 flex gap-2",children:[f.jsx(jt,{type:"button",variant:"outline",className:"flex-1",onClick:()=>s({pathname:K("/.account/login/password/"),search:S}),children:Ln.backToSignIn}),v==="success"?f.jsx(jt,{type:"button",className:"flex-1",onClick:()=>{p("idle"),x(void 0)},children:Ln.resend}):null]})]})})}function zA(){const{controls:a,idpIndex:r,isLoggedIn:i}=Nn(),s=qn(),[u]=bv(),[d,h]=y.useState(""),[v,p]=y.useState(""),[g,x]=y.useState("idle"),[w,S]=y.useState(),T=u.get("rid")||u.get("token"),j=u.get("returnTo"),N=j?`?${new URLSearchParams({returnTo:j})}`:"";if(i)return f.jsx(Rn,{to:K("/.account/account/"),replace:!0});if(!T)return f.jsx(Rn,{to:{pathname:K("/.account/login/password/forgot/"),search:N},replace:!0});const _=async Q=>{if(g!=="submitting"){x("submitting"),S(void 0);try{const Z=await zt(a?.password?.reset||"/.account/login/password/reset/",fetch,r);if(!Z)throw new Error("Account recovery control unavailable");const G=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"include",body:JSON.stringify({recordId:T,password:Q.password})});if(!G.ok){S(Og(G.status)),x("error");return}x("success")}catch{S(Og()),x("error")}}};return f.jsx(yr,{title:Ln.resetSurfaceTitle,children:f.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col justify-center px-5 pb-5 pt-4",children:[f.jsx("p",{className:"mb-4 text-sm leading-5 text-muted-foreground",children:jg.description}),f.jsx(o2,{password:d,confirmation:v,onPasswordChange:Q=>{h(Q),S(void 0)},onConfirmationChange:Q=>{p(Q),S(void 0)},onSubmit:_,pending:g==="submitting",status:g,error:w,copy:jg,frame:"bare",showHeader:!1}),f.jsx(jt,{type:"button",variant:"ghost",className:"mt-3 w-full",onClick:()=>s({pathname:K("/.account/login/password/"),search:N}),children:Ln.backToSignIn})]})})}function UA(){const{controls:a,isLoggedIn:r,hasOidcPending:i}=Nn();if(r)return f.jsx(Rn,{to:K(i?"/.account/oidc/consent/":"/.account/account/"),replace:!0});const s=a?.html?.password?.login||a?.password?.login,u=Ud(s),d=u?new URL(u):new URL(K("/.account/login/password/"),window.location.origin),h=d.pathname===K("/.account/login/")?K("/.account/login/password/"):`${d.pathname}${d.search}${d.hash}`;return f.jsx(Rn,{to:K(h),replace:!0})}function OA(){const{isInitializing:a,initError:r,retry:i}=Nn();return a?f.jsx(u2,{}):r?f.jsx(f2,{message:r,retry:i}):f.jsxs(fw,{children:[f.jsx(pn,{path:K("/.account/"),element:f.jsx(X2,{})}),f.jsx(pn,{path:K("/.account/about/"),element:f.jsx(G2,{})}),f.jsx(pn,{path:K("/.account/account/"),element:f.jsx(Rg,{children:f.jsx(nA,{})})}),f.jsx(pn,{path:K("/.account/create-pod/"),element:f.jsx(Rg,{allowOidcPending:!0,children:f.jsx(pA,{})})}),f.jsx(pn,{path:K("/.account/login/"),element:f.jsx(UA,{})}),f.jsx(pn,{path:K("/.account/login/password/"),element:f.jsx(gd,{initialIsRegister:!1},"login")}),f.jsx(pn,{path:K("/.account/login/password/register/"),element:f.jsx(gd,{initialIsRegister:!0},"register")}),f.jsx(pn,{path:K("/.account/login/password/forgot/"),element:f.jsx(_A,{})}),f.jsx(pn,{path:K("/.account/login/password/reset/"),element:f.jsx(zA,{})}),f.jsx(pn,{path:K("/.account/oidc/consent/"),element:f.jsx(jA,{})}),f.jsx(pn,{path:"*",element:f.jsx(Rn,{to:K("/.account/"),replace:!0})})]})}function MA(){return y.useEffect(()=>{globalThis.xpodDesktop?.setWindowMode?.("workspace")},[]),f.jsx(kw,{children:f.jsx(US,{children:f.jsx(OA,{})})})}const xd="xpod.theme",LA="(prefers-color-scheme: dark)";function qy(a=wd()){try{const r=a?.getItem(xd);return r==="light"||r==="dark"?r:"system"}catch{return"system"}}function Yy(a,r=Gy()){return a!=="system"?a:r?.matches?"dark":"light"}function Xy(a,r=typeof document>"u"?void 0:document.documentElement){r&&(r.classList.toggle("light",a==="light"),r.classList.toggle("dark",a==="dark"),r.dataset.theme=a,r.style.colorScheme=a)}function DA(){const a=qy(),r=Yy(a);return Xy(r),{preference:a,resolvedTheme:r}}function Gy(){return typeof window>"u"||typeof window.matchMedia!="function"?void 0:window.matchMedia(LA)}function wd(){try{return typeof window>"u"?void 0:window.localStorage}catch{return}}const kA=y.createContext(null);function BA({children:a}){const[r,i]=y.useState(()=>qy()),[s,u]=y.useState(()=>Yy("system")),d=r==="system"?s:r;y.useEffect(()=>{const v=Gy();if(!v)return;const p=g=>{u(g.matches?"dark":"light")};return typeof v.addEventListener=="function"?(v.addEventListener("change",p),()=>v.removeEventListener("change",p)):(v.addListener?.(p),()=>v.removeListener?.(p))},[]),y.useEffect(()=>{Xy(d)},[d]);const h=y.useMemo(()=>({preference:r,resolvedTheme:d,setPreference(v){i(v);try{v==="system"?wd()?.removeItem(xd):wd()?.setItem(xd,v)}catch{}}}),[r,d]);return f.jsx(kA.Provider,{value:h,children:a})}DA();try{xS()}catch{}fx.createRoot(document.getElementById("root")).render(f.jsx(Jg.StrictMode,{children:f.jsx(BA,{children:f.jsx(MA,{})})}));
|