@lsamien/yaoyao 0.4.76 → 0.4.78
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/README.md +7 -5
- package/THIRD_PARTY_NOTICES.md +8 -0
- package/bin/hermes-yaoyao.mjs +15 -2
- package/build-info.json +35 -3
- package/desktop/main.mjs +12 -4
- package/dist/assets/{AboutDialog-fbm5CG09.js → AboutDialog-jvhTP8-J.js} +2 -2
- package/dist/assets/AboutDialog-jvhTP8-J.js.map +1 -0
- package/dist/assets/BotAutomationsView-ktoci79V.js +2 -0
- package/dist/assets/{BotAutomationsView-DPAAYyuy.js.map → BotAutomationsView-ktoci79V.js.map} +1 -1
- package/dist/assets/{BotPluginsDialog-MwGpwjgu.js → BotPluginsDialog-H85RI-7P.js} +2 -2
- package/dist/assets/{BotPluginsDialog-MwGpwjgu.js.map → BotPluginsDialog-H85RI-7P.js.map} +1 -1
- package/dist/assets/{BotSettingsDialog-DXtsSzi8.js → BotSettingsDialog-Ci_DZL4m.js} +5 -5
- package/dist/assets/{BotSettingsDialog-DXtsSzi8.js.map → BotSettingsDialog-Ci_DZL4m.js.map} +1 -1
- package/dist/assets/ChatView-6cdLMsuy.js +2 -0
- package/dist/assets/ChatView-6cdLMsuy.js.map +1 -0
- package/dist/assets/ChatView-C_7_7olu.css +1 -0
- package/dist/assets/{ComputerPanel-B0QyKQkF.js → ComputerPanel-Dbwgx5n8.js} +2 -2
- package/dist/assets/{ComputerPanel-B0QyKQkF.js.map → ComputerPanel-Dbwgx5n8.js.map} +1 -1
- package/dist/assets/{ComputerViewerView-CaOkTXpc.js → ComputerViewerView-csnhRedK.js} +2 -2
- package/dist/assets/{ComputerViewerView-CaOkTXpc.js.map → ComputerViewerView-csnhRedK.js.map} +1 -1
- package/dist/assets/ConversationsView-CEO2SVGT.js +6 -0
- package/dist/assets/ConversationsView-CEO2SVGT.js.map +1 -0
- package/dist/assets/{ConversationsView-C_VZl5g2.css → ConversationsView-CHLGKsJt.css} +1 -1
- package/dist/assets/FilesView-t5jA-H2-.js +2 -0
- package/dist/assets/{FilesView-CluNyIk8.js.map → FilesView-t5jA-H2-.js.map} +1 -1
- package/dist/assets/FloatingResourceSearch-3GOuDkuO.css +1 -0
- package/dist/assets/FloatingResourceSearch-BAYymuJV.js +9 -0
- package/dist/assets/FloatingResourceSearch-BAYymuJV.js.map +1 -0
- package/dist/assets/HistoryView-BqMSV9iC.js +2 -0
- package/dist/assets/HistoryView-BqMSV9iC.js.map +1 -0
- package/dist/assets/HistoryView-DlVfSP_p.css +1 -0
- package/dist/assets/KanbanView-CWwrwH9S.js +2 -0
- package/dist/assets/{KanbanView-D5AdRwqi.js.map → KanbanView-CWwrwH9S.js.map} +1 -1
- package/dist/assets/{LocalVmSettingsPanel-BILcGHmu.js → LocalVmSettingsPanel-BXvZwFQP.js} +2 -2
- package/dist/assets/{LocalVmSettingsPanel-BILcGHmu.js.map → LocalVmSettingsPanel-BXvZwFQP.js.map} +1 -1
- package/dist/assets/{RunnerSettingsPanel-IHLAFIh8.js → RunnerSettingsPanel-KkpIkkob.js} +2 -2
- package/dist/assets/{RunnerSettingsPanel-IHLAFIh8.js.map → RunnerSettingsPanel-KkpIkkob.js.map} +1 -1
- package/dist/assets/{StandaloneDialog-DdcL_wV2.js → StandaloneDialog-D4BQqjpB.js} +2 -2
- package/dist/assets/{StandaloneDialog-DdcL_wV2.js.map → StandaloneDialog-D4BQqjpB.js.map} +1 -1
- package/dist/assets/{UpdateCheckDialog-CJQezkXo.js → UpdateCheckDialog-Ct0bT6xU.js} +2 -2
- package/dist/assets/{UpdateCheckDialog-CJQezkXo.js.map → UpdateCheckDialog-Ct0bT6xU.js.map} +1 -1
- package/dist/assets/{WorkspaceKnowledgePanel-DS0kOQgg.js → WorkspaceKnowledgePanel-WBcPB49x.js} +2 -2
- package/dist/assets/{WorkspaceKnowledgePanel-DS0kOQgg.js.map → WorkspaceKnowledgePanel-WBcPB49x.js.map} +1 -1
- package/dist/assets/{WorkspaceRoutinesPanel-DpVAtnDX.js → WorkspaceRoutinesPanel-JubUwGsV.js} +2 -2
- package/dist/assets/{WorkspaceRoutinesPanel-DpVAtnDX.js.map → WorkspaceRoutinesPanel-JubUwGsV.js.map} +1 -1
- package/dist/assets/WorkspaceShell-0m4gg6AW.css +1 -0
- package/dist/assets/WorkspaceShell-Do2VAwIz.js +44 -0
- package/dist/assets/WorkspaceShell-Do2VAwIz.js.map +1 -0
- package/dist/assets/{WorkspaceView-Cco3Umfn.js → WorkspaceView-DTanioWW.js} +2 -2
- package/dist/assets/{WorkspaceView-Cco3Umfn.js.map → WorkspaceView-DTanioWW.js.map} +1 -1
- package/dist/assets/{docx-preview-C6qrP-g2.js → docx-preview-B1SjJgD_.js} +2 -2
- package/dist/assets/{docx-preview-C6qrP-g2.js.map → docx-preview-B1SjJgD_.js.map} +1 -1
- package/dist/assets/index-CWamgtSb.js +17 -0
- package/dist/assets/index-CWamgtSb.js.map +1 -0
- package/dist/assets/{pdf-G3DUsfMb.js → pdf-DVDddcFC.js} +2 -2
- package/dist/assets/{pdf-G3DUsfMb.js.map → pdf-DVDddcFC.js.map} +1 -1
- package/dist/assets/sessionOwnership-0hdKcwOs.js +4 -0
- package/dist/assets/sessionOwnership-0hdKcwOs.js.map +1 -0
- package/dist/assets/{sessionOwnership-BTz0Fyp5.css → sessionOwnership-CfO8CfmZ.css} +1 -1
- package/dist/assets/{viewModels-DfaKvI0x.js → viewModels-DKBqaDRg.js} +12 -12
- package/dist/assets/{viewModels-DfaKvI0x.js.map → viewModels-DKBqaDRg.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist-server/runner/agent.js +15 -4
- package/dist-server/runner/hermes-bots-bridge/README.md +4 -2
- package/dist-server/runner/hermes-bots-bridge/bridge_runtime.py +21 -2
- package/dist-server/runner/hermes-bots-bridge/plugin.yaml +1 -1
- package/dist-server/runner/worker/gateway.js +52 -22
- package/dist-server/runner/worker/profileSession.js +2 -12
- package/dist-server/server/app.js +15 -1
- package/dist-server/server/chatTranscriptApi.js +2 -2
- package/dist-server/server/chatTranscriptStore.js +16 -0
- package/dist-server/server/config.js +3 -0
- package/dist-server/server/credentialVault/broker.js +272 -0
- package/dist-server/server/credentialVault/coordinator.js +297 -0
- package/dist-server/server/credentialVault/executor.js +1 -0
- package/dist-server/server/credentialVault/fixtureWebsiteExecutor.js +51 -0
- package/dist-server/server/credentialVault/index.js +49 -0
- package/dist-server/server/credentialVault/isolation.js +37 -0
- package/dist-server/server/credentialVault/privateFiles.js +17 -0
- package/dist-server/server/credentialVault/protectedExecutor.js +21 -0
- package/dist-server/server/credentialVault/schema.js +45 -0
- package/dist-server/server/credentialVault/sshExecutor.js +135 -0
- package/dist-server/server/credentialVault/store.js +308 -0
- package/dist-server/server/credentialVault/transport.js +127 -0
- package/dist-server/server/credentialVault/websiteExecutor.js +102 -0
- package/dist-server/server/desktopEnvironments.js +2 -2
- package/dist-server/server/hermesRuntimeEnvironment.js +14 -0
- package/dist-server/server/localAuth.js +5 -0
- package/dist-server/server/openVikingMemoryProvider.js +29 -10
- package/dist-server/server/openVikingService.js +44 -14
- package/dist-server/server/openVikingSessionSync.js +148 -37
- package/dist-server/server/pushCoordinator.js +7 -4
- package/dist-server/server/realtimeApi.js +11 -2
- package/dist-server/server/realtimeBroker.js +1 -1
- package/dist-server/server/realtimeReceipts.js +39 -8
- package/dist-server/server/routes.js +18 -0
- package/dist-server/server/runnerHub.js +17 -4
- package/dist-server/server/sessionStop.js +19 -0
- package/dist-server/server/subaccountAccess.js +12 -0
- package/dist-server/server/taskCoordinator.js +3 -1
- package/dist-server/server/unreadCenter.js +61 -0
- package/dist-server/server/uploads.js +4 -1
- package/dist-server/server/workspaceAssets.js +56 -12
- package/dist-server/server/workspaceEnvironment.js +1 -0
- package/dist-server/server/workspaceMemorySynthesis.js +5 -1
- package/dist-server/server/workspacePrompt.js +5 -1
- package/dist-server/server/workspaceRoutes.js +26 -21
- package/dist-server/server/workspaceRuntime.js +89 -8
- package/dist-server/server/workspaceScheduler.js +5 -1
- package/dist-server/server/workspaceStore.js +125 -47
- package/dist-server/server/workspaceSync.js +4 -1
- package/dist-server/shared/botEnvironment.js +3 -3
- package/dist-server/shared/credentialVault.js +2 -0
- package/dist-server/shared/unread.js +6 -0
- package/dist-server/shared/uploadNames.js +14 -0
- package/licenses/libsodium.js/LICENSE +16 -0
- package/licenses/ssh2/LICENSE +19 -0
- package/package.json +8 -5
- package/release.json +3 -3
- package/dist/assets/AboutDialog-fbm5CG09.js.map +0 -1
- package/dist/assets/BotAutomationsView-DPAAYyuy.js +0 -2
- package/dist/assets/ChatView-BNqHa6Ma.js +0 -2
- package/dist/assets/ChatView-BNqHa6Ma.js.map +0 -1
- package/dist/assets/ChatView-Dx8YlcPr.css +0 -1
- package/dist/assets/ConversationsView-CYNc59hv.js +0 -6
- package/dist/assets/ConversationsView-CYNc59hv.js.map +0 -1
- package/dist/assets/FilesView-CluNyIk8.js +0 -2
- package/dist/assets/FloatingResourceSearch-BF2XOLd-.css +0 -1
- package/dist/assets/FloatingResourceSearch-Bg5rUZMy.js +0 -9
- package/dist/assets/FloatingResourceSearch-Bg5rUZMy.js.map +0 -1
- package/dist/assets/HistoryView-DSbSDzsB.js +0 -2
- package/dist/assets/HistoryView-DSbSDzsB.js.map +0 -1
- package/dist/assets/HistoryView-DvuCAjlo.css +0 -1
- package/dist/assets/KanbanView-D5AdRwqi.js +0 -2
- package/dist/assets/WorkspaceShell-7wn8iTne.css +0 -1
- package/dist/assets/WorkspaceShell-Bykfy3AR.js +0 -44
- package/dist/assets/WorkspaceShell-Bykfy3AR.js.map +0 -1
- package/dist/assets/index-CEqMqiJr.js +0 -17
- package/dist/assets/index-CEqMqiJr.js.map +0 -1
- package/dist/assets/sessionOwnership-DMfBRINe.js +0 -6
- package/dist/assets/sessionOwnership-DMfBRINe.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";qhCAQA,IAAM,GAAY,OAAO,OAAW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,QAAQ,GAAU,KAAK,CAAC,CAAC,KAAK,CAAC,EAAI,KAAY,CAAC,EAAI,CAAC,GAAG,CAAM,CAAC,CAAC,CAAC,EAGzI,GAAe,CACnB,SAAU,CACR,IACA,GACF,EACA,OAAQ,CACN,IACA,GACF,EACA,KAAM,CACJ,IACA,IACF,EACA,UAAW,CACT,KACA,GACF,EACA,SAAU,CACR,IACA,IACF,EACA,UAAW,CACT,IACA,IACF,EACA,QAAS,CACP,KACA,IACF,EACA,QAAS,CACP,KACA,GACF,EACA,UAAW,CACT,KACA,GACF,EACA,WAAY,CACV,KACA,IACF,EACA,MAAO,CACL,KACA,IACF,EACA,OAAQ,CACN,IACA,GACF,EACA,MAAO,CACL,KACA,IACF,EACA,QAAS,CACP,KACA,IACF,EACA,SAAU,CACR,KACA,IACF,EACA,MAAO,CACL,KACA,GACF,EACA,MAAO,CACL,KACA,GACF,EACA,IAAK,CACH,IACA,IACF,EACA,IAAK,CACH,IACA,GACF,EACA,SAAU,CACR,KACA,IACF,EACA,OAAQ,CACN,IACA,IACF,EACA,QAAS,CACP,KACA,GACF,EACA,UAAW,CACT,KACA,IACF,EACA,MAAO,CACL,IACA,GACF,EACA,MAAO,CACL,IACA,GACF,EACA,SAAU,CACR,IACA,GACF,EACA,SAAU,CACR,KACA,IACF,EACA,QAAS,CACP,IACA,GACF,EACA,QAAS,CACP,IACA,GACF,EACA,UAAW,CACT,IACA,GACF,EACA,QAAS,CACP,IACA,GACF,EACA,UAAW,CACT,IACA,GACF,EACA,UAAW,CACT,IACA,GACF,EACA,QAAS,CACP,IACA,GACF,EACA,UAAW,CACT,KACA,IACF,EACA,SAAU,CACR,IACA,IACF,EACA,SAAU,CACR,IACA,GACF,EACA,SAAU,CACR,KACA,GACF,EACA,gBAAiB,CACf,IACA,GACF,CACF,EAGM,GAAQ,CACZ,SAAU,KACV,OAAQ,KACR,KAAM,CACJ,IACA,IACF,EACA,UAAW,CACT,IACA,GACF,EACA,SAAU,CACR,KACA,GACF,E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AAiB,OAAO,4GAAiC,EAC/G,CAAE,KAAM,sBAAuB,KAAM,SAAU,qBAAiB,OAAO,kEAA0B,EACjG,CAAE,KAAM,SAAU,KAAM,QAAS,qBAAiB,OAAO,uEAAyB,EAClF,CAAE,KAAM,aAAc,SAAU,OAAQ,EACxC,CAAE,KAAM,mBAAoB,SAAU,OAAQ,CAChD,EACA,oBAAuB,CAAE,IAAK,CAAE,EAClC,CAAC,EACD,GAAO,UAAU,GAAM,CAAM,EAAG,OAAS,YAAY,GAAsB,EAAG,IAAI,CAAE,CAAC,ECbrF,IAAM,GAAM,EAAU,EAAG,EACzB,GAAI,OAAO,cAAgB,EAAO,EAAW,IAAS,CACpD,QAAQ,MAAM,qBAAqB,EAAK,GAAI,CAAK,CACnD,EACA,GAAO,QAAS,GAAU,CACxB,QAAQ,MAAM,0BAA2B,CAAK,CAChD,CAAC,EAED,GAAI,IAAI,GAAY,CAAC,CAAC,CAAC,IAAI,EAAM,CAAC,CAAC,MAAM,MAAM","names":["isPlainObject","noop","assign","decode","_a","clone","initializer","util.jsonStringifyReplacer","core.$ZodAsyncError","util.finalizeIssue","core.config","errors.$ZodError","safeParse","errors.$ZodRealError","safeParseAsync","util.nullish","util.getLengthableOrigin","util.aborted","util.explicitlyAborted","util.prefixIssues","util.cleanRegex","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","checks.$ZodCheckMaxLength","util.normalizeParams","checks.$ZodCheckMinLength","checks.$ZodCheckLengthEquals","checks.$ZodCheckOverwrite","issue","checks.$ZodCheck","core.formatError","core.flattenError","parse.parse","parse.safeParse","parse.parseAsync","parse.safeParseAsync","parse.encode","parse.decode","parse.encodeAsync","parse.decodeAsync","parse.safeEncode","parse.safeDecode","parse.safeEncodeAsync","parse.safeDecodeAsync","util.mergeDefs","core.clone","checks.overwrite","processors.arrayProcessor","checks.minLength","checks.maxLength","checks.length","core._array","processors.unionProcessor","processors.intersectionProcessor","processors.enumProcessor","processors.transformProcessor","processors.optionalProcessor","processors.nullableProcessor","processors.defaultProcessor","util.shallowClone","processors.prefaultProcessor","processors.nonoptionalProcessor","processors.catchProcessor","processors.pipeProcessor","processors.readonlyProcessor","processors.customProcessor","core._refine","core._superRefine"],"ignoreList":[0,1,2,29,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"sources":["../../node_modules/pinia/dist/pinia.mjs","../../node_modules/vue-router/dist/devtools-EWN81iOl.mjs","../../node_modules/vue-router/dist/vue-router.mjs","../../../../../../brand/AppIcon-1024.png","../../src/client/components/common/BrandMark.vue","../../src/client/components/app/LoadingScreen.vue","../../src/client/components/common/AppIcon.vue","../../src/shared/chatTools.ts","../../src/shared/serverFiles.ts","../../src/client/utils/attachments.ts","../../src/client/utils/normalize.ts","../../src/client/api/client.ts","../../src/client/api/serverIdentity.ts","../../src/shared/sse.ts","../../src/client/utils/id.ts","../../src/shared/chatTranscript.ts","../../src/client/api/httpRealtime.ts","../../src/client/api/realtime.ts","../../src/shared/agentIdentity.ts","../../src/client/api/profiles.ts","../../src/client/api/auth.ts","../../src/client/stores/auth.ts","../../src/client/stores/theme.ts","../../src/client/views/LoginView.vue","../../src/client/views/PasswordChangeView.vue","../../src/shared/unread.ts","../../src/client/stores/unread.ts","../../src/client/api/sessions.ts","../../src/client/api/chatTranscript.ts","../../node_modules/idb/build/index.js","../../src/client/utils/cache.ts","../../src/client/utils/contextUsage.ts","../../src/client/utils/messageReducer.ts","../../src/client/utils/chatHistory.ts","../../src/client/utils/sessionOrder.ts","../../src/client/utils/sessionModel.ts","../../src/client/utils/sessionPreferences.ts","../../src/client/stores/chat.ts","../../src/client/api/kanban.ts","../../src/client/stores/kanban.ts","../../src/client/components/common/maus/laoa-data.ts","../../node_modules/zod/v4/core/core.js","../../node_modules/zod/v4/core/util.js","../../node_modules/zod/v4/core/errors.js","../../node_modules/zod/v4/core/parse.js","../../node_modules/zod/v4/core/checks.js","../../node_modules/zod/v4/core/versions.js","../../node_modules/zod/v4/core/schemas.js","../../node_modules/zod/v4/core/registries.js","../../node_modules/zod/v4/core/api.js","../../node_modules/zod/v4/core/to-json-schema.js","../../node_modules/zod/v4/core/json-schema-processors.js","../../node_modules/zod/v4/classic/errors.js","../../node_modules/zod/v4/classic/parse.js","../../node_modules/zod/v4/classic/schemas.js","../../src/client/components/common/maus/mascot-bodies.ts","../../src/client/components/common/maus/cursor-face-data.ts","../../src/client/components/common/maus/cursor-engine.ts","../../src/client/components/common/maus/silhouettes.ts","../../src/client/components/common/AgentAvatar.vue","../../src/client/components/common/TeamAvatar.vue","../../src/client/components/app/AgentIdentityFixture.vue","../../src/client/App.vue","../../src/client/utils/interfaceMode.ts","../../src/client/router/index.ts","../../src/client/main.ts"],"sourcesContent":["/*!\n * pinia v3.0.4\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isRef, isReactive, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, nextTick, computed, toRefs } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst IS_CLIENT = typeof window !== 'undefined';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = (process.env.NODE_ENV !== 'production')\n ? () => {\n const pinia = hasInjectionContext() && inject(piniaSymbol);\n if (!pinia && !IS_CLIENT) {\n console.error(`[🍍]: Pinia instance not found in context. This falls back to the global activePinia which exposes you to cross-request pollution on the server. Most of the time, it means you are calling \"useStore()\" in the wrong place.\\n` +\n `Read https://vuejs.org/guide/reusability/composables.html to learn more`);\n }\n return pinia || activePinia;\n }\n : () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n return (o &&\n typeof o === 'object' &&\n Object.prototype.toString.call(o) === '[object Object]' &&\n typeof o.toJSON !== 'function');\n}\n// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n /**\n * Direct mutation of the state:\n *\n * - `store.name = 'new name'`\n * - `store.$state.name = 'new name'`\n * - `store.list.push('new item')`\n */\n MutationType[\"direct\"] = \"direct\";\n /**\n * Mutated the state with `$patch` and an object\n *\n * - `store.$patch({ name: 'newName' })`\n */\n MutationType[\"patchObject\"] = \"patch object\";\n /**\n * Mutated the state with `$patch` and a function\n *\n * - `store.$patch(state => state.name = 'newName')`\n */\n MutationType[\"patchFunction\"] = \"patch function\";\n // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n ? window\n : typeof self === 'object' && self.self === self\n ? self\n : typeof global === 'object' && global.global === global\n ? global\n : typeof globalThis === 'object'\n ? globalThis\n : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n xhr.onload = function () {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function () {\n console.error('could not download file');\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false);\n try {\n xhr.send();\n }\n catch (e) { }\n return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent('click'));\n }\n catch (e) {\n const evt = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n detail: 0,\n screenX: 80,\n screenY: 20,\n clientX: 80,\n clientY: 20,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null,\n });\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n /AppleWebKit/.test(_navigator.userAgent) &&\n !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n ? () => { } // noop\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== 'undefined' &&\n 'download' in HTMLAnchorElement.prototype &&\n !isMacOSWebView\n ? downloadSaveAs\n : // Use msSaveOrOpenBlob as a second approach\n 'msSaveOrOpenBlob' in _navigator\n ? msSaveAs\n : // Fallback to using FileReader and a popup\n fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n const a = document.createElement('a');\n a.download = name;\n a.rel = 'noopener'; // tabnabbing\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n }\n else {\n a.target = '_blank';\n click(a);\n }\n }\n else {\n click(a);\n }\n }\n else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function () {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function () {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n }\n else {\n const a = document.createElement('a');\n a.href = blob;\n a.target = '_blank';\n setTimeout(function () {\n click(a);\n });\n }\n }\n else {\n // @ts-ignore: works on windows\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank');\n if (popup) {\n popup.document.title = popup.document.body.innerText = 'downloading...';\n }\n if (typeof blob === 'string')\n return download(blob, name, opts);\n const force = blob.type === 'application/octet-stream';\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n const reader = new FileReader();\n reader.onloadend = function () {\n let url = reader.result;\n if (typeof url !== 'string') {\n popup = null;\n throw new Error('Wrong reader.result type');\n }\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n if (popup) {\n popup.location.href = url;\n }\n else {\n location.assign(url);\n }\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n }\n else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n const piniaMessage = '🍍 ' + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n // No longer available :(\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n }\n else if (type === 'error') {\n console.error(piniaMessage);\n }\n else if (type === 'warn') {\n console.warn(piniaMessage);\n }\n else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n if (!('clipboard' in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error &&\n error.message.toLowerCase().includes('document is not focused')) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n toastMessage('Global state copied to clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n toastMessage('Global state pasted from clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia) {\n try {\n saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n type: 'text/plain;charset=utf-8',\n }), 'pinia-state.json');\n }\n catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.json';\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n // @ts-ignore: TODO: changed from 4.3 to 4.4\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n try {\n const open = getFileOpener();\n const result = await open();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n }\n catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nfunction loadStoresState(pinia, state) {\n for (const key in state) {\n const storeState = pinia.state.value[key];\n // store is already instantiated, patch it\n if (storeState) {\n Object.assign(storeState, state[key]);\n }\n else {\n // store is not instantiated, set the initial state\n pinia.state.value[key] = state[key];\n }\n }\n}\n\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store)\n ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL,\n }\n : {\n id: store.$id,\n label: store.$id,\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId],\n })),\n getters: storeNames\n .filter((id) => storeMap.get(id)._getters)\n .map((id) => {\n const store = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store._getters.reduce((getters, key) => {\n getters[key] = store[key];\n return getters;\n }, {}),\n };\n }),\n };\n return state;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key],\n })),\n };\n // avoid adding empty getters\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName],\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key],\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n // TODO: handle add and delete for arrays and objects\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {},\n });\n }\n else {\n return {\n operation: formatDisplay(events.type),\n key: formatDisplay(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue,\n };\n }\n}\nfunction formatMutationType(type) {\n switch (type) {\n case MutationType.direct:\n return 'mutation';\n case MutationType.patchFunction:\n return '$patch';\n case MutationType.patchObject:\n return '$patch';\n default:\n return 'unknown';\n }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n }, (api) => {\n if (typeof api.now !== 'function') {\n toastMessage('You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 0xe5df88,\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Pinia 🍍',\n icon: 'storage',\n treeFilterPlaceholder: 'Search stores',\n actions: [\n {\n icon: 'content_copy',\n action: () => {\n actionGlobalCopyState(pinia);\n },\n tooltip: 'Serialize and copy the state',\n },\n {\n icon: 'content_paste',\n action: async () => {\n await actionGlobalPasteState(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Replace the state with the content of your clipboard',\n },\n {\n icon: 'save',\n action: () => {\n actionGlobalSaveState(pinia);\n },\n tooltip: 'Save the state as a JSON file',\n },\n {\n icon: 'folder_open',\n action: async () => {\n await actionGlobalOpenStateFile(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Import the state from a JSON file',\n },\n ],\n nodeActions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n }\n else if (typeof store.$reset !== 'function') {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n }\n else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n },\n },\n ],\n });\n api.on.inspectComponent((payload) => {\n const proxy = (payload.componentInstance &&\n payload.componentInstance.proxy);\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'state',\n editable: true,\n value: store._isOptionsAPI\n ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state of this store',\n action: () => store.$reset(),\n },\n ],\n },\n }\n : // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {}),\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'getters',\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n }\n catch (error) {\n // @ts-expect-error: we just want to show it in devtools\n getters[key] = error;\n }\n return getters;\n }, {}),\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia];\n stores = stores.concat(Array.from(pinia._s.values()));\n payload.rootNodes = (payload.filter\n ? stores.filter((store) => '$id' in store\n ? store.$id\n .toLowerCase()\n .includes(payload.filter.toLowerCase())\n : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n : stores).map(formatStoreForInspectorTree);\n }\n });\n // Expose pinia instance as $pinia to window\n globalThis.$pinia = pinia;\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n // this could be the selected store restored for a different project\n // so it's better not to say anything here\n return;\n }\n if (inspectedStore) {\n // Expose selected store as $store to window\n if (payload.nodeId !== PINIA_ROOT_ID)\n globalThis.$store = toRaw(inspectedStore);\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n // access only the state\n if (path.length !== 1 ||\n !inspectedStore._customProperties.has(path[0]) ||\n path[0] in inspectedStore.$state) {\n path.unshift('$state');\n }\n }\n else {\n // Root access, we can omit the `.value` because the devtools API does it for us\n path.unshift('state');\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith('🍍')) {\n const storeId = payload.type.replace(/^🍍\\s*/, '');\n const store = pinia._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (path[0] !== 'state') {\n return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n }\n // rewrite the first entry to be able to directly set the state as\n // well as any other path\n path[0] = '$state';\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: 'Notify about new/deleted stores',\n type: 'boolean',\n defaultValue: true,\n },\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n },\n }, (api) => {\n // gracefully handle errors\n const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛫 ' + name,\n subtitle: 'start',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n },\n groupId,\n },\n });\n after((result) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛬 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n result,\n },\n groupId,\n },\n });\n });\n onError((error) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n logType: 'error',\n title: '💥 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n error,\n },\n groupId,\n },\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: 'Change',\n subtitle: name,\n data: {\n newValue,\n oldValue,\n },\n groupId: activeAction,\n },\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n // rootStore.state[store.id] = state\n const eventData = {\n time: now(),\n title: formatMutationType(type),\n data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n groupId: activeAction,\n };\n if (type === MutationType.patchFunction) {\n eventData.subtitle = '⤵️';\n }\n else if (type === MutationType.patchObject) {\n eventData.subtitle = '🧩';\n }\n else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data['rawEvent(s)'] = {\n _custom: {\n display: 'DebuggerEvent',\n type: 'object',\n tooltip: 'raw DebuggerEvent[]',\n value: events,\n },\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData,\n });\n }, { detached: true, flush: 'sync' });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🔥 ' + store.$id,\n subtitle: 'HMR update',\n data: {\n store: formatDisplay(store.$id),\n info: formatDisplay(`HMR update`),\n },\n },\n });\n // update the devtools too\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n // trigger an update so it can display new registered stores\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n // original actions of the store as they are given by pinia. We are going to override them\n const actions = actionNames.reduce((storeActions, actionName) => {\n // use toRaw to avoid tracking #541\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function () {\n // the running action id is incremented in a before action hook\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy\n ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n },\n })\n : store;\n // For Setup Stores we need https://github.com/tc39/proposal-async-context\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n activeAction = undefined;\n return retValue;\n };\n }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n // HMR module\n if (store.$id.startsWith('__hot:')) {\n return;\n }\n // detect option api vs setup api\n store._isOptionsAPI = !!options.state;\n // Do not overwrite actions mocked by @pinia/testing (#2298)\n if (!store._p._testing) {\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n // Upgrade the HMR to also update the new actions\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function (newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n }\n addStoreToDevtools(app, \n // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?\n store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n const scope = effectScope(true);\n // NOTE: here we could check the window object for a state and directly set it\n // if there is anything like it with Vue 3 SSR\n const state = scope.run(() => ref({}));\n let _p = [];\n // plugins added before calling app.use(pinia)\n let toBeInstalled = [];\n const pinia = markRaw({\n install(app) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n },\n use(plugin) {\n if (!this._a) {\n toBeInstalled.push(plugin);\n }\n else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: new Map(),\n state,\n });\n // pinia devtools rely on dev only features so they cannot be forced unless\n // the dev build of Vue is used. Avoid old browsers like IE11.\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n pinia._e.stop();\n pinia._s.clear();\n pinia._p.splice(0);\n pinia.state.value = {};\n // @ts-expect-error: non valid\n pinia._a = null;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in oldState) {\n const subPatch = oldState[key];\n // skip the whole sub tree\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n }\n else {\n // objects are either a bit more complex (e.g. refs) or primitives, so we\n // just set the whole thing\n newState[key] = subPatch;\n }\n }\n return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n * import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n // strip as much as possible from iife.prod\n if (!(process.env.NODE_ENV !== 'production')) {\n return () => { };\n }\n return (newModule) => {\n const pinia = hot.data.pinia || initialUseStore._pinia;\n if (!pinia) {\n // this store is still not used\n return;\n }\n // preserve the pinia instance across loads\n hot.data.pinia = pinia;\n // console.log('got data', newStore)\n for (const exportName in newModule) {\n const useStore = newModule[exportName];\n // console.log('checking for', exportName)\n if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n // console.log('Accepting update for', useStore.$id)\n const id = useStore.$id;\n if (id !== initialUseStore.$id) {\n console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n // return import.meta.hot.invalidate()\n return hot.invalidate();\n }\n const existingStore = pinia._s.get(id);\n if (!existingStore) {\n console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n return;\n }\n useStore(pinia, existingStore);\n }\n }\n };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n subscriptions.add(callback);\n const removeSubscription = () => {\n const isDel = subscriptions.delete(callback);\n isDel && onCleanup();\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.forEach((callback) => {\n callback(...args);\n });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\nfunction mergeReactiveObjects(target, patchToApply) {\n // Handle Map instances\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n else if (target instanceof Set && patchToApply instanceof Set) {\n // Handle Set instances\n patchToApply.forEach(target.add, target);\n }\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n target.hasOwnProperty(key) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n }\n else {\n // @ts-expect-error: subPatch is a valid value\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n ? Symbol('pinia:skipHydration')\n : /* istanbul ignore next */ Symbol();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n return Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n return (!isPlainObject(obj) ||\n !Object.prototype.hasOwnProperty.call(obj, skipHydrateSymbol));\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[id] = state ? state() : {};\n }\n // avoid creating a state in pinia.state.value\n const localState = (process.env.NODE_ENV !== 'production') && hot\n ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n : toRefs(pinia.state.value[id]);\n return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if ((process.env.NODE_ENV !== 'production') && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia);\n // it was created just before\n const store = pinia._s.get(id);\n // allow cross using stores\n // @ts-expect-error\n // return getters![name].call(context, context)\n // TODO: avoid reading the getter while assigning with a global variable\n return getters[name].call(store, store);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign({ actions: {} }, options);\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n throw new Error('Pinia destroyed');\n }\n // watcher options for $subscribe\n const $subscribeOptions = { deep: true };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n $subscribeOptions.onTrigger = (event) => {\n /* istanbul ignore else */\n if (isListening) {\n debuggerEvents = event;\n // avoid triggering this while the store is being built and the state is being set in pinia\n }\n else if (isListening == false && !store._hotUpdating) {\n // let patch send all the events together later\n /* istanbul ignore else */\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n }\n else {\n console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n }\n }\n };\n }\n // internal state\n let isListening; // set to true at the end\n let isSyncListening; // set to true at the end\n let subscriptions = new Set();\n let actionSubscriptions = new Set();\n let debuggerEvents;\n const initialState = pinia.state.value[$id];\n // avoid setting the state for option stores if it is set\n // by the setup\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[$id] = {};\n }\n const hotState = ref({});\n // avoid triggering too many listeners\n // https://github.com/vuejs/pinia/issues/1129\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n // reset the debugger events since patches are sync\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === 'function') {\n partialStateOrMutator(pinia.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n else {\n mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n const myListenerId = (activeListener = Symbol());\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n // because we paused the watcher, we need to manually call the subscriptions\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n }\n const $reset = isOptionsStore\n ? function $reset() {\n const { state } = options;\n const newState = state ? state() : {};\n // we use a patch to group all changes into one single subscription\n this.$patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, newState);\n });\n }\n : /* istanbul ignore next */\n (process.env.NODE_ENV !== 'production')\n ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n }\n : noop;\n function $dispose() {\n scope.stop();\n subscriptions.clear();\n actionSubscriptions.clear();\n pinia._s.delete($id);\n }\n /**\n * Helper that wraps function so it can be tracked with $onAction\n * @param fn - action to wrap\n * @param name - name of the action\n */\n const action = (fn, name = '') => {\n if (ACTION_MARKER in fn) {\n fn[ACTION_NAME] = name;\n return fn;\n }\n const wrappedAction = function () {\n setActivePinia(pinia);\n const args = Array.from(arguments);\n const afterCallbackSet = new Set();\n const onErrorCallbackSet = new Set();\n function after(callback) {\n afterCallbackSet.add(callback);\n }\n function onError(callback) {\n onErrorCallbackSet.add(callback);\n }\n // @ts-expect-error\n triggerSubscriptions(actionSubscriptions, {\n args,\n name: wrappedAction[ACTION_NAME],\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = fn.apply(this && this.$id === $id ? this : store, args);\n // handle sync errors\n }\n catch (error) {\n triggerSubscriptions(onErrorCallbackSet, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret\n .then((value) => {\n triggerSubscriptions(afterCallbackSet, value);\n return value;\n })\n .catch((error) => {\n triggerSubscriptions(onErrorCallbackSet, error);\n return Promise.reject(error);\n });\n }\n // trigger after callbacks\n triggerSubscriptions(afterCallbackSet, ret);\n return ret;\n };\n wrappedAction[ACTION_MARKER] = true;\n wrappedAction[ACTION_NAME] = name; // will be set later\n // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n // because all the added properties are internals that are exposed through `$onAction()` only\n return wrappedAction;\n };\n const _hmrPayload = /*#__PURE__*/ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState,\n });\n const partialStore = {\n _p: pinia,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n if (options.flush === 'sync' ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents,\n }, state);\n }\n }, assign({}, $subscribeOptions, options)));\n return removeSubscription;\n },\n $dispose,\n };\n const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\n ? assign({\n _hmrPayload,\n _customProperties: markRaw(new Set()), // devtools custom properties\n }, partialStore\n // must be added later\n // setupStore\n )\n : partialStore);\n // store the partial store now so the setup of stores can instantiate each other before they are finished without\n // creating infinite loops.\n pinia._s.set($id, store);\n const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));\n // overwrite existing actions to support $onAction\n for (const key in setupStore) {\n const prop = setupStore[key];\n if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n // mark it as a piece of state to be serialized\n if ((process.env.NODE_ENV !== 'production') && hot) {\n hotState.value[key] = toRef(setupStore, key);\n // createOptionStore directly sets the state in pinia.state.value so we\n // can just skip that\n }\n else if (!isOptionsStore) {\n // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n }\n else {\n // probably a reactive object, lets recursively assign\n // @ts-expect-error: prop is unknown\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n // transfer the ref to the pinia state to keep everything in sync\n pinia.state.value[$id][key] = prop;\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.state.push(key);\n }\n // action\n }\n else if (typeof prop === 'function') {\n const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n // @ts-expect-error\n setupStore[key] = actionValue;\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.actions[key] = prop;\n }\n // list actions so they can be used in plugins\n // @ts-expect-error\n optionsForPlugin.actions[key] = prop;\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n // add getters for devtools\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore\n ? // @ts-expect-error\n options.getters[key]\n : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters ||\n // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n // add the state, getters, and action properties\n /* istanbul ignore if */\n assign(store, setupStore);\n // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n // Make `storeToRefs()` work with `reactive()` #799\n assign(toRaw(store), setupStore);\n // use this instead of a computed with setter to be able to create it anywhere\n // without linking the computed lifespan to wherever the store is first\n // created.\n Object.defineProperty(store, '$state', {\n get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n set: (state) => {\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && hot) {\n throw new Error('cannot set hotState');\n }\n $patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, state);\n });\n },\n });\n // add the hotUpdate before plugins to allow them to override it\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === 'object' &&\n isPlainObject(newStateTarget) &&\n isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n }\n else {\n // transfer the ref\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n // patch direct access properties to allow store.stateProperty to work as\n // store.$state.stateProperty\n // @ts-expect-error: any type\n store[stateKey] = toRef(newStore.$state, stateKey);\n });\n // remove deleted state properties\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[stateKey];\n }\n });\n // avoid devtools logging this as a mutation\n isListening = false;\n isSyncListening = false;\n pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const actionFn = newStore[actionName];\n // @ts-expect-error: actionName is a string\n store[actionName] =\n //\n action(actionFn, actionName);\n }\n // TODO: does this work in both setup and option store?\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore\n ? // special handling of options api\n computed(() => {\n setActivePinia(pinia);\n return getter.call(store, store);\n })\n : getter;\n // @ts-expect-error: getterName is a string\n store[getterName] =\n //\n getterValue;\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // update the values used in devtools and to allow deleting new properties later on\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false,\n };\n ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n });\n }\n // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const extensions = scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign(store, extensions);\n }\n else {\n assign(store, scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n })));\n }\n });\n if ((process.env.NODE_ENV !== 'production') &&\n store.$state &&\n typeof store.$state === 'object' &&\n typeof store.$state.constructor === 'function' &&\n !store.$state.constructor.toString().includes('[native code]')) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n `\\tstate: () => new MyClass()\\n` +\n `Found in store \"${store.$id}\".`);\n }\n // only apply hydrate to option stores with an initial state in pinia\n if (initialState &&\n isOptionsStore &&\n options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\n// allows unused stores to be tree shaken\n/*! #__NO_SIDE_EFFECTS__ */\nfunction defineStore(\n// TODO: add proper types from above\nid, setup, setupOptions) {\n let options;\n const isSetupStore = typeof setup === 'function';\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\n function useStore(pinia, hot) {\n const hasContext = hasInjectionContext();\n pinia =\n // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia)\n setActivePinia(pinia);\n if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n `This will fail in production.`);\n }\n pinia = activePinia;\n if (!pinia._s.has(id)) {\n // creating the store registers it in `pinia._s`\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia);\n }\n else {\n createOptionsStore(id, options, pinia);\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n // @ts-expect-error: not the right inferred type\n useStore._pinia = pinia;\n }\n }\n const store = pinia._s.get(id);\n if ((process.env.NODE_ENV !== 'production') && hot) {\n const hotId = '__hot:' + id;\n const newStore = isSetupStore\n ? createSetupStore(hotId, setup, options, pinia, true)\n : createOptionsStore(hotId, assign({}, options), pinia, true);\n hot._hotUpdate(newStore);\n // cleanup the state properties and the store from the cache\n delete pinia.state.value[hotId];\n pinia._s.delete(hotId);\n }\n if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n // save stores in instances to access them devtools\n if (currentInstance &&\n currentInstance.proxy &&\n // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n cache[id] = store;\n }\n }\n // StoreGeneric cannot be casted towards Store\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n * computed: {\n * // other computed properties\n * ...mapStores(useUserStore, useCartStore)\n * },\n *\n * created() {\n * this.userStore // store with id \"user\"\n * this.cartStore // store with id \"cart\"\n * }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n `Replace\\n` +\n `\\tmapStores([useAuthStore, useCartStore])\\n` +\n `with\\n` +\n `\\tmapStores(useAuthStore, useCartStore)\\n` +\n `This will fail in production if not fixed.`);\n stores = stores[0];\n }\n return stores.reduce((reduced, useStore) => {\n // @ts-expect-error: $id is added by defineStore\n reduced[useStore.$id + mapStoreSuffix] = function () {\n return useStore(this.$pinia);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = function () {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key];\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function () {\n const store = useStore(this.$pinia);\n const storeKey = keysOrMapper[key];\n // for some reason TS is unable to infer the type of storeKey to be a\n // function\n return typeof storeKey === 'function'\n ? storeKey.call(this, store)\n : // @ts-expect-error: FIXME: should work?\n store[storeKey];\n };\n return reduced;\n }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key](...args);\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[keysOrMapper[key]](...args);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\n return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n },\n };\n return reduced;\n }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n const rawStore = toRaw(store);\n const refs = {};\n for (const key in rawStore) {\n const value = rawStore[key];\n // There is no native method to check for a computed\n // https://github.com/vuejs/core/pull/4165\n if (value.effect) {\n // @ts-expect-error: too hard to type correctly\n refs[key] =\n // ...\n computed({\n get: () => store[key],\n set(value) {\n store[key] = value;\n },\n });\n }\n else if (isRef(value) || isReactive(value)) {\n // @ts-expect-error: the key is state or getter\n refs[key] =\n // ---\n toRef(store, key);\n }\n }\n return refs;\n}\n\nexport { MutationType, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, shouldHydrate, skipHydrate, storeToRefs };\n","/*!\n * vue-router v4.6.4\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onActivated, onDeactivated, onUnmounted, watch } from \"vue\";\nimport { setupDevtoolsPlugin } from \"@vue/devtools-api\";\n\n//#region src/utils/env.ts\nconst isBrowser = typeof document !== \"undefined\";\n\n//#endregion\n//#region src/utils/index.ts\n/**\n* Identity function that returns the value as is.\n*\n* @param v - the value to return\n*\n* @internal\n*/\nconst identityFn = (v) => v;\n/**\n* Allows differentiating lazy components from functional components and vue-class-component\n* @internal\n*\n* @param component\n*/\nfunction isRouteComponent(component) {\n\treturn typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction isESModule(obj) {\n\treturn obj.__esModule || obj[Symbol.toStringTag] === \"Module\" || obj.default && isRouteComponent(obj.default);\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n\tconst newParams = {};\n\tfor (const key in params) {\n\t\tconst value = params[key];\n\t\tnewParams[key] = isArray(value) ? value.map(fn) : fn(value);\n\t}\n\treturn newParams;\n}\nconst noop = () => {};\n/**\n* Typesafe alternative to Array.isArray\n* https://github.com/microsoft/TypeScript/pull/48228\n*\n* @internal\n*/\nconst isArray = Array.isArray;\nfunction mergeOptions(defaults, partialOptions) {\n\tconst options = {};\n\tfor (const key in defaults) options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n\treturn options;\n}\n\n//#endregion\n//#region src/warning.ts\nfunction warn$1(msg) {\n\tconst args = Array.from(arguments).slice(1);\n\tconsole.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\n\n//#endregion\n//#region src/encoding.ts\n/**\n* Encoding Rules (␣ = Space)\n* - Path: ␣ \" < > # ? { }\n* - Query: ␣ \" < > # & =\n* - Hash: ␣ \" < > `\n*\n* On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n* defines some extra characters to be encoded. Most browsers do not encode them\n* in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n* also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n* plus `-._~`. This extra safety should be applied to query by patching the\n* string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n* should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n* into a `/` if directly typed in. The _backtick_ (`````) should also be\n* encoded everywhere because some browsers like FF encode it when directly\n* written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n*/\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\n/**\n* NOTE: It's not clear to me if we should encode the + symbol in queries, it\n* seems to be less flexible than not doing so and I can't find out the legacy\n* systems requiring this for regular requests like text/html. In the standard,\n* the encoding of the plus character is only mentioned for\n* application/x-www-form-urlencoded\n* (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n* leave the plus character as is in queries. To be more flexible, we allow the\n* plus character on the query, but it can also be manually encoded by the user.\n*\n* Resources:\n* - https://url.spec.whatwg.org/#urlencoded-parsing\n* - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n*/\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\n/**\n* Encode characters that need to be encoded on the path, search and hash\n* sections of the URL.\n*\n* @internal\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction commonEncode(text) {\n\treturn text == null ? \"\" : encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\n/**\n* Encode characters that need to be encoded on the hash section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeHash(text) {\n\treturn commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Encode characters that need to be encoded query values on the query\n* section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeQueryValue(text) {\n\treturn commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Like `encodeQueryValue` but also encodes the `=` character.\n*\n* @param text - string to encode\n*/\nfunction encodeQueryKey(text) {\n\treturn encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodePath(text) {\n\treturn commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL as a\n* param. This function encodes everything {@link encodePath} does plus the\n* slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n* string instead.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeParam(text) {\n\treturn encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n\tif (text == null) return null;\n\ttry {\n\t\treturn decodeURIComponent(\"\" + text);\n\t} catch (err) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Error decoding \"${text}\". Using original value`);\n\t}\n\treturn \"\" + text;\n}\n\n//#endregion\n//#region src/location.ts\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\n/**\n* Transforms a URI into a normalized history location\n*\n* @param parseQuery\n* @param location - URI to normalize\n* @param currentLocation - current absolute location. Allows resolving relative\n* paths. Must start with `/`. Defaults to `/`\n* @returns a normalized history location\n*/\nfunction parseURL(parseQuery$1, location, currentLocation = \"/\") {\n\tlet path, query = {}, searchString = \"\", hash = \"\";\n\tconst hashPos = location.indexOf(\"#\");\n\tlet searchPos = location.indexOf(\"?\");\n\tsearchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos;\n\tif (searchPos >= 0) {\n\t\tpath = location.slice(0, searchPos);\n\t\tsearchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length);\n\t\tquery = parseQuery$1(searchString.slice(1));\n\t}\n\tif (hashPos >= 0) {\n\t\tpath = path || location.slice(0, hashPos);\n\t\thash = location.slice(hashPos, location.length);\n\t}\n\tpath = resolveRelativePath(path != null ? path : location, currentLocation);\n\treturn {\n\t\tfullPath: path + searchString + hash,\n\t\tpath,\n\t\tquery,\n\t\thash: decode(hash)\n\t};\n}\nfunction NEW_stringifyURL(stringifyQuery$1, path, query, hash = \"\") {\n\tconst searchText = stringifyQuery$1(query);\n\treturn path + (searchText && \"?\") + searchText + encodeHash(hash);\n}\n/**\n* Stringifies a URL object\n*\n* @param stringifyQuery\n* @param location\n*/\nfunction stringifyURL(stringifyQuery$1, location) {\n\tconst query = location.query ? stringifyQuery$1(location.query) : \"\";\n\treturn location.path + (query && \"?\") + query + (location.hash || \"\");\n}\n/**\n* Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n*\n* @param pathname - location.pathname\n* @param base - base to strip off\n*/\nfunction stripBase(pathname, base) {\n\tif (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) return pathname;\n\treturn pathname.slice(base.length) || \"/\";\n}\n/**\n* Checks if two RouteLocation are equal. This means that both locations are\n* pointing towards the same {@link RouteRecord} and that all `params`, `query`\n* parameters and `hash` are the same\n*\n* @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n* @param a - first {@link RouteLocation}\n* @param b - second {@link RouteLocation}\n*/\nfunction isSameRouteLocation(stringifyQuery$1, a, b) {\n\tconst aLastIndex = a.matched.length - 1;\n\tconst bLastIndex = b.matched.length - 1;\n\treturn aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery$1(a.query) === stringifyQuery$1(b.query) && a.hash === b.hash;\n}\n/**\n* Check if two `RouteRecords` are equal. Takes into account aliases: they are\n* considered equal to the `RouteRecord` they are aliasing.\n*\n* @param a - first {@link RouteRecord}\n* @param b - second {@link RouteRecord}\n*/\nfunction isSameRouteRecord(a, b) {\n\treturn (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (var key in a) if (!isSameRouteLocationParamsValue(a[key], b[key])) return false;\n\treturn true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n\treturn isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a?.valueOf() === b?.valueOf();\n}\n/**\n* Check if two arrays are the same or if an array with one single entry is the\n* same as another primitive value. Used to check query and parameters\n*\n* @param a - array of values\n* @param b - array of values or a single value\n*/\nfunction isEquivalentArray(a, b) {\n\treturn isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\n/**\n* Resolves a relative path that starts with `.`.\n*\n* @param to - path location we are resolving\n* @param from - currentLocation.path, should start with `/`\n*/\nfunction resolveRelativePath(to, from) {\n\tif (to.startsWith(\"/\")) return to;\n\tif (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n\t\twarn$1(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n\t\treturn to;\n\t}\n\tif (!to) return from;\n\tconst fromSegments = from.split(\"/\");\n\tconst toSegments = to.split(\"/\");\n\tconst lastToSegment = toSegments[toSegments.length - 1];\n\tif (lastToSegment === \"..\" || lastToSegment === \".\") toSegments.push(\"\");\n\tlet position = fromSegments.length - 1;\n\tlet toPosition;\n\tlet segment;\n\tfor (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n\t\tsegment = toSegments[toPosition];\n\t\tif (segment === \".\") continue;\n\t\tif (segment === \"..\") {\n\t\t\tif (position > 1) position--;\n\t\t} else break;\n\t}\n\treturn fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition).join(\"/\");\n}\n/**\n* Initial route location where the router is. Can be used in navigation guards\n* to differentiate the initial navigation.\n*\n* @example\n* ```js\n* import { START_LOCATION } from 'vue-router'\n*\n* router.beforeEach((to, from) => {\n* if (from === START_LOCATION) {\n* // initial navigation\n* }\n* })\n* ```\n*/\nconst START_LOCATION_NORMALIZED = {\n\tpath: \"/\",\n\tname: void 0,\n\tparams: {},\n\tquery: {},\n\thash: \"\",\n\tfullPath: \"/\",\n\tmatched: [],\n\tmeta: {},\n\tredirectedFrom: void 0\n};\n\n//#endregion\n//#region src/history/common.ts\nlet NavigationType = /* @__PURE__ */ function(NavigationType$1) {\n\tNavigationType$1[\"pop\"] = \"pop\";\n\tNavigationType$1[\"push\"] = \"push\";\n\treturn NavigationType$1;\n}({});\nlet NavigationDirection = /* @__PURE__ */ function(NavigationDirection$1) {\n\tNavigationDirection$1[\"back\"] = \"back\";\n\tNavigationDirection$1[\"forward\"] = \"forward\";\n\tNavigationDirection$1[\"unknown\"] = \"\";\n\treturn NavigationDirection$1;\n}({});\n/**\n* Starting location for Histories\n*/\nconst START = \"\";\n/**\n* Normalizes a base by removing any trailing slash and reading the base tag if\n* present.\n*\n* @param base - base to normalize\n*/\nfunction normalizeBase(base) {\n\tif (!base) if (isBrowser) {\n\t\tconst baseEl = document.querySelector(\"base\");\n\t\tbase = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n\t\tbase = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n\t} else base = \"/\";\n\tif (base[0] !== \"/\" && base[0] !== \"#\") base = \"/\" + base;\n\treturn removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n\treturn base.replace(BEFORE_HASH_RE, \"#\") + location;\n}\n\n//#endregion\n//#region src/scrollBehavior.ts\nfunction getElementPosition(el, offset) {\n\tconst docRect = document.documentElement.getBoundingClientRect();\n\tconst elRect = el.getBoundingClientRect();\n\treturn {\n\t\tbehavior: offset.behavior,\n\t\tleft: elRect.left - docRect.left - (offset.left || 0),\n\t\ttop: elRect.top - docRect.top - (offset.top || 0)\n\t};\n}\nconst computeScrollPosition = () => ({\n\tleft: window.scrollX,\n\ttop: window.scrollY\n});\nfunction scrollToPosition(position) {\n\tlet scrollToOptions;\n\tif (\"el\" in position) {\n\t\tconst positionEl = position.el;\n\t\tconst isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n\t\t/**\n\t\t* `id`s can accept pretty much any characters, including CSS combinators\n\t\t* like `>` or `~`. It's still possible to retrieve elements using\n\t\t* `document.getElementById('~')` but it needs to be escaped when using\n\t\t* `document.querySelector('#\\\\~')` for it to be valid. The only\n\t\t* requirements for `id`s are them to be unique on the page and to not be\n\t\t* empty (`id=\"\"`). Because of that, when passing an id selector, it should\n\t\t* be properly escaped for it to work with `querySelector`. We could check\n\t\t* for the id selector to be simple (no CSS combinators `+ >~`) but that\n\t\t* would make things inconsistent since they are valid characters for an\n\t\t* `id` but would need to be escaped when using `querySelector`, breaking\n\t\t* their usage and ending up in no selector returned. Selectors need to be\n\t\t* escaped:\n\t\t*\n\t\t* - `#1-thing` becomes `#\\31 -thing`\n\t\t* - `#with~symbols` becomes `#with\\\\~symbols`\n\t\t*\n\t\t* - More information about the topic can be found at\n\t\t* https://mathiasbynens.be/notes/html5-id-class.\n\t\t* - Practical example: https://mathiasbynens.be/demo/html5-id\n\t\t*/\n\t\tif (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n\t\t\tif (!isIdSelector || !document.getElementById(position.el.slice(1))) try {\n\t\t\t\tconst foundEl = document.querySelector(position.el);\n\t\t\t\tif (isIdSelector && foundEl) {\n\t\t\t\t\twarn$1(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\twarn$1(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n\t\tif (!el) {\n\t\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n\t\t\treturn;\n\t\t}\n\t\tscrollToOptions = getElementPosition(el, position);\n\t} else scrollToOptions = position;\n\tif (\"scrollBehavior\" in document.documentElement.style) window.scrollTo(scrollToOptions);\n\telse window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n}\nfunction getScrollKey(path, delta) {\n\treturn (history.state ? history.state.position - delta : -1) + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n\tscrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n\tconst scroll = scrollPositions.get(key);\n\tscrollPositions.delete(key);\n\treturn scroll;\n}\n/**\n* ScrollBehavior instance used by the router to compute and restore the scroll\n* position when navigating.\n*/\n\n//#endregion\n//#region src/types/typeGuards.ts\nfunction isRouteLocation(route) {\n\treturn typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n\treturn typeof name === \"string\" || typeof name === \"symbol\";\n}\n\n//#endregion\n//#region src/errors.ts\n/**\n* Flags so we can combine them when checking for multiple errors. This is the internal version of\n* {@link NavigationFailureType}.\n*\n* @internal\n*/\nlet ErrorTypes = /* @__PURE__ */ function(ErrorTypes$1) {\n\tErrorTypes$1[ErrorTypes$1[\"MATCHER_NOT_FOUND\"] = 1] = \"MATCHER_NOT_FOUND\";\n\tErrorTypes$1[ErrorTypes$1[\"NAVIGATION_GUARD_REDIRECT\"] = 2] = \"NAVIGATION_GUARD_REDIRECT\";\n\tErrorTypes$1[ErrorTypes$1[\"NAVIGATION_ABORTED\"] = 4] = \"NAVIGATION_ABORTED\";\n\tErrorTypes$1[ErrorTypes$1[\"NAVIGATION_CANCELLED\"] = 8] = \"NAVIGATION_CANCELLED\";\n\tErrorTypes$1[ErrorTypes$1[\"NAVIGATION_DUPLICATED\"] = 16] = \"NAVIGATION_DUPLICATED\";\n\treturn ErrorTypes$1;\n}({});\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\n/**\n* Enumeration with all possible types for navigation failures. Can be passed to\n* {@link isNavigationFailure} to check for specific failures.\n*/\nlet NavigationFailureType = /* @__PURE__ */ function(NavigationFailureType$1) {\n\t/**\n\t* An aborted navigation is a navigation that failed because a navigation\n\t* guard returned `false` or called `next(false)`\n\t*/\n\tNavigationFailureType$1[NavigationFailureType$1[\"aborted\"] = 4] = \"aborted\";\n\t/**\n\t* A cancelled navigation is a navigation that failed because a more recent\n\t* navigation finished started (not necessarily finished).\n\t*/\n\tNavigationFailureType$1[NavigationFailureType$1[\"cancelled\"] = 8] = \"cancelled\";\n\t/**\n\t* A duplicated navigation is a navigation that failed because it was\n\t* initiated while already being at the exact same location.\n\t*/\n\tNavigationFailureType$1[NavigationFailureType$1[\"duplicated\"] = 16] = \"duplicated\";\n\treturn NavigationFailureType$1;\n}({});\nconst ErrorTypeMessages = {\n\t[ErrorTypes.MATCHER_NOT_FOUND]({ location, currentLocation }) {\n\t\treturn `No match for\\n ${JSON.stringify(location)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n\t},\n\t[ErrorTypes.NAVIGATION_GUARD_REDIRECT]({ from, to }) {\n\t\treturn `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n\t},\n\t[ErrorTypes.NAVIGATION_ABORTED]({ from, to }) {\n\t\treturn `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n\t},\n\t[ErrorTypes.NAVIGATION_CANCELLED]({ from, to }) {\n\t\treturn `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n\t},\n\t[ErrorTypes.NAVIGATION_DUPLICATED]({ from, to }) {\n\t\treturn `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n\t}\n};\n/**\n* Creates a typed NavigationFailure object.\n* @internal\n* @param type - NavigationFailureType\n* @param params - { from, to }\n*/\nfunction createRouterError(type, params) {\n\tif (process.env.NODE_ENV !== \"production\" || false) return assign(new Error(ErrorTypeMessages[type](params)), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n\telse return assign(/* @__PURE__ */ new Error(), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n}\nfunction isNavigationFailure(error, type) {\n\treturn error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));\n}\nconst propertiesToLog = [\n\t\"params\",\n\t\"query\",\n\t\"hash\"\n];\nfunction stringifyRoute(to) {\n\tif (typeof to === \"string\") return to;\n\tif (to.path != null) return to.path;\n\tconst location = {};\n\tfor (const key of propertiesToLog) if (key in to) location[key] = to[key];\n\treturn JSON.stringify(location, null, 2);\n}\n\n//#endregion\n//#region src/query.ts\n/**\n* Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n* version with the leading `?` and without Should work as URLSearchParams\n\n* @internal\n*\n* @param search - search string to parse\n* @returns a query object\n*/\nfunction parseQuery(search) {\n\tconst query = {};\n\tif (search === \"\" || search === \"?\") return query;\n\tconst searchParams = (search[0] === \"?\" ? search.slice(1) : search).split(\"&\");\n\tfor (let i = 0; i < searchParams.length; ++i) {\n\t\tconst searchParam = searchParams[i].replace(PLUS_RE, \" \");\n\t\tconst eqPos = searchParam.indexOf(\"=\");\n\t\tconst key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n\t\tconst value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n\t\tif (key in query) {\n\t\t\tlet currentValue = query[key];\n\t\t\tif (!isArray(currentValue)) currentValue = query[key] = [currentValue];\n\t\t\tcurrentValue.push(value);\n\t\t} else query[key] = value;\n\t}\n\treturn query;\n}\n/**\n* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n* doesn't prepend a `?`\n*\n* @internal\n*\n* @param query - query object to stringify\n* @returns string version of the query without the leading `?`\n*/\nfunction stringifyQuery(query) {\n\tlet search = \"\";\n\tfor (let key in query) {\n\t\tconst value = query[key];\n\t\tkey = encodeQueryKey(key);\n\t\tif (value == null) {\n\t\t\tif (value !== void 0) search += (search.length ? \"&\" : \"\") + key;\n\t\t\tcontinue;\n\t\t}\n\t\t(isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value$1) => {\n\t\t\tif (value$1 !== void 0) {\n\t\t\t\tsearch += (search.length ? \"&\" : \"\") + key;\n\t\t\t\tif (value$1 != null) search += \"=\" + value$1;\n\t\t\t}\n\t\t});\n\t}\n\treturn search;\n}\n/**\n* Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n* numbers into strings, removing keys with an undefined value and replacing\n* undefined with null in arrays\n*\n* @param query - query object to normalize\n* @returns a normalized query object\n*/\nfunction normalizeQuery(query) {\n\tconst normalizedQuery = {};\n\tfor (const key in query) {\n\t\tconst value = query[key];\n\t\tif (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n\t}\n\treturn normalizedQuery;\n}\n\n//#endregion\n//#region src/injectionSymbols.ts\n/**\n* RouteRecord being rendered by the closest ancestor Router View. Used for\n* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n* Location Matched\n*\n* @internal\n*/\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\n/**\n* Allows overriding the router view depth to control which component in\n* `matched` is rendered. rvd stands for Router View Depth\n*\n* @internal\n*/\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\n/**\n* Allows overriding the router instance returned by `useRouter` in tests. r\n* stands for router\n*\n* @internal\n*/\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\n/**\n* Allows overriding the current route returned by `useRoute` in tests. rl\n* stands for route location\n*\n* @internal\n*/\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\n/**\n* Allows overriding the current route used by router-view. Internally this is\n* used when the `route` prop is passed.\n*\n* @internal\n*/\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\n\n//#endregion\n//#region src/utils/callbacks.ts\n/**\n* Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n*/\nfunction useCallbacks() {\n\tlet handlers = [];\n\tfunction add(handler) {\n\t\thandlers.push(handler);\n\t\treturn () => {\n\t\t\tconst i = handlers.indexOf(handler);\n\t\t\tif (i > -1) handlers.splice(i, 1);\n\t\t};\n\t}\n\tfunction reset() {\n\t\thandlers = [];\n\t}\n\treturn {\n\t\tadd,\n\t\tlist: () => handlers.slice(),\n\t\treset\n\t};\n}\n\n//#endregion\n//#region src/navigationGuards.ts\nfunction registerGuard(record, name, guard) {\n\tconst removeFromList = () => {\n\t\trecord[name].delete(guard);\n\t};\n\tonUnmounted(removeFromList);\n\tonDeactivated(removeFromList);\n\tonActivated(() => {\n\t\trecord[name].add(guard);\n\t});\n\trecord[name].add(guard);\n}\n/**\n* Add a navigation guard that triggers whenever the component for the current\n* location is about to be left. Similar to {@link beforeRouteLeave} but can be\n* used in any component. The guard is removed when the component is unmounted.\n*\n* @param leaveGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteLeave(leaveGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tconst activeRecord = inject(matchedRouteKey, {}).value;\n\tif (!activeRecord) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(\"No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?\");\n\t\treturn;\n\t}\n\tregisterGuard(activeRecord, \"leaveGuards\", leaveGuard);\n}\n/**\n* Add a navigation guard that triggers whenever the current location is about\n* to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n* component. The guard is removed when the component is unmounted.\n*\n* @param updateGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteUpdate(updateGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tconst activeRecord = inject(matchedRouteKey, {}).value;\n\tif (!activeRecord) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(\"No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?\");\n\t\treturn;\n\t}\n\tregisterGuard(activeRecord, \"updateGuards\", updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {\n\tconst enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n\treturn () => new Promise((resolve, reject) => {\n\t\tconst next = (valid) => {\n\t\t\tif (valid === false) reject(createRouterError(ErrorTypes.NAVIGATION_ABORTED, {\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t}));\n\t\t\telse if (valid instanceof Error) reject(valid);\n\t\t\telse if (isRouteLocation(valid)) reject(createRouterError(ErrorTypes.NAVIGATION_GUARD_REDIRECT, {\n\t\t\t\tfrom: to,\n\t\t\t\tto: valid\n\t\t\t}));\n\t\t\telse {\n\t\t\t\tif (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") enterCallbackArray.push(valid);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\tconst guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next));\n\t\tlet guardCall = Promise.resolve(guardReturn);\n\t\tif (guard.length < 3) guardCall = guardCall.then(next);\n\t\tif (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n\t\t\tconst message = `The \"next\" callback was never called inside of ${guard.name ? \"\\\"\" + guard.name + \"\\\"\" : \"\"}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n\t\t\tif (typeof guardReturn === \"object\" && \"then\" in guardReturn) guardCall = guardCall.then((resolvedValue) => {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t}\n\t\t\t\treturn resolvedValue;\n\t\t\t});\n\t\t\telse if (guardReturn !== void 0) {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tguardCall.catch((err) => reject(err));\n\t});\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n\tlet called = 0;\n\treturn function() {\n\t\tif (called++ === 1) warn$1(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n\t\tnext._called = true;\n\t\tif (called === 1) next.apply(null, arguments);\n\t};\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {\n\tconst guards = [];\n\tfor (const record of matched) {\n\t\tif (process.env.NODE_ENV !== \"production\" && !record.components && record.children && !record.children.length) warn$1(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n\t\tfor (const name in record.components) {\n\t\t\tlet rawComponent = record.components[name];\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n\t\t\t\t\tthrow new Error(\"Invalid route component\");\n\t\t\t\t} else if (\"then\" in rawComponent) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n\t\t\t\t\tconst promise = rawComponent;\n\t\t\t\t\trawComponent = () => promise;\n\t\t\t\t} else if (rawComponent.__asyncLoader && !rawComponent.__warnedDefineAsync) {\n\t\t\t\t\trawComponent.__warnedDefineAsync = true;\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guardType !== \"beforeRouteEnter\" && !record.instances[name]) continue;\n\t\t\tif (isRouteComponent(rawComponent)) {\n\t\t\t\tconst guard = (rawComponent.__vccOpts || rawComponent)[guardType];\n\t\t\t\tguard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n\t\t\t} else {\n\t\t\t\tlet componentPromise = rawComponent();\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n\t\t\t\t\tcomponentPromise = Promise.resolve(componentPromise);\n\t\t\t\t}\n\t\t\t\tguards.push(() => componentPromise.then((resolved) => {\n\t\t\t\t\tif (!resolved) throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n\t\t\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\tconst guard = (resolvedComponent.__vccOpts || resolvedComponent)[guardType];\n\t\t\t\t\treturn guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\treturn guards;\n}\n/**\n* Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n*\n* @param route - resolved route to load\n*/\nfunction loadRouteLocation(route) {\n\treturn route.matched.every((record) => record.redirect) ? Promise.reject(/* @__PURE__ */ new Error(\"Cannot load a route that redirects.\")) : Promise.all(route.matched.map((record) => record.components && Promise.all(Object.keys(record.components).reduce((promises, name) => {\n\t\tconst rawComponent = record.components[name];\n\t\tif (typeof rawComponent === \"function\" && !(\"displayName\" in rawComponent)) promises.push(rawComponent().then((resolved) => {\n\t\t\tif (!resolved) return Promise.reject(/* @__PURE__ */ new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\trecord.mods[name] = resolved;\n\t\t\trecord.components[name] = resolvedComponent;\n\t\t}));\n\t\treturn promises;\n\t}, [])))).then(() => route);\n}\n/**\n* Split the leaving, updating, and entering records.\n* @internal\n*\n* @param to - Location we are navigating to\n* @param from - Location we are navigating from\n*/\nfunction extractChangingRecords(to, from) {\n\tconst leavingRecords = [];\n\tconst updatingRecords = [];\n\tconst enteringRecords = [];\n\tconst len = Math.max(from.matched.length, to.matched.length);\n\tfor (let i = 0; i < len; i++) {\n\t\tconst recordFrom = from.matched[i];\n\t\tif (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);\n\t\telse leavingRecords.push(recordFrom);\n\t\tconst recordTo = to.matched[i];\n\t\tif (recordTo) {\n\t\t\tif (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);\n\t\t}\n\t}\n\treturn [\n\t\tleavingRecords,\n\t\tupdatingRecords,\n\t\tenteringRecords\n\t];\n}\n\n//#endregion\n//#region src/devtools.ts\n/**\n* Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n*\n* @param routeLocation - routeLocation to format\n* @param tooltip - optional tooltip\n* @returns a copy of the routeLocation\n*/\nfunction formatRouteLocation(routeLocation, tooltip) {\n\tconst copy = assign({}, routeLocation, { matched: routeLocation.matched.map((matched) => omit(matched, [\n\t\t\"instances\",\n\t\t\"children\",\n\t\t\"aliasOf\"\n\t])) });\n\treturn { _custom: {\n\t\ttype: null,\n\t\treadOnly: true,\n\t\tdisplay: routeLocation.fullPath,\n\t\ttooltip,\n\t\tvalue: copy\n\t} };\n}\nfunction formatDisplay(display) {\n\treturn { _custom: { display } };\n}\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n\tif (router.__hasDevtools) return;\n\trouter.__hasDevtools = true;\n\tconst id = routerId++;\n\tsetupDevtoolsPlugin({\n\t\tid: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n\t\tlabel: \"Vue Router\",\n\t\tpackageName: \"vue-router\",\n\t\thomepage: \"https://router.vuejs.org\",\n\t\tlogo: \"https://router.vuejs.org/logo.png\",\n\t\tcomponentStateTypes: [\"Routing\"],\n\t\tapp\n\t}, (api) => {\n\t\tif (typeof api.now !== \"function\") warn$1(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n\t\tapi.on.inspectComponent((payload, ctx) => {\n\t\t\tif (payload.instanceData) payload.instanceData.state.push({\n\t\t\t\ttype: \"Routing\",\n\t\t\t\tkey: \"$route\",\n\t\t\t\teditable: false,\n\t\t\t\tvalue: formatRouteLocation(router.currentRoute.value, \"Current Route\")\n\t\t\t});\n\t\t});\n\t\tapi.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n\t\t\tif (componentInstance.__vrv_devtools) {\n\t\t\t\tconst info = componentInstance.__vrv_devtools;\n\t\t\t\tnode.tags.push({\n\t\t\t\t\tlabel: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n\t\t\t\t\ttextColor: 0,\n\t\t\t\t\ttooltip: \"This component is rendered by <router-view>\",\n\t\t\t\t\tbackgroundColor: PINK_500\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isArray(componentInstance.__vrl_devtools)) {\n\t\t\t\tcomponentInstance.__devtoolsApi = api;\n\t\t\t\tcomponentInstance.__vrl_devtools.forEach((devtoolsData) => {\n\t\t\t\t\tlet label = devtoolsData.route.path;\n\t\t\t\t\tlet backgroundColor = ORANGE_400;\n\t\t\t\t\tlet tooltip = \"\";\n\t\t\t\t\tlet textColor = 0;\n\t\t\t\t\tif (devtoolsData.error) {\n\t\t\t\t\t\tlabel = devtoolsData.error;\n\t\t\t\t\t\tbackgroundColor = RED_100;\n\t\t\t\t\t\ttextColor = RED_700;\n\t\t\t\t\t} else if (devtoolsData.isExactActive) {\n\t\t\t\t\t\tbackgroundColor = LIME_500;\n\t\t\t\t\t\ttooltip = \"This is exactly active\";\n\t\t\t\t\t} else if (devtoolsData.isActive) {\n\t\t\t\t\t\tbackgroundColor = BLUE_600;\n\t\t\t\t\t\ttooltip = \"This link is active\";\n\t\t\t\t\t}\n\t\t\t\t\tnode.tags.push({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\ttooltip,\n\t\t\t\t\t\tbackgroundColor\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\twatch(router.currentRoute, () => {\n\t\t\trefreshRoutesView();\n\t\t\tapi.notifyComponentUpdate();\n\t\t\tapi.sendInspectorTree(routerInspectorId);\n\t\t\tapi.sendInspectorState(routerInspectorId);\n\t\t});\n\t\tconst navigationsLayerId = \"router:navigations:\" + id;\n\t\tapi.addTimelineLayer({\n\t\t\tid: navigationsLayerId,\n\t\t\tlabel: `Router${id ? \" \" + id : \"\"} Navigations`,\n\t\t\tcolor: 4237508\n\t\t});\n\t\trouter.onError((error, to) => {\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"Error during Navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tlogType: \"error\",\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata: { error },\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tlet navigationId = 0;\n\t\trouter.beforeEach((to, from) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay(\"beforeEach\"),\n\t\t\t\tfrom: formatRouteLocation(from, \"Current Location during this navigation\"),\n\t\t\t\tto: formatRouteLocation(to, \"Target location\")\n\t\t\t};\n\t\t\tObject.defineProperty(to.meta, \"__navigationId\", { value: navigationId++ });\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\ttitle: \"Start of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tdata,\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\trouter.afterEach((to, from, failure) => {\n\t\t\tconst data = { guard: formatDisplay(\"afterEach\") };\n\t\t\tif (failure) {\n\t\t\t\tdata.failure = { _custom: {\n\t\t\t\t\ttype: Error,\n\t\t\t\t\treadOnly: true,\n\t\t\t\t\tdisplay: failure ? failure.message : \"\",\n\t\t\t\t\ttooltip: \"Navigation Failure\",\n\t\t\t\t\tvalue: failure\n\t\t\t\t} };\n\t\t\t\tdata.status = formatDisplay(\"❌\");\n\t\t\t} else data.status = formatDisplay(\"✅\");\n\t\t\tdata.from = formatRouteLocation(from, \"Current Location during this navigation\");\n\t\t\tdata.to = formatRouteLocation(to, \"Target location\");\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"End of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata,\n\t\t\t\t\tlogType: failure ? \"warning\" : \"default\",\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t/**\n\t\t* Inspector of Existing routes\n\t\t*/\n\t\tconst routerInspectorId = \"router-inspector:\" + id;\n\t\tapi.addInspector({\n\t\t\tid: routerInspectorId,\n\t\t\tlabel: \"Routes\" + (id ? \" \" + id : \"\"),\n\t\t\ticon: \"book\",\n\t\t\ttreeFilterPlaceholder: \"Search routes\"\n\t\t});\n\t\tfunction refreshRoutesView() {\n\t\t\tif (!activeRoutesPayload) return;\n\t\t\tconst payload = activeRoutesPayload;\n\t\t\tlet routes = matcher.getRoutes().filter((route) => !route.parent || !route.parent.record.components);\n\t\t\troutes.forEach(resetMatchStateOnRouteRecord);\n\t\t\tif (payload.filter) routes = routes.filter((route) => isRouteMatching(route, payload.filter.toLowerCase()));\n\t\t\troutes.forEach((route) => markRouteRecordActive(route, router.currentRoute.value));\n\t\t\tpayload.rootNodes = routes.map(formatRouteRecordForInspector);\n\t\t}\n\t\tlet activeRoutesPayload;\n\t\tapi.on.getInspectorTree((payload) => {\n\t\t\tactiveRoutesPayload = payload;\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) refreshRoutesView();\n\t\t});\n\t\t/**\n\t\t* Display information about the currently selected route record\n\t\t*/\n\t\tapi.on.getInspectorState((payload) => {\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\tconst route = matcher.getRoutes().find((route$1) => route$1.record.__vd_id === payload.nodeId);\n\t\t\t\tif (route) payload.state = { options: formatRouteRecordMatcherForStateInspector(route) };\n\t\t\t}\n\t\t});\n\t\tapi.sendInspectorTree(routerInspectorId);\n\t\tapi.sendInspectorState(routerInspectorId);\n\t});\n}\nfunction modifierForKey(key) {\n\tif (key.optional) return key.repeatable ? \"*\" : \"?\";\n\telse return key.repeatable ? \"+\" : \"\";\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n\tconst { record } = route;\n\tconst fields = [{\n\t\teditable: false,\n\t\tkey: \"path\",\n\t\tvalue: record.path\n\t}];\n\tif (record.name != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"name\",\n\t\tvalue: record.name\n\t});\n\tfields.push({\n\t\teditable: false,\n\t\tkey: \"regexp\",\n\t\tvalue: route.re\n\t});\n\tif (route.keys.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"keys\",\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n\t\t\ttooltip: \"Param keys\",\n\t\t\tvalue: route.keys\n\t\t} }\n\t});\n\tif (record.redirect != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"redirect\",\n\t\tvalue: record.redirect\n\t});\n\tif (route.alias.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"aliases\",\n\t\tvalue: route.alias.map((alias) => alias.record.path)\n\t});\n\tif (Object.keys(route.record.meta).length) fields.push({\n\t\teditable: false,\n\t\tkey: \"meta\",\n\t\tvalue: route.record.meta\n\t});\n\tfields.push({\n\t\tkey: \"score\",\n\t\teditable: false,\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.score.map((score) => score.join(\", \")).join(\" | \"),\n\t\t\ttooltip: \"Score used to sort routes\",\n\t\t\tvalue: route.score\n\t\t} }\n\t});\n\treturn fields;\n}\n/**\n* Extracted from tailwind palette\n*/\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nconst RED_100 = 16704226;\nconst RED_700 = 12131356;\nfunction formatRouteRecordForInspector(route) {\n\tconst tags = [];\n\tconst { record } = route;\n\tif (record.name != null) tags.push({\n\t\tlabel: String(record.name),\n\t\ttextColor: 0,\n\t\tbackgroundColor: CYAN_400\n\t});\n\tif (record.aliasOf) tags.push({\n\t\tlabel: \"alias\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: ORANGE_400\n\t});\n\tif (route.__vd_match) tags.push({\n\t\tlabel: \"matches\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: PINK_500\n\t});\n\tif (route.__vd_exactActive) tags.push({\n\t\tlabel: \"exact\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: LIME_500\n\t});\n\tif (route.__vd_active) tags.push({\n\t\tlabel: \"active\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: BLUE_600\n\t});\n\tif (record.redirect) tags.push({\n\t\tlabel: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n\t\ttextColor: 16777215,\n\t\tbackgroundColor: DARK\n\t});\n\tlet id = record.__vd_id;\n\tif (id == null) {\n\t\tid = String(routeRecordId++);\n\t\trecord.__vd_id = id;\n\t}\n\treturn {\n\t\tid,\n\t\tlabel: record.path,\n\t\ttags,\n\t\tchildren: route.children.map(formatRouteRecordForInspector)\n\t};\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n\tconst isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n\troute.__vd_exactActive = route.__vd_active = isExactActive;\n\tif (!isExactActive) route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n\troute.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n\troute.__vd_match = false;\n\troute.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n\tconst found = String(route.re).match(EXTRACT_REGEXP_RE);\n\troute.__vd_match = false;\n\tif (!found || found.length < 3) return false;\n\tif (new RegExp(found[1].replace(/\\$$/, \"\"), found[2]).test(filter)) {\n\t\troute.children.forEach((child) => isRouteMatching(child, filter));\n\t\tif (route.record.path !== \"/\" || filter === \"/\") {\n\t\t\troute.__vd_match = route.re.test(filter);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tconst path = route.record.path.toLowerCase();\n\tconst decodedPath = decode(path);\n\tif (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter))) return true;\n\tif (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;\n\tif (route.record.name && String(route.record.name).includes(filter)) return true;\n\treturn route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n\tconst ret = {};\n\tfor (const key in obj) if (!keys.includes(key)) ret[key] = obj[key];\n\treturn ret;\n}\n\n//#endregion\nexport { isBrowser as $, START as A, stringifyURL as B, computeScrollPosition as C, scrollToPosition as D, saveScrollPosition as E, isSameRouteLocation as F, encodePath as G, decode as H, isSameRouteLocationParams as I, assign as J, warn$1 as K, isSameRouteRecord as L, normalizeBase as M, NEW_stringifyURL as N, NavigationDirection as O, START_LOCATION_NORMALIZED as P, noop as Q, parseURL as R, isRouteName as S, getScrollKey as T, encodeHash as U, stripBase as V, encodeParam as W, isArray as X, identityFn as Y, mergeOptions as Z, ErrorTypes as _, loadRouteLocation as a, isNavigationFailure as b, useCallbacks as c, routerKey as d, routerViewLocationKey as f, stringifyQuery as g, parseQuery as h, guardToPromiseFn as i, createHref as j, NavigationType as k, matchedRouteKey as l, normalizeQuery as m, extractChangingRecords as n, onBeforeRouteLeave as o, viewDepthKey as p, applyToParams as q, extractComponentsGuards as r, onBeforeRouteUpdate as s, addDevtools as t, routeLocationKey as u, NavigationFailureType as v, getSavedScrollPosition as w, isRouteLocation as x, createRouterError as y, resolveRelativePath as z };","/*!\n * vue-router v4.6.4\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { $ as isBrowser, A as START, B as stringifyURL, C as computeScrollPosition, D as scrollToPosition, E as saveScrollPosition, F as isSameRouteLocation, H as decode, I as isSameRouteLocationParams, J as assign, K as warn$1, L as isSameRouteRecord, M as normalizeBase, O as NavigationDirection, P as START_LOCATION_NORMALIZED, Q as noop, R as parseURL, S as isRouteName, T as getScrollKey, U as encodeHash, V as stripBase, W as encodeParam, X as isArray, Z as mergeOptions, _ as ErrorTypes, a as loadRouteLocation, b as isNavigationFailure, c as useCallbacks, d as routerKey, f as routerViewLocationKey, g as stringifyQuery, h as parseQuery, i as guardToPromiseFn, j as createHref, k as NavigationType, l as matchedRouteKey, m as normalizeQuery, n as extractChangingRecords, o as onBeforeRouteLeave, p as viewDepthKey, q as applyToParams, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as routeLocationKey, v as NavigationFailureType, w as getSavedScrollPosition, x as isRouteLocation, y as createRouterError } from \"./devtools-EWN81iOl.mjs\";\nimport { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from \"vue\";\n\n//#region src/history/html5.ts\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\n/**\n* Creates a normalized history location from a window.location object\n* @param base - The base path\n* @param location - The window.location object\n*/\nfunction createCurrentLocation(base, location$1) {\n\tconst { pathname, search, hash } = location$1;\n\tconst hashPos = base.indexOf(\"#\");\n\tif (hashPos > -1) {\n\t\tlet slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n\t\tlet pathFromHash = hash.slice(slicePos);\n\t\tif (pathFromHash[0] !== \"/\") pathFromHash = \"/\" + pathFromHash;\n\t\treturn stripBase(pathFromHash, \"\");\n\t}\n\treturn stripBase(pathname, base) + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n\tlet listeners = [];\n\tlet teardowns = [];\n\tlet pauseState = null;\n\tconst popStateHandler = ({ state }) => {\n\t\tconst to = createCurrentLocation(base, location);\n\t\tconst from = currentLocation.value;\n\t\tconst fromState = historyState.value;\n\t\tlet delta = 0;\n\t\tif (state) {\n\t\t\tcurrentLocation.value = to;\n\t\t\thistoryState.value = state;\n\t\t\tif (pauseState && pauseState === from) {\n\t\t\t\tpauseState = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta = fromState ? state.position - fromState.position : 0;\n\t\t} else replace(to);\n\t\tlisteners.forEach((listener) => {\n\t\t\tlistener(currentLocation.value, from, {\n\t\t\t\tdelta,\n\t\t\t\ttype: NavigationType.pop,\n\t\t\t\tdirection: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n\t\t\t});\n\t\t});\n\t};\n\tfunction pauseListeners() {\n\t\tpauseState = currentLocation.value;\n\t}\n\tfunction listen(callback) {\n\t\tlisteners.push(callback);\n\t\tconst teardown = () => {\n\t\t\tconst index = listeners.indexOf(callback);\n\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t};\n\t\tteardowns.push(teardown);\n\t\treturn teardown;\n\t}\n\tfunction beforeUnloadListener() {\n\t\tif (document.visibilityState === \"hidden\") {\n\t\t\tconst { history: history$1 } = window;\n\t\t\tif (!history$1.state) return;\n\t\t\thistory$1.replaceState(assign({}, history$1.state, { scroll: computeScrollPosition() }), \"\");\n\t\t}\n\t}\n\tfunction destroy() {\n\t\tfor (const teardown of teardowns) teardown();\n\t\tteardowns = [];\n\t\twindow.removeEventListener(\"popstate\", popStateHandler);\n\t\twindow.removeEventListener(\"pagehide\", beforeUnloadListener);\n\t\tdocument.removeEventListener(\"visibilitychange\", beforeUnloadListener);\n\t}\n\twindow.addEventListener(\"popstate\", popStateHandler);\n\twindow.addEventListener(\"pagehide\", beforeUnloadListener);\n\tdocument.addEventListener(\"visibilitychange\", beforeUnloadListener);\n\treturn {\n\t\tpauseListeners,\n\t\tlisten,\n\t\tdestroy\n\t};\n}\n/**\n* Creates a state object\n*/\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n\treturn {\n\t\tback,\n\t\tcurrent,\n\t\tforward,\n\t\treplaced,\n\t\tposition: window.history.length,\n\t\tscroll: computeScroll ? computeScrollPosition() : null\n\t};\n}\nfunction useHistoryStateNavigation(base) {\n\tconst { history: history$1, location: location$1 } = window;\n\tconst currentLocation = { value: createCurrentLocation(base, location$1) };\n\tconst historyState = { value: history$1.state };\n\tif (!historyState.value) changeLocation(currentLocation.value, {\n\t\tback: null,\n\t\tcurrent: currentLocation.value,\n\t\tforward: null,\n\t\tposition: history$1.length - 1,\n\t\treplaced: true,\n\t\tscroll: null\n\t}, true);\n\tfunction changeLocation(to, state, replace$1) {\n\t\t/**\n\t\t* if a base tag is provided, and we are on a normal domain, we have to\n\t\t* respect the provided `base` attribute because pushState() will use it and\n\t\t* potentially erase anything before the `#` like at\n\t\t* https://github.com/vuejs/router/issues/685 where a base of\n\t\t* `/folder/#` but a base of `/` would erase the `/folder/` section. If\n\t\t* there is no host, the `<base>` tag makes no sense and if there isn't a\n\t\t* base tag we can just use everything after the `#`.\n\t\t*/\n\t\tconst hashIndex = base.indexOf(\"#\");\n\t\tconst url = hashIndex > -1 ? (location$1.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n\t\ttry {\n\t\t\thistory$1[replace$1 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n\t\t\thistoryState.value = state;\n\t\t} catch (err) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Error with push/replace State\", err);\n\t\t\telse console.error(err);\n\t\t\tlocation$1[replace$1 ? \"replace\" : \"assign\"](url);\n\t\t}\n\t}\n\tfunction replace(to, data) {\n\t\tchangeLocation(to, assign({}, history$1.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);\n\t\tcurrentLocation.value = to;\n\t}\n\tfunction push(to, data) {\n\t\tconst currentState = assign({}, historyState.value, history$1.state, {\n\t\t\tforward: to,\n\t\t\tscroll: computeScrollPosition()\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\" && !history$1.state) warn$1(\"history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\nhistory.replaceState(history.state, '', url)\\n\\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state\");\n\t\tchangeLocation(currentState.current, currentState, true);\n\t\tchangeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);\n\t\tcurrentLocation.value = to;\n\t}\n\treturn {\n\t\tlocation: currentLocation,\n\t\tstate: historyState,\n\t\tpush,\n\t\treplace\n\t};\n}\n/**\n* Creates an HTML5 history. Most common history for single page applications.\n*\n* @param base -\n*/\nfunction createWebHistory(base) {\n\tbase = normalizeBase(base);\n\tconst historyNavigation = useHistoryStateNavigation(base);\n\tconst historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n\tfunction go(delta, triggerListeners = true) {\n\t\tif (!triggerListeners) historyListeners.pauseListeners();\n\t\thistory.go(delta);\n\t}\n\tconst routerHistory = assign({\n\t\tlocation: \"\",\n\t\tbase,\n\t\tgo,\n\t\tcreateHref: createHref.bind(null, base)\n\t}, historyNavigation, historyListeners);\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.location.value\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.state.value\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/memory.ts\n/**\n* Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n* It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n*\n* @param base - Base applied to all urls, defaults to '/'\n* @returns a history object that can be passed to the router constructor\n*/\nfunction createMemoryHistory(base = \"\") {\n\tlet listeners = [];\n\tlet queue = [[START, {}]];\n\tlet position = 0;\n\tbase = normalizeBase(base);\n\tfunction setLocation(location$1, state = {}) {\n\t\tposition++;\n\t\tif (position !== queue.length) queue.splice(position);\n\t\tqueue.push([location$1, state]);\n\t}\n\tfunction triggerListeners(to, from, { direction, delta }) {\n\t\tconst info = {\n\t\t\tdirection,\n\t\t\tdelta,\n\t\t\ttype: NavigationType.pop\n\t\t};\n\t\tfor (const callback of listeners) callback(to, from, info);\n\t}\n\tconst routerHistory = {\n\t\tlocation: START,\n\t\tstate: {},\n\t\tbase,\n\t\tcreateHref: createHref.bind(null, base),\n\t\treplace(to, state) {\n\t\t\tqueue.splice(position--, 1);\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tpush(to, state) {\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tlisten(callback) {\n\t\t\tlisteners.push(callback);\n\t\t\treturn () => {\n\t\t\t\tconst index = listeners.indexOf(callback);\n\t\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t\t};\n\t\t},\n\t\tdestroy() {\n\t\t\tlisteners = [];\n\t\t\tqueue = [[START, {}]];\n\t\t\tposition = 0;\n\t\t},\n\t\tgo(delta, shouldTrigger = true) {\n\t\t\tconst from = this.location;\n\t\t\tconst direction = delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n\t\t\tposition = Math.max(0, Math.min(position + delta, queue.length - 1));\n\t\t\tif (shouldTrigger) triggerListeners(this.location, from, {\n\t\t\t\tdirection,\n\t\t\t\tdelta\n\t\t\t});\n\t\t}\n\t};\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][0]\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][1]\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/hash.ts\n/**\n* Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n* handle any URL is not possible.\n*\n* @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n* in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n* calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n* after the `#`).\n*\n* @example\n* ```js\n* // at https://example.com/folder\n* createWebHashHistory() // gives a url of `https://example.com/folder#`\n* createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n* // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n* createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n* // you should avoid doing this because it changes the original url and breaks copying urls\n* createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n*\n* // at file:///usr/etc/folder/index.html\n* // for locations with no `host`, the base is ignored\n* createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n* ```\n*/\nfunction createWebHashHistory(base) {\n\tbase = location.host ? base || location.pathname + location.search : \"\";\n\tif (!base.includes(\"#\")) base += \"#\";\n\tif (process.env.NODE_ENV !== \"production\" && !base.endsWith(\"#/\") && !base.endsWith(\"#\")) warn$1(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, \"#\")}\".`);\n\treturn createWebHistory(base);\n}\n\n//#endregion\n//#region src/matcher/pathTokenizer.ts\nlet TokenType = /* @__PURE__ */ function(TokenType$1) {\n\tTokenType$1[TokenType$1[\"Static\"] = 0] = \"Static\";\n\tTokenType$1[TokenType$1[\"Param\"] = 1] = \"Param\";\n\tTokenType$1[TokenType$1[\"Group\"] = 2] = \"Group\";\n\treturn TokenType$1;\n}({});\nvar TokenizerState = /* @__PURE__ */ function(TokenizerState$1) {\n\tTokenizerState$1[TokenizerState$1[\"Static\"] = 0] = \"Static\";\n\tTokenizerState$1[TokenizerState$1[\"Param\"] = 1] = \"Param\";\n\tTokenizerState$1[TokenizerState$1[\"ParamRegExp\"] = 2] = \"ParamRegExp\";\n\tTokenizerState$1[TokenizerState$1[\"ParamRegExpEnd\"] = 3] = \"ParamRegExpEnd\";\n\tTokenizerState$1[TokenizerState$1[\"EscapeNext\"] = 4] = \"EscapeNext\";\n\treturn TokenizerState$1;\n}(TokenizerState || {});\nconst ROOT_TOKEN = {\n\ttype: TokenType.Static,\n\tvalue: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n\tif (!path) return [[]];\n\tif (path === \"/\") return [[ROOT_TOKEN]];\n\tif (!path.startsWith(\"/\")) throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n\tfunction crash(message) {\n\t\tthrow new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n\t}\n\tlet state = TokenizerState.Static;\n\tlet previousState = state;\n\tconst tokens = [];\n\tlet segment;\n\tfunction finalizeSegment() {\n\t\tif (segment) tokens.push(segment);\n\t\tsegment = [];\n\t}\n\tlet i = 0;\n\tlet char;\n\tlet buffer = \"\";\n\tlet customRe = \"\";\n\tfunction consumeBuffer() {\n\t\tif (!buffer) return;\n\t\tif (state === TokenizerState.Static) segment.push({\n\t\t\ttype: TokenType.Static,\n\t\t\tvalue: buffer\n\t\t});\n\t\telse if (state === TokenizerState.Param || state === TokenizerState.ParamRegExp || state === TokenizerState.ParamRegExpEnd) {\n\t\t\tif (segment.length > 1 && (char === \"*\" || char === \"+\")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n\t\t\tsegment.push({\n\t\t\t\ttype: TokenType.Param,\n\t\t\t\tvalue: buffer,\n\t\t\t\tregexp: customRe,\n\t\t\t\trepeatable: char === \"*\" || char === \"+\",\n\t\t\t\toptional: char === \"*\" || char === \"?\"\n\t\t\t});\n\t\t} else crash(\"Invalid state to consume buffer\");\n\t\tbuffer = \"\";\n\t}\n\tfunction addCharToBuffer() {\n\t\tbuffer += char;\n\t}\n\twhile (i < path.length) {\n\t\tchar = path[i++];\n\t\tif (char === \"\\\\\" && state !== TokenizerState.ParamRegExp) {\n\t\t\tpreviousState = state;\n\t\t\tstate = TokenizerState.EscapeNext;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch (state) {\n\t\t\tcase TokenizerState.Static:\n\t\t\t\tif (char === \"/\") {\n\t\t\t\t\tif (buffer) consumeBuffer();\n\t\t\t\t\tfinalizeSegment();\n\t\t\t\t} else if (char === \":\") {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Param;\n\t\t\t\t} else addCharToBuffer();\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.EscapeNext:\n\t\t\t\taddCharToBuffer();\n\t\t\t\tstate = previousState;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.Param:\n\t\t\t\tif (char === \"(\") state = TokenizerState.ParamRegExp;\n\t\t\t\telse if (VALID_PARAM_RE.test(char)) addCharToBuffer();\n\t\t\t\telse {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExp:\n\t\t\t\tif (char === \")\") if (customRe[customRe.length - 1] == \"\\\\\") customRe = customRe.slice(0, -1) + char;\n\t\t\t\telse state = TokenizerState.ParamRegExpEnd;\n\t\t\t\telse customRe += char;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExpEnd:\n\t\t\t\tconsumeBuffer();\n\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\tcustomRe = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcrash(\"Unknown state\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (state === TokenizerState.ParamRegExp) crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n\tconsumeBuffer();\n\tfinalizeSegment();\n\treturn tokens;\n}\n\n//#endregion\n//#region src/matcher/pathParserRanker.ts\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n\tsensitive: false,\n\tstrict: false,\n\tstart: true,\n\tend: true\n};\nvar PathScore = /* @__PURE__ */ function(PathScore$1) {\n\tPathScore$1[PathScore$1[\"_multiplier\"] = 10] = \"_multiplier\";\n\tPathScore$1[PathScore$1[\"Root\"] = 90] = \"Root\";\n\tPathScore$1[PathScore$1[\"Segment\"] = 40] = \"Segment\";\n\tPathScore$1[PathScore$1[\"SubSegment\"] = 30] = \"SubSegment\";\n\tPathScore$1[PathScore$1[\"Static\"] = 40] = \"Static\";\n\tPathScore$1[PathScore$1[\"Dynamic\"] = 20] = \"Dynamic\";\n\tPathScore$1[PathScore$1[\"BonusCustomRegExp\"] = 10] = \"BonusCustomRegExp\";\n\tPathScore$1[PathScore$1[\"BonusWildcard\"] = -50] = \"BonusWildcard\";\n\tPathScore$1[PathScore$1[\"BonusRepeatable\"] = -20] = \"BonusRepeatable\";\n\tPathScore$1[PathScore$1[\"BonusOptional\"] = -8] = \"BonusOptional\";\n\tPathScore$1[PathScore$1[\"BonusStrict\"] = .7000000000000001] = \"BonusStrict\";\n\tPathScore$1[PathScore$1[\"BonusCaseSensitive\"] = .25] = \"BonusCaseSensitive\";\n\treturn PathScore$1;\n}(PathScore || {});\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n* Creates a path parser from an array of Segments (a segment is an array of Tokens)\n*\n* @param segments - array of segments returned by tokenizePath\n* @param extraOptions - optional options for the regexp\n* @returns a PathParser\n*/\nfunction tokensToParser(segments, extraOptions) {\n\tconst options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n\tconst score = [];\n\tlet pattern = options.start ? \"^\" : \"\";\n\tconst keys = [];\n\tfor (const segment of segments) {\n\t\tconst segmentScores = segment.length ? [] : [PathScore.Root];\n\t\tif (options.strict && !segment.length) pattern += \"/\";\n\t\tfor (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n\t\t\tconst token = segment[tokenIndex];\n\t\t\tlet subSegmentScore = PathScore.Segment + (options.sensitive ? PathScore.BonusCaseSensitive : 0);\n\t\t\tif (token.type === TokenType.Static) {\n\t\t\t\tif (!tokenIndex) pattern += \"/\";\n\t\t\t\tpattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n\t\t\t\tsubSegmentScore += PathScore.Static;\n\t\t\t} else if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional, regexp } = token;\n\t\t\t\tkeys.push({\n\t\t\t\t\tname: value,\n\t\t\t\t\trepeatable,\n\t\t\t\t\toptional\n\t\t\t\t});\n\t\t\t\tconst re$1 = regexp ? regexp : BASE_PARAM_PATTERN;\n\t\t\t\tif (re$1 !== BASE_PARAM_PATTERN) {\n\t\t\t\t\tsubSegmentScore += PathScore.BonusCustomRegExp;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t`${re$1}`;\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tthrow new Error(`Invalid custom RegExp for param \"${value}\" (${re$1}): ` + err.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet subPattern = repeatable ? `((?:${re$1})(?:/(?:${re$1}))*)` : `(${re$1})`;\n\t\t\t\tif (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n\t\t\t\tif (optional) subPattern += \"?\";\n\t\t\t\tpattern += subPattern;\n\t\t\t\tsubSegmentScore += PathScore.Dynamic;\n\t\t\t\tif (optional) subSegmentScore += PathScore.BonusOptional;\n\t\t\t\tif (repeatable) subSegmentScore += PathScore.BonusRepeatable;\n\t\t\t\tif (re$1 === \".*\") subSegmentScore += PathScore.BonusWildcard;\n\t\t\t}\n\t\t\tsegmentScores.push(subSegmentScore);\n\t\t}\n\t\tscore.push(segmentScores);\n\t}\n\tif (options.strict && options.end) {\n\t\tconst i = score.length - 1;\n\t\tscore[i][score[i].length - 1] += PathScore.BonusStrict;\n\t}\n\tif (!options.strict) pattern += \"/?\";\n\tif (options.end) pattern += \"$\";\n\telse if (options.strict && !pattern.endsWith(\"/\")) pattern += \"(?:/|$)\";\n\tconst re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n\tfunction parse(path) {\n\t\tconst match = path.match(re);\n\t\tconst params = {};\n\t\tif (!match) return null;\n\t\tfor (let i = 1; i < match.length; i++) {\n\t\t\tconst value = match[i] || \"\";\n\t\t\tconst key = keys[i - 1];\n\t\t\tparams[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n\t\t}\n\t\treturn params;\n\t}\n\tfunction stringify(params) {\n\t\tlet path = \"\";\n\t\tlet avoidDuplicatedSlash = false;\n\t\tfor (const segment of segments) {\n\t\t\tif (!avoidDuplicatedSlash || !path.endsWith(\"/\")) path += \"/\";\n\t\t\tavoidDuplicatedSlash = false;\n\t\t\tfor (const token of segment) if (token.type === TokenType.Static) path += token.value;\n\t\t\telse if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional } = token;\n\t\t\t\tconst param = value in params ? params[value] : \"\";\n\t\t\t\tif (isArray(param) && !repeatable) throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n\t\t\t\tconst text = isArray(param) ? param.join(\"/\") : param;\n\t\t\t\tif (!text) if (optional) {\n\t\t\t\t\tif (segment.length < 2) if (path.endsWith(\"/\")) path = path.slice(0, -1);\n\t\t\t\t\telse avoidDuplicatedSlash = true;\n\t\t\t\t} else throw new Error(`Missing required param \"${value}\"`);\n\t\t\t\tpath += text;\n\t\t\t}\n\t\t}\n\t\treturn path || \"/\";\n\t}\n\treturn {\n\t\tre,\n\t\tscore,\n\t\tkeys,\n\t\tparse,\n\t\tstringify\n\t};\n}\n/**\n* Compares an array of numbers as used in PathParser.score and returns a\n* number. This function can be used to `sort` an array\n*\n* @param a - first array of numbers\n* @param b - second array of numbers\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n* should be sorted first\n*/\nfunction compareScoreArray(a, b) {\n\tlet i = 0;\n\twhile (i < a.length && i < b.length) {\n\t\tconst diff = b[i] - a[i];\n\t\tif (diff) return diff;\n\t\ti++;\n\t}\n\tif (a.length < b.length) return a.length === 1 && a[0] === PathScore.Static + PathScore.Segment ? -1 : 1;\n\telse if (a.length > b.length) return b.length === 1 && b[0] === PathScore.Static + PathScore.Segment ? 1 : -1;\n\treturn 0;\n}\n/**\n* Compare function that can be used with `sort` to sort an array of PathParser\n*\n* @param a - first PathParser\n* @param b - second PathParser\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n*/\nfunction comparePathParserScore(a, b) {\n\tlet i = 0;\n\tconst aScore = a.score;\n\tconst bScore = b.score;\n\twhile (i < aScore.length && i < bScore.length) {\n\t\tconst comp = compareScoreArray(aScore[i], bScore[i]);\n\t\tif (comp) return comp;\n\t\ti++;\n\t}\n\tif (Math.abs(bScore.length - aScore.length) === 1) {\n\t\tif (isLastScoreNegative(aScore)) return 1;\n\t\tif (isLastScoreNegative(bScore)) return -1;\n\t}\n\treturn bScore.length - aScore.length;\n}\n/**\n* This allows detecting splats at the end of a path: /home/:id(.*)*\n*\n* @param score - score to check\n* @returns true if the last entry is negative\n*/\nfunction isLastScoreNegative(score) {\n\tconst last = score[score.length - 1];\n\treturn score.length > 0 && last[last.length - 1] < 0;\n}\nconst PATH_PARSER_OPTIONS_DEFAULTS = {\n\tstrict: false,\n\tend: true,\n\tsensitive: false\n};\n\n//#endregion\n//#region src/matcher/pathMatcher.ts\nfunction createRouteRecordMatcher(record, parent, options) {\n\tconst parser = tokensToParser(tokenizePath(record.path), options);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst existingKeys = /* @__PURE__ */ new Set();\n\t\tfor (const key of parser.keys) {\n\t\t\tif (existingKeys.has(key.name)) warn$1(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n\t\t\texistingKeys.add(key.name);\n\t\t}\n\t}\n\tconst matcher = assign(parser, {\n\t\trecord,\n\t\tparent,\n\t\tchildren: [],\n\t\talias: []\n\t});\n\tif (parent) {\n\t\tif (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);\n\t}\n\treturn matcher;\n}\n\n//#endregion\n//#region src/matcher/index.ts\n/**\n* Creates a Router Matcher.\n*\n* @internal\n* @param routes - array of initial routes\n* @param globalOptions - global route options\n*/\nfunction createRouterMatcher(routes, globalOptions) {\n\tconst matchers = [];\n\tconst matcherMap = /* @__PURE__ */ new Map();\n\tglobalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);\n\tfunction getRecordMatcher(name) {\n\t\treturn matcherMap.get(name);\n\t}\n\tfunction addRoute(record, parent, originalRecord) {\n\t\tconst isRootAdd = !originalRecord;\n\t\tconst mainNormalizedRecord = normalizeRouteRecord(record);\n\t\tif (process.env.NODE_ENV !== \"production\") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n\t\tmainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n\t\tconst options = mergeOptions(globalOptions, record);\n\t\tconst normalizedRecords = [mainNormalizedRecord];\n\t\tif (\"alias\" in record) {\n\t\t\tconst aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n\t\t\tfor (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n\t\t\t\tcomponents: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n\t\t\t\tpath: alias,\n\t\t\t\taliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n\t\t\t})));\n\t\t}\n\t\tlet matcher;\n\t\tlet originalMatcher;\n\t\tfor (const normalizedRecord of normalizedRecords) {\n\t\t\tconst { path } = normalizedRecord;\n\t\t\tif (parent && path[0] !== \"/\") {\n\t\t\t\tconst parentPath = parent.record.path;\n\t\t\t\tconst connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n\t\t\t\tnormalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") throw new Error(\"Catch all routes (\\\"*\\\") must now be defined using a param with a custom regexp.\\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.\");\n\t\t\tmatcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\") checkMissingParamsInAbsolutePath(matcher, parent);\n\t\t\tif (originalRecord) {\n\t\t\t\toriginalRecord.alias.push(matcher);\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameParams(originalRecord, matcher);\n\t\t\t} else {\n\t\t\t\toriginalMatcher = originalMatcher || matcher;\n\t\t\t\tif (originalMatcher !== matcher) originalMatcher.alias.push(matcher);\n\t\t\t\tif (isRootAdd && record.name && !isAliasRecord(matcher)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameNameAsAncestor(record, parent);\n\t\t\t\t\tremoveRoute(record.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isMatchable(matcher)) insertMatcher(matcher);\n\t\t\tif (mainNormalizedRecord.children) {\n\t\t\t\tconst children = mainNormalizedRecord.children;\n\t\t\t\tfor (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n\t\t\t}\n\t\t\toriginalRecord = originalRecord || matcher;\n\t\t}\n\t\treturn originalMatcher ? () => {\n\t\t\tremoveRoute(originalMatcher);\n\t\t} : noop;\n\t}\n\tfunction removeRoute(matcherRef) {\n\t\tif (isRouteName(matcherRef)) {\n\t\t\tconst matcher = matcherMap.get(matcherRef);\n\t\t\tif (matcher) {\n\t\t\t\tmatcherMap.delete(matcherRef);\n\t\t\t\tmatchers.splice(matchers.indexOf(matcher), 1);\n\t\t\t\tmatcher.children.forEach(removeRoute);\n\t\t\t\tmatcher.alias.forEach(removeRoute);\n\t\t\t}\n\t\t} else {\n\t\t\tconst index = matchers.indexOf(matcherRef);\n\t\t\tif (index > -1) {\n\t\t\t\tmatchers.splice(index, 1);\n\t\t\t\tif (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);\n\t\t\t\tmatcherRef.children.forEach(removeRoute);\n\t\t\t\tmatcherRef.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matchers;\n\t}\n\tfunction insertMatcher(matcher) {\n\t\tconst index = findInsertionIndex(matcher, matchers);\n\t\tmatchers.splice(index, 0, matcher);\n\t\tif (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);\n\t}\n\tfunction resolve(location$1, currentLocation) {\n\t\tlet matcher;\n\t\tlet params = {};\n\t\tlet path;\n\t\tlet name;\n\t\tif (\"name\" in location$1 && location$1.name) {\n\t\t\tmatcher = matcherMap.get(location$1.name);\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location: location$1 });\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconst invalidParams = Object.keys(location$1.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n\t\t\t\tif (invalidParams.length) warn$1(`Discarded invalid param(s) \"${invalidParams.join(\"\\\", \\\"\")}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n\t\t\t}\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location$1.params && pickParams(location$1.params, matcher.keys.map((k) => k.name)));\n\t\t\tpath = matcher.stringify(params);\n\t\t} else if (location$1.path != null) {\n\t\t\tpath = location$1.path;\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) warn$1(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n\t\t\tmatcher = matchers.find((m) => m.re.test(path));\n\t\t\tif (matcher) {\n\t\t\t\tparams = matcher.parse(path);\n\t\t\t\tname = matcher.record.name;\n\t\t\t}\n\t\t} else {\n\t\t\tmatcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, {\n\t\t\t\tlocation: location$1,\n\t\t\t\tcurrentLocation\n\t\t\t});\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign({}, currentLocation.params, location$1.params);\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\tconst matched = [];\n\t\tlet parentMatcher = matcher;\n\t\twhile (parentMatcher) {\n\t\t\tmatched.unshift(parentMatcher.record);\n\t\t\tparentMatcher = parentMatcher.parent;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpath,\n\t\t\tparams,\n\t\t\tmatched,\n\t\t\tmeta: mergeMetaFields(matched)\n\t\t};\n\t}\n\troutes.forEach((route) => addRoute(route));\n\tfunction clearRoutes() {\n\t\tmatchers.length = 0;\n\t\tmatcherMap.clear();\n\t}\n\treturn {\n\t\taddRoute,\n\t\tresolve,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\tgetRoutes,\n\t\tgetRecordMatcher\n\t};\n}\n/**\n* Picks an object param to contain only specified keys.\n*\n* @param params - params object to pick from\n* @param keys - keys to pick\n*/\nfunction pickParams(params, keys) {\n\tconst newParams = {};\n\tfor (const key of keys) if (key in params) newParams[key] = params[key];\n\treturn newParams;\n}\n/**\n* Normalizes a RouteRecordRaw. Creates a copy\n*\n* @param record\n* @returns the normalized version\n*/\nfunction normalizeRouteRecord(record) {\n\tconst normalized = {\n\t\tpath: record.path,\n\t\tredirect: record.redirect,\n\t\tname: record.name,\n\t\tmeta: record.meta || {},\n\t\taliasOf: record.aliasOf,\n\t\tbeforeEnter: record.beforeEnter,\n\t\tprops: normalizeRecordProps(record),\n\t\tchildren: record.children || [],\n\t\tinstances: {},\n\t\tleaveGuards: /* @__PURE__ */ new Set(),\n\t\tupdateGuards: /* @__PURE__ */ new Set(),\n\t\tenterCallbacks: {},\n\t\tcomponents: \"components\" in record ? record.components || null : record.component && { default: record.component }\n\t};\n\tObject.defineProperty(normalized, \"mods\", { value: {} });\n\treturn normalized;\n}\n/**\n* Normalize the optional `props` in a record to always be an object similar to\n* components. Also accept a boolean for components.\n* @param record\n*/\nfunction normalizeRecordProps(record) {\n\tconst propsObject = {};\n\tconst props = record.props || false;\n\tif (\"component\" in record) propsObject.default = props;\n\telse for (const name in record.components) propsObject[name] = typeof props === \"object\" ? props[name] : props;\n\treturn propsObject;\n}\n/**\n* Checks if a record or any of its parent is an alias\n* @param record\n*/\nfunction isAliasRecord(record) {\n\twhile (record) {\n\t\tif (record.record.aliasOf) return true;\n\t\trecord = record.parent;\n\t}\n\treturn false;\n}\n/**\n* Merge meta fields of an array of records\n*\n* @param matched - array of matched records\n*/\nfunction mergeMetaFields(matched) {\n\treturn matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction isSameParam(a, b) {\n\treturn a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\n/**\n* Check if a path and its alias have the same required params\n*\n* @param a - original record\n* @param b - alias record\n*/\nfunction checkSameParams(a, b) {\n\tfor (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n\tfor (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n}\n/**\n* A route with a name and a child with an empty path without a name should warn when adding the route\n*\n* @param mainNormalizedRecord - RouteRecordNormalized\n* @param parent - RouteRecordMatcher\n*/\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n\tif (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) warn$1(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n}\nfunction checkSameNameAsAncestor(record, parent) {\n\tfor (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? \"child\" : \"descendant\"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n\tfor (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) return warn$1(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n}\n/**\n* Performs a binary search to find the correct insertion index for a new matcher.\n*\n* Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n* with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n*\n* @param matcher - new matcher to be inserted\n* @param matchers - existing matchers\n*/\nfunction findInsertionIndex(matcher, matchers) {\n\tlet lower = 0;\n\tlet upper = matchers.length;\n\twhile (lower !== upper) {\n\t\tconst mid = lower + upper >> 1;\n\t\tif (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;\n\t\telse lower = mid + 1;\n\t}\n\tconst insertionAncestor = getInsertionAncestor(matcher);\n\tif (insertionAncestor) {\n\t\tupper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n\t\tif (process.env.NODE_ENV !== \"production\" && upper < 0) warn$1(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n\t}\n\treturn upper;\n}\nfunction getInsertionAncestor(matcher) {\n\tlet ancestor = matcher;\n\twhile (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;\n}\n/**\n* Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n* a component, or name, or redirect, are just used to group other routes.\n* @param matcher\n* @param matcher.record record of the matcher\n* @returns\n*/\nfunction isMatchable({ record }) {\n\treturn !!(record.name || record.components && Object.keys(record.components).length || record.redirect);\n}\n\n//#endregion\n//#region src/RouterLink.ts\n/**\n* Returns the internal behavior of a {@link RouterLink} without the rendering part.\n*\n* @param props - a `to` location and an optional `replace` flag\n*/\nfunction useLink(props) {\n\tconst router = inject(routerKey);\n\tconst currentRoute = inject(routeLocationKey);\n\tlet hasPrevious = false;\n\tlet previousTo = null;\n\tconst route = computed(() => {\n\t\tconst to = unref(props.to);\n\t\tif (process.env.NODE_ENV !== \"production\" && (!hasPrevious || to !== previousTo)) {\n\t\t\tif (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n\t\t\telse warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n\t\t\tpreviousTo = to;\n\t\t\thasPrevious = true;\n\t\t}\n\t\treturn router.resolve(to);\n\t});\n\tconst activeRecordIndex = computed(() => {\n\t\tconst { matched } = route.value;\n\t\tconst { length } = matched;\n\t\tconst routeMatched = matched[length - 1];\n\t\tconst currentMatched = currentRoute.matched;\n\t\tif (!routeMatched || !currentMatched.length) return -1;\n\t\tconst index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n\t\tif (index > -1) return index;\n\t\tconst parentRecordPath = getOriginalPath(matched[length - 2]);\n\t\treturn length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;\n\t});\n\tconst isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n\tconst isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n\tfunction navigate(e = {}) {\n\t\tif (guardEvent(e)) {\n\t\t\tconst p = router[unref(props.replace) ? \"replace\" : \"push\"](unref(props.to)).catch(noop);\n\t\t\tif (props.viewTransition && typeof document !== \"undefined\" && \"startViewTransition\" in document) document.startViewTransition(() => p);\n\t\t\treturn p;\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance) {\n\t\t\tconst linkContextDevtools = {\n\t\t\t\troute: route.value,\n\t\t\t\tisActive: isActive.value,\n\t\t\t\tisExactActive: isExactActive.value,\n\t\t\t\terror: null\n\t\t\t};\n\t\t\tinstance.__vrl_devtools = instance.__vrl_devtools || [];\n\t\t\tinstance.__vrl_devtools.push(linkContextDevtools);\n\t\t\twatchEffect(() => {\n\t\t\t\tlinkContextDevtools.route = route.value;\n\t\t\t\tlinkContextDevtools.isActive = isActive.value;\n\t\t\t\tlinkContextDevtools.isExactActive = isExactActive.value;\n\t\t\t\tlinkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : \"Invalid \\\"to\\\" value\";\n\t\t\t}, { flush: \"post\" });\n\t\t}\n\t}\n\t/**\n\t* NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n\t*/\n\treturn {\n\t\troute,\n\t\thref: computed(() => route.value.href),\n\t\tisActive,\n\t\tisExactActive,\n\t\tnavigate\n\t};\n}\nfunction preferSingleVNode(vnodes) {\n\treturn vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterLink\",\n\tcompatConfig: { MODE: 3 },\n\tprops: {\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true\n\t\t},\n\t\treplace: Boolean,\n\t\tactiveClass: String,\n\t\texactActiveClass: String,\n\t\tcustom: Boolean,\n\t\tariaCurrentValue: {\n\t\t\ttype: String,\n\t\t\tdefault: \"page\"\n\t\t},\n\t\tviewTransition: Boolean\n\t},\n\tuseLink,\n\tsetup(props, { slots }) {\n\t\tconst link = reactive(useLink(props));\n\t\tconst { options } = inject(routerKey);\n\t\tconst elClass = computed(() => ({\n\t\t\t[getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n\t\t\t[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n\t\t}));\n\t\treturn () => {\n\t\t\tconst children = slots.default && preferSingleVNode(slots.default(link));\n\t\t\treturn props.custom ? children : h(\"a\", {\n\t\t\t\t\"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n\t\t\t\thref: link.href,\n\t\t\t\tonClick: link.navigate,\n\t\t\t\tclass: elClass.value\n\t\t\t}, children);\n\t\t};\n\t}\n});\n/**\n* Component to render a link that triggers a navigation on click.\n*/\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n\tif (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;\n\tif (e.defaultPrevented) return;\n\tif (e.button !== void 0 && e.button !== 0) return;\n\tif (e.currentTarget && e.currentTarget.getAttribute) {\n\t\tconst target = e.currentTarget.getAttribute(\"target\");\n\t\tif (/\\b_blank\\b/i.test(target)) return;\n\t}\n\tif (e.preventDefault) e.preventDefault();\n\treturn true;\n}\nfunction includesParams(outer, inner) {\n\tfor (const key in inner) {\n\t\tconst innerValue = inner[key];\n\t\tconst outerValue = outer[key];\n\t\tif (typeof innerValue === \"string\") {\n\t\t\tif (innerValue !== outerValue) return false;\n\t\t} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;\n\t}\n\treturn true;\n}\n/**\n* Get the original path value of a record by following its aliasOf\n* @param record\n*/\nfunction getOriginalPath(record) {\n\treturn record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\n/**\n* Utility class to get the active class based on defaults.\n* @param propClass\n* @param globalClass\n* @param defaultClass\n*/\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\n\n//#endregion\n//#region src/RouterView.ts\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterView\",\n\tinheritAttrs: false,\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: \"default\"\n\t\t},\n\t\troute: Object\n\t},\n\tcompatConfig: { MODE: 3 },\n\tsetup(props, { attrs, slots }) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n\t\tconst injectedRoute = inject(routerViewLocationKey);\n\t\tconst routeToDisplay = computed(() => props.route || injectedRoute.value);\n\t\tconst injectedDepth = inject(viewDepthKey, 0);\n\t\tconst depth = computed(() => {\n\t\t\tlet initialDepth = unref(injectedDepth);\n\t\t\tconst { matched } = routeToDisplay.value;\n\t\t\tlet matchedRoute;\n\t\t\twhile ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;\n\t\t\treturn initialDepth;\n\t\t});\n\t\tconst matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n\t\tprovide(viewDepthKey, computed(() => depth.value + 1));\n\t\tprovide(matchedRouteKey, matchedRouteRef);\n\t\tprovide(routerViewLocationKey, routeToDisplay);\n\t\tconst viewRef = ref();\n\t\twatch(() => [\n\t\t\tviewRef.value,\n\t\t\tmatchedRouteRef.value,\n\t\t\tprops.name\n\t\t], ([instance, to, name], [oldInstance, from, oldName]) => {\n\t\t\tif (to) {\n\t\t\t\tto.instances[name] = instance;\n\t\t\t\tif (from && from !== to && instance && instance === oldInstance) {\n\t\t\t\t\tif (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;\n\t\t\t\t\tif (!to.updateGuards.size) to.updateGuards = from.updateGuards;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n\t\t}, { flush: \"post\" });\n\t\treturn () => {\n\t\t\tconst route = routeToDisplay.value;\n\t\t\tconst currentName = props.name;\n\t\t\tconst matchedRoute = matchedRouteRef.value;\n\t\t\tconst ViewComponent = matchedRoute && matchedRoute.components[currentName];\n\t\t\tif (!ViewComponent) return normalizeSlot(slots.default, {\n\t\t\t\tComponent: ViewComponent,\n\t\t\t\troute\n\t\t\t});\n\t\t\tconst routePropsOption = matchedRoute.props[currentName];\n\t\t\tconst routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n\t\t\tconst onVnodeUnmounted = (vnode) => {\n\t\t\t\tif (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;\n\t\t\t};\n\t\t\tconst component = h(ViewComponent, assign({}, routeProps, attrs, {\n\t\t\t\tonVnodeUnmounted,\n\t\t\t\tref: viewRef\n\t\t\t}));\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {\n\t\t\t\tconst info = {\n\t\t\t\t\tdepth: depth.value,\n\t\t\t\t\tname: matchedRoute.name,\n\t\t\t\t\tpath: matchedRoute.path,\n\t\t\t\t\tmeta: matchedRoute.meta\n\t\t\t\t};\n\t\t\t\t(isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {\n\t\t\t\t\tinstance.__vrv_devtools = info;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn normalizeSlot(slots.default, {\n\t\t\t\tComponent: component,\n\t\t\t\troute\n\t\t\t}) || component;\n\t\t};\n\t}\n});\nfunction normalizeSlot(slot, data) {\n\tif (!slot) return null;\n\tconst slotContent = slot(data);\n\treturn slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n/**\n* Component to display the current route the user is at.\n*/\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n\tconst instance = getCurrentInstance();\n\tconst parentName = instance.parent && instance.parent.type.name;\n\tconst parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n\tif (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n\t\tconst comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n\t\twarn$1(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\nUse slot props instead:\n\n<router-view v-slot=\"{ Component }\">\n <${comp}>\\n <component :is=\"Component\" />\\n </${comp}>\\n</router-view>`);\n\t}\n}\n\n//#endregion\n//#region src/router.ts\n/**\n* Creates a Router instance that can be used by a Vue app.\n*\n* @param options - {@link RouterOptions}\n*/\nfunction createRouter(options) {\n\tconst matcher = createRouterMatcher(options.routes, options);\n\tconst parseQuery$1 = options.parseQuery || parseQuery;\n\tconst stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n\tconst routerHistory = options.history;\n\tif (process.env.NODE_ENV !== \"production\" && !routerHistory) throw new Error(\"Provide the \\\"history\\\" option when calling \\\"createRouter()\\\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history\");\n\tconst beforeGuards = useCallbacks();\n\tconst beforeResolveGuards = useCallbacks();\n\tconst afterGuards = useCallbacks();\n\tconst currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n\tlet pendingLocation = START_LOCATION_NORMALIZED;\n\tif (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) history.scrollRestoration = \"manual\";\n\tconst normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n\tconst encodeParams = applyToParams.bind(null, encodeParam);\n\tconst decodeParams = applyToParams.bind(null, decode);\n\tfunction addRoute(parentOrRoute, route) {\n\t\tlet parent;\n\t\tlet record;\n\t\tif (isRouteName(parentOrRoute)) {\n\t\t\tparent = matcher.getRecordMatcher(parentOrRoute);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !parent) warn$1(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n\t\t\trecord = route;\n\t\t} else record = parentOrRoute;\n\t\treturn matcher.addRoute(record, parent);\n\t}\n\tfunction removeRoute(name) {\n\t\tconst recordMatcher = matcher.getRecordMatcher(name);\n\t\tif (recordMatcher) matcher.removeRoute(recordMatcher);\n\t\telse if (process.env.NODE_ENV !== \"production\") warn$1(`Cannot remove non-existent route \"${String(name)}\"`);\n\t}\n\tfunction getRoutes() {\n\t\treturn matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n\t}\n\tfunction hasRoute(name) {\n\t\treturn !!matcher.getRecordMatcher(name);\n\t}\n\tfunction resolve(rawLocation, currentLocation) {\n\t\tcurrentLocation = assign({}, currentLocation || currentRoute.value);\n\t\tif (typeof rawLocation === \"string\") {\n\t\t\tconst locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n\t\t\tconst matchedRoute$1 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n\t\t\tconst href$1 = routerHistory.createHref(locationNormalized.fullPath);\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (href$1.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href$1}\". A resolved location cannot start with multiple slashes.`);\n\t\t\t\telse if (!matchedRoute$1.matched.length) warn$1(`No match found for location with path \"${rawLocation}\"`);\n\t\t\t}\n\t\t\treturn assign(locationNormalized, matchedRoute$1, {\n\t\t\t\tparams: decodeParams(matchedRoute$1.params),\n\t\t\t\thash: decode(locationNormalized.hash),\n\t\t\t\tredirectedFrom: void 0,\n\t\t\t\thref: href$1\n\t\t\t});\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && !isRouteLocation(rawLocation)) {\n\t\t\twarn$1(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n\t\t\treturn resolve({});\n\t\t}\n\t\tlet matcherLocation;\n\t\tif (rawLocation.path != null) {\n\t\t\tif (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && Object.keys(rawLocation.params).length) warn$1(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n\t\t\tmatcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });\n\t\t} else {\n\t\t\tconst targetParams = assign({}, rawLocation.params);\n\t\t\tfor (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];\n\t\t\tmatcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });\n\t\t\tcurrentLocation.params = encodeParams(currentLocation.params);\n\t\t}\n\t\tconst matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n\t\tconst hash = rawLocation.hash || \"\";\n\t\tif (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) warn$1(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n\t\tmatchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n\t\tconst fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n\t\t\thash: encodeHash(hash),\n\t\t\tpath: matchedRoute.path\n\t\t}));\n\t\tconst href = routerHistory.createHref(fullPath);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n\t\t}\n\t\treturn assign({\n\t\t\tfullPath,\n\t\t\thash,\n\t\t\tquery: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n\t\t}, matchedRoute, {\n\t\t\tredirectedFrom: void 0,\n\t\t\thref\n\t\t});\n\t}\n\tfunction locationAsObject(to) {\n\t\treturn typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n\t}\n\tfunction checkCanceledNavigation(to, from) {\n\t\tif (pendingLocation !== to) return createRouterError(ErrorTypes.NAVIGATION_CANCELLED, {\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t}\n\tfunction push(to) {\n\t\treturn pushWithRedirect(to);\n\t}\n\tfunction replace(to) {\n\t\treturn push(assign(locationAsObject(to), { replace: true }));\n\t}\n\tfunction handleRedirectRecord(to, from) {\n\t\tconst lastMatched = to.matched[to.matched.length - 1];\n\t\tif (lastMatched && lastMatched.redirect) {\n\t\t\tconst { redirect } = lastMatched;\n\t\t\tlet newTargetLocation = typeof redirect === \"function\" ? redirect(to, from) : redirect;\n\t\t\tif (typeof newTargetLocation === \"string\") {\n\t\t\t\tnewTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };\n\t\t\t\tnewTargetLocation.params = {};\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && newTargetLocation.path == null && !(\"name\" in newTargetLocation)) {\n\t\t\t\twarn$1(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n\t\t\t\tthrow new Error(\"Invalid redirect\");\n\t\t\t}\n\t\t\treturn assign({\n\t\t\t\tquery: to.query,\n\t\t\t\thash: to.hash,\n\t\t\t\tparams: newTargetLocation.path != null ? {} : to.params\n\t\t\t}, newTargetLocation);\n\t\t}\n\t}\n\tfunction pushWithRedirect(to, redirectedFrom) {\n\t\tconst targetLocation = pendingLocation = resolve(to);\n\t\tconst from = currentRoute.value;\n\t\tconst data = to.state;\n\t\tconst force = to.force;\n\t\tconst replace$1 = to.replace === true;\n\t\tconst shouldRedirect = handleRedirectRecord(targetLocation, from);\n\t\tif (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n\t\t\tstate: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n\t\t\tforce,\n\t\t\treplace: replace$1\n\t\t}), redirectedFrom || targetLocation);\n\t\tconst toLocation = targetLocation;\n\t\ttoLocation.redirectedFrom = redirectedFrom;\n\t\tlet failure;\n\t\tif (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n\t\t\tfailure = createRouterError(ErrorTypes.NAVIGATION_DUPLICATED, {\n\t\t\t\tto: toLocation,\n\t\t\t\tfrom\n\t\t\t});\n\t\t\thandleScroll(from, from, true, false);\n\t\t}\n\t\treturn (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure$1) => {\n\t\t\tif (failure$1) {\n\t\t\t\tif (isNavigationFailure(failure$1, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\" && isSameRouteLocation(stringifyQuery$1, resolve(failure$1.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {\n\t\t\t\t\t\twarn$1(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n\t\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Infinite redirect in navigation guard\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn pushWithRedirect(assign({ replace: replace$1 }, locationAsObject(failure$1.to), {\n\t\t\t\t\t\tstate: typeof failure$1.to === \"object\" ? assign({}, data, failure$1.to.state) : data,\n\t\t\t\t\t\tforce\n\t\t\t\t\t}), redirectedFrom || toLocation);\n\t\t\t\t}\n\t\t\t} else failure$1 = finalizeNavigation(toLocation, from, true, replace$1, data);\n\t\t\ttriggerAfterEach(toLocation, from, failure$1);\n\t\t\treturn failure$1;\n\t\t});\n\t}\n\t/**\n\t* Helper to reject and skip all navigation guards if a new navigation happened\n\t* @param to\n\t* @param from\n\t*/\n\tfunction checkCanceledNavigationAndReject(to, from) {\n\t\tconst error = checkCanceledNavigation(to, from);\n\t\treturn error ? Promise.reject(error) : Promise.resolve();\n\t}\n\tfunction runWithContext(fn) {\n\t\tconst app = installedApps.values().next().value;\n\t\treturn app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n\t}\n\tfunction navigate(to, from) {\n\t\tlet guards;\n\t\tconst [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n\t\tguards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n\t\tfor (const record of leavingRecords) record.leaveGuards.forEach((guard) => {\n\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t});\n\t\tconst canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n\t\tguards.push(canceledNavigationCheck);\n\t\treturn runGuardQueue(guards).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n\t\t\tfor (const record of updatingRecords) record.updateGuards.forEach((guard) => {\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t});\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));\n\t\t\telse guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tto.matched.forEach((record) => record.enterCallbacks = {});\n\t\t\tguards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from, runWithContext);\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).catch((err) => isNavigationFailure(err, ErrorTypes.NAVIGATION_CANCELLED) ? err : Promise.reject(err));\n\t}\n\tfunction triggerAfterEach(to, from, failure) {\n\t\tafterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n\t}\n\t/**\n\t* - Cleans up any navigation guards\n\t* - Changes the url if necessary\n\t* - Calls the scrollBehavior\n\t*/\n\tfunction finalizeNavigation(toLocation, from, isPush, replace$1, data) {\n\t\tconst error = checkCanceledNavigation(toLocation, from);\n\t\tif (error) return error;\n\t\tconst isFirstNavigation = from === START_LOCATION_NORMALIZED;\n\t\tconst state = !isBrowser ? {} : history.state;\n\t\tif (isPush) if (replace$1 || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));\n\t\telse routerHistory.push(toLocation.fullPath, data);\n\t\tcurrentRoute.value = toLocation;\n\t\thandleScroll(toLocation, from, isPush, isFirstNavigation);\n\t\tmarkAsReady();\n\t}\n\tlet removeHistoryListener;\n\tfunction setupListeners() {\n\t\tif (removeHistoryListener) return;\n\t\tremoveHistoryListener = routerHistory.listen((to, _from, info) => {\n\t\t\tif (!router.listening) return;\n\t\t\tconst toLocation = resolve(to);\n\t\t\tconst shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);\n\t\t\tif (shouldRedirect) {\n\t\t\t\tpushWithRedirect(assign(shouldRedirect, {\n\t\t\t\t\treplace: true,\n\t\t\t\t\tforce: true\n\t\t\t\t}), toLocation).catch(noop);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingLocation = toLocation;\n\t\t\tconst from = currentRoute.value;\n\t\t\tif (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n\t\t\tnavigate(toLocation, from).catch((error) => {\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_CANCELLED)) return error;\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tpushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {\n\t\t\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED) && !info.delta && info.type === NavigationType.pop) routerHistory.go(-1, false);\n\t\t\t\t\t}).catch(noop);\n\t\t\t\t\treturn Promise.reject();\n\t\t\t\t}\n\t\t\t\tif (info.delta) routerHistory.go(-info.delta, false);\n\t\t\t\treturn triggerError(error, toLocation, from);\n\t\t\t}).then((failure) => {\n\t\t\t\tfailure = failure || finalizeNavigation(toLocation, from, false);\n\t\t\t\tif (failure) {\n\t\t\t\t\tif (info.delta && !isNavigationFailure(failure, ErrorTypes.NAVIGATION_CANCELLED)) routerHistory.go(-info.delta, false);\n\t\t\t\t\telse if (info.type === NavigationType.pop && isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED)) routerHistory.go(-1, false);\n\t\t\t\t}\n\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t}).catch(noop);\n\t\t});\n\t}\n\tlet readyHandlers = useCallbacks();\n\tlet errorListeners = useCallbacks();\n\tlet ready;\n\t/**\n\t* Trigger errorListeners added via onError and throws the error as well\n\t*\n\t* @param error - error to throw\n\t* @param to - location we were navigating to when the error happened\n\t* @param from - location we were navigating from when the error happened\n\t* @returns the error as a rejected promise\n\t*/\n\tfunction triggerError(error, to, from) {\n\t\tmarkAsReady(error);\n\t\tconst list = errorListeners.list();\n\t\tif (list.length) list.forEach((handler) => handler(error, to, from));\n\t\telse {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"uncaught error during route navigation:\");\n\t\t\tconsole.error(error);\n\t\t}\n\t\treturn Promise.reject(error);\n\t}\n\tfunction isReady() {\n\t\tif (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();\n\t\treturn new Promise((resolve$1, reject) => {\n\t\t\treadyHandlers.add([resolve$1, reject]);\n\t\t});\n\t}\n\tfunction markAsReady(err) {\n\t\tif (!ready) {\n\t\t\tready = !err;\n\t\t\tsetupListeners();\n\t\t\treadyHandlers.list().forEach(([resolve$1, reject]) => err ? reject(err) : resolve$1());\n\t\t\treadyHandlers.reset();\n\t\t}\n\t\treturn err;\n\t}\n\tfunction handleScroll(to, from, isPush, isFirstNavigation) {\n\t\tconst { scrollBehavior } = options;\n\t\tif (!isBrowser || !scrollBehavior) return Promise.resolve();\n\t\tconst scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n\t\treturn nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n\t}\n\tconst go = (delta) => routerHistory.go(delta);\n\tlet started;\n\tconst installedApps = /* @__PURE__ */ new Set();\n\tconst router = {\n\t\tcurrentRoute,\n\t\tlistening: true,\n\t\taddRoute,\n\t\tremoveRoute,\n\t\tclearRoutes: matcher.clearRoutes,\n\t\thasRoute,\n\t\tgetRoutes,\n\t\tresolve,\n\t\toptions,\n\t\tpush,\n\t\treplace,\n\t\tgo,\n\t\tback: () => go(-1),\n\t\tforward: () => go(1),\n\t\tbeforeEach: beforeGuards.add,\n\t\tbeforeResolve: beforeResolveGuards.add,\n\t\tafterEach: afterGuards.add,\n\t\tonError: errorListeners.add,\n\t\tisReady,\n\t\tinstall(app) {\n\t\t\tapp.component(\"RouterLink\", RouterLink);\n\t\t\tapp.component(\"RouterView\", RouterView);\n\t\t\tapp.config.globalProperties.$router = router;\n\t\t\tObject.defineProperty(app.config.globalProperties, \"$route\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => unref(currentRoute)\n\t\t\t});\n\t\t\tif (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n\t\t\t\tstarted = true;\n\t\t\t\tpush(routerHistory.location).catch((err) => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Unexpected error when starting the router:\", err);\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst reactiveRoute = {};\n\t\t\tfor (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {\n\t\t\t\tget: () => currentRoute.value[key],\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t\tapp.provide(routerKey, router);\n\t\t\tapp.provide(routeLocationKey, shallowReactive(reactiveRoute));\n\t\t\tapp.provide(routerViewLocationKey, currentRoute);\n\t\t\tconst unmountApp = app.unmount;\n\t\t\tinstalledApps.add(app);\n\t\t\tapp.unmount = function() {\n\t\t\t\tinstalledApps.delete(app);\n\t\t\t\tif (installedApps.size < 1) {\n\t\t\t\t\tpendingLocation = START_LOCATION_NORMALIZED;\n\t\t\t\t\tremoveHistoryListener && removeHistoryListener();\n\t\t\t\t\tremoveHistoryListener = null;\n\t\t\t\t\tcurrentRoute.value = START_LOCATION_NORMALIZED;\n\t\t\t\t\tstarted = false;\n\t\t\t\t\tready = false;\n\t\t\t\t}\n\t\t\t\tunmountApp();\n\t\t\t};\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser) addDevtools(app, router, matcher);\n\t\t}\n\t};\n\tfunction runGuardQueue(guards) {\n\t\treturn guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n\t}\n\treturn router;\n}\n\n//#endregion\n//#region src/useApi.ts\n/**\n* Returns the router instance. Equivalent to using `$router` inside\n* templates.\n*/\nfunction useRouter() {\n\treturn inject(routerKey);\n}\n/**\n* Returns the current route location. Equivalent to using `$route` inside\n* templates.\n*/\nfunction useRoute(_name) {\n\treturn inject(routeLocationKey);\n}\n\n//#endregion\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };","export default \"__VITE_PUBLIC_ASSET__b010f6c6__\"","<script setup lang=\"ts\">\nwithDefaults(defineProps<{\n size?: number\n label?: boolean\n compact?: boolean\n bare?: boolean\n}>(), {\n size: 32,\n label: false,\n compact: false,\n bare: false,\n})\n</script>\n\n<template>\n <span class=\"brand-mark\" :class=\"{ 'brand-mark--compact': compact, 'brand-mark--bare': bare }\">\n <span class=\"brand-mark__plate\" :style=\"{ width: `${size}px`, height: `${size}px` }\">\n <img src=\"/brand/AppIcon-1024.png\" alt=\"\" aria-hidden=\"true\" />\n </span>\n <span v-if=\"label\" class=\"brand-mark__name\">夭夭 AI</span>\n </span>\n</template>\n\n<style scoped>\n.brand-mark {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n color: var(--text-primary);\n}\n\n.brand-mark__plate {\n display: inline-grid;\n place-items: center;\n flex: 0 0 auto;\n overflow: hidden;\n border-radius: 24%;\n background: #f1f1ef;\n}\n\n.brand-mark__plate img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n.brand-mark__name {\n font-size: 20px;\n font-weight: 650;\n letter-spacing: -.035em;\n}\n\n.brand-mark--compact { gap: 8px; }\n.brand-mark--compact .brand-mark__name { font-size: 16px; }\n.brand-mark--bare .brand-mark__plate { border-radius: 0; background: transparent; }\n</style>\n","<script setup lang=\"ts\">\nimport BrandMark from '@/components/common/BrandMark.vue'\n\nwithDefaults(defineProps<{ message?: string }>(), { message: '正在恢复会话…' })\n</script>\n\n<template>\n <main class=\"loading-screen\" aria-live=\"polite\">\n <BrandMark :size=\"48\" label />\n <span class=\"loading-line\"><i />{{ message }}</span>\n </main>\n</template>\n\n<style scoped>\n.loading-screen { display: grid; place-content: center; justify-items: center; width: 100%; height: 100%; background: var(--canvas); }\n.loading-line { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--text-muted); font-size: 11px; }\n.loading-line i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-primary); animation: blink 1.15s ease-in-out infinite; }\n@keyframes blink { 50% { opacity: .2; transform: scale(.72); } }\n</style>\n","<script setup lang=\"ts\">\ntype IconName =\n | 'info'\n | 'clock'\n | 'chat'\n | 'history'\n | 'groups'\n | 'files'\n | 'artifacts'\n | 'board'\n | 'plus'\n | 'search'\n | 'dots'\n | 'sun'\n | 'moon'\n | 'logout'\n | 'menu'\n | 'close'\n | 'paperclip'\n | 'brain'\n | 'settings'\n | 'model'\n | 'bolt'\n | 'arrow-up'\n | 'stop'\n | 'tools'\n | 'users'\n | 'chevron-down'\n | 'chevron-left'\n | 'download'\n | 'external'\n | 'image'\n | 'video'\n | 'audio'\n | 'file'\n | 'link'\n | 'refresh'\n | 'quote'\n | 'check'\n | 'alert'\n | 'copy'\n | 'branch'\n | 'topic'\n | 'archive'\n | 'trash'\n | 'edit'\n | 'panel'\n | 'pin'\n | 'pin-filled'\n | 'pin-off'\n | 'globe'\n | 'bell'\n | 'monitor'\n | 'calendar'\n | 'bug'\n\nwithDefaults(defineProps<{ name: IconName; size?: number }>(), { size: 18 })\n</script>\n\n<template>\n <svg\n class=\"app-icon\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <template v-if=\"name === 'calendar'\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\"/><path d=\"M16 3v4M8 3v4M3 11h18M8 15h2M14 15h2M8 18h2\"/></template>\n <template v-else-if=\"name === 'bug'\"><path d=\"M8 9h8v7a4 4 0 0 1-8 0V9ZM9 9V6a3 3 0 0 1 6 0v3M12 10v10M4 10h4M16 10h4M3 15h5M16 15h5M5 21l3-3M16 18l3 3M5 4l4 3M15 7l4-3\"/></template>\n <template v-else-if=\"name === 'monitor'\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"M8 21h8M12 16v5\"/></template>\n <template v-else-if=\"name === 'chat'\">\n <path d=\"M8 18h-3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-5l-6 4z\" />\n <path d=\"M8 9h8M8 13h5\" />\n </template>\n <template v-else-if=\"name === 'history'\"><circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 7v5l3 2M3 12H1m2 0 2-2m-2 2 2 2\" /></template>\n <template v-else-if=\"name === 'groups'\">\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75\" />\n </template>\n <template v-else-if=\"name === 'files'\">\n <path d=\"M4 4a2 2 0 0 1 2-2h5l2 3h5a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z\" />\n </template>\n <template v-else-if=\"name === 'artifacts'\">\n <path d=\"M12 3 3 8l9 5 9-5zM3 12l9 5 9-5M3 16l9 5 9-5\" />\n </template>\n <template v-else-if=\"name === 'board'\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" /><path d=\"M9 4v16M15 4v16M5.5 8h1M11.5 8h1M17.5 8h1\" /></template>\n <template v-else-if=\"name === 'plus'\"><path d=\"M12 5v14M5 12h14\" /></template>\n <template v-else-if=\"name === 'search'\"><circle cx=\"11\" cy=\"11\" r=\"7\" /><path d=\"m20 20-4-4\" /></template>\n <template v-else-if=\"name === 'dots'\"><circle cx=\"5\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" /><circle cx=\"12\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" /><circle cx=\"19\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" /></template>\n <template v-else-if=\"name === 'sun'\"><circle cx=\"12\" cy=\"12\" r=\"4\" /><path d=\"M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.65 17.65l1.42 1.42M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.65 6.35l1.42-1.42\" /></template>\n <template v-else-if=\"name === 'moon'\"><path d=\"M20.5 14.2A8.5 8.5 0 0 1 9.8 3.5 8.5 8.5 0 1 0 20.5 14.2z\" /></template>\n <template v-else-if=\"name === 'logout'\"><path d=\"M10 17l5-5-5-5M15 12H3M21 19V5a2 2 0 0 0-2-2h-6\" /></template>\n <template v-else-if=\"name === 'menu'\"><path d=\"M4 7h16M4 12h16M4 17h16\" /></template>\n <template v-else-if=\"name === 'close'\"><path d=\"m6 6 12 12M18 6 6 18\" /></template>\n <template v-else-if=\"name === 'paperclip'\"><path d=\"m21.4 11.6-8.9 8.9a6 6 0 0 1-8.5-8.5l9.5-9.5a4 4 0 1 1 5.7 5.7l-9.6 9.5a2 2 0 0 1-2.8-2.8l8.9-8.9\" /></template>\n <template v-else-if=\"name === 'brain'\"><path d=\"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-5-.1 2.5 2.5 0 0 1-3-3 3 3 0 0 1 0-5.8A2.5 2.5 0 0 1 7 6a2.5 2.5 0 0 1 2.5-4Z\" /><path d=\"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 5-.1 2.5 2.5 0 0 0 3-3 3 3 0 0 0 0-5.8A2.5 2.5 0 0 0 17 6a2.5 2.5 0 0 0-2.5-4Z\" /></template>\n <template v-else-if=\"name === 'settings'\"><circle cx=\"12\" cy=\"12\" r=\"3\" /><path d=\"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5v.2h-4v-.2a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1-2.8-2.8.1-.1A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-1.5-1H3v-4h.1A1.7 1.7 0 0 0 4.6 9a1.7 1.7 0 0 0-.3-1.8l-.1-.1 2.8-2.8.1.1a1.7 1.7 0 0 0 1.8.3 1.7 1.7 0 0 0 1-1.5V3h4v.2a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1 2.8 2.8-.1.1A1.7 1.7 0 0 0 19.4 9a1.7 1.7 0 0 0 1.5 1h.1v4h-.1a1.7 1.7 0 0 0-1.5 1Z\" /></template>\n <template v-else-if=\"name === 'model'\"><circle cx=\"12\" cy=\"12\" r=\"3\" /><path d=\"M12 2v4M12 18v4M2 12h4M18 12h4M5 5l3 3M16 16l3 3M5 19l3-3M16 8l3-3\" /></template>\n <template v-else-if=\"name === 'bolt'\"><path d=\"M13.3 2 4.5 13h6.2L9.8 22l9.7-12h-6.2z\" fill=\"currentColor\" stroke=\"none\" /></template>\n <template v-else-if=\"name === 'arrow-up'\"><path d=\"M12 19V5m-7 7 7-7 7 7\" stroke-width=\"2.2\" /></template>\n <template v-else-if=\"name === 'stop'\"><rect x=\"6\" y=\"6\" width=\"12\" height=\"12\" rx=\"2.5\" fill=\"currentColor\" stroke=\"none\" /></template>\n <template v-else-if=\"name === 'tools'\"><path d=\"M14.7 6.3a4 4 0 0 0-5-5L12 3.6 8.4 7.2 6.1 4.9a4 4 0 0 0 5 5l-7.4 7.4a2.1 2.1 0 0 0 3 3l7.4-7.4a4 4 0 0 0 5-5l-2.3 2.3-3.6-3.6z\" /></template>\n <template v-else-if=\"name === 'info'\"><circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 11v6M12 7h.01\" /></template>\n <template v-else-if=\"name === 'clock'\"><circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 7v5l3 2\" /></template>\n <template v-else-if=\"name === 'users'\"><circle cx=\"9\" cy=\"8\" r=\"3\" /><path d=\"M3 21v-2a6 6 0 0 1 12 0v2M16 3a3 3 0 0 1 0 6M18 14a5 5 0 0 1 3 5v2\" /></template>\n <template v-else-if=\"name === 'chevron-down'\"><path d=\"m6 9 6 6 6-6\" /></template>\n <template v-else-if=\"name === 'chevron-left'\"><path d=\"m15 18-6-6 6-6\" /></template>\n <template v-else-if=\"name === 'download'\"><path d=\"M12 3v12m-5-5 5 5 5-5M5 21h14\" /></template>\n <template v-else-if=\"name === 'external'\"><path d=\"M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" /></template>\n <template v-else-if=\"name === 'image'\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" /><circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\" /><path d=\"m21 15-5-5L5 21\" /></template>\n <template v-else-if=\"name === 'video'\"><rect x=\"2\" y=\"5\" width=\"15\" height=\"14\" rx=\"2\" /><path d=\"m17 10 5-3v10l-5-3z\" /></template>\n <template v-else-if=\"name === 'audio'\"><path d=\"M9 18V5l11-2v13M9 9l11-2\" /><circle cx=\"6\" cy=\"18\" r=\"3\" /><circle cx=\"17\" cy=\"16\" r=\"3\" /></template>\n <template v-else-if=\"name === 'file'\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" /><path d=\"M14 2v6h6\" /></template>\n <template v-else-if=\"name === 'link'\"><path d=\"M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1\" /></template>\n <template v-else-if=\"name === 'refresh'\"><path d=\"M20 7v5h-5M4 17v-5h5\" /><path d=\"M5.1 9a8 8 0 0 1 13-3l2 2M18.9 15a8 8 0 0 1-13 3l-2-2\" /></template>\n <template v-else-if=\"name === 'quote'\"><path d=\"M3 21c3 0 7-1 7-8V5H4v8h3c0 3-1 4-4 5zM14 21c3 0 7-1 7-8V5h-6v8h3c0 3-1 4-4 5z\" /></template>\n <template v-else-if=\"name === 'check'\"><path d=\"m5 12 4 4L19 6\" /></template>\n <template v-else-if=\"name === 'alert'\"><path d=\"M12 3 2 21h20zM12 9v4M12 17h.01\" /></template>\n <template v-else-if=\"name === 'copy'\"><rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" /></template>\n <template v-else-if=\"name === 'branch'\"><circle cx=\"6\" cy=\"5\" r=\"2\" /><circle cx=\"18\" cy=\"6\" r=\"2\" /><circle cx=\"6\" cy=\"19\" r=\"2\" /><path d=\"M6 7v10M8 7c6 0 4 6 8 6h2\" /></template>\n <template v-else-if=\"name === 'topic'\"><path d=\"M5 9h14M5 15h14M9 5 7 19M17 5l-2 14\" /></template>\n <template v-else-if=\"name === 'archive'\"><path d=\"M3 6h18M5 6v14h14V6M3 3h18v3H3zM9 10h6\" /></template>\n <template v-else-if=\"name === 'trash'\"><path d=\"M3 6h18M8 6V4h8v2M19 6l-1 15H6L5 6M10 11v5M14 11v5\" /></template>\n <template v-else-if=\"name === 'edit'\"><path d=\"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4z\" /></template>\n <template v-else-if=\"name === 'panel'\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" /><path d=\"M15 3v18\" /></template>\n <template v-else-if=\"name === 'pin'\"><path d=\"M9 4v6l-2 4v2h10v-2l-2-4V4M12 16v5M8 4h8\" /></template>\n <template v-else-if=\"name === 'pin-filled'\"><path d=\"M8 3a1 1 0 0 0 0 2h1v4.72l-2.8 4.7A1 1 0 0 0 7.06 16H11v5a1 1 0 1 0 2 0v-5h3.94a1 1 0 0 0 .86-1.58L15 9.72V5h1a1 1 0 1 0 0-2z\" fill=\"currentColor\" stroke=\"none\" /></template>\n <template v-else-if=\"name === 'pin-off'\"><path d=\"M9 4v6l-2 4v2h10v-2l-2-4V4M12 16v5M8 4h8\" /><path d=\"M4 4l16 16\" /></template>\n <template v-else-if=\"name === 'globe'\"><circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18\" /></template>\n <template v-else-if=\"name === 'bell'\"><path d=\"M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4\" /></template>\n </svg>\n</template>\n\n<style scoped>\n.app-icon { display: block; flex: 0 0 auto; }\n</style>\n","/** Tool events and persisted tool-result rows share the same outcome rules. */\nexport function toolResultFailed(value: unknown, error?: unknown): boolean {\n if (error && error !== 'false') return true\n if (typeof value === 'string') {\n try { value = JSON.parse(value) } catch { return false }\n }\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false\n const result = value as Record<string, unknown>\n return Boolean(result.error && result.error !== 'false') || result.is_error === true\n || result.ok === false || result.success === false\n || ['failed', 'error', 'cancelled', 'canceled'].includes(String(result.status))\n || (typeof result.exit_code === 'number' && result.exit_code !== 0)\n}\n\nexport function toolStatus(status: unknown, result?: unknown, error?: unknown): 'running' | 'completed' | 'failed' | 'interrupted' {\n if (toolResultFailed(result, error)) return 'failed'\n const value = String(status ?? '').replace(/^tool\\./, '')\n if (['failed', 'error'].includes(value)) return 'failed'\n if (['interrupted', 'cancelled', 'canceled', 'unknown'].includes(value)) return 'interrupted'\n if (['complete', 'completed', 'success', 'done'].includes(value) || result !== undefined && result !== null) return 'completed'\n return 'running'\n}\n","/** Normalize a server-side file reference without confusing it with an app URL. */\nexport function serverFilePath(raw: string, decode = true): string | undefined {\n let value = raw.trim().replace(/^sandbox:/i, '')\n if (/^file:/i.test(value)) {\n try { const url = new URL(value); if (url.hostname && url.hostname !== 'localhost') return; value = url.pathname; decode = true } catch { return }\n }\n if (decode) try { value = decodeURIComponent(value) } catch { return }\n if (!value.startsWith('/') || value.startsWith('//') || /[\\\\\\u0000-\\u001f\\u007f]/.test(value)) return\n if (value.split('/').some(part => part === '..' || /%2e|%2f|%5c/i.test(part))) return\n return value.replace(/\\/{2,}/g, '/')\n}\n\nconst FILE_CARD_EXTENSIONS = new Set([\n 'apng', 'avif', 'bmp', 'gif', 'heic', 'heif', 'ico', 'jfi', 'jfif', 'jif',\n 'jpe', 'jpeg', 'jpg', 'jxl', 'png', 'svg', 'tif', 'tiff', 'webp',\n 'mp4', 'mov', 'm4v', 'webm', 'mkv', 'avi',\n 'mp3', 'wav', 'm4a', 'aac', 'ogg', 'flac',\n 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'csv', 'tsv', 'rtf',\n 'txt', 'md', 'json', 'jsonl', 'xml', 'yaml', 'yml', 'toml', 'ini', 'log',\n 'html', 'htm', 'css', 'scss', 'less', 'js', 'mjs', 'cjs', 'ts', 'tsx',\n 'jsx', 'vue', 'svelte', 'swift', 'kt', 'kts', 'java', 'py', 'rb', 'go',\n 'rs', 'c', 'cc', 'cpp', 'h', 'hpp', 'cs', 'php', 'sh', 'zsh', 'bash',\n 'fish', 'sql', 'zip', 'rar', '7z', 'tar', 'gz', 'tgz', 'bz2', 'xz',\n])\n\n/** Only promote file types that the preview/download experience understands. */\nexport function isSupportedFilePath(raw: string): boolean {\n const path = serverFilePath(raw)\n if (!path) return false\n const name = path.split('/').at(-1) || ''\n const match = /\\.([A-Za-z0-9]{1,16})$/.exec(name)\n return Boolean(match && FILE_CARD_EXTENSIONS.has(match[1].toLowerCase()))\n}\n\nexport function serverFileUrl(raw: string, profile?: string): string | undefined {\n const path = serverFilePath(raw)\n if (!path || !/^(?:file:|sandbox:)/i.test(raw) && /^\\/(?:api|assets|icons|brand|attachments|uploads|media|chat|history|conversations|kanban|files|artifacts|settings)(?:\\/|$)/.test(path)) return\n return `/api/files/download?${new URLSearchParams({ path, preview: '1', ...(profile ? { profile } : {}) })}`\n}\n","import { serverFilePath } from '@shared/serverFiles'\n\nexport const MAX_ATTACHMENT_BYTES = 25 * 1024 * 1024\n\n/** Use the authenticated file route for uploads from any Hermes home. */\nexport function imageAttachmentReference(raw: string, profile?: string): { path: string; url: string } | undefined {\n let source = raw.trim().replace(/^[`'\"]|[`'\"]$/g, '')\n let decode = true\n if (/^\\/api\\/(?:files\\/(?:download|stream)|hermes\\/download|media)\\?/.test(source)) {\n source = new URL(source, 'https://local.invalid').searchParams.get('path') || ''\n decode = false // URLSearchParams already decoded the path.\n }\n // Encoded separators must not change the meaning of a path segment.\n if (/%2f|%5c|[\\\\\\u0000-\\u001f\\u007f]/i.test(source)\n || source.split('/').some(segment => /^(?:\\.|%2e){1,2}$/i.test(segment))) return\n const path = serverFilePath(source, decode)\n if (!path || path.split('/').some(segment => segment === '.')) return\n if (decode && !/^(?:file:|sandbox:)/i.test(source)\n && /^\\/(?:api|assets|icons|brand|attachments|uploads|media|chat|history|conversations|kanban|files|artifacts|settings)(?:\\/|$)/.test(path)) return\n return { path, url: `/api/files/download?${new URLSearchParams({ path, preview: '1', ...(profile ? { profile } : {}) })}` }\n}\n\nexport interface EncodedAttachment {\n name: string\n mimeType: string\n size: number\n base64: string\n dataUrl: string\n extension: string\n kind: 'image' | 'pdf' | 'file'\n}\n\nfunction readAsDataURL(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.onerror = () => reject(reader.error ?? new Error(`无法读取 ${file.name}`))\n reader.onload = () => resolve(String(reader.result ?? ''))\n reader.readAsDataURL(file)\n })\n}\n\nexport async function encodeAttachment(file: File): Promise<EncodedAttachment> {\n if (file.size > MAX_ATTACHMENT_BYTES) throw new Error(`${file.name} 超过 25 MiB 限制`)\n const dataUrl = await readAsDataURL(file)\n const separator = dataUrl.indexOf(',')\n if (separator < 0) throw new Error(`${file.name} 编码失败`)\n const mimeType = file.type || 'application/octet-stream'\n return {\n name: file.name,\n mimeType,\n size: file.size,\n base64: dataUrl.slice(separator + 1),\n dataUrl,\n extension: file.name.includes('.') ? file.name.split('.').pop()?.toLowerCase() ?? '' : '',\n kind: mimeType.startsWith('image/') ? 'image' : mimeType === 'application/pdf' || file.name.toLowerCase().endsWith('.pdf') ? 'pdf' : 'file',\n }\n}\n","import { toolStatus } from '@shared/chatTools'\nimport { imageAttachmentReference } from './attachments'\nimport type {\n ChatAttachment,\n ChatMessage,\n CurrentUser,\n FileKind,\n FileLibraryItem,\n GroupAgent,\n GroupCapabilities,\n GroupInteraction,\n GroupMessage,\n GroupRoomDetail,\n GroupRoomActivity,\n GroupRoomSummary,\n GroupRun,\n GroupTopicSummary,\n JsonValue,\n ModelOption,\n Profile,\n SessionSummary,\n ToolCall,\n} from '@shared/types'\n\nexport type UnknownRecord = Record<string, unknown>\n\nexport function record(value: unknown): UnknownRecord {\n return value && typeof value === 'object' && !Array.isArray(value) ? value as UnknownRecord : {}\n}\n\nexport function string(value: unknown, fallback = ''): string {\n if (typeof value === 'string') return value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n return fallback\n}\n\nexport function number(value: unknown, fallback = 0): number {\n const parsed = typeof value === 'number' ? value : Number(value)\n return Number.isFinite(parsed) ? parsed : fallback\n}\n\nexport function bool(value: unknown, fallback = false): boolean {\n if (typeof value === 'boolean') return value\n if (value === 1 || value === '1' || value === 'true') return true\n if (value === 0 || value === '0' || value === 'false') return false\n return fallback\n}\n\nexport function values(value: unknown): unknown[] {\n return Array.isArray(value) ? value : []\n}\n\nfunction pick(source: UnknownRecord, ...keys: string[]): unknown {\n for (const key of keys) if (source[key] !== undefined && source[key] !== null) return source[key]\n return undefined\n}\n\nfunction jsonRecord(value: unknown): UnknownRecord {\n const direct = record(value)\n if (Object.keys(direct).length || typeof value !== 'string') return direct\n try { return record(JSON.parse(value)) } catch { return {} }\n}\n\nexport function normalizeUser(value: unknown): CurrentUser {\n const source = record(value)\n const id = string(pick(source, 'id', 'user_id', 'userId')) || string(pick(source, 'email', 'username')) || 'local'\n return {\n id,\n username: string(pick(source, 'username', 'display_name', 'displayName', 'email', 'user_id', 'userId'), id),\n avatar: string(source.avatar) || undefined,\n displayName: string(pick(source, 'display_name', 'displayName')) || undefined,\n email: string(source.email) || undefined,\n provider: string(source.provider) || undefined,\n role: string(source.role) || undefined,\n enabled: source.enabled === undefined ? undefined : bool(source.enabled),\n mustChangePassword: bool(pick(source, 'mustChangePassword', 'must_change_password')),\n ...(source.localDesktop === true ? { localDesktop: true } : {}),\n }\n}\n\nexport function normalizeProfile(value: unknown): Profile {\n const source = record(value)\n const name = string(pick(source, 'name', 'profile', 'id'), 'default')\n return {\n name,\n agentName: string(pick(source, 'agentName', 'agent_name')) || undefined,\n displayName: string(pick(source, 'display_name', 'displayName', 'alias', 'description')) || undefined,\n description: string(source.description) || undefined,\n isDefault: bool(pick(source, 'is_default', 'isDefault', 'active')),\n model: string(source.model) || undefined,\n provider: string(source.provider) || undefined,\n gatewayRunning: source.gateway_running === undefined && source.gatewayRunning === undefined\n ? undefined\n : bool(pick(source, 'gateway_running', 'gatewayRunning')),\n avatar: string(source.avatar) || undefined,\n agentAvatar: string(pick(source, 'agentAvatar', 'agent_avatar')) || undefined,\n }\n}\n\nexport function normalizeModel(value: unknown): ModelOption {\n const source = record(value)\n const provider = string(source.provider)\n const id = string(pick(source, 'id', 'model', 'value'))\n return {\n id,\n name: string(pick(source, 'name', 'display_name', 'displayName'), id),\n provider,\n supportsReasoning: source.supports_reasoning === undefined && source.supportsReasoning === undefined\n ? undefined\n : bool(pick(source, 'supports_reasoning', 'supportsReasoning')),\n reasoningEfforts: values(pick(source, 'reasoning_efforts', 'reasoningEfforts')).map(value => string(value)).filter(Boolean),\n isDefault: bool(pick(source, 'is_default', 'isDefault')),\n }\n}\n\nexport function normalizeSession(value: unknown, fallbackProfile?: string): SessionSummary {\n const source = record(value)\n const modelConfig = jsonRecord(pick(source, 'model_config', 'modelConfig'))\n const owned = pick(source, 'owned', 'is_owned', 'isOwned')\n const startedAt = number(pick(source, 'started_at', 'startedAt', 'created_at', 'createdAt'))\n const updatedAt = number(pick(source, 'last_active', 'lastActive', 'updated_at', 'updatedAt'), startedAt)\n const id = string(pick(source, 'id', 'session_id', 'sessionId', 'stored_session_id', 'storedSessionId'))\n return {\n id,\n profile: string(source.profile, fallbackProfile) || undefined,\n source: string(source.source, 'cli'),\n owned: owned === undefined ? undefined : bool(owned),\n title: string(source.title, '未命名会话'),\n preview: string(source.preview) || undefined,\n model: string(source.model ?? modelConfig.model) || undefined,\n provider: string(source.provider ?? modelConfig.provider) || undefined,\n agent: string(source.agent) || undefined,\n messageCount: number(pick(source, 'message_count', 'messageCount')),\n toolCallCount: number(pick(source, 'tool_call_count', 'toolCallCount')),\n inputTokens: number(pick(source, 'input_tokens', 'inputTokens')) || undefined,\n outputTokens: number(pick(source, 'output_tokens', 'outputTokens')) || undefined,\n startedAt,\n updatedAt,\n endedAt: pick(source, 'ended_at', 'endedAt') == null ? null : number(pick(source, 'ended_at', 'endedAt')),\n parentSessionId: string(pick(source, 'parent_session_id', 'parentSessionId')) || null,\n forkPointMessageId: string(pick(source, 'fork_point_message_id', 'forkPointMessageId')) || null,\n workspace: string(source.workspace) || null,\n archived: bool(pick(source, 'is_archived', 'isArchived', 'archived')),\n pinned: bool(pick(source, 'is_pinned', 'isPinned', 'pinned')),\n }\n}\n\nfunction normalizeToolCall(value: unknown, index: number): ToolCall {\n const source = record(value)\n const functionCall = record(source.function)\n const error = string(source.error)\n const result = pick(source, 'result', 'output') as JsonValue | undefined\n return {\n id: string(pick(source, 'id', 'tool_call_id', 'toolCallId', 'tool_id'), `tool-${index}`),\n name: string(pick(source, 'name', 'tool_name', 'toolName') ?? functionCall.name, '工具'),\n status: toolStatus(source.completion_unknown ? 'interrupted' : source.status, result, source.error),\n arguments: (pick(source, 'arguments', 'args', 'context') ?? functionCall.arguments) as JsonValue | undefined,\n result,\n preview: string(pick(source, 'preview', 'summary', 'args_text')) || undefined,\n error: error || undefined,\n durationSeconds: number(pick(source, 'duration_seconds', 'durationSeconds', 'duration_s')) || undefined,\n }\n}\n\nfunction parseJsonValue(value: unknown): JsonValue | undefined {\n if (typeof value !== 'string') return value as JsonValue | undefined\n try { return JSON.parse(value) as JsonValue } catch { return undefined }\n}\n\nexport function normalizeAttachment(value: unknown, index = 0): ChatAttachment {\n const source = record(value)\n const mimeType = string(pick(source, 'mime_type', 'mimeType', 'media_type', 'mediaType'), 'application/octet-stream')\n const name = string(pick(source, 'name', 'filename'), `附件 ${index + 1}`)\n return {\n id: string(source.id, `${name}:${index}`),\n name,\n mimeType,\n size: number(source.size),\n path: string(source.path) || undefined,\n url: string(source.url) || undefined,\n kind: mimeType.startsWith('image/') ? 'image' : mimeType === 'application/pdf' ? 'pdf' : 'file',\n }\n}\n\nfunction attachmentMime(name: string): { mimeType: string; kind: ChatAttachment['kind'] } {\n const extension = name.split('.').at(-1)?.toLocaleLowerCase() || ''\n if (['jpg', 'jpeg', 'png', 'gif', 'webp', 'heic', 'heif', 'avif', 'bmp', 'tif', 'tiff'].includes(extension)) {\n return { mimeType: `image/${extension === 'jpg' ? 'jpeg' : extension}`, kind: 'image' }\n }\n if (extension === 'pdf') return { mimeType: 'application/pdf', kind: 'pdf' }\n return { mimeType: 'application/octet-stream', kind: 'file' }\n}\n\nfunction persistedAttachmentUrl(path: string): { path: string; url: string } | undefined {\n if (path.startsWith('/')) return { path, url: path }\n const segments = path.split('/')\n const normalizedSegments = segments.map(segment => {\n try { return decodeURIComponent(segment) } catch { return '' }\n })\n if (segments[0] !== 'attachments' || segments.length < 2 || normalizedSegments.some(segment => !segment || segment === '.' || segment === '..')) return undefined\n return { path, url: `/${segments.map(encodeURIComponent).join('/')}` }\n}\n\nfunction extractPersistedAttachments(content: string): { content: string; attachments: ChatAttachment[] } {\n const attachments: ChatAttachment[] = []\n const extracted = content.replace(\n /\\[用户附加\\s*(文件|图片|PDF)\\s*:\\s*([^\\]\\r\\n]+)\\]\\s*(?:\\r?\\n)?@file:\\s*(`[^`\\r\\n]+`|'[^'\\r\\n]+'|\"[^\"\\r\\n]+\"|(?:\\\\?\\/)[^\\r\\n]+)/g,\n (_match, _type: string, rawName: string, rawPath: string) => {\n const name = rawName.trim()\n const path = rawPath.trim().replace(/\\\\\\//g, '/').replace(/^[`'\"]|[`'\"]$/g, '')\n const reference = persistedAttachmentUrl(path)\n if (!reference) return _match\n const media = attachmentMime(name)\n attachments.push({ id: `persisted:${reference.path}`, name, path: reference.path, url: reference.url, size: 0, ...media })\n return ''\n },\n )\n const cleaned = (attachments.length\n ? extracted.replace(/(?:^|\\n)--- Attached Context ---[\\s\\S]*$/, '')\n : extracted\n ).replace(/\\n{3,}/g, '\\n\\n').trim()\n return { content: cleaned, attachments }\n}\n\nfunction extractPersistedImages(content: string, profile?: string): { content: string; attachments: ChatAttachment[] } {\n const lines = content.split(/\\r?\\n/)\n const attachments: ChatAttachment[] = []\n const imageMarker = /^\\[用户附加图片\\s*:\\s*([^\\]\\r\\n]+)\\]\\s*$/\n const imageReference = /^@image:\\s*(.+?)\\s*$/\n const screenshot = /^\\[screenshot\\]\\s*$/\n\n for (let index = 0; index < lines.length;) {\n const firstMarker = lines[index]?.match(imageMarker)\n if (!firstMarker) {\n index += 1\n continue\n }\n const start = index\n const names: string[] = []\n let cursor = index\n while (true) {\n const marker = lines[cursor]?.match(imageMarker)\n if (!marker) break\n names.push(marker[1]!.trim())\n cursor += 1\n while (lines[cursor]?.trim() === '') cursor += 1\n }\n const paths: string[] = []\n while (true) {\n const reference = lines[cursor]?.match(imageReference)\n if (!reference) break\n paths.push(reference[1]!.trim().replace(/^[`'\"]|[`'\"]$/g, ''))\n cursor += 1\n }\n const references = paths.map(path => imageAttachmentReference(path, profile))\n if (!paths.length || names.length !== paths.length || references.some(reference => !reference)) {\n index = start + 1\n continue\n }\n for (let position = 0; position < names.length; position += 1) {\n const reference = references[position]!\n const name = names[position]!\n attachments.push({ id: `persisted:${reference.path}`, name, path: reference.path, url: reference.url, size: 0, ...attachmentMime(name) })\n }\n while (screenshot.test(lines[cursor] || '')) cursor += 1\n lines.splice(start, cursor - start, ...Array(cursor - start).fill(''))\n index = cursor\n }\n return { content: lines.join('\\n').replace(/\\n{3,}/g, '\\n\\n').trim(), attachments }\n}\n\nexport function normalizeChatMessage(value: unknown, sessionId: string, fallbackProfile?: string): ChatMessage {\n const source = record(value)\n const contentValue = pick(source, 'content', 'text', 'output')\n let content = typeof contentValue === 'string' ? contentValue : ''\n let contentParts: ChatMessage['contentParts']\n let attachments: ChatAttachment[] = values(pick(source, 'attachments', 'files')).map(normalizeAttachment)\n if (Array.isArray(contentValue)) {\n contentParts = []\n const textBlocks: string[] = []\n const attachmentBlocks: ChatAttachment[] = []\n contentValue.forEach((blockValue, index) => {\n const block = record(blockValue)\n const type = string(block.type)\n if (type === 'text') { textBlocks.push(string(block.text)); contentParts!.push({ text: string(block.text) }) }\n if (type === 'image' || type === 'file') {\n const attachment = normalizeAttachment(block, index)\n attachmentBlocks.push(attachment)\n contentParts!.push({ attachmentId: attachment.id })\n }\n })\n content = textBlocks.filter(Boolean).join('\\n\\n')\n attachments = [...attachments, ...attachmentBlocks]\n }\n const roleValue = string(source.role, 'assistant')\n const role = ['user', 'assistant', 'tool', 'system'].includes(roleValue) ? roleValue as ChatMessage['role'] : 'system'\n if (role === 'user' && (content.includes('@file:') || content.includes('@image:'))) {\n const persistedFiles = extractPersistedAttachments(content)\n const persistedImages = extractPersistedImages(persistedFiles.content, string(source.profile, fallbackProfile) || undefined)\n content = persistedImages.content\n const known = new Set(attachments.map(item => item.path || item.url || item.name))\n attachments.push(...[...persistedFiles.attachments, ...persistedImages.attachments]\n .filter(item => !known.has(item.path || item.url || item.name)))\n }\n const id = string(pick(source, 'id', 'message_id', 'messageId')) || `history-${sessionId}-${number(source.timestamp)}-${Math.random()}`\n const status = string(pick(source, 'status', 'finish_reason', 'finishReason'))\n return {\n id,\n serverMessageId: id,\n clientMessageId: string(pick(source, 'client_message_id', 'clientMessageId')) || undefined,\n sessionId,\n profile: string(source.profile, fallbackProfile) || undefined,\n role,\n content,\n contentParts,\n reasoning: string(pick(source, 'reasoning', 'thinking', 'reasoning_content', 'reasoningContent')) || undefined,\n timestamp: number(pick(source, 'timestamp', 'created_at', 'createdAt', 'updated_at', 'updatedAt'), Date.now() / 1000),\n sequence: number(pick(source, 'seq', 'sequence')) || undefined,\n stage: ['error', 'failed'].includes(status) || source.error ? 'failed' : status === 'streaming' ? 'streaming' : 'settled',\n isStreaming: status === 'streaming',\n error: string(source.error) || undefined,\n attachments: attachments.length ? attachments : undefined,\n toolCalls: values(typeof pick(source, 'tool_calls', 'toolCalls', 'tools') === 'string'\n ? (() => { try { return JSON.parse(String(pick(source, 'tool_calls', 'toolCalls', 'tools'))) } catch { return [] } })()\n : pick(source, 'tool_calls', 'toolCalls', 'tools')).map(normalizeToolCall),\n toolCallId: string(pick(source, 'tool_call_id', 'toolCallId')) || undefined,\n toolName: string(pick(source, 'tool_name', 'toolName')) || undefined,\n displayKind: string(pick(source, 'display_kind', 'displayKind')) || undefined,\n displayMetadata: parseJsonValue(pick(source, 'display_metadata', 'displayMetadata')),\n raw: value as JsonValue,\n }\n}\n\nexport function normalizeGroupCapabilities(value: unknown): GroupCapabilities {\n const source = record(value)\n const limits = record(source.limits)\n return {\n protocolVersion: number(pick(source, 'protocolVersion', 'protocol_version')),\n journalEpoch: string(pick(source, 'journalEpoch', 'journal_epoch')),\n latestCursor: number(pick(source, 'latestCursor', 'latest_cursor')),\n limits: {\n maxAgentsPerRoom: number(pick(limits, 'maxAgentsPerRoom', 'max_agents_per_room'), 8),\n maxMessageBytes: number(pick(limits, 'maxMessageBytes', 'max_message_bytes'), 64 * 1024),\n maxToolStateBytes: number(pick(limits, 'maxToolStateBytes', 'max_tool_state_bytes')) || undefined,\n maxInteractionPayloadBytes: number(pick(limits, 'maxInteractionPayloadBytes', 'max_interaction_payload_bytes')) || undefined,\n maxMessagePageSize: number(pick(limits, 'maxMessagePageSize', 'max_message_page_size'), 100),\n maxEventBatchSize: number(pick(limits, 'maxEventBatchSize', 'max_event_batch_size')) || undefined,\n maxAgentDepth: number(pick(limits, 'maxAgentDepth', 'max_agent_depth')) || undefined,\n maxRoomConcurrency: number(pick(limits, 'maxRoomConcurrency', 'max_room_concurrency')) || undefined,\n maxPluginConcurrency: number(pick(limits, 'maxPluginConcurrency', 'max_plugin_concurrency')) || undefined,\n defaultMaxReplyRounds: number(pick(limits, 'defaultMaxReplyRounds', 'default_max_reply_rounds'), 3),\n unlimitedReplyRoundsValue: number(pick(limits, 'unlimitedReplyRoundsValue', 'unlimited_reply_rounds_value'), -1),\n maxAgentDisplayNameLength: number(pick(limits, 'maxAgentDisplayNameLength', 'max_agent_display_name_length'), 100),\n },\n eventTypes: values(pick(source, 'eventTypes', 'event_types')).map(value => string(value)).filter(Boolean),\n features: values(source.features).map(value => string(value)).filter(Boolean),\n }\n}\n\nexport function normalizeGroupAgent(value: unknown): GroupAgent {\n const source = record(value)\n const status = string(source.status, 'unknown') as GroupAgent['status']\n const rawFastMode = pick(source, 'fastMode', 'fast_mode')\n return {\n id: string(source.id), roomId: string(pick(source, 'roomId', 'room_id')),\n profile: string(source.profile),\n nodeId: string(pick(source, 'nodeId', 'node_id'), 'local'),\n nodeLabel: string(pick(source, 'nodeLabel', 'node_label')),\n displayName: string(pick(source, 'displayName', 'display_name'), string(source.profile)),\n description: string(source.description), storedSessionId: string(pick(source, 'storedSessionId', 'stored_session_id')) || null,\n lastContextMessageSeq: number(pick(source, 'lastContextMessageSeq', 'last_context_message_seq')),\n enabled: bool(source.enabled, true), replyWithoutMention: bool(pick(source, 'replyWithoutMention', 'reply_without_mention')),\n isHost: bool(pick(source, 'isHost', 'is_host')),\n model: string(source.model) || null, provider: string(source.provider) || null,\n reasoningEffort: string(pick(source, 'reasoningEffort', 'reasoning_effort')) || null,\n fastMode: rawFastMode == null ? null : bool(rawFastMode),\n createdAt: number(pick(source, 'createdAt', 'created_at')), updatedAt: number(pick(source, 'updatedAt', 'updated_at')),\n status: ['idle', 'queued', 'running', 'awaiting_input'].includes(status) ? status : 'unknown',\n }\n}\n\nexport function normalizeGroupMessage(value: unknown): GroupMessage {\n const source = record(value)\n const senderKind = string(pick(source, 'senderKind', 'sender_kind'), 'unknown') as GroupMessage['senderKind']\n const status = string(source.status, 'unknown') as GroupMessage['status']\n return {\n seq: number(source.seq), id: string(source.id), roomId: string(pick(source, 'roomId', 'room_id')),\n topicId: string(pick(source, 'topicId', 'topic_id')) || null,\n senderKind: ['human', 'agent', 'system'].includes(senderKind) ? senderKind : 'unknown',\n senderId: string(pick(source, 'senderId', 'sender_id')), senderName: string(pick(source, 'senderName', 'sender_name')),\n rootMessageId: string(pick(source, 'rootMessageId', 'root_message_id')), replyToMessageId: string(pick(source, 'replyToMessageId', 'reply_to_message_id')) || null,\n clientMessageId: string(pick(source, 'clientMessageId', 'client_message_id')) || null,\n content: string(source.content), reasoning: string(source.reasoning), toolState: values(pick(source, 'toolState', 'tool_state')) as JsonValue[],\n status: ['queued', 'streaming', 'completed', 'failed', 'interrupted'].includes(status) ? status : 'unknown',\n error: string(source.error), execution: source.execution ? record(source.execution) as GroupMessage['execution'] : null, createdAt: number(pick(source, 'createdAt', 'created_at')), updatedAt: number(pick(source, 'updatedAt', 'updated_at')),\n }\n}\n\nexport function normalizeGroupInteraction(value: unknown): GroupInteraction {\n const source = record(value)\n return {\n id: string(source.id), roomId: string(pick(source, 'roomId', 'room_id')), topicId: string(pick(source, 'topicId', 'topic_id')) || null,\n agentId: string(pick(source, 'agentId', 'agent_id')),\n runId: string(pick(source, 'runId', 'run_id')), kind: string(source.kind, 'unknown') as GroupInteraction['kind'],\n payload: (source.payload ?? null) as JsonValue, status: string(source.status, 'unknown') as GroupInteraction['status'],\n createdAt: number(pick(source, 'createdAt', 'created_at')), resolvedAt: pick(source, 'resolvedAt', 'resolved_at') == null ? null : number(pick(source, 'resolvedAt', 'resolved_at')),\n }\n}\n\nexport function normalizeGroupRun(value: unknown): GroupRun {\n const source = record(value)\n const status = string(source.status, 'unknown') as GroupRun['status']\n const replyMode = string(pick(source, 'replyMode', 'reply_mode'))\n return {\n id: string(source.id), roomId: string(pick(source, 'roomId', 'room_id')),\n topicId: string(pick(source, 'topicId', 'topic_id')) || null,\n agentId: string(pick(source, 'agentId', 'agent_id')),\n triggerMessageId: string(pick(source, 'triggerMessageId', 'trigger_message_id')),\n responseMessageId: string(pick(source, 'responseMessageId', 'response_message_id')),\n rootMessageId: string(pick(source, 'rootMessageId', 'root_message_id')),\n depth: number(source.depth),\n status: ['queued', 'running', 'awaiting_input', 'completed', 'failed', 'interrupted'].includes(status) ? status : 'unknown',\n runtimeSessionId: string(pick(source, 'runtimeSessionId', 'runtime_session_id')) || null,\n error: string(source.error),\n replyMode: replyMode === 'mentioned' || replyMode === 'automatic' ? replyMode : null,\n createdAt: number(pick(source, 'createdAt', 'created_at')),\n updatedAt: number(pick(source, 'updatedAt', 'updated_at')),\n }\n}\n\nexport function normalizeGroupTopic(value: unknown): GroupTopicSummary {\n const source = record(value)\n return {\n id: string(source.id), roomId: string(pick(source, 'roomId', 'room_id')),\n title: string(source.title, '新话题'), preview: string(source.preview),\n messageCount: number(pick(source, 'messageCount', 'message_count')),\n unreadCount: number(pick(source, 'unreadCount', 'unread_count')),\n latestMessageSeq: number(pick(source, 'latestMessageSeq', 'latest_message_seq')),\n createdAt: number(pick(source, 'createdAt', 'created_at')),\n updatedAt: number(pick(source, 'updatedAt', 'updated_at')),\n archived: bool(source.archived),\n pinned: bool(source.pinned),\n }\n}\n\nexport function normalizeGroupRoom(value: unknown): GroupRoomSummary {\n const source = record(value)\n const rawAgents = source.agents\n const orchestrationMode = string(pick(source, 'orchestrationMode', 'orchestration_mode'))\n return {\n id: string(source.id), name: string(source.name, '未命名团队'), cwd: string(source.cwd), instructions: string(source.instructions), avatar: string(source.avatar),\n avatarMembers: values(pick(source, 'avatarMembers', 'avatar_members')).flatMap(value => {\n const member = record(value)\n const profile = string(member.profile)\n if (!profile) return []\n return [{ profile, nodeId: string(pick(member, 'nodeId', 'node_id'), 'local'), displayName: string(pick(member, 'displayName', 'display_name'), profile) }]\n }),\n createdAt: number(pick(source, 'createdAt', 'created_at')), updatedAt: number(pick(source, 'updatedAt', 'updated_at')),\n archived: bool(source.archived), agentCount: Array.isArray(rawAgents) ? rawAgents.length : number(pick(source, 'agentCount', 'agent_count')),\n lastMessage: source.lastMessage || source.last_message ? normalizeGroupMessage(pick(source, 'lastMessage', 'last_message')) : null,\n unreadCount: number(pick(source, 'unreadCount', 'unread_count')),\n activeRunCount: number(pick(source, 'activeRunCount', 'active_run_count')),\n maxReplyRounds: number(pick(source, 'maxReplyRounds', 'max_reply_rounds'), 3),\n orchestrationMode: orchestrationMode === 'host' ? 'host' : 'free',\n }\n}\n\nexport function normalizeGroupRoomActivity(value: unknown): GroupRoomActivity {\n const source = record(value)\n const lastMessage = pick(source, 'lastMessage', 'last_message')\n return {\n roomId: string(pick(source, 'roomId', 'room_id')),\n activeRunCount: number(pick(source, 'activeRunCount', 'active_run_count')),\n unreadCount: number(pick(source, 'unreadCount', 'unread_count')),\n lastMessage: lastMessage == null ? null : normalizeGroupMessage(lastMessage),\n }\n}\n\nexport function normalizeGroupRoomDetail(value: unknown): GroupRoomDetail {\n const source = record(value)\n const summary = normalizeGroupRoom(source)\n return {\n id: summary.id, name: summary.name, cwd: summary.cwd, instructions: summary.instructions, avatar: summary.avatar, avatarMembers: summary.avatarMembers, createdAt: summary.createdAt, updatedAt: summary.updatedAt,\n archived: summary.archived, maxReplyRounds: summary.maxReplyRounds, orchestrationMode: summary.orchestrationMode,\n agents: values(source.agents).map(normalizeGroupAgent), runs: values(source.runs).map(normalizeGroupRun),\n pendingInteractions: values(pick(source, 'pendingInteractions', 'pending_interactions')).map(normalizeGroupInteraction),\n latestCursor: number(pick(source, 'latestCursor', 'latest_cursor')),\n }\n}\n\nexport function inferFileKind(mimeType: string, name: string): FileKind {\n const mime = mimeType.toLowerCase().split(';')[0]\n if (mime.startsWith('image/')) return 'image'\n if (mime.startsWith('video/')) return 'video'\n if (mime.startsWith('audio/')) return 'audio'\n if (mime.startsWith('text/') || /\\.(pdf|docx?|xlsx?|pptx?|md|txt|csv|json|rtf|pages|numbers|key)$/i.test(name)) return 'document'\n return 'other'\n}\n\nexport function normalizeFile(value: unknown, fallbackProfile?: string): FileLibraryItem {\n const source = record(value)\n const id = string(pick(source, 'id', 'fileId', 'file_id'))\n const mimeType = string(pick(source, 'mimeType', 'mime_type'), 'application/octet-stream')\n const name = string(source.name)\n const origins = values(source.origins).map(item => {\n const origin = record(item)\n return {\n id: origin.id as number | string | undefined,\n profile: string(origin.profile) || fallbackProfile || undefined,\n sessionId: string(pick(origin, 'sessionId', 'session_id')) || undefined,\n workspaceConversationId: string(origin.workspaceConversationId) || undefined,\n sessionTitle: string(pick(origin, 'sessionTitle', 'session_title')) || undefined,\n messageId: string(pick(origin, 'messageId', 'message_id')) || undefined,\n authorKind: string(pick(origin, 'authorKind', 'author_kind')) as FileLibraryItem['origins'][number]['authorKind'] || undefined,\n authorName: string(pick(origin, 'authorName', 'author_name')) || undefined,\n observedAt: number(pick(origin, 'observedAt', 'observed_at')) || undefined,\n originalPath: string(pick(origin, 'originalPath', 'original_path')) || undefined,\n referencePath: string(pick(origin, 'referencePath', 'reference_path')) || undefined,\n }\n })\n const profile = origins.find(origin => origin.profile)?.profile\n const profileQuery = profile ? `?profile=${encodeURIComponent(profile)}` : ''\n return {\n id, path: string(source.path), name, extension: string(pick(source, 'extension', 'extensionName', 'extension_name')),\n mimeType, size: number(source.size), modifiedAt: number(pick(source, 'modifiedAt', 'modified_at')),\n exists: bool(source.exists, true), availability: string(source.availability) as FileLibraryItem['availability'] || undefined,\n archiveStatus: string(pick(source, 'archiveStatus', 'archive_status')) || undefined,\n firstSeenAt: number(pick(source, 'firstSeenAt', 'first_seen_at')) || undefined,\n lastSeenAt: number(pick(source, 'lastSeenAt', 'last_seen_at')) || undefined,\n messageTimestamp: pick(source, 'messageTimestamp', 'message_timestamp') == null ? null : number(pick(source, 'messageTimestamp', 'message_timestamp')),\n origins, kind: inferFileKind(mimeType, name),\n previewUrl: string(pick(source, 'previewUrl', 'preview_url'))\n || `/api/app/files/${encodeURIComponent(id)}/preview${profileQuery}`,\n downloadUrl: string(pick(source, 'downloadUrl', 'download_url'))\n || `/api/app/files/${encodeURIComponent(id)}/download${profileQuery}`,\n }\n}\n","import type { JsonValue } from '@shared/types'\nimport { bool, normalizeUser, record, string } from '@/utils/normalize'\n\nexport class ApiError extends Error {\n readonly status: number\n readonly code?: string\n readonly details?: JsonValue\n\n constructor(message: string, status = 0, code?: string, details?: JsonValue) {\n super(message)\n this.name = 'ApiError'\n this.status = status\n this.code = code\n this.details = details\n }\n}\n\nlet csrfToken = ''\nlet csrfAccountId: string | null | undefined\nlet securityGeneration = 0\nlet csrfRefresh: { generation: number; promise: Promise<void> } | undefined\nconst unauthorizedListeners = new Set<() => void>()\nconst securityChannel = typeof window !== 'undefined' && typeof window.BroadcastChannel !== 'undefined'\n ? new window.BroadcastChannel('hermes-yaoyao-security')\n : undefined\nsecurityChannel?.addEventListener('message', event => {\n // Another window shares cookies, but may now belong to another account.\n // Revalidate that identity before using its token for a pending action.\n if (typeof event.data === 'string' && event.data !== csrfToken) csrfToken = ''\n})\n\nexport function setApiCsrfToken(token?: string | null, accountId?: string | null): void {\n if (accountId !== undefined) {\n if (csrfAccountId !== undefined && csrfAccountId !== accountId) securityGeneration += 1\n csrfAccountId = accountId\n }\n csrfToken = token?.trim() ?? ''\n securityChannel?.postMessage(csrfToken)\n}\n\nexport function clearApiSecurityContext(): void {\n securityGeneration += 1\n csrfToken = ''\n csrfAccountId = undefined\n csrfRefresh = undefined\n}\n\nfunction requireSecurityGeneration(generation: number): void {\n if (generation !== securityGeneration) throw new ApiError('登录状态已变化,请重新操作', 0, 'SECURITY_CONTEXT_CHANGED')\n}\n\nfunction refreshCsrfToken(rejectedToken: string): Promise<void> {\n if (csrfToken && csrfToken !== rejectedToken) return Promise.resolve()\n const generation = securityGeneration, accountId = csrfAccountId\n if (csrfRefresh?.generation === generation) return csrfRefresh.promise\n const renew = async () => {\n requireSecurityGeneration(generation)\n const payload = await apiRequest<unknown>('/api/app/bootstrap?csrfOnly=1', {\n csrf: false, notifyUnauthorized: false, timeoutMs: 10_000,\n })\n requireSecurityGeneration(generation)\n const root = record(unwrapData(payload)), status = record(root.status)\n const user = root.user ?? root.identity\n const token = string(root.csrfToken ?? root.csrf_token ?? root.csrf).trim()\n const authRequired = root.authRequired ?? root.auth_required ?? status.authRequired ?? status.auth_required\n if (!token || (!('userId' in root) && !user && authRequired === undefined)\n || ('userId' in root && root.userId !== null && typeof root.userId !== 'string'))\n throw new ApiError('无法更新安全令牌,请稍后重试', 0, 'CSRF_REFRESH_FAILED')\n // Older servers ignore csrfOnly and return a complete bootstrap response.\n const currentAccount = 'userId' in root ? (typeof root.userId === 'string' ? root.userId : null)\n : user ? normalizeUser(user).id\n : bool(authRequired) ? null : 'local'\n if (accountId !== undefined && currentAccount !== accountId) {\n clearApiSecurityContext()\n for (const listener of unauthorizedListeners) listener()\n throw new ApiError('登录账号已变化,请重新登录后操作', 401, 'SECURITY_CONTEXT_CHANGED')\n }\n setApiCsrfToken(token, currentAccount)\n }\n // Cookie issuance must also be serialized across windows when supported;\n // otherwise two expired-cookie responses can replace one another's token.\n const locks = typeof navigator !== 'undefined' ? navigator.locks : undefined\n const promise = (locks ? locks.request('hermes-yaoyao-csrf-refresh', renew) : renew())\n .finally(() => { if (csrfRefresh?.promise === promise) csrfRefresh = undefined })\n csrfRefresh = { generation, promise }\n return promise\n}\n\nfunction waitForCsrfRefresh(promise: Promise<void>, signal: AbortSignal): Promise<void> {\n return new Promise((resolve, reject) => {\n const abort = () => { cleanup(); reject(new DOMException('Request aborted', 'AbortError')) }\n const cleanup = () => signal.removeEventListener('abort', abort)\n signal.addEventListener('abort', abort, { once: true })\n promise.then(() => { cleanup(); resolve() }, error => { cleanup(); reject(error) })\n if (signal.aborted) abort()\n })\n}\n\nexport function onApiUnauthorized(listener: () => void): () => void {\n unauthorizedListeners.add(listener)\n return () => unauthorizedListeners.delete(listener)\n}\n\nexport interface ApiRequestOptions extends Omit<RequestInit, 'body'> {\n body?: JsonValue | FormData | Blob\n csrf?: boolean\n timeoutMs?: number\n notifyUnauthorized?: boolean\n}\n\nfunction isBodyInit(value: ApiRequestOptions['body']): value is FormData | Blob {\n return (typeof FormData !== 'undefined' && value instanceof FormData)\n || (typeof Blob !== 'undefined' && value instanceof Blob)\n}\n\nfunction errorMessage(payload: unknown, fallback: string): string {\n if (payload && typeof payload === 'object') {\n const record = payload as Record<string, unknown>\n const nested = record.error && typeof record.error === 'object'\n ? record.error as Record<string, unknown>\n : undefined\n for (const candidate of [record.message, record.error, nested?.message, record.detail]) {\n if (typeof candidate === 'string' && candidate.trim()) return candidate.trim()\n }\n if (Array.isArray(record.detail)) {\n const validation = record.detail.find(item => item && typeof item === 'object') as Record<string, unknown> | undefined\n if (validation && typeof validation.msg === 'string' && validation.msg.trim()) {\n const location = Array.isArray(validation.loc)\n ? validation.loc.filter(item => typeof item === 'string' || typeof item === 'number').join('.')\n : ''\n return location ? `${location}:${validation.msg.trim()}` : validation.msg.trim()\n }\n }\n }\n if (typeof payload === 'string' && payload.trim()) return payload.trim()\n return fallback\n}\n\nexport async function apiRequest<T>(path: string, options: ApiRequestOptions = {}): Promise<T> {\n if (!path.startsWith('/api/app/') && !path.startsWith('/api/realtime/')) throw new ApiError('客户端仅允许访问应用接口', 0, 'INVALID_PATH')\n\n const method = (options.method ?? 'GET').toUpperCase()\n const requiresCsrf = options.csrf !== false && !['GET', 'HEAD', 'OPTIONS'].includes(method)\n const generation = securityGeneration\n const headers = new Headers(options.headers)\n headers.set('Accept', 'application/json')\n\n let body: BodyInit | undefined\n if (options.body !== undefined) {\n if (isBodyInit(options.body)) {\n if (typeof FormData !== 'undefined' && options.body instanceof FormData) {\n const snapshot = new FormData()\n options.body.forEach((value, key) => snapshot.append(key, value))\n body = snapshot\n } else body = options.body\n } else {\n headers.set('Content-Type', 'application/json')\n body = JSON.stringify(options.body)\n }\n }\n\n const controller = new AbortController()\n const timeout = window.setTimeout(() => controller.abort(), options.timeoutMs ?? 30_000)\n const abort = () => controller.abort(options.signal?.reason)\n options.signal?.addEventListener('abort', abort, { once: true })\n if (options.signal?.aborted) abort()\n try {\n if (controller.signal.aborted) throw new DOMException('Request aborted', 'AbortError')\n if (requiresCsrf && !csrfToken) await waitForCsrfRefresh(refreshCsrfToken(''), controller.signal)\n for (let attempt = 0; attempt < 2; attempt += 1) {\n const requestHeaders = new Headers(headers)\n if (controller.signal.aborted) throw new DOMException('Request aborted', 'AbortError')\n if (requiresCsrf) {\n requireSecurityGeneration(generation)\n requestHeaders.set('X-CSRF-Token', csrfToken)\n }\n const sentToken = requestHeaders.get('X-CSRF-Token') ?? ''\n const response = await fetch(path, {\n ...options,\n method,\n headers: requestHeaders,\n body,\n credentials: 'include',\n cache: 'no-store',\n signal: controller.signal,\n })\n const contentType = response.headers.get('content-type') ?? ''\n const payload = response.status === 204\n ? undefined\n : contentType.includes('application/json')\n ? await response.json().catch(() => undefined)\n : await response.text().catch(() => undefined)\n if (!response.ok) {\n const record = payload && typeof payload === 'object' ? payload as Record<string, unknown> : undefined\n const code = typeof record?.code === 'string' ? record.code : undefined\n if (requiresCsrf && attempt === 0 && response.status === 403 && code === 'invalid_csrf') {\n requireSecurityGeneration(generation)\n // This explicit rejection occurs before the server executes the action.\n // Preserve the original body and idempotency key; never retry timeouts.\n await waitForCsrfRefresh(refreshCsrfToken(sentToken), controller.signal)\n continue\n }\n if (response.status === 401\n && generation === securityGeneration\n && options.notifyUnauthorized !== false) {\n // A response from before logout/account switching cannot expire a new login.\n for (const listener of unauthorizedListeners) listener()\n }\n throw new ApiError(\n errorMessage(payload, `请求失败(${response.status})`),\n response.status,\n code,\n payload as JsonValue,\n )\n }\n return payload as T\n }\n throw new ApiError('安全令牌校验失败,请稍后重试', 403, 'invalid_csrf')\n } catch (error) {\n if (error instanceof ApiError) throw error\n if (controller.signal.aborted) throw new ApiError('请求已取消或超时', 0, 'REQUEST_ABORTED')\n throw new ApiError(error instanceof Error ? error.message : '网络请求失败', 0, 'NETWORK_ERROR')\n } finally {\n window.clearTimeout(timeout)\n options.signal?.removeEventListener('abort', abort)\n }\n}\n\nexport function apiUrl(path: string, query: Record<string, string | number | boolean | null | undefined> = {}): string {\n const params = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined && value !== null && value !== '') params.set(key, String(value))\n }\n const encoded = params.toString()\n return encoded ? `${path}?${encoded}` : path\n}\n\nexport function unwrapData<T>(payload: T | { data: T }): T {\n return payload && typeof payload === 'object' && 'data' in payload\n ? (payload as { data: T }).data\n : payload as T\n}\n","import { apiRequest } from './client'\nimport type { ServerIdentity } from '@shared/serverIdentity'\n\nconst listeners = new Set<(identity: ServerIdentity) => void>()\nexport function serverIdentityValue(value: unknown): ServerIdentity | undefined {\n if (!value || typeof value !== 'object') return\n const v = value as Record<string, unknown>\n if (typeof v.serverId !== 'string' || typeof v.name !== 'string' || typeof v.displayName !== 'string'\n || !Number.isSafeInteger(v.revision) || Number(v.revision) < 0 || v.displayName.length > 255) return\n return v as unknown as ServerIdentity\n}\nexport function publishServerIdentity(value: unknown): void {\n const identity = serverIdentityValue(value)\n if (identity) for (const listener of listeners) listener(identity)\n}\nexport function onServerIdentity(listener: (identity: ServerIdentity) => void): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\nexport const fetchServerIdentity = () => apiRequest<ServerIdentity>('/api/app/server-identity')\nexport const saveServerIdentity = (name: string, expectedRevision: number, expectedServerId: string) =>\n apiRequest<ServerIdentity>('/api/app/server-identity', { method: 'PUT', body: { name, expectedRevision, expectedServerId } })\n","export interface SSEMessage { event: string; data: string; id?: string }\n\n/** Incremental SSE framing; callers supply a streaming UTF-8 decoder. */\nexport class SSEParser {\n private buffer = ''\n private data: string[] = []\n private event = ''\n private id: string | undefined\n private size = 0\n private first = true\n feed(chunk: string): SSEMessage[] {\n if (this.first && chunk) { chunk = chunk.replace(/^\\uFEFF/, ''); this.first = false }\n this.buffer += chunk\n if (this.buffer.length + this.size > 36 * 1024 * 1024) throw new Error('SSE frame exceeds limit')\n const result: SSEMessage[] = []\n while (true) {\n const i = this.buffer.search(/[\\r\\n]/)\n if (i < 0 || (this.buffer[i] === '\\r' && i === this.buffer.length - 1)) break\n const line = this.buffer.slice(0, i)\n this.buffer = this.buffer.slice(i + (this.buffer[i] === '\\r' && this.buffer[i + 1] === '\\n' ? 2 : 1))\n if (!line) {\n if (this.data.length) result.push({ event: this.event || 'message', data: this.data.join('\\n'), ...(this.id !== undefined ? { id: this.id } : {}) })\n this.data = []; this.event = ''; this.size = 0\n } else if (!line.startsWith(':')) {\n const colon = line.indexOf(':')\n const field = colon < 0 ? line : line.slice(0, colon)\n const value = colon < 0 ? '' : line.slice(colon + 1).replace(/^ /, '')\n if (field === 'data') { this.data.push(value); this.size += value.length }\n else if (field === 'event') this.event = value\n else if (field === 'id' && !value.includes('\\0')) this.id = value\n }\n }\n return result\n }\n}\n","let fallbackCounter = 0\n\nexport function createId(prefix = 'web'): string {\n const uuid = globalThis.crypto?.randomUUID?.()\n if (uuid) return uuid.toLowerCase()\n fallbackCounter += 1\n return `${prefix}-${Date.now().toString(36)}-${fallbackCounter.toString(36)}-${Math.random().toString(36).slice(2, 10)}`\n}\n\nexport function createUuid(): string {\n const native = globalThis.crypto?.randomUUID?.()\n if (native) return native.toLowerCase()\n const bytes = new Uint8Array(16)\n if (globalThis.crypto?.getRandomValues) globalThis.crypto.getRandomValues(bytes)\n else for (let index = 0; index < bytes.length; index += 1) bytes[index] = Math.floor(Math.random() * 256)\n bytes[6] = (bytes[6] & 0x0f) | 0x40\n bytes[8] = (bytes[8] & 0x3f) | 0x80\n const hex = [...bytes].map(value => value.toString(16).padStart(2, '0')).join('')\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`\n}\n\nexport function routeKey(profile: string, sessionId: string): string {\n return `${encodeURIComponent(profile)}::${encodeURIComponent(sessionId)}`\n}\n","/** Ordinary-chat display protocol. Upstream identities remain server metadata. */\nexport const CHAT_TRANSCRIPT_FEATURE = 'ordinary-chat-transcript-v2'\nexport interface TranscriptMessage {\n id: string\n seq: number\n revision: number\n source_message_id: string\n client_message_id?: string\n turn_id?: string\n segment_kind?: 'input' | 'commentary' | 'answer' | 'tool' | 'system'\n role: string\n content: unknown\n reasoning?: string\n status?: string\n [key: string]: unknown\n}\nexport interface TranscriptPatch {\n id: string\n seq: number\n baseRevision: number\n revision: number\n contentAppend: string\n reasoningAppend: string\n}\nexport interface TranscriptEvent {\n cursor: number\n profile: string\n sessionId: string\n epoch?: string\n previousCursor?: number\n total?: number\n type:\n | 'message.upsert'\n | 'message.patch'\n | 'message.deleted'\n | 'session.changed'\n | 'session.deleted'\n | 'session.migrated'\n data: unknown\n}\nexport interface TranscriptSnapshot {\n protocol: typeof CHAT_TRANSCRIPT_FEATURE\n epoch: string\n cursor: number\n profile: string\n sessionId: string\n messages: TranscriptMessage[]\n session: Record<string, unknown>\n hasOlder: boolean\n total: number\n state: string\n deletedIds?: string[]\n running?: boolean\n queued?: boolean\n pendingApproval?: Record<string, unknown> | null\n pendingClarification?: Record<string, unknown> | null\n liveStatus?: string | null\n error?: string | null\n}\nexport interface TranscriptControlState {\n running: boolean\n queued: boolean\n pendingApproval: Record<string, unknown> | null\n pendingClarification: Record<string, unknown> | null\n liveStatus: string | null\n error: string | null\n}\nexport interface TranscriptControlEvent extends TranscriptControlState {\n epoch: string\n cursor: number\n}\nexport class TranscriptGap extends Error {\n constructor() {\n super('普通聊天消息版本不连续,需要重新同步')\n }\n}\nexport function applyTranscriptEvent(\n messages: TranscriptMessage[],\n event: TranscriptEvent,\n): TranscriptMessage[] {\n const data = event.data as TranscriptMessage & TranscriptPatch\n const index = messages.findIndex((message) => message.id === data.id)\n const old = messages[index]\n if (event.type === 'message.deleted') {\n if (!Number.isSafeInteger(data.revision) || data.revision < 1) throw new TranscriptGap()\n return old && old.revision >= data.revision\n ? messages\n : messages.filter((message) => message.id !== data.id)\n }\n if (event.type === 'message.upsert') {\n if (\n !data.id ||\n !Number.isSafeInteger(data.seq) ||\n !Number.isSafeInteger(data.revision) ||\n data.revision < 1\n )\n throw new TranscriptGap()\n if (old && old.revision >= data.revision) return messages\n return [...messages.filter((message) => message.id !== data.id), data].sort(\n (a, b) => a.seq - b.seq || a.id.localeCompare(b.id),\n )\n }\n if (event.type === 'message.patch') {\n if (old && old.revision >= data.revision) return messages\n if (\n !old ||\n old.revision !== data.baseRevision ||\n data.revision !== data.baseRevision + 1 ||\n old.seq !== data.seq ||\n typeof old.content !== 'string' ||\n typeof data.contentAppend !== 'string' ||\n typeof data.reasoningAppend !== 'string'\n )\n throw new TranscriptGap()\n const next = [...messages]\n next[index] = {\n ...old,\n revision: data.revision,\n content: old.content + data.contentAppend,\n reasoning: String(old.reasoning ?? '') + data.reasoningAppend,\n }\n return next\n }\n return messages\n}\n","import type { JsonValue } from '@shared/types'\nimport { SSEParser } from '@shared/sse'\nimport { apiRequest, ApiError, setApiCsrfToken } from './client'\nimport { createId } from '@/utils/id'\nimport { CHAT_TRANSCRIPT_FEATURE } from '@shared/chatTranscript'\n\nexport class HTTPRPCError extends Error {\n constructor(message: string, readonly code?: string | number, readonly data?: JsonValue) { super(message) }\n}\n\nexport class HTTPRealtimeChannel {\n private id = ''\n private cursor = ''\n private stopped = false\n private abort?: AbortController\n private ready = false\n constructor(readonly onFrame: (frame: string) => Promise<unknown>, readonly onFailure: (error: Error) => void) {}\n static async requireSupport(): Promise<string[]> {\n let value: { protocolVersion: number; csrfToken?: string; features?: string[] }\n try { value = await apiRequest('/api/realtime/capabilities') }\n catch (e) {\n if (e instanceof ApiError && [404, 405, 410].includes(e.status)) throw new ApiError('此服务端不支持 HTTP+SSE,请升级 15300 服务', 409, 'HTTP_SSE_REQUIRED')\n throw e\n }\n if (value.protocolVersion !== 1) throw new ApiError('不支持的实时协议版本', 409, 'UNSUPPORTED_REALTIME_PROTOCOL')\n if (value.csrfToken) setApiCsrfToken(value.csrfToken)\n return value.features ?? []\n }\n async open(channel: 'chat' | 'groups', anchor?: { epoch: string; cursor: number }): Promise<void> {\n const created = await apiRequest<{ id: string }>('/api/realtime/channels', { method: 'POST', body: { channel, ...(channel==='chat'?{chatProtocol:CHAT_TRANSCRIPT_FEATURE}:{}), ...anchor } })\n this.id = created.id\n if (this.stopped) { this.close(); return }\n await new Promise<void>((resolve, reject) => {\n const timer = window.setTimeout(() => { this.abort?.abort(); reject(new ApiError('实时事件握手超时', 0, 'REALTIME_READY_TIMEOUT')) }, 20_000)\n void this.readLoop(() => { window.clearTimeout(timer); this.ready = true; resolve() }).catch(error => {\n window.clearTimeout(timer)\n if (!this.ready) reject(error)\n if (!this.stopped) this.onFailure(error instanceof Error ? error : new Error(String(error)))\n })\n })\n }\n private async readLoop(onReady: () => void): Promise<void> {\n let attempt = 0\n while (!this.stopped) {\n const attemptAbort = new AbortController()\n this.abort = attemptAbort\n let reader: ReadableStreamDefaultReader<Uint8Array> | undefined\n let watchdog: number | undefined\n try {\n watchdog = window.setTimeout(() => attemptAbort.abort(), 45_000)\n const headers: Record<string, string> = { Accept: 'text/event-stream' }\n if (this.cursor) headers['Last-Event-ID'] = this.cursor\n const response = await fetch(`/api/realtime/channels/${this.id}/events`, { credentials: 'same-origin', headers, signal: attemptAbort.signal, cache: 'no-store' })\n if ([401, 403, 404, 409, 428].includes(response.status)) throw new ApiError('实时连接需要重新同步', response.status, 'REALTIME_RESET_REQUIRED')\n if (!response.ok) throw new Error(`SSE HTTP ${response.status}`)\n if (!response.headers.get('content-type')?.startsWith('text/event-stream') || !response.body) throw new ApiError('无效的事件流响应', 502, 'INVALID_EVENT_STREAM')\n reader = response.body.getReader()\n const parser = new SSEParser(), decoder = new TextDecoder()\n while (!this.stopped) {\n window.clearTimeout(watchdog)\n watchdog = window.setTimeout(() => attemptAbort.abort(), 45_000)\n const { value, done } = await reader.read()\n if (done) throw new Error('SSE disconnected')\n attempt = 0\n for (const entry of parser.feed(decoder.decode(value, { stream: true }))) {\n if (entry.event === 'reset') throw new ApiError('事件需要重新同步', 409, 'REALTIME_RESET_REQUIRED')\n if (entry.event === 'ready') continue\n if (entry.event !== 'frame') continue\n if (entry.id && entry.id === this.cursor) continue\n await this.onFrame(entry.data)\n if (entry.id) this.cursor = entry.id\n const frame = JSON.parse(entry.data)\n if (frame.type === 'group.ready' || frame.params?.type === 'gateway.ready') onReady()\n }\n }\n } catch (error) {\n if (this.stopped) return\n if (error instanceof ApiError) throw error\n } finally { window.clearTimeout(watchdog); await reader?.cancel().catch(() => {}); reader?.releaseLock() }\n await new Promise(r => window.setTimeout(r, Math.min(15_000, 500 * 2 ** Math.min(attempt++, 5))))\n }\n }\n async request(method: string, params: Record<string, JsonValue>, timeoutMs: number, requestId = createId('http-rpc')): Promise<JsonValue> {\n if (!this.ready || this.stopped) throw new ApiError('事件通道尚未就绪', 0, 'REALTIME_NOT_READY')\n type Receipt = { state: string; response?: { result?: JsonValue; error?: { message?: string; code?: string | number; data?: JsonValue } } }\n let receipt: Receipt\n try {\n receipt = await apiRequest(`/api/realtime/channels/${this.id}/commands`, {\n method: 'POST', headers: { 'Idempotency-Key': requestId }, body: { jsonrpc: '2.0', method, params }, timeoutMs,\n })\n } catch (error) {\n if (error instanceof ApiError && error.status >= 400 && error.status < 500) throw error\n try { receipt = await apiRequest(`/api/realtime/commands/${encodeURIComponent(requestId)}`) }\n catch { throw new ApiError('提交结果未知,请同步历史确认', 0, 'SUBMISSION_UNCERTAIN') }\n }\n if (receipt.state === 'unknown' || receipt.state === 'pending') throw new ApiError('提交结果未知,请同步历史确认', 0, 'SUBMISSION_UNCERTAIN')\n if (receipt.response?.error) throw new HTTPRPCError(receipt.response.error.message ?? '上游拒绝请求', receipt.response.error.code, receipt.response.error.data)\n if (receipt.state !== 'confirmed') throw new ApiError('无效的命令回执', 502, 'INVALID_RECEIPT')\n return receipt.response?.result ?? null\n }\n close(): void {\n this.stopped = true; this.abort?.abort()\n if (this.id) { const id = this.id; this.id = ''; void apiRequest(`/api/realtime/channels/${id}`, { method: 'DELETE' }).catch(() => {}) }\n }\n}\n","import { publishServerIdentity } from './serverIdentity'\nimport type { GroupSocketEnvelope, JsonValue, RealtimeConnectionState, RpcEventFrame } from '@shared/types'\nimport { ApiError } from './client'\nimport { number, record, string } from '@/utils/normalize'\nimport { HTTPRealtimeChannel, HTTPRPCError } from './httpRealtime'\nimport { CHAT_TRANSCRIPT_FEATURE } from '@shared/chatTranscript'\n\nexport class RpcError extends Error {\n constructor(message: string, readonly code?: number | string, readonly data?: JsonValue) {\n super(message); this.name = 'RpcError'\n }\n}\n\ntype StateListener = (state: RealtimeConnectionState, reason?: string) => void\ntype RpcEventListener = (event: RpcEventFrame['params']) => void\n\n/** Historical facade name retained for store injection; transport is HTTP+SSE only. */\nexport class ChatRpcSocket {\n private http?: HTTPRealtimeChannel\n private generation = 0\n private openingRequests = 0\n private earlyFrames: string[] = []\n private eventListeners = new Set<RpcEventListener>()\n private stateListeners = new Set<StateListener>()\n state: RealtimeConnectionState = 'idle'\n transcriptSupported = false\n\n onEvent(listener: RpcEventListener): () => void { this.eventListeners.add(listener); return () => this.eventListeners.delete(listener) }\n onState(listener: StateListener): () => void { this.stateListeners.add(listener); return () => this.stateListeners.delete(listener) }\n async connect(): Promise<void> {\n this.close()\n const generation = ++this.generation\n this.publishState('connecting')\n this.transcriptSupported = (await HTTPRealtimeChannel.requireSupport()).includes(CHAT_TRANSCRIPT_FEATURE)\n if(!this.transcriptSupported)throw new ApiError('普通聊天需要新版服务端,请先升级服务端',426,'ordinary_chat_upgrade_required')\n if (generation !== this.generation) return\n this.http = new HTTPRealtimeChannel(frame => this.handleMessage(frame, generation), error => {\n if (generation === this.generation) this.publishState('failed', error.message)\n })\n await this.http.open('chat')\n }\n close(): void {\n this.generation++; this.http?.close(); this.http = undefined\n this.earlyFrames = []; this.openingRequests = 0\n this.publishState('disconnected')\n }\n async request(method: string, params: Record<string, JsonValue> = {}, timeoutMs = 120_000, requestId?: string): Promise<JsonValue> {\n if (!this.http) throw new ApiError('HTTP 事件通道尚未就绪', 0, 'REALTIME_NOT_READY')\n const generation = this.generation\n const opening = ['session.create', 'session.resume', 'session.branch'].includes(method)\n if (opening) this.openingRequests++\n try { return await this.http.request(method, params, timeoutMs, requestId) }\n catch (error) { if (error instanceof HTTPRPCError) throw new RpcError(error.message, error.code, error.data); throw error }\n finally {\n if (opening && generation === this.generation) {\n this.openingRequests--\n window.setTimeout(() => {\n if (generation !== this.generation || this.openingRequests) return\n const frames = this.earlyFrames; this.earlyFrames = []\n for (const frame of frames) void this.handleMessage(frame, generation)\n }, 0)\n }\n }\n }\n private async handleMessage(text: string, generation: number): Promise<void> {\n if (generation !== this.generation) return\n const frame = record(JSON.parse(text))\n if (frame.method !== 'event') return\n const params = record(frame.params), type = string(params.type)\n if (!type) return\n if (this.openingRequests && type !== 'gateway.ready') {\n if (this.earlyFrames.length >= 512) { this.earlyFrames = []; this.publishState('failed', '事件缓存已满,需要重新同步') }\n else this.earlyFrames.push(text)\n return\n }\n if (type === 'server.identity.changed') publishServerIdentity(params.payload)\n if (type === 'gateway.ready') this.publishState('ready')\n const event: RpcEventFrame['params'] = {\n type, session_id: string(params.session_id) || undefined,\n profile: string(params.profile) || undefined, payload: (params.payload ?? null) as JsonValue,\n }\n for (const listener of this.eventListeners) listener(event)\n }\n private publishState(state: RealtimeConnectionState, reason?: string): void {\n this.state = state\n for (const listener of this.stateListeners) listener(state, reason)\n }\n}\n\nexport interface GroupEventSocketOptions {\n epoch: string\n cursor: number\n onEnvelope(envelope: GroupSocketEnvelope): void\n onState?(state: RealtimeConnectionState, reason?: string): void\n onReset(reason: string): void\n}\n\nexport class GroupEventSocket {\n private http?: HTTPRealtimeChannel\n private generation = 0\n private epoch = ''\n private cursor = 0\n state: RealtimeConnectionState = 'idle'\n async connect(options: GroupEventSocketOptions): Promise<void> {\n this.close()\n this.epoch = options.epoch; this.cursor = options.cursor\n const generation = ++this.generation\n this.publish(options, 'connecting')\n await HTTPRealtimeChannel.requireSupport()\n if (generation !== this.generation) return\n this.http = new HTTPRealtimeChannel(frame => this.handleMessage(frame, generation, options), error => {\n if (generation === this.generation) this.needsReset(options, error.message)\n })\n await this.http.open('groups', { epoch: this.epoch, cursor: this.cursor })\n }\n close(): void {\n this.generation++; this.http?.close(); this.http = undefined\n this.state = 'disconnected'\n }\n private async handleMessage(data: unknown, generation: number, options: GroupEventSocketOptions): Promise<void> {\n if (generation !== this.generation) return\n let text: string\n if (typeof data === 'string') text = data\n else if (data instanceof Blob) text = await data.text()\n else if (data instanceof ArrayBuffer) text = new TextDecoder().decode(data)\n else return\n let decoded: unknown\n try { decoded = JSON.parse(text) } catch {\n this.needsReset(options, 'malformed_frame')\n return\n }\n const source = record(decoded)\n const envelope: GroupSocketEnvelope = {\n type: string(source.type) as GroupSocketEnvelope['type'],\n epoch: string(source.epoch) || undefined,\n cursor: source.cursor == null ? undefined : number(source.cursor, -1),\n heartbeatSeconds: source.heartbeatSeconds == null && source.heartbeat_seconds == null ? undefined : number(source.heartbeatSeconds ?? source.heartbeat_seconds),\n roomId: string(source.roomId ?? source.room_id) || undefined,\n event: string(source.event) || undefined,\n payload: (source.payload ?? null) as JsonValue,\n reason: string(source.reason) || undefined,\n }\n if (!['group.ready', 'group.event', 'group.heartbeat', 'group.reset_required'].includes(envelope.type)) {\n this.needsReset(options, 'unknown_envelope')\n return\n }\n if (envelope.epoch && envelope.epoch !== this.epoch) {\n this.needsReset(options, 'epoch_mismatch')\n return\n }\n if (envelope.type === 'group.ready') {\n if (envelope.cursor !== this.cursor) return this.needsReset(options, 'ready_cursor_mismatch')\n this.publish(options, 'ready')\n options.onEnvelope(envelope)\n return\n }\n if (envelope.type === 'group.event') {\n if (envelope.cursor == null || envelope.cursor < 0) return this.needsReset(options, 'invalid_cursor')\n if (envelope.cursor <= this.cursor) return\n if (envelope.cursor !== this.cursor + 1) return this.needsReset(options, 'cursor_gap')\n this.cursor = envelope.cursor\n options.onEnvelope(envelope)\n return\n }\n if (envelope.type === 'group.reset_required') {\n this.needsReset(options, envelope.reason || 'server_reset')\n return\n }\n if (envelope.cursor != null && envelope.cursor !== this.cursor) this.needsReset(options, 'heartbeat_cursor_mismatch')\n }\n\n private needsReset(options: GroupEventSocketOptions, reason: string): void {\n this.http?.close(); this.http = undefined\n this.publish(options, 'needs-reset', reason)\n options.onReset(reason)\n }\n\n private publish(options: GroupEventSocketOptions, state: RealtimeConnectionState, reason?: string): void {\n this.state = state\n options.onState?.(state, reason)\n }\n}\n","export const YAOYAO_AGENT_IDENTITY_NAMESPACE = 'hermes-yaoyao-identity'\nexport const YAOYAO_AGENT_IDENTITY_VERSION = 2\nexport const AVATAR_DESCRIPTOR_PREFIX = 'yaoyao-avatar:v2:'\nexport const MAX_AVATAR_IMAGE_LENGTH = 2_800_000\nexport const MAX_AVATAR_DESCRIPTOR_LENGTH = MAX_AVATAR_IMAGE_LENGTH + 4096\nexport const AGENT_MASCOT_SHAPES = ['circle', 'square', 'triangle', 'ellipse', 'capsule', 'hexagon', 'cloud', 'droplet'] as const\nexport type AgentMascotShape = typeof AGENT_MASCOT_SHAPES[number]\nexport const AGENT_MASCOT_SHAPE_OPTIONS: readonly AgentMascotShape[] = ['circle', 'ellipse', 'square', 'capsule', 'triangle', 'hexagon', 'cloud', 'droplet']\nexport const AGENT_MASCOT_EXPRESSIONS = ['idle', 'happy', 'curious', 'drowsy', 'working', 'thinking', 'listening', 'sleeping', 'suspicious', 'proud'] as const\nexport type AgentMascotExpression = typeof AGENT_MASCOT_EXPRESSIONS[number]\nexport const AGENT_MASCOT_BODIES = ['cursor', 'blob', 'circle', 'squircle', 'capsule', 'drop', 'shield', 'hexagon', 'diamond', 'star'] as const\nexport type AgentMascotBody = typeof AGENT_MASCOT_BODIES[number]\nexport const AGENT_MASCOT_BODY_LABELS: Record<AgentMascotBody, string> = { cursor: '光标', blob: '软团', circle: '圆球', squircle: '圆角块', capsule: '胶囊体', drop: '液滴', shield: '盾牌', hexagon: '六边体', diamond: '菱形', star: '星星' }\nexport const AGENT_MASCOT_EXPRESSION_LABELS: Record<AgentMascotExpression, string> = { idle: '默认', happy: '开心', curious: '好奇', drowsy: '困倦', working: '工作', thinking: '思考', listening: '倾听', sleeping: '睡眠', suspicious: '疑惑', proud: '自豪' }\nexport const AGENT_MASCOT_COLORS = ['#000000', '#94643a', '#ff2d45', '#ff6b00', '#ff9900', '#00c875', '#00b9ac', '#1488ff', '#9655f7', '#f52ba5', '#808080'] as const\nexport const AGENT_MASCOT_COLOR_LABELS: Record<string, string> = { '#000000':'黑色', '#94643a':'棕色', '#ff2d45':'红色', '#ff6b00':'橙色', '#ff9900':'金黄色', '#00c875':'绿色', '#00b9ac':'青绿色', '#1488ff':'蓝色', '#9655f7':'紫色', '#f52ba5':'粉色', '#808080':'灰色' }\nexport const AGENT_IMAGE_CROPS = ['circle', 'rounded', 'square'] as const\nexport type AgentImageCrop = typeof AGENT_IMAGE_CROPS[number]\nexport type AgentAvatarMode = 'mascot' | 'image'\nexport interface AgentIdentity {\n version: 2\n displayName: string\n avatarMode: AgentAvatarMode\n shape: AgentMascotShape\n color: string\n expression: AgentMascotExpression\n bodyId?: AgentMascotBody | null\n imageCrop?: AgentImageCrop\n imageDataURL?: string\n}\nexport interface AgentIdentityProfileSource { name?: unknown; display_name?: unknown; displayName?: unknown; description?: unknown; ui_meta?: unknown }\nconst imagePattern = /^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$/i\nconst legacyPattern = /^yaoyao-mascot:v1:(circle|square|triangle|ellipse|capsule|hexagon|cloud|droplet):([0-9a-f]{6}):(friendly|focused|curious|calm)$/i\nfunction object(v: unknown): Record<string, unknown> { return v && typeof v === 'object' && !Array.isArray(v) ? v as Record<string, unknown> : {} }\nfunction name(v: unknown): string { return typeof v === 'string' ? v.trim().replace(/\\s+/g, ' ').slice(0, 100) : '' }\nexport function validAvatarImage(v: unknown): boolean { return typeof v === 'string' && v.length <= MAX_AVATAR_IMAGE_LENGTH && imagePattern.test(v) }\nexport function defaultAgentIdentity(profile: string, displayName?: string): AgentIdentity {\n return { version: 2, displayName: name(displayName) || name(profile) || 'default', avatarMode: 'mascot', shape: 'circle', color: '#00c875', expression: 'idle', bodyId: null, imageCrop: 'rounded' }\n}\nexport function randomAgentIdentity(profile: string, displayName?: string, random: () => number = Math.random): AgentIdentity {\n const identity = defaultAgentIdentity(profile, displayName)\n const count = AGENT_MASCOT_SHAPES.length + AGENT_MASCOT_BODIES.length\n const visual = Math.min(count - 1, Math.max(0, Math.floor(random() * count)))\n if (visual < AGENT_MASCOT_SHAPES.length) identity.shape = AGENT_MASCOT_SHAPES[visual]!\n else identity.bodyId = AGENT_MASCOT_BODIES[visual - AGENT_MASCOT_SHAPES.length]!\n identity.color = AGENT_MASCOT_COLORS[Math.min(AGENT_MASCOT_COLORS.length - 1, Math.max(0, Math.floor(random() * AGENT_MASCOT_COLORS.length)))]!\n identity.expression = AGENT_MASCOT_EXPRESSIONS[Math.min(AGENT_MASCOT_EXPRESSIONS.length - 1, Math.max(0, Math.floor(random() * AGENT_MASCOT_EXPRESSIONS.length)))]!\n return identity\n}\nfunction descriptor(v: Record<string, unknown>): AgentIdentity | null {\n if (v.version !== 2 || !['mascot', 'image'].includes(String(v.avatarMode)) || !AGENT_MASCOT_SHAPES.includes(v.shape as AgentMascotShape)\n || typeof v.color !== 'string' || !/^#[0-9a-f]{6}$/i.test(v.color)\n || !AGENT_MASCOT_EXPRESSIONS.includes(v.expression as AgentMascotExpression)\n || (v.bodyId != null && !AGENT_MASCOT_BODIES.includes(v.bodyId as AgentMascotBody))\n || (v.imageCrop != null && !AGENT_IMAGE_CROPS.includes(v.imageCrop as AgentImageCrop))\n || (v.imageDataURL != null && !validAvatarImage(v.imageDataURL))\n || (v.avatarMode === 'image' && !validAvatarImage(v.imageDataURL))) return null\n return { version: 2, displayName: name(v.displayName), avatarMode: v.avatarMode as AgentAvatarMode, shape: v.shape as AgentMascotShape, color: v.color.toLowerCase(), expression: v.expression as AgentMascotExpression,\n bodyId: v.bodyId as AgentMascotBody | null ?? null, imageCrop: v.imageCrop as AgentImageCrop ?? 'rounded', ...(v.imageDataURL ? { imageDataURL: v.imageDataURL as string } : {}) }\n}\nexport function decodeAgentAvatar(value: string | undefined): AgentIdentity | null {\n if (!value || value.length > MAX_AVATAR_DESCRIPTOR_LENGTH) return null\n if (validAvatarImage(value)) return { ...defaultAgentIdentity(''), avatarMode: 'image', imageDataURL: value }\n if (legacyPattern.test(value)) return defaultAgentIdentity('')\n if (!value.startsWith(AVATAR_DESCRIPTOR_PREFIX)) return null\n try { return descriptor(object(JSON.parse(value.slice(AVATAR_DESCRIPTOR_PREFIX.length)))) } catch { return null }\n}\nexport function encodeAgentAvatar(identity: AgentIdentity): string {\n const value = descriptor({ ...identity, version: 2, bodyId: identity.bodyId ?? null, imageCrop: identity.imageCrop ?? 'rounded' })\n if (!value) throw new Error('无效的头像设置')\n const { displayName: _, ...data } = value\n return AVATAR_DESCRIPTOR_PREFIX + JSON.stringify(data)\n}\nexport function decodeAgentMascotAvatar(value: string | undefined): AgentIdentity | null {\n const identity = decodeAgentAvatar(value)\n return identity?.avatarMode === 'mascot' ? identity : null\n}\nexport function isAgentImageAvatar(value: string | undefined): boolean { return decodeAgentAvatar(value)?.avatarMode === 'image' }\nexport function normalizeAvatar(value: string | undefined): string { return encodeAgentAvatar(decodeAgentAvatar(value) ?? defaultAgentIdentity('')) }\nexport function agentIdentityFromProfile(source: AgentIdentityProfileSource): AgentIdentity {\n const meta = object(source.ui_meta), current = object(meta[YAOYAO_AGENT_IDENTITY_NAMESPACE]), legacy = object(meta['hermes-bots'])\n const displayName = name(current.display_name) || name(legacy.title) || name(source.display_name) || name(source.displayName) || name(source.description) || name(source.name)\n const fallback = defaultAgentIdentity(name(source.name), displayName)\n const image = validAvatarImage(current.image_data_url) ? current.image_data_url as string : validAvatarImage(legacy.avatar) ? legacy.avatar as string : undefined\n if (current.version !== 2) return { ...fallback, ...(image ? { imageDataURL: image, avatarMode: current.avatar_mode === 'image' || !Object.keys(current).length ? 'image' as const : 'mascot' as const } : {}) }\n return descriptor({ version: 2, displayName, avatarMode: current.avatar_mode, shape: current.shape, color: current.color, expression: current.expression, bodyId: current.body_id, imageCrop: current.image_crop, imageDataURL: current.image_data_url }) ?? fallback\n}\nexport function agentIdentityMetadata(identity: AgentIdentity): Record<string, unknown> {\n const v = descriptor({ ...identity })\n if (!v) throw new Error('无效的头像设置')\n return { version: 2, display_name: name(identity.displayName), avatar_mode: v.avatarMode, shape: v.shape, color: v.color, expression: v.expression, body_id: v.bodyId, image_crop: v.imageCrop, ...(v.imageDataURL ? { image_data_url: v.imageDataURL } : {}) }\n}\n","import type { JsonValue, ModelOption, Profile } from '@shared/types'\nimport { apiRequest, unwrapData } from './client'\nimport { normalizeModel, normalizeProfile, record, values } from '@/utils/normalize'\nimport { ChatRpcSocket } from './realtime'\nimport {\n AGENT_MASCOT_EXPRESSIONS,\n AGENT_MASCOT_SHAPES,\n AGENT_MASCOT_BODIES, AGENT_IMAGE_CROPS,\n YAOYAO_AGENT_IDENTITY_NAMESPACE,\n agentIdentityFromProfile,\n agentIdentityMetadata,\n encodeAgentAvatar,\n type AgentAvatarMode,\n type AgentMascotExpression,\n type AgentMascotShape,\n} from '@shared/agentIdentity'\n\nconst MAX_AGENT_NAME_LENGTH = 100\nconst MAX_AGENT_AVATAR_LENGTH = 2_800_000\nconst avatarDataURLPattern = /^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$/i\n\nexport type ProfileIdentityInput = {\n title: string\n avatarMode: AgentAvatarMode\n shape: AgentMascotShape\n color: string\n expression: AgentMascotExpression\n bodyId?: import(\"@shared/agentIdentity\").AgentMascotBody | null\n imageCrop?: import(\"@shared/agentIdentity\").AgentImageCrop\n avatarDataURL?: string | null\n}\n\nfunction jsonObject(value: unknown): Record<string, JsonValue> {\n return record(value) as Record<string, JsonValue>\n}\n\nfunction readProfileEntries(value: JsonValue): Record<string, JsonValue>[] {\n const source = jsonObject(value)\n return values(source.profiles).flatMap(item => {\n const outer = jsonObject(item)\n const profile = jsonObject(outer.profile)\n return Object.keys(profile).length ? [profile] : [outer]\n })\n}\n\nfunction validateIdentity(input: ProfileIdentityInput): ProfileIdentityInput {\n const title = input.title.trim().replace(/\\s+/g, ' ')\n if (!title || title.length > MAX_AGENT_NAME_LENGTH || /[\\u0000-\\u001f\\u007f]/.test(title)) {\n throw new Error(`机器人名称应为 1 至 ${MAX_AGENT_NAME_LENGTH} 个字符`)\n }\n const avatarDataURL = input.avatarDataURL === undefined ? undefined : input.avatarDataURL?.trim() || null\n if (avatarDataURL && (avatarDataURL.length > MAX_AGENT_AVATAR_LENGTH || !avatarDataURLPattern.test(avatarDataURL))) {\n throw new Error('头像必须是小于 2 MB 的 PNG、JPEG 或 WebP 图片')\n }\n if (!AGENT_MASCOT_SHAPES.includes(input.shape)) throw new Error('请选择有效的头像形状')\n if (!AGENT_MASCOT_EXPRESSIONS.includes(input.expression)) throw new Error('请选择有效的基础表情')\n if (input.bodyId != null && !AGENT_MASCOT_BODIES.includes(input.bodyId)) throw new Error('请选择有效的造型')\n if (input.imageCrop != null && !AGENT_IMAGE_CROPS.includes(input.imageCrop)) throw new Error('请选择有效的裁剪')\n if (!/^#[0-9a-f]{6}$/i.test(input.color)) throw new Error('请选择有效的头像颜色')\n return {\n title,\n avatarMode: input.avatarMode === 'image' && avatarDataURL ? 'image' : 'mascot',\n shape: input.shape,\n color: input.color.toLowerCase(),\n expression: input.expression,\n bodyId: input.bodyId ?? null, imageCrop: input.imageCrop ?? 'rounded',\n avatarDataURL,\n }\n}\n\n/**\n * Yaoyao owns this identity in a dedicated Hermes metadata namespace. The\n * native Desktop Bots title/avatar are deliberately left untouched.\n */\nexport async function updateProfileIdentity(profile: Profile, input: ProfileIdentityInput): Promise<void> {\n const identity = validateIdentity(input)\n const control = new ChatRpcSocket()\n await control.connect()\n try {\n const listed = await control.request('profiles.list', { include_sessions: false })\n const current = readProfileEntries(listed).find(item => String(item.name ?? '') === profile.name)\n if (!current) throw new Error('该机器人已不存在,请刷新后重试')\n const revisions = jsonObject(current.ui_meta_revisions)\n const revision = typeof revisions[YAOYAO_AGENT_IDENTITY_NAMESPACE] === 'number'\n ? revisions[YAOYAO_AGENT_IDENTITY_NAMESPACE] as number\n : 0\n const currentIdentity = agentIdentityFromProfile(current)\n const nextIdentity = {\n ...currentIdentity,\n displayName: identity.title,\n avatarMode: identity.avatarMode,\n shape: identity.shape,\n color: identity.color,\n expression: identity.expression,\n bodyId: identity.bodyId ?? null,\n imageCrop: identity.imageCrop ?? 'rounded',\n ...(identity.avatarDataURL ? { imageDataURL: identity.avatarDataURL } : {}),\n }\n if (!identity.avatarDataURL) delete nextIdentity.imageDataURL\n await control.request('profiles.configure', {\n name: profile.name,\n ui_meta: {\n [YAOYAO_AGENT_IDENTITY_NAMESPACE]: agentIdentityMetadata(nextIdentity) as Record<string, JsonValue>,\n },\n ui_meta_expected_revisions: {\n [YAOYAO_AGENT_IDENTITY_NAMESPACE]: revision,\n },\n })\n } finally {\n control.close()\n }\n}\n\n/** Fetch Yaoyao-owned identity for every profile. */\nexport async function getProfileIdentities(profiles: Profile[]): Promise<Record<string, { displayName: string; avatar: string }>> {\n if (!profiles.length) return {}\n const allowed = new Set(profiles.map(profile => profile.name))\n const control = new ChatRpcSocket()\n await control.connect()\n try {\n const listed = await control.request('profiles.list', { include_sessions: false })\n return Object.fromEntries(\n readProfileEntries(listed)\n .filter(item => allowed.has(String(item.name ?? '')))\n .map(item => {\n const identity = agentIdentityFromProfile(item)\n return [String(item.name), {\n displayName: identity.displayName,\n avatar: encodeAgentAvatar(identity),\n }]\n }),\n )\n } finally {\n control.close()\n }\n}\n\nexport async function getProfiles(): Promise<Profile[]> {\n const payload = unwrapData(await apiRequest<unknown>('/api/app/profiles'))\n const source = record(payload)\n return values(source.profiles ?? source.items ?? payload).map(normalizeProfile)\n}\n\nexport async function getModels(profile?: string): Promise<ModelOption[]> {\n const suffix = profile ? `?profile=${encodeURIComponent(profile)}` : ''\n const payload = unwrapData(await apiRequest<unknown>(`/api/app/models${suffix}`))\n const source = record(payload)\n if (Array.isArray(source.providers)) {\n const currentModel = typeof source.model === 'string' ? source.model : ''\n const currentProvider = typeof source.provider === 'string' ? source.provider : ''\n return source.providers.flatMap(rawProvider => {\n const provider = record(rawProvider)\n const slug = typeof provider.slug === 'string' ? provider.slug : typeof provider.name === 'string' ? provider.name : ''\n const capabilities = record(provider.capabilities)\n return values(provider.models).flatMap(rawModel => {\n const model = typeof rawModel === 'string' ? rawModel : String(record(rawModel).id ?? record(rawModel).model ?? '')\n if (!model || !slug) return []\n const modelCapabilities = record(capabilities[model])\n return [{\n id: model,\n name: model,\n provider: slug,\n supportsReasoning: typeof modelCapabilities.reasoning === 'boolean' ? modelCapabilities.reasoning : undefined,\n isDefault: model === currentModel && slug === currentProvider,\n } satisfies ModelOption]\n })\n })\n }\n return values(source.models ?? source.items ?? payload).map(normalizeModel).filter(model => model.id)\n}\n","import { serverIdentityValue } from './serverIdentity'\nimport type { BootstrapResponse, CurrentUser, JsonValue, Profile } from '@shared/types'\nimport { apiRequest, setApiCsrfToken, unwrapData } from './client'\nimport { bool, normalizeProfile, normalizeUser, record, string, values } from '@/utils/normalize'\nimport { getProfileIdentities } from './profiles'\n\nfunction normalizeBootstrap(payload: unknown): BootstrapResponse {\n const root = record(unwrapData(payload as never))\n const status = record(root.status)\n const authRequired = bool(root.authRequired ?? root.auth_required ?? status.authRequired ?? status.auth_required)\n const rawUser = root.user ?? root.identity\n const profiles = values(root.profiles).map(normalizeProfile)\n const csrfToken = string(root.csrfToken ?? root.csrf_token ?? root.csrf)\n const response: BootstrapResponse = {\n status: string(status.state ?? root.state) || undefined,\n authRequired,\n registrationAvailable: bool(root.registrationAvailable),\n setupRequired: bool(root.setupRequired ?? root.setup_required),\n profiles,\n csrfToken,\n insecureLan: bool(root.insecureLan ?? root.insecure_lan),\n groupUploadsEnabled: bool(root.groupUploadsEnabled ?? root.group_uploads_enabled),\n upstreamReady: bool(root.upstreamReady ?? root.upstream_ready),\n upstreamError: string(root.upstreamError ?? root.upstream_error) || undefined,\n serverKind: string(root.serverKind ?? root.server_kind) || undefined,\n serverIdentity: serverIdentityValue(root.serverIdentity),\n }\n if (rawUser) response.user = normalizeUser(rawUser)\n setApiCsrfToken(csrfToken, response.user?.id ?? (authRequired ? null : 'local'))\n return response\n}\n\nexport async function bootstrap(): Promise<BootstrapResponse> {\n return normalizeBootstrap(await apiRequest<unknown>('/api/app/bootstrap', { csrf: false }))\n}\n\nexport interface LoginInput {\n username: string\n password: string\n provider?: string\n}\n\nexport async function login(input: LoginInput): Promise<BootstrapResponse> {\n const payload = await apiRequest<unknown>('/api/app/login', {\n method: 'POST',\n body: { ...input, next: '/' } as JsonValue,\n notifyUnauthorized: false,\n })\n const response = normalizeBootstrap(payload)\n if (!response.user && response.authRequired) return bootstrap()\n return response\n}\n\nexport async function setup(input: LoginInput): Promise<BootstrapResponse> {\n return normalizeBootstrap(await apiRequest<unknown>('/api/app/setup', {\n method: 'POST',\n body: input as unknown as JsonValue,\n notifyUnauthorized: false,\n }))\n}\n\nexport async function logout(): Promise<void> {\n await apiRequest('/api/app/logout', { method: 'POST', body: {}, notifyUnauthorized: false })\n setApiCsrfToken('')\n}\n\nexport async function fetchProfiles(): Promise<Profile[]> {\n const payload = record(unwrapData(await apiRequest<unknown>('/api/app/profiles')))\n return values(payload.profiles ?? payload.items ?? payload).map(normalizeProfile)\n}\n\nexport async function fetchProfileIdentities(profiles: Profile[]): Promise<Record<string, { displayName: string; avatar: string }>> {\n return getProfileIdentities(profiles)\n}\n\nexport async function fetchCurrentUser(): Promise<CurrentUser | undefined> {\n const response = await bootstrap()\n return response.user\n}\n\nexport async function changeCredentials(input: {\n currentPassword: string\n newPassword: string\n username?: string\n}): Promise<CurrentUser> {\n const payload = record(unwrapData(await apiRequest<unknown>('/api/app/account/credentials', {\n method: 'PUT', body: input as unknown as JsonValue, notifyUnauthorized: false,\n })))\n return normalizeUser(payload.user ?? payload)\n}\n\nexport async function updateAccountAvatar(avatar: string | null): Promise<CurrentUser> {\n const payload = record(unwrapData(await apiRequest<unknown>('/api/app/account/avatar', {\n method: 'PUT', body: { avatar } as unknown as JsonValue,\n })))\n return normalizeUser(payload.user ?? payload)\n}\n\nexport async function register(input: LoginInput): Promise<void> {\n await bootstrap()\n await apiRequest('/api/app/register', { method: 'POST', body: { username: input.username, password: input.password }, notifyUnauthorized: false })\n}\n","import type { ServerIdentity } from '@shared/serverIdentity'\nimport { fetchServerIdentity, onServerIdentity } from '@/api/serverIdentity'\nimport { computed, onScopeDispose, ref } from 'vue'\nimport { defineStore } from 'pinia'\nimport type { AuthStatus, BootstrapResponse, CurrentUser, Profile } from '@shared/types'\nimport * as authApi from '@/api/auth'\nimport { ApiError, clearApiSecurityContext, onApiUnauthorized } from '@/api/client'\n\nfunction message(error: unknown): string {\n return error instanceof Error ? error.message : '认证请求失败'\n}\n\nexport const useAuthStore = defineStore('auth', () => {\n const status = ref<AuthStatus>('checking')\n const serverIdentity = ref<ServerIdentity>()\n let identityRequest = 0\n const user = ref<CurrentUser>()\n const profiles = ref<Profile[]>([])\n const activeProfileName = ref('')\n const csrfToken = ref('')\n const error = ref<string>()\n const authRequired = ref(true)\n const setupRequired = ref(false)\n const registrationAvailable = ref(false)\n const insecureLan = ref(false)\n const groupUploadsEnabled = ref(false)\n const upstreamReady = ref(false)\n const upstreamError = ref<string>()\n\n const activeProfile = computed(() => profiles.value.find(profile => profile.name === activeProfileName.value)\n ?? profiles.value.find(profile => profile.isDefault)\n ?? profiles.value[0])\n const isBotOnly = computed(() => Boolean(user.value && user.value.role !== 'admin'))\n const isAuthenticated = computed(() => status.value === 'authenticated')\n\n function acceptServerIdentity(value: ServerIdentity): void {\n if (serverIdentity.value?.serverId === value.serverId && serverIdentity.value.revision > value.revision) return\n if (serverIdentity.value?.serverId === value.serverId && serverIdentity.value.revision === value.revision && serverIdentity.value.name === value.name && serverIdentity.value.displayName === value.displayName) return\n serverIdentity.value = value\n }\n async function refreshServerIdentity(): Promise<void> {\n if (!isAuthenticated.value) return\n const generation = ++identityRequest, account = user.value?.id\n try {\n const value = await fetchServerIdentity()\n if (generation === identityRequest && isAuthenticated.value && user.value?.id === account) acceptServerIdentity(value)\n } catch { /* An older/offline server keeps the last known display name. */ }\n }\n const stopIdentity = onServerIdentity(value => { if (isAuthenticated.value) acceptServerIdentity(value) })\n const refreshIdentityOnFocus = () => { void refreshServerIdentity() }\n if (typeof window !== 'undefined') window.addEventListener('focus', refreshIdentityOnFocus)\n onScopeDispose(() => { stopIdentity(); if (typeof window !== 'undefined') window.removeEventListener('focus', refreshIdentityOnFocus) })\n\n function publish(response: BootstrapResponse): void {\n if (response.serverIdentity) acceptServerIdentity(response.serverIdentity)\n authRequired.value = response.authRequired\n setupRequired.value = Boolean(response.setupRequired)\n registrationAvailable.value = response.registrationAvailable === true\n csrfToken.value = response.csrfToken\n insecureLan.value = Boolean(response.insecureLan)\n groupUploadsEnabled.value = Boolean(response.groupUploadsEnabled)\n upstreamReady.value = Boolean(response.upstreamReady)\n upstreamError.value = response.upstreamError\n profiles.value = response.profiles\n user.value = response.user ?? (!response.authRequired\n ? { id: 'local', username: '本机 Hermes', role: 'local' }\n : undefined)\n if (!profiles.value.some(profile => profile.name === activeProfileName.value)) {\n activeProfileName.value = profiles.value.find(profile => profile.isDefault)?.name ?? profiles.value[0]?.name ?? ''\n }\n status.value = user.value ? 'authenticated' : 'anonymous'\n error.value = undefined\n }\n\n function expire(): void {\n if (status.value === 'anonymous' || status.value === 'checking') return\n status.value = 'expired'\n user.value = undefined\n serverIdentity.value = undefined; identityRequest++\n profiles.value = []\n activeProfileName.value = ''\n csrfToken.value = ''\n clearApiSecurityContext()\n }\n\n onApiUnauthorized(expire)\n\n async function authorizeComputerAfterExplicitLogin(response: BootstrapResponse): Promise<void> {\n if (response.user?.role !== 'admin' || !window.yaoyaoDesktop?.authorizeComputer) return\n try { await window.yaoyaoDesktop.authorizeComputer(response.csrfToken) }\n catch { /* Account login still succeeds; the desktop process presents the recovery error. */ }\n }\n\n async function bootstrap(): Promise<void> {\n status.value = 'checking'\n error.value = undefined\n try { publish(await authApi.bootstrap()) }\n catch (cause) {\n if (cause instanceof ApiError && [401, 403].includes(cause.status)) status.value = 'anonymous'\n else status.value = 'error'\n error.value = message(cause)\n user.value = undefined\n profiles.value = []\n }\n }\n\n async function login(input: authApi.LoginInput): Promise<void> {\n status.value = 'authenticating'\n error.value = undefined\n try {\n const response = await authApi.login(input)\n await authorizeComputerAfterExplicitLogin(response)\n publish(response)\n }\n catch (cause) {\n status.value = 'anonymous'\n error.value = message(cause)\n throw cause\n }\n }\n\n async function setup(input: authApi.LoginInput): Promise<void> {\n status.value = 'authenticating'\n error.value = undefined\n try {\n const response = await authApi.setup(input)\n await authorizeComputerAfterExplicitLogin(response)\n publish(response)\n }\n catch (cause) {\n status.value = 'anonymous'\n error.value = message(cause)\n throw cause\n }\n }\n\n async function logout(): Promise<void> {\n try { await authApi.logout() } catch { /* local state still signs out */ }\n await window.yaoyaoDesktop?.forgetLogin?.()\n status.value = 'anonymous'\n user.value = undefined\n serverIdentity.value = undefined; identityRequest++\n profiles.value = []\n activeProfileName.value = ''\n csrfToken.value = ''\n clearApiSecurityContext()\n try { publish(await authApi.bootstrap()) } catch { status.value = 'anonymous' }\n }\n\n function selectProfile(name: string): void {\n if (!profiles.value.some(profile => profile.name === name)) throw new Error(`未知 Profile:${name}`)\n activeProfileName.value = name\n }\n\n async function refreshProfiles(): Promise<void> {\n if (isBotOnly.value) return\n const nextProfiles = await authApi.fetchProfiles()\n profiles.value = nextProfiles\n if (!nextProfiles.some(profile => profile.name === activeProfileName.value)) {\n activeProfileName.value = nextProfiles.find(profile => profile.isDefault)?.name ?? nextProfiles[0]?.name ?? ''\n }\n }\n\n async function refreshProfileAvatars(): Promise<void> {\n if (isBotOnly.value) return\n const identities = await authApi.fetchProfileIdentities(profiles.value)\n profiles.value = profiles.value.map(profile => ({\n ...profile,\n ...(identities[profile.name] ? {\n agentName: identities[profile.name]!.displayName,\n agentAvatar: identities[profile.name]!.avatar,\n } : {}),\n }))\n }\n\n async function changeCredentials(input: { currentPassword: string; newPassword: string; username?: string }): Promise<void> {\n const localDesktop = user.value?.localDesktop\n user.value = await authApi.changeCredentials(input)\n if (window.yaoyaoDesktop && !localDesktop) await window.yaoyaoDesktop.forgetLogin?.()\n await bootstrap()\n }\n async function updateAccountAvatar(avatar: string | null): Promise<void> {\n user.value = await authApi.updateAccountAvatar(avatar)\n }\n\n return {\n serverIdentity, acceptServerIdentity, refreshServerIdentity,\n registrationAvailable, status, user, profiles, activeProfileName, activeProfile, csrfToken, error, authRequired, setupRequired, insecureLan, groupUploadsEnabled,\n upstreamReady, upstreamError, isAuthenticated, isBotOnly, bootstrap, login, setup, logout, selectProfile, refreshProfiles, refreshProfileAvatars,\n changeCredentials, updateAccountAvatar, expire,\n }\n})\n","import { computed, onBeforeUnmount, ref } from 'vue'\nimport { defineStore } from 'pinia'\n\nexport type ThemePreference = 'light' | 'dark' | 'system'\n\nexport const useThemeStore = defineStore('theme', () => {\n const saved = localStorage.getItem('hermes-yaoyao:theme')\n const theme = ref<ThemePreference>(saved === 'light' || saved === 'dark' ? saved : 'system')\n const media = window.matchMedia('(prefers-color-scheme: dark)')\n const systemDark = ref(media.matches)\n const onChange = (event: MediaQueryListEvent) => { systemDark.value = event.matches }\n media.addEventListener('change', onChange)\n onBeforeUnmount(() => media.removeEventListener('change', onChange))\n\n const resolvedTheme = computed<'light' | 'dark'>(() => theme.value === 'system' ? systemDark.value ? 'dark' : 'light' : theme.value)\n\n function setTheme(value: ThemePreference): void {\n theme.value = value\n if (value === 'system') localStorage.removeItem('hermes-yaoyao:theme')\n else localStorage.setItem('hermes-yaoyao:theme', value)\n }\n\n function toggle(): void { setTheme(resolvedTheme.value === 'dark' ? 'light' : 'dark') }\n return { theme, resolvedTheme, setTheme, toggle }\n})\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport BrandMark from '@/components/common/BrandMark.vue'\nimport AppIcon from '@/components/common/AppIcon.vue'\nimport { register } from '@/api/auth'\nimport { useAuthStore } from '@/stores/auth'\nimport { useThemeStore } from '@/stores/theme'\n\nconst auth = useAuthStore()\nconst theme = useThemeStore()\nconst username = ref('')\nconst password = ref('')\nconst passwordConfirmation = ref('')\nconst localError = ref('')\nconst registering = ref(false)\nconst registrationBusy = ref(false)\nconst notice = ref('')\nconst submitting = computed(() => auth.status === 'authenticating' || registrationBusy.value)\nconst needsConfirmation = computed(() => auth.setupRequired || registering.value)\nfunction toggleRegistration() {\n registering.value = !registering.value\n password.value = ''; passwordConfirmation.value = ''; localError.value = ''; notice.value = ''; auth.error = undefined\n}\n\n\nonMounted(() => {\n if (window.yaoyaoDesktop?.openLogin) {\n void window.yaoyaoDesktop.openLogin().catch(() => { localError.value = '无法打开服务器登录页面,请重新打开应用。' })\n }\n})\n\nasync function login() {\n if (!username.value.trim() || !password.value) return\n if (needsConfirmation.value && password.value !== passwordConfirmation.value) {\n localError.value = '两次输入的密码不一致'\n return\n }\n localError.value = ''\n try {\n const input = { username: username.value.trim(), password: password.value }\n if (registering.value) {\n registrationBusy.value = true\n await register(input)\n registering.value = false\n password.value = ''; passwordConfirmation.value = ''\n notice.value = '注册成功,请等待管理员开通。开通后使用此账号登录。'\n } else if (auth.setupRequired) await auth.setup(input)\n else await auth.login(input)\n } catch (error) {\n localError.value = error instanceof Error ? error.message : '登录失败,请检查账号和密码'\n password.value = ''\n await nextTick()\n document.querySelector<HTMLInputElement>('#password')?.focus()\n } finally { registrationBusy.value = false }\n}\n</script>\n\n<template>\n <main class=\"login-view\">\n <button class=\"theme-button icon-button\" type=\"button\" :aria-label=\"theme.resolvedTheme === 'dark' ? '切换浅色主题' : '切换深色主题'\" @click=\"theme.toggle\">\n <AppIcon :name=\"theme.resolvedTheme === 'dark' ? 'sun' : 'moon'\" />\n </button>\n <div class=\"login-atmosphere\" aria-hidden=\"true\"><i /><i /><i /></div>\n <section class=\"login-panel\" aria-labelledby=\"login-title\">\n <BrandMark :size=\"72\" />\n <div class=\"login-copy\">\n <h1 id=\"login-title\">{{ auth.setupRequired ? '创建管理员' : registering ? '注册子账号' : '登录夭夭' }}</h1>\n <p v-if=\"auth.setupRequired\">首次启动请设置 15300 管理账号,不会创建固定默认密码。</p>\n </div>\n <p v-if=\"notice\" role=\"status\" class=\"registration-note\">{{ notice }}</p>\n <p v-if=\"registering\" class=\"registration-note\">子账号仅可使用 Bot 模式,注册后需要本服务器管理员分配机器人并开通。</p>\n <form @submit.prevent=\"login\">\n <label><span>账号</span><input v-model=\"username\" name=\"username\" autocomplete=\"username\" autofocus required placeholder=\"用户名\" /></label>\n <label><span>密码</span><input id=\"password\" v-model=\"password\" name=\"password\" type=\"password\" :autocomplete=\"needsConfirmation ? 'new-password' : 'current-password'\" required placeholder=\"密码\" /></label>\n <label v-if=\"needsConfirmation\"><span>确认密码</span><input v-model=\"passwordConfirmation\" name=\"password-confirmation\" type=\"password\" autocomplete=\"new-password\" minlength=\"8\" required placeholder=\"再次输入密码\" /></label>\n <p v-if=\"localError || auth.error\" class=\"login-error\" role=\"alert\"><AppIcon name=\"alert\" :size=\"14\" />{{ localError || auth.error }}</p>\n <button class=\"login-submit solid-button\" type=\"submit\" :disabled=\"submitting || !username.trim() || password.length < (needsConfirmation ? 8 : 1) || (needsConfirmation && password !== passwordConfirmation)\">\n <span>{{ submitting ? '正在提交…' : auth.setupRequired ? '创建并登录' : registering ? '注册子账号' : '登录' }}</span><AppIcon v-if=\"!submitting\" name=\"arrow-up\" :size=\"15\" />\n </button>\n </form>\n <button v-if=\"!auth.setupRequired\" class=\"registration-link\" type=\"button\" :disabled=\"submitting\" @click=\"auth.registrationAvailable ? toggleRegistration() : localError = '当前服务器尚不支持子账号注册,请联系管理员升级。'\">{{ registering ? '已有账号?返回登录' : '没有账号?注册子账号' }}</button>\n </section>\n </main>\n</template>\n\n<style scoped>\n.registration-link{width:100%;min-height:44px;margin-top:12px;border:0;background:transparent;color:var(--text-secondary);cursor:pointer}.registration-link:focus-visible{outline:2px solid var(--accent)}.registration-note{font-size:13px;line-height:1.6;color:var(--text-secondary);margin:12px 0}\n.login-view { position: relative; display: grid; width: 100%; height: 100%; place-items: center; overflow: hidden; padding: 24px; background: var(--canvas); }\n.theme-button { position: absolute; z-index: 3; top: max(15px, env(safe-area-inset-top)); right: 16px; }\n.login-atmosphere { position: absolute; inset: 0; pointer-events: none; opacity: .75; }.login-atmosphere i { position: absolute; display: block; border: 1px solid var(--line); border-radius: 50%; }.login-atmosphere i:nth-child(1) { width: 520px; height: 520px; top: -360px; left: -180px; }.login-atmosphere i:nth-child(2) { width: 310px; height: 310px; right: -190px; bottom: -170px; }.login-atmosphere i:nth-child(3) { width: 3px; height: 3px; top: 22%; right: 18%; border: 0; background: var(--text-muted); box-shadow: -80px 160px 0 var(--line-strong), 90px 270px 0 var(--line-strong), -900px 340px 0 var(--line-strong); }\n.login-panel { position: relative; z-index: 2; width: min(368px, 100%); animation: login-enter 360ms var(--ease-out) both; }.login-panel :deep(.brand-mark) { display: flex; justify-content: center; width: 100%; }\n.login-copy { margin: 34px 0 22px; text-align: center; }.login-copy h1 { margin: 0; font-size: 18px; font-weight: 630; letter-spacing: -.03em; }.login-copy p { margin: 9px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.6; }\nform { display: flex; flex-direction: column; gap: 13px; } label { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 10px; } label span { display: flex; justify-content: space-between; } label small { color: var(--text-muted); font-weight: 400; }\ninput { width: 100%; height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--surface-raised); color: var(--text-primary); font-size: 13px; transition: border-color 140ms ease, box-shadow 140ms ease; } input::placeholder { color: var(--text-muted); } input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--focus-ring); }\n.provider { margin-top: 1px; }.provider input { height: 37px; background: var(--surface-soft); font-size: 11px; }\n.login-error { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 8px 9px; border-radius: 9px; background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--danger); font-size: 10px; line-height: 1.5; }\n.login-submit { justify-content: space-between; width: 100%; height: 43px; margin-top: 3px; padding: 0 12px 0 15px; }.login-submit .app-icon { transform: rotate(45deg); }\n@keyframes login-enter { from { opacity: 0; transform: translateY(10px); } }\n@media (max-width: 480px) { .login-view { place-items: start center; padding: max(74px, calc(env(safe-area-inset-top) + 58px)) 22px 24px; overflow-y: auto; }.login-panel :deep(.brand-mark__plate) { width: 64px !important; height: 64px !important; }.login-copy { margin-top: 28px; } }\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport BrandMark from '@/components/common/BrandMark.vue'\nimport { useAuthStore } from '@/stores/auth'\n\nconst auth = useAuthStore()\nconst username = ref(auth.user?.username || '')\nconst currentPassword = ref('')\nconst newPassword = ref('')\nconst confirmation = ref('')\nconst busy = ref(false)\nconst error = ref('')\nconst canSubmit = computed(() => currentPassword.value && newPassword.value.length >= 8\n && newPassword.value === confirmation.value && username.value.trim())\n\nasync function submit() {\n if (!canSubmit.value) return\n busy.value = true\n error.value = ''\n try {\n await auth.changeCredentials({\n currentPassword: currentPassword.value,\n newPassword: newPassword.value,\n username: auth.user?.role === 'admin' ? username.value.trim() : undefined,\n })\n } catch (cause) {\n error.value = cause instanceof Error ? cause.message : '修改密码失败'\n } finally {\n busy.value = false\n }\n}\n</script>\n\n<template>\n <main class=\"password-change\">\n <section>\n <BrandMark :size=\"68\" />\n <div><h1>先修改初始密码</h1><p>默认密码或管理员重置的临时密码不能继续用于工作区。</p></div>\n <form @submit.prevent=\"submit\">\n <label v-if=\"auth.user?.role === 'admin'\"><span>管理员用户名</span><input v-model=\"username\" autocomplete=\"username\" /></label>\n <label><span>当前密码</span><input v-model=\"currentPassword\" type=\"password\" autocomplete=\"current-password\" /></label>\n <label><span>新密码</span><input v-model=\"newPassword\" type=\"password\" autocomplete=\"new-password\" placeholder=\"至少 8 个字符\" /></label>\n <label><span>确认新密码</span><input v-model=\"confirmation\" type=\"password\" autocomplete=\"new-password\" /></label>\n <p v-if=\"newPassword && confirmation && newPassword !== confirmation\" class=\"error\">两次输入的新密码不一致</p>\n <p v-else-if=\"error\" class=\"error\">{{ error }}</p>\n <button class=\"solid-button\" type=\"submit\" :disabled=\"busy || !canSubmit\">{{ busy ? '正在保存…' : '保存并进入夭夭' }}</button>\n </form>\n </section>\n </main>\n</template>\n\n<style scoped>\n.password-change { display: grid; min-height: 100%; place-items: center; padding: 24px; background: var(--canvas); }.password-change > section { width: min(380px, 100%); }.password-change :deep(.brand-mark) { display: flex; justify-content: center; }.password-change > section > div { margin: 28px 0 22px; text-align: center; }h1 { margin: 0 0 8px; font-size: 19px; }p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }form { display: grid; gap: 13px; }label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 10px; }input { height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: var(--surface-raised); color: var(--text-primary); }input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--focus-ring); }.error { color: var(--danger); }.solid-button { min-height: 43px; margin-top: 3px; }\n</style>\n","export type UnreadMode = 'bot' | 'chat'\nexport interface UnreadMessage { id: string; seq: number; version?: number; taskId?: string }\nexport interface UnreadConversation {\n mode: UnreadMode; id: string; profile?: string; name: string; preview: string;\n count: number; updatedAt: number; messages: UnreadMessage[];\n}\nexport interface UnreadSnapshot { total: number; bot: number; chat: number; conversations: UnreadConversation[] }\nexport const emptyUnread = (): UnreadSnapshot => ({ total: 0, bot: 0, chat: 0, conversations: [] })\n/** Tool traces may accompany a final answer; standalone process/system records never qualify. */\nexport function isWorkspaceChatReply(m: { role: string; status: string; visible?: boolean; error?: string; content: string; attachments?: unknown[] }): boolean {\n return m.role === 'assistant' && m.status === 'complete' && m.visible !== false && !m.error\n && (!!m.content.replace(/<(think|thinking|reasoning)\\b[^>]*>[\\s\\S]*?(?:<\\/\\1>|$)/gi, '').trim() || !!m.attachments?.length)\n}\n","import { ref, computed, reactive } from 'vue'\nimport { apiRequest } from '@/api/client'\nimport { emptyUnread, type UnreadConversation, type UnreadSnapshot } from '@shared/unread'\nconst createUnreadStore=()=>{\n const snapshot=ref<UnreadSnapshot>(emptyUnread()),error=ref(''),scope=ref('')\n let epoch=0,revision=0,timer:ReturnType<typeof setInterval>|undefined,inflight:Promise<void>|undefined\n function reset(account='') { epoch++;revision++;scope.value=account;snapshot.value=emptyUnread();error.value='';inflight=undefined;clearInterval(timer);timer=undefined }\n async function refresh(){\n if(!scope.value)return\n if(inflight)return inflight\n const generation=epoch,request=revision\n const pending=apiRequest<UnreadSnapshot>('/api/app/unread').then(value=>{\n if(generation!==epoch||request!==revision)return\n snapshot.value=value;error.value=''\n void window.yaoyaoDesktop?.unreadState?.(scope.value).catch(()=>{})\n }).catch(e=>{if(generation===epoch)error.value=e instanceof Error?e.message:'未读同步失败'})\n inflight=pending;try{await pending}finally{if(inflight===pending)inflight=undefined}\n }\n function start(account:string){reset(account);void window.yaoyaoDesktop?.unreadState?.(account).catch(()=>{});void refresh();timer=setInterval(()=>void refresh(),3000)}\n async function read(items:UnreadConversation[]){\n const generation=epoch,account=scope.value;revision++;inflight=undefined\n await apiRequest<UnreadSnapshot>('/api/app/unread/read',{method:'POST',body:JSON.parse(JSON.stringify({items:items.map(({mode,id,profile,messages})=>({mode,id,profile,messages}))}))})\n if(generation!==epoch||account!==scope.value)return\n // Concurrent reads can finish out of order; fetch the latest authority.\n revision++;await refresh()\n }\n async function visible(mode:'bot'|'chat',id:string,profile:string|undefined,ids:string[]){\n if(!ids.length||!scope.value)return\n const row=snapshot.value.conversations.find(c=>c.mode===mode&&c.id===id&&(mode==='bot'||c.profile===profile))\n if(!row)return\n const selected=new Set(ids),messages=row.messages.filter(m=>selected.has(m.id))\n if(messages.length)await read([{...row,messages}])\n }\n const total=computed(()=>snapshot.value.total)\n return reactive({snapshot,total,error,reset,start,refresh,read,visible})\n}\nlet store:ReturnType<typeof createUnreadStore>|undefined\nexport const useUnreadStore=()=>store??=createUnreadStore()\n","import type { ChatMessage, JsonValue, SessionSummary } from '@shared/types'\nimport { apiRequest, apiUrl, unwrapData } from './client'\nimport { normalizeChatMessage, normalizeSession, number, record, values } from '@/utils/normalize'\n\nconst EXCLUDED_SOURCES = 'cron,ios_group,yaoyao_workspace'\n\nexport interface SessionPage {\n items: SessionSummary[]\n nextCursor?: string | null\n total?: number\n}\n\nexport interface MessagePage {\n session?: SessionSummary\n messages: ChatMessage[]\n total: number\n returned: number\n hasMore: boolean\n offset: number\n limit: number\n}\n\nexport async function getSessions(profile?: string, cursor?: string, limit = 100, view: 'chat' | 'history' = 'chat'): Promise<SessionPage> {\n const offset = Math.max(0, Number.parseInt(cursor ?? '0', 10) || 0)\n const payload = unwrapData(await apiRequest<unknown>(apiUrl('/api/app/sessions', {\n profile,\n offset,\n limit: Math.max(1, Math.min(200, limit)),\n order: 'recent',\n archived: 'exclude',\n exclude: EXCLUDED_SOURCES,\n view,\n })))\n const source = record(payload)\n const rawItems = values(source.items ?? source.sessions ?? payload)\n const items = rawItems.map(item => normalizeSession(item, profile)).filter(session => session.id)\n .filter(session => !['cron', 'ios_group', 'yaoyao_workspace'].includes(session.source))\n const total = number(source.total)\n const nextOffset = offset + items.length\n return {\n items,\n nextCursor: typeof source.nextCursor === 'string'\n ? source.nextCursor\n : typeof source.next_cursor === 'string'\n ? source.next_cursor\n : total > nextOffset && items.length ? String(nextOffset) : null,\n total: total || undefined,\n }\n}\n\nexport async function searchSessions(query: string, profile?: string, limit = 100): Promise<SessionSummary[]> {\n const payload = unwrapData(await apiRequest<unknown>(apiUrl('/api/app/sessions/search', {\n q: query,\n profile,\n limit: Math.max(1, Math.min(200, limit)),\n exclude: EXCLUDED_SOURCES,\n })))\n const source = record(payload)\n return values(source.items ?? source.sessions ?? source.results ?? payload).map(item => normalizeSession(item, profile))\n .filter(session => session.id && !['cron', 'ios_group', 'yaoyao_workspace'].includes(session.source))\n}\n\nexport async function getSession(id: string, profile?: string): Promise<SessionSummary> {\n const payload = unwrapData(await apiRequest<unknown>(apiUrl(`/api/app/sessions/${encodeURIComponent(id)}`, { profile })))\n const source = record(payload)\n return normalizeSession(source.session ?? payload, profile)\n}\n\nexport async function getMessages(\n sessionId: string,\n offset: number,\n limit = 150,\n profile?: string,\n forceRefresh = false,\n view: 'chat' | 'history' = 'chat',\n): Promise<MessagePage> {\n const safeOffset = Math.max(0, Math.trunc(offset))\n const safeLimit = Math.max(1, Math.min(500, Math.trunc(limit)))\n const url = apiUrl(`/api/app/sessions/${encodeURIComponent(sessionId)}/messages`, {\n offset: safeOffset,\n limit: safeLimit,\n order: 'latest',\n include_compacted: true,\n profile,\n ...(view === 'history' ? {view} : {}),\n })\n const payload = unwrapData(await apiRequest<unknown>(url, forceRefresh ? { headers: { 'X-Yaoyao-Cache': 'bypass' } } : {}))\n const source = record(payload)\n const pagination = record(source.pagination)\n const messages = values(source.messages ?? source.items ?? payload).map(message => normalizeChatMessage(message, sessionId, profile))\n const returned = Math.max(number(pagination.returned), messages.length)\n const total = Math.max(number(pagination.total ?? source.total), safeOffset + returned)\n const hasMore = typeof pagination.hasMore === 'boolean'\n ? pagination.hasMore\n : typeof pagination.has_more === 'boolean'\n ? pagination.has_more\n : safeOffset + returned < total || returned >= safeLimit\n return {\n session: source.session ? normalizeSession(source.session, profile) : undefined,\n messages,\n total,\n returned,\n hasMore,\n offset: safeOffset,\n limit: safeLimit,\n }\n}\n\nexport async function createSession(profile: string, title?: string): Promise<SessionSummary> {\n const payload = unwrapData(await apiRequest<unknown>('/api/app/sessions', {\n method: 'POST',\n body: { profile, title: title || null, source: 'web' } as JsonValue,\n }))\n const source = record(payload)\n return normalizeSession(source.session ?? payload, profile)\n}\n\nexport async function updateSession(\n id: string,\n patch: { title?: string; archived?: boolean; pinned?: boolean },\n profile?: string,\n): Promise<SessionSummary> {\n await apiRequest<unknown>(apiUrl(`/api/app/sessions/${encodeURIComponent(id)}`, { profile }), {\n method: 'PATCH', body: patch as JsonValue,\n })\n return getSession(id, profile)\n}\n\nexport async function deleteSession(id: string, profile?: string): Promise<void> {\n await apiRequest(apiUrl(`/api/app/sessions/${encodeURIComponent(id)}`, { profile }), { method: 'DELETE' })\n}\n\nexport async function requestHistorySync(sessionId:string,profile?:string):Promise<void>{\n await apiRequest(apiUrl(`/api/app/sessions/${encodeURIComponent(sessionId)}/sync`,{profile}),{method:'POST',body:{}})\n}\n\nexport async function getSessionUnread(profile?: string): Promise<Record<string, number>> {\n const payload = unwrapData(await apiRequest<unknown>(apiUrl('/api/app/sessions/unread', { profile })))\n const source = record(payload)\n const sessionRows = values(source.sessions ?? source.items)\n if (sessionRows.length) {\n const result: Record<string, number> = {}\n for (const value of sessionRows) {\n const item = record(value)\n const id = typeof item.sessionId === 'string'\n ? item.sessionId\n : typeof item.session_id === 'string' ? item.session_id : ''\n if (id) result[id] = Math.max(0, number(item.final_unread_count ?? item.unreadCount ?? item.unread_count ?? item.count))\n }\n return result\n }\n const raw = record(source.items ?? source.unread ?? source.counts ?? payload)\n const result: Record<string, number> = {}\n for (const [sessionId, value] of Object.entries(raw)) {\n if (typeof value === 'number' || typeof value === 'string') result[sessionId] = Math.max(0, number(value))\n else {\n const item = record(value)\n const id = typeof item.sessionId === 'string' ? item.sessionId : typeof item.session_id === 'string' ? item.session_id : sessionId\n result[id] = Math.max(0, number(item.final_unread_count ?? item.unreadCount ?? item.unread_count ?? item.count))\n }\n }\n return result\n}\n\nexport async function markSessionRead(sessionId: string, readMessageCount: number, profile?: string): Promise<void> {\n await apiRequest(apiUrl(`/api/app/sessions/unread/${encodeURIComponent(sessionId)}`, { profile }), {\n method: 'PATCH', body: { readMessageCount: Math.max(0, Math.trunc(readMessageCount)) },\n })\n}\n","import { apiRequest } from './client'\nimport { SSEParser } from '@shared/sse'\nimport {\n applyTranscriptEvent,\n CHAT_TRANSCRIPT_FEATURE,\n TranscriptGap,\n type TranscriptEvent,\n type TranscriptControlEvent,\n type TranscriptMessage,\n type TranscriptSnapshot,\n} from '@shared/chatTranscript'\n\n/** Serial, durable replica: no state/cursor becomes visible before changed commits it. */\nexport class ChatTranscriptClient {\n private abort = new AbortController()\n private snapshot?: TranscriptSnapshot\n private fetchingOlder = false\n private operations: Promise<unknown> = Promise.resolve()\n private request?: AbortController\n private readonly foreground = () => {\n if (document.visibilityState === 'visible') this.request?.abort()\n }\n constructor(\n readonly profile: string,\n readonly sessionId: string,\n readonly changed: (snapshot: TranscriptSnapshot) => Promise<void>,\n readonly failed: (error: Error) => void,\n readonly initialCount = 150,\n ) {\n if (typeof document !== 'undefined') document.addEventListener('visibilitychange', this.foreground)\n }\n static async supported(): Promise<boolean> {\n return (await apiRequest<{ features: string[] }>('/api/app/chat/capabilities')).features.includes(\n CHAT_TRANSCRIPT_FEATURE,\n )\n }\n close() {\n this.abort.abort()\n this.request?.abort()\n if (typeof document !== 'undefined') document.removeEventListener('visibilitychange', this.foreground)\n }\n restore(value: TranscriptSnapshot) {\n if (\n value.protocol === CHAT_TRANSCRIPT_FEATURE &&\n value.profile === this.profile &&\n value.sessionId === this.sessionId\n )\n this.snapshot = value\n }\n private serial<T>(operation: () => Promise<T>): Promise<T> {\n const task = this.operations.then(operation, operation)\n this.operations = task.catch(() => {})\n return task\n }\n private path(suffix: string, query: Record<string, string> = {}) {\n return `/api/app/chat/sessions/${encodeURIComponent(this.sessionId)}/${suffix}?${new URLSearchParams({ profile: this.profile, ...query })}`\n }\n private async page(before?: number): Promise<TranscriptSnapshot> {\n const value = await apiRequest<TranscriptSnapshot>(\n this.path('snapshot', { limit: '150', ...(before === undefined ? {} : { before: String(before) }) }),\n { signal: this.abort.signal },\n )\n if (\n value.protocol !== CHAT_TRANSCRIPT_FEATURE ||\n value.profile !== this.profile ||\n value.sessionId !== this.sessionId\n )\n throw new TranscriptGap()\n return value\n }\n private async commit(value: TranscriptSnapshot) {\n if (this.abort.signal.aborted) return\n await this.changed(value)\n if (!this.abort.signal.aborted) this.snapshot = value\n }\n private merge(current: TranscriptSnapshot, page: TranscriptSnapshot): TranscriptMessage[] {\n const deleted = new Set([...(current.deletedIds ?? []), ...(page.deletedIds ?? [])])\n const messages = new Map(current.messages.filter((m) => !deleted.has(m.id)).map((m) => [m.id, m]))\n for (const message of page.messages)\n if (!deleted.has(message.id) && (messages.get(message.id)?.revision ?? 0) < message.revision)\n messages.set(message.id, message)\n return [...messages.values()].sort((a, b) => a.seq - b.seq || a.id.localeCompare(b.id))\n }\n private async hydrate() {\n let value = await this.page()\n if (this.abort.signal.aborted) return\n while (value.messages.length < this.initialCount && value.hasOlder && value.messages.length) {\n const older = await this.page(value.messages[0]!.seq)\n if (older.epoch !== value.epoch) throw new TranscriptGap()\n const messages = this.merge(value, older),\n added = messages.length - value.messages.length\n value = {\n ...value,\n messages,\n hasOlder: older.hasOlder,\n deletedIds: [...new Set([...(value.deletedIds ?? []), ...(older.deletedIds ?? [])])],\n }\n if (!added) break\n }\n await this.serial(async () => {\n const old = this.snapshot\n if (old?.epoch === value.epoch && old.cursor > value.cursor) return\n // An authoritative generation replaces the covered window. Older loaded\n // pages can be retained only inside the same epoch and outside that window.\n if (old?.epoch === value.epoch && value.messages.length) {\n const first = value.messages[0]!.seq\n value = {\n ...value,\n messages: this.merge({ ...old, messages: old.messages.filter((m) => m.seq < first) }, value),\n }\n }\n await this.commit(value)\n })\n }\n async loadOlder() {\n const starting = this.snapshot\n if (this.fetchingOlder || !starting?.hasOlder || !starting.messages.length) return\n this.fetchingOlder = true\n try {\n const page = await this.page(starting.messages[0]!.seq)\n await this.serial(async () => {\n const current = this.snapshot\n if (!current || page.epoch !== current.epoch) return\n await this.commit({\n ...current,\n messages: this.merge(current, page),\n hasOlder: page.hasOlder,\n deletedIds: [...new Set([...(current.deletedIds ?? []), ...(page.deletedIds ?? [])])],\n })\n })\n } finally {\n this.fetchingOlder = false\n }\n }\n private async receive(event: TranscriptEvent) {\n await this.serial(async () => {\n const current = this.snapshot\n if (!current) throw new TranscriptGap()\n if (\n event.profile !== this.profile ||\n event.sessionId !== this.sessionId ||\n event.epoch !== current.epoch ||\n !Number.isSafeInteger(event.cursor)\n )\n throw new TranscriptGap()\n if (event.cursor <= current.cursor) return\n if (\n event.previousCursor !== current.cursor ||\n event.type === 'session.deleted' ||\n event.type === 'session.migrated'\n )\n throw new TranscriptGap()\n const data = event.data as Record<string, any>,\n deleted = new Set(current.deletedIds ?? [])\n if (event.type === 'message.deleted') deleted.add(String(data.id))\n const before = current.messages[0]?.seq\n const unloaded =\n ['message.patch', 'message.upsert'].includes(event.type) &&\n typeof data.seq === 'number' &&\n before !== undefined &&\n data.seq < before\n const messages =\n unloaded || (event.type !== 'message.deleted' && deleted.has(String(data.id)))\n ? current.messages\n : applyTranscriptEvent(current.messages, event)\n const next: TranscriptSnapshot = {\n ...current,\n messages,\n cursor: event.cursor,\n deletedIds: [...deleted],\n total: event.total ?? current.total,\n }\n if (event.type === 'session.changed') {\n for (const key of [\n 'running',\n 'queued',\n 'pendingApproval',\n 'pendingClarification',\n 'liveStatus',\n 'error',\n ] as const)\n if (data[key] !== undefined) (next as any)[key] = data[key]\n if (data.eventType === 'session.info' && data.payload)\n next.session = { ...next.session, ...data.payload }\n }\n await this.commit(next)\n })\n }\n private async control(input: unknown) {\n const value = input as Partial<TranscriptControlEvent>\n const cursor = value.cursor\n await this.serial(async () => {\n const current = this.snapshot\n if (\n !current ||\n value.epoch !== current.epoch ||\n typeof cursor !== 'number' ||\n !Number.isSafeInteger(cursor) ||\n typeof value.running !== 'boolean' ||\n typeof value.queued !== 'boolean'\n ) throw new TranscriptGap()\n if (cursor < current.cursor) return\n if (cursor > current.cursor) throw new TranscriptGap()\n await this.commit({\n ...current,\n running: value.running,\n queued: value.queued,\n pendingApproval: value.pendingApproval ?? null,\n pendingClarification: value.pendingClarification ?? null,\n liveStatus: value.liveStatus ?? null,\n error: value.error ?? null,\n })\n })\n }\n async run() {\n let needsSnapshot = !this.snapshot\n let restorePending = Boolean(this.snapshot)\n while (!this.abort.signal.aborted) {\n let reader: ReadableStreamDefaultReader<Uint8Array> | undefined\n let watchdog: ReturnType<typeof setTimeout> | undefined\n try {\n if (restorePending) {\n const saved = this.snapshot!\n await this.serial(() => this.commit(saved))\n restorePending = false\n }\n if (needsSnapshot) {\n await this.hydrate()\n needsSnapshot = false\n }\n if (this.abort.signal.aborted) return\n const current = this.snapshot\n if (!current) return\n const attempt = new AbortController()\n this.request = attempt\n watchdog = setTimeout(() => attempt.abort(), 45_000)\n const response = await fetch(this.path('events'), {\n headers: { Accept: 'text/event-stream', 'Last-Event-ID': `${current.epoch}:${current.cursor}` },\n credentials: 'include',\n cache: 'no-store',\n signal: attempt.signal,\n })\n if (response.status === 409) throw new TranscriptGap()\n if (!response.ok || !response.body) throw new Error(`聊天消息流 HTTP ${response.status}`)\n const parser = new SSEParser(),\n decoder = new TextDecoder()\n reader = response.body.getReader()\n while (!this.abort.signal.aborted) {\n clearTimeout(watchdog)\n watchdog = setTimeout(() => attempt.abort(), 45_000)\n const { value, done } = await reader.read()\n if (done) break\n for (const frame of parser.feed(decoder.decode(value, { stream: true }))) {\n if (frame.event === 'reset') throw new TranscriptGap()\n if (frame.event === 'ready' || frame.event === 'state') {\n await this.control(JSON.parse(frame.data))\n continue\n }\n if (frame.event === 'transcript') await this.receive(JSON.parse(frame.data))\n }\n }\n } catch (error) {\n if (this.abort.signal.aborted) return\n if (error instanceof TranscriptGap) needsSnapshot = true\n this.failed(error instanceof Error ? error : new Error('聊天消息需要同步'))\n } finally {\n clearTimeout(watchdog)\n this.request = undefined\n await reader?.cancel().catch(() => {})\n reader?.releaseLock()\n }\n await new Promise<void>((resolve) => {\n const finish = () => {\n clearTimeout(timer)\n this.abort.signal.removeEventListener('abort', finish)\n resolve()\n }\n const timer = setTimeout(finish, 1000)\n this.abort.signal.addEventListener('abort', finish, { once: true })\n if (this.abort.signal.aborted) finish()\n })\n }\n }\n}\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst transactionDoneMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n // This mapping exists in reverseTransformCache but doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(this.request);\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nconst advanceMethodProps = ['continue', 'continuePrimaryKey', 'advance'];\nconst methodMap = {};\nconst advanceResults = new WeakMap();\nconst ittrProxiedCursorToOriginalProxy = new WeakMap();\nconst cursorIteratorTraps = {\n get(target, prop) {\n if (!advanceMethodProps.includes(prop))\n return target[prop];\n let cachedFunc = methodMap[prop];\n if (!cachedFunc) {\n cachedFunc = methodMap[prop] = function (...args) {\n advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));\n };\n }\n return cachedFunc;\n },\n};\nasync function* iterate(...args) {\n // tslint:disable-next-line:no-this-assignment\n let cursor = this;\n if (!(cursor instanceof IDBCursor)) {\n cursor = await cursor.openCursor(...args);\n }\n if (!cursor)\n return;\n cursor = cursor;\n const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);\n ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);\n // Map this double-proxy back to the original, so other cursor methods work.\n reverseTransformCache.set(proxiedCursor, unwrap(cursor));\n while (cursor) {\n yield proxiedCursor;\n // If one of the advancing methods was not called, call continue().\n cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());\n advanceResults.delete(proxiedCursor);\n }\n}\nfunction isIteratorProp(target, prop) {\n return ((prop === Symbol.asyncIterator &&\n instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor])) ||\n (prop === 'iterate' && instanceOfAny(target, [IDBIndex, IDBObjectStore])));\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get(target, prop, receiver) {\n if (isIteratorProp(target, prop))\n return iterate;\n return oldTraps.get(target, prop, receiver);\n },\n has(target, prop) {\n return isIteratorProp(target, prop) || oldTraps.has(target, prop);\n },\n}));\n\nexport { deleteDB, openDB, unwrap, wrap };\n","import { openDB, type IDBPDatabase } from 'idb'\n\nconst memory = new Map<string, unknown>()\nlet databasePromise: Promise<IDBPDatabase | null> | undefined\n\nasync function database(): Promise<IDBPDatabase | null> {\n if (typeof indexedDB === 'undefined') return null\n databasePromise ??= openDB('hermes-yaoyao-cache', 1, {\n upgrade(database) {\n if (!database.objectStoreNames.contains('records')) database.createObjectStore('records')\n },\n }).catch(() => null)\n return databasePromise\n}\n\nexport class ScopedCache<T> {\n constructor(private readonly namespace: string, private readonly maximumBytes = 16 * 1024 * 1024) {}\n\n private key(scope: string, key: string): string { return `${this.namespace}:${scope}:${key}` }\n\n async get(scope: string, key: string): Promise<T | undefined> {\n const storageKey = this.key(scope, key)\n const db = await database()\n if (!db) return memory.get(storageKey) as T | undefined\n try { return await db.get('records', storageKey) as T | undefined } catch { return memory.get(storageKey) as T | undefined }\n }\n\n async set(scope: string, key: string, value: T, durable = false): Promise<void> {\n const serialized = JSON.stringify(value)\n if (new Blob([serialized]).size > this.maximumBytes) {\n if(durable)throw new Error('聊天缓存超出容量,未推进同步位置')\n return\n }\n // Cache records are JSON snapshots. Detach reactive proxies before IndexedDB\n // structured-clones them, and keep the memory fallback equally immutable.\n const snapshot = JSON.parse(serialized) as T\n const storageKey = this.key(scope, key)\n const db = await database()\n if(durable&&typeof indexedDB!=='undefined'&&!db)throw new Error('聊天缓存不可写,未推进同步位置')\n if (db) {\n if(durable)await db.put('records',snapshot,storageKey)\n else await db.put('records', snapshot, storageKey).catch(() => undefined)\n }\n memory.set(storageKey, snapshot)\n }\n\n async delete(scope: string, key: string): Promise<void> {\n const storageKey = this.key(scope, key)\n memory.delete(storageKey)\n const db = await database()\n if (db) await db.delete('records', storageKey).catch(() => undefined)\n }\n}\n","import type { ChatUsage, JsonValue } from '@shared/types'\nimport { record } from './normalize'\n\n/** Match mobile: context is the latest prompt occupancy, never cumulative usage\n * or the full (possibly compacted/paginated) visible transcript. */\nexport function normalizeChatUsage(...sources: unknown[]): ChatUsage | undefined {\n const fields: [Exclude<keyof ChatUsage, 'raw'>, string[]][] = [\n ['inputTokens', ['input_tokens', 'inputTokens', 'input', 'prompt']],\n ['outputTokens', ['output_tokens', 'outputTokens', 'output', 'completion']],\n ['totalTokens', ['total_tokens', 'totalTokens', 'total']],\n ['contextTokens', ['context_used', 'contextUsed', 'context_tokens', 'contextTokens']],\n ['contextLimit', ['context_max', 'contextMax', 'context_limit', 'contextLimit', 'context_length', 'contextLength', 'effective_context_length']],\n ['percentUsed', ['context_percent', 'contextPercent', 'percent_used', 'percentUsed']],\n ]\n const usage: ChatUsage = {}\n for (const source of sources) {\n const root = record(source)\n for (const value of [record(root.usage), record(record(root.info).usage), root, record(root.info)]) {\n for (const [field, aliases] of fields) {\n if (usage[field] !== undefined) continue\n for (const alias of aliases) {\n const raw = value[alias]\n if (typeof raw !== 'number' && (typeof raw !== 'string' || !raw.trim())) continue\n const number = Number(raw)\n if (!Number.isFinite(number) || number < 0 || (field === 'contextLimit' && number === 0)) continue\n usage[field] = number\n break\n }\n }\n }\n }\n return Object.keys(usage).length ? { ...usage, raw: sources[0] as JsonValue } : undefined\n}\n","import type {\n ApprovalRequest, ChatMessage, ChatRouteState, ClarificationRequest, JsonValue, RpcEventFrame, ToolCall,\n} from '@shared/types'\nimport { createId } from './id'\nimport { toolStatus } from '@shared/chatTools'\nimport { bool, number, record, string } from './normalize'\nimport { normalizeChatUsage } from './contextUsage'\n\ntype MergePosition = 'append' | 'prepend' | 'snapshot'\n\nfunction messageTime(message: ChatMessage): number {\n return message.timestamp < 10_000_000_000 ? message.timestamp * 1000 : message.timestamp\n}\n\n/**\n * Keep the conversation in its canonical chronological order even when a\n * history snapshot races a realtime event. Sequence is preferred when both\n * rows carry one; otherwise timestamps retain the order supplied by Hermes.\n */\nexport function orderChatMessages(messages: ChatMessage[]): ChatMessage[] {\n return messages\n .map((message, index) => ({ message, index }))\n .sort((left, right) => {\n const leftSequence = left.message.sequence\n const rightSequence = right.message.sequence\n if (leftSequence !== undefined && rightSequence !== undefined && leftSequence !== rightSequence) {\n return leftSequence - rightSequence\n }\n const timeDelta = messageTime(left.message) - messageTime(right.message)\n return timeDelta || left.index - right.index\n })\n .map(({ message }) => message)\n}\n\nfunction sameMessage(left: ChatMessage, right: ChatMessage): boolean {\n if (left.id && right.id && left.id === right.id) return true\n return Boolean(left.clientMessageId && right.clientMessageId && left.clientMessageId === right.clientMessageId)\n}\n\nfunction mergeOne(previous: ChatMessage, incoming: ChatMessage): ChatMessage {\n const persistedUser = (message: ChatMessage) => message.role === 'user' && message.stage === 'settled'\n && message.serverMessageId === message.id && message.id !== message.clientMessageId && !message.id.startsWith('user:')\n // A late receipt or a cached optimistic row must not demote persisted history.\n if (persistedUser(previous) && !persistedUser(incoming)) [previous, incoming] = [incoming, previous]\n const replacesContent = Boolean(incoming.content) || Boolean(incoming.attachments?.length)\n return {\n ...previous,\n ...incoming,\n id: incoming.serverMessageId || incoming.stage === 'settled' ? incoming.id : previous.id,\n clientMessageId: incoming.clientMessageId ?? previous.clientMessageId,\n serverMessageId: incoming.serverMessageId ?? previous.serverMessageId,\n content: replacesContent ? incoming.content : previous.content,\n reasoning: incoming.reasoning ?? previous.reasoning,\n attachments: incoming.attachments?.length ? incoming.attachments : previous.attachments,\n toolCalls: incoming.toolCalls?.length ? incoming.toolCalls : previous.toolCalls,\n }\n}\n\n/** Merge only by server/client identity. Repeated text is always retained. */\nexport function mergeChatMessages(existing: ChatMessage[], incoming: ChatMessage[], position: MergePosition = 'append'): ChatMessage[] {\n const base = position === 'prepend' || position === 'snapshot' ? [...incoming, ...existing] : [...existing, ...incoming]\n const result: ChatMessage[] = []\n for (const message of base) {\n let merged = message\n let index: number\n let insertionIndex = result.length\n // An enriched history row can bridge both an old server row and its local\n // echo already in the cache. Consume every identity match, not just the first.\n while ((index = result.findIndex(candidate => sameMessage(candidate, merged))) >= 0) {\n insertionIndex = Math.min(insertionIndex, index)\n merged = mergeOne(result.splice(index, 1)[0]!, merged)\n }\n result.splice(insertionIndex, 0, merged)\n }\n return orderChatMessages(result)\n}\n\nfunction payloadRecord(event: RpcEventFrame['params']): Record<string, unknown> {\n return record(event.payload)\n}\n\nfunction eventSessionId(event: RpcEventFrame['params'], fallback: string): string {\n const payload = payloadRecord(event)\n return string(event.session_id ?? payload.session_id ?? payload.sessionId, fallback)\n}\n\nfunction eventMessageId(payload: Record<string, unknown>, fallback: string): string {\n return string(payload.message_id ?? payload.messageId ?? payload.id ?? payload.run_id ?? payload.runId, fallback)\n}\n\nfunction lastUserMessage(messages: ChatMessage[]): ChatMessage | undefined {\n return [...messages].reverse().find(message => message.role === 'user')\n}\n\nfunction lastStreamingAssistant(messages: ChatMessage[], afterLatestUser = false): ChatMessage | undefined {\n let latestUserIndex = -1\n if (afterLatestUser) {\n for (let index = messages.length - 1; index >= 0; index -= 1) {\n if (messages[index].role === 'user') {\n latestUserIndex = index\n break\n }\n }\n }\n return messages.slice(latestUserIndex + 1).reverse()\n .find(message => message.role === 'assistant' && message.isStreaming)\n}\n\nexport function chatHasUnfinishedOutput(messages: ChatMessage[]): boolean {\n return messages.some(message => message.role === 'assistant'\n && message.toolCalls?.some(tool => ['pending', 'running'].includes(tool.status)))\n}\n\nexport function settleChatMessages(messages: ChatMessage[], current?: ChatMessage, interruptUnfinishedTools = true): ChatMessage[] {\n return messages.map(message => message.role === 'assistant' && message !== current\n ? { ...message, stage: message.stage === 'streaming' ? 'settled' : message.stage, isStreaming: false,\n toolCalls: message.toolCalls?.map(tool => interruptUnfinishedTools && ['running', 'pending'].includes(tool.status)\n ? { ...tool, status: 'interrupted' }\n : tool) }\n : message)\n}\n\nfunction streamingSegmentId(state: ChatRouteState): string {\n const latestUser = lastUserMessage(state.messages)\n return `stream:${state.route.profile}:${state.route.sessionId}:${latestUser?.id ?? 'orphan'}:${createId('segment')}`\n}\n\nfunction sealInterimMessage(state: ChatRouteState, payload: Record<string, unknown>): ChatMessage[] {\n const content = string(payload.output ?? payload.text ?? payload.content)\n if (!content.trim()) return state.messages\n\n const current = lastStreamingAssistant(state.messages)\n const occurredAt = number(payload.timestamp ?? payload.created_at, Date.now() / 1000)\n const sealedId = current?.id ?? streamingSegmentId(state)\n const sealed: ChatMessage = {\n ...(current ?? {}),\n id: sealedId,\n clientMessageId: current?.clientMessageId ?? (sealedId.startsWith('stream:') ? sealedId : undefined),\n sessionId: state.route.sessionId,\n profile: state.route.profile,\n role: 'assistant',\n content,\n timestamp: current?.timestamp ?? occurredAt,\n stage: 'settled',\n isStreaming: false,\n raw: payload as JsonValue,\n }\n const nextId = streamingSegmentId(state)\n const next: ChatMessage = {\n id: nextId,\n clientMessageId: nextId,\n sessionId: state.route.sessionId,\n profile: state.route.profile,\n role: 'assistant',\n content: '',\n timestamp: occurredAt,\n stage: 'streaming',\n isStreaming: true,\n raw: { stream_interim_continuation: true },\n }\n return mergeChatMessages(mergeChatMessages(state.messages, [sealed]), [next])\n}\n\nfunction toolFromEvent(payload: Record<string, unknown>, status: ToolCall['status']): ToolCall {\n return {\n id: string(payload.tool_call_id ?? payload.toolCallId ?? payload.tool_id ?? payload.id, createId('tool')),\n name: string(payload.name ?? payload.tool_name, '工具'),\n status,\n arguments: (payload.arguments ?? payload.args ?? payload.context) as JsonValue | undefined,\n result: (payload.result ?? payload.output) as JsonValue | undefined,\n preview: string(payload.preview ?? payload.summary ?? payload.args_text) || undefined,\n error: string(payload.error) || undefined,\n durationSeconds: number(payload.duration_seconds ?? payload.duration_s) || undefined,\n }\n}\n\nfunction updateStreamingMessage(\n state: ChatRouteState,\n payload: Record<string, unknown>,\n mode: 'start' | 'delta' | 'reasoning' | 'complete' | 'failed',\n): ChatMessage[] {\n // A start event belongs to the turn after the latest user row. An interrupted\n // turn may never receive a terminal event, so reusing any older streaming row\n // would make the new answer render above the new prompt.\n const current = lastStreamingAssistant(state.messages, mode === 'start')\n const fallbackId = current?.id ?? streamingSegmentId(state)\n const id = eventMessageId(payload, fallbackId)\n const existing = state.messages.find(message => message.id === id) ?? current\n const delta = string(payload.delta ?? payload.text_delta ?? payload.content_delta)\n const full = string(payload.output ?? payload.text ?? payload.content)\n const emptyInterimContinuation = mode === 'complete'\n && existing === current\n && bool(record(current?.raw).stream_interim_continuation)\n && !current?.content.trim()\n && !current?.reasoning?.trim()\n && !current?.toolCalls?.length\n if (emptyInterimContinuation && current) {\n const currentIndex = state.messages.indexOf(current)\n const previous = state.messages.slice(0, currentIndex).reverse()\n .find(message => message.role === 'assistant')\n const previousContent = previous?.content.trim() ?? ''\n const continuesPrevious = Boolean(full && previousContent\n && (full === previousContent || full.startsWith(previousContent) || previousContent.startsWith(full)))\n if (previous && (!full || bool(payload.response_previewed) || continuesPrevious)) {\n return orderChatMessages(state.messages\n .filter(message => message !== current)\n .map(message => message === previous && full\n ? { ...message, content: full, stage: 'settled', isStreaming: false, raw: payload as JsonValue }\n : message))\n }\n }\n let content = existing?.content ?? ''\n let reasoning = existing?.reasoning\n if (mode === 'delta') content += delta || full\n if (mode === 'complete') content = bool(payload.authoritative_output) && full ? full : full || content\n if (mode === 'reasoning') reasoning = `${reasoning ?? ''}${delta || full}`\n const message: ChatMessage = {\n id,\n // Keep a stable local identity while Hermes promotes a synthetic stream ID\n // to its authoritative message/run ID on a later event.\n clientMessageId: existing?.clientMessageId\n ?? (existing?.id.startsWith('stream:') ? existing.id : id.startsWith('stream:') ? id : undefined),\n serverMessageId: id.startsWith('stream:') ? undefined : id,\n sessionId: state.route.sessionId,\n profile: state.route.profile,\n role: 'assistant',\n content,\n reasoning,\n timestamp: number(payload.timestamp ?? payload.created_at, existing?.timestamp ?? Date.now() / 1000),\n stage: mode === 'complete' ? 'settled' : mode === 'failed' ? 'failed' : 'streaming',\n isStreaming: !['complete', 'failed'].includes(mode),\n error: mode === 'failed' ? string(payload.error ?? payload.message, '运行失败') : undefined,\n toolCalls: existing?.toolCalls,\n raw: payload as JsonValue,\n }\n const messages = mode === 'start' ? settleChatMessages(state.messages, current) : state.messages\n return mergeChatMessages(messages, [message])\n}\n\nexport function applyChatEvent(state: ChatRouteState, event: RpcEventFrame['params']): ChatRouteState {\n if (event.type === 'gateway.ready') return state\n const payload = payloadRecord(event)\n if (eventSessionId(event, state.route.sessionId) !== state.route.sessionId) return state\n const next: ChatRouteState = { ...state, error: undefined }\n switch (event.type) {\n case 'run.peer_user_message':\n case 'peer.user.message': {\n const id=string(payload.message_id),clientMessageId=string(payload.client_message_id ?? payload.queue_id)\n const existing=state.messages.find(m=>m.id===id||m.clientMessageId===clientMessageId)\n const stage=payload.status==='failed'?'failed':payload.status==='accepted'?'accepted':existing?.stage??'pending'\n next.messages=mergeChatMessages(state.messages,[{...existing,id,clientMessageId,sessionId:state.route.sessionId,profile:state.route.profile,\n role:'user',content:string(payload.text ?? payload.content),timestamp:existing?.timestamp??number(payload.timestamp,Date.now()/1000),stage}])\n break\n }\n case 'message.start':\n case 'run.started':\n next.messages = updateStreamingMessage(state, payload, 'start')\n next.isStreaming = true\n next.isQueued = false\n break\n case 'message.delta':\n case 'content.delta':\n case 'assistant.delta':\n next.messages = updateStreamingMessage(state, payload, 'delta')\n next.isStreaming = true\n break\n case 'message.interim':\n // Hermes emits this after commentary that precedes a tool call. Seal the\n // visible text in place and start a fresh segment, otherwise later deltas\n // keep rewriting the older bubble until message.complete replaces it.\n next.messages = sealInterimMessage(state, payload)\n next.isStreaming = true\n break\n case 'reasoning.delta':\n next.messages = updateStreamingMessage(state, payload, 'reasoning')\n next.isStreaming = true\n break\n case 'thinking.delta':\n case 'status.update':\n next.liveStatus = string(payload.text ?? payload.message ?? payload.status) || undefined\n break\n case 'message.complete':\n case 'run.completed': {\n const terminalStatus = string(payload.status).trim().toLowerCase()\n const failed = terminalStatus === 'error' || terminalStatus === 'failed' || Boolean(payload.error)\n next.messages = updateStreamingMessage(state, payload, failed ? 'failed' : 'complete')\n const waitingForOutput = !failed && chatHasUnfinishedOutput(next.messages)\n next.messages = settleChatMessages(next.messages, undefined, !waitingForOutput)\n next.isStreaming = waitingForOutput\n next.isQueued = false\n next.liveStatus = undefined\n const usage = normalizeChatUsage(payload)\n if (usage) next.usage = { ...next.usage, ...usage }\n if (failed) next.error = string(payload.error ?? payload.text ?? payload.message, '运行失败')\n break\n }\n case 'error':\n case 'run.failed':\n next.messages = updateStreamingMessage(state, payload, 'failed')\n next.messages = settleChatMessages(next.messages)\n next.isStreaming = false\n next.isQueued = false\n next.error = string(payload.error ?? payload.message, '运行失败')\n break\n case 'run.queued':\n next.isQueued = true\n break\n case 'run.steered':\n case 'submission.acknowledged':\n next.isQueued = false\n break\n case 'session.usage':\n case 'usage.update':\n case 'context.update': {\n const usage = normalizeChatUsage(payload)\n if (usage) next.usage = { ...next.usage, ...usage }\n break\n }\n case 'tool.start':\n case 'tool.progress':\n case 'tool.started':\n case 'tool.generating': {\n const id = string(payload.tool_call_id ?? payload.toolCallId ?? payload.tool_id ?? payload.id)\n if (!id) {\n next.liveStatus = `正在准备 ${string(payload.name ?? payload.tool_name, '工具')}`\n break\n }\n const current = lastStreamingAssistant(next.messages)\n ?? [...next.messages].reverse().find(message => message.role === 'assistant'\n && (message.toolCalls?.some(tool => tool.id === id)\n || message.toolCalls?.some(tool => ['pending', 'running'].includes(tool.status))))\n ?? [...next.messages].reverse().find(message => message.role === 'assistant')\n if (!current) break\n const tool = toolFromEvent(payload, 'running')\n const tools = [...(current.toolCalls ?? [])]\n const index = tools.findIndex(item => item.id === tool.id)\n if (index >= 0) tools[index] = { ...tools[index], ...tool,\n result: tool.result ?? tools[index].result,\n status: ['completed', 'failed'].includes(tools[index].status) ? tools[index].status : tool.status }\n else tools.push(tool)\n next.messages = mergeChatMessages(next.messages, [{ ...current, toolCalls: tools }])\n next.isStreaming = true\n next.liveStatus = undefined\n break\n }\n case 'tool.complete':\n case 'tool.completed':\n case 'tool.failed': {\n const id = string(payload.tool_call_id ?? payload.toolCallId ?? payload.tool_id ?? payload.id)\n if (!id) break\n const current = [...next.messages].reverse().find(message => message.role === 'assistant' && message.toolCalls?.some(tool => tool.id === id))\n ?? lastStreamingAssistant(next.messages)\n if (!current) break\n const tool = toolFromEvent(payload, toolStatus(event.type, payload.result ?? payload.output, payload.error))\n const tools = [...(current.toolCalls ?? [])]\n const index = tools.findIndex(item => item.id === tool.id)\n if (index >= 0) tools[index] = { ...tools[index], ...tool }\n else tools.push(tool)\n next.messages = mergeChatMessages(next.messages, [{ ...current, toolCalls: tools }])\n if (!chatHasUnfinishedOutput(next.messages) && !next.messages.some(message => message.isStreaming)) {\n next.isStreaming = false\n next.isQueued = false\n next.liveStatus = undefined\n }\n break\n }\n case 'approval.request':\n case 'approval.requested': {\n const id = string(payload.request_id ?? payload.requestId ?? payload.id)\n if (id) next.pendingApproval = {\n id, sessionId: state.route.sessionId, message: string(payload.message ?? payload.prompt) || undefined,\n toolName: string(payload.tool_name ?? payload.tool) || undefined,\n choices: Array.isArray(payload.choices) ? payload.choices.map(String) : undefined,\n payload: payload as Record<string, JsonValue>,\n } satisfies ApprovalRequest\n break\n }\n case 'approval.resolved':\n next.pendingApproval = undefined\n break\n case 'clarify.request':\n case 'clarify.requested': {\n const id = string(payload.request_id ?? payload.requestId ?? payload.id)\n if (id) next.pendingClarification = {\n id, sessionId: state.route.sessionId, question: string(payload.question ?? payload.message ?? payload.prompt, '需要补充信息'),\n choices: Array.isArray(payload.choices) ? payload.choices.map(String) : undefined,\n payload: payload as Record<string, JsonValue>,\n } satisfies ClarificationRequest\n break\n }\n case 'clarify.expire':\n case 'clarify.resolved':\n next.pendingClarification = undefined\n break\n }\n return next\n}\n","import type { ChatMessage } from '@shared/types'\nimport { mergeChatMessages } from './messageReducer'\n\nconst projectedID = /^(?:stream:|resume:|event:|history-)/\n\n/** Replace completed live projections only inside an identified history turn. */\nexport function reconcileChatHistory(existing: ChatMessage[], history: ChatMessage[], running: boolean): ChatMessage[] {\n const aliases = new Map<string, string>()\n for (const message of history) if (message.role === 'user') {\n aliases.set(message.id, message.id)\n if (message.clientMessageId) aliases.set(message.clientMessageId, message.id)\n }\n const userKey = (message: ChatMessage) => aliases.get(message.clientMessageId || '') ?? aliases.get(message.id) ?? message.id\n // A queued user message can appear after the currently executing assistant.\n // Protect the owner of that live segment, rather than the newest queue entry.\n let liveIndex = -1\n for (let index = existing.length - 1; index >= 0; index -= 1) {\n if (existing[index]!.role === 'assistant' && existing[index]!.isStreaming) { liveIndex = index; break }\n }\n const activeUser = [...existing.slice(0, liveIndex < 0 ? undefined : liveIndex)].reverse().find(message => message.role === 'user')\n const active = running && activeUser ? userKey(activeUser) : ''\n const canonical = new Map(history.filter(message => message.serverMessageId && !projectedID.test(message.id)).map(message => [message.id, message]))\n const completedTurns = new Set<string>()\n let turn = ''\n for (const message of history) {\n if (message.role === 'user') turn = userKey(message)\n if (turn && (!running || active) && turn !== active && canonical.has(message.id) && message.role === 'assistant'\n && !message.isStreaming && message.content.trim() && !message.toolCalls?.length) completedTurns.add(turn)\n }\n turn = ''\n const retained = existing.flatMap(message => {\n if (message.role === 'user') turn = userKey(message)\n if (message.role !== 'assistant') return [message]\n const persisted = canonical.get(message.id)\n if (persisted && (!message.isStreaming || completedTurns.has(turn))) return [persisted]\n if (completedTurns.has(turn) && projectedID.test(message.id)) return []\n return [message]\n })\n return mergeChatMessages(retained, history, 'snapshot')\n}\n","import type { SessionSummary } from '@shared/types'\n\n/** Keeps 9119's relative order inside each partition while honoring a pin. */\nexport function pinnedSessionsFirst(sessions: SessionSummary[]): SessionSummary[] {\n const pinned: SessionSummary[] = []\n const regular: SessionSummary[] = []\n for (const session of sessions) (session.pinned ? pinned : regular).push(session)\n return [...pinned, ...regular]\n}\n\nexport function appendSessionPage(existing: SessionSummary[], next: SessionSummary[]): SessionSummary[] {\n const seen = new Set(existing.map(session => `${session.profile}\\u0000${session.id}`))\n return pinnedSessionsFirst([...existing, ...next.filter(session => {\n const key = `${session.profile}\\u0000${session.id}`\n if (seen.has(key)) return false\n seen.add(key)\n return true\n })])\n}\n","import type { ModelOption } from '@shared/types'\nimport { record, string } from '@/utils/normalize'\n\nexport interface SessionModelSelection {\n model: string\n provider?: string\n}\n\n/**\n * The model chooser uses this exact value for its option IDs. Providers may\n * themselves contain colons, so callers must compare the whole value instead\n * of splitting it back into provider and model parts.\n */\nexport function modelChoiceId(option: Pick<ModelOption, 'id' | 'provider'>): string {\n return `${option.provider}:${option.id}`\n}\n\nexport function modelForChoiceId(options: ModelOption[], choiceId: string): ModelOption | undefined {\n return options.find(option => modelChoiceId(option) === choiceId)\n}\n\nexport function modelForSession(options: ModelOption[], model?: string, provider?: string): ModelOption | undefined {\n const id = model?.trim()\n if (!id) return undefined\n const normalizedId = id.toLocaleLowerCase()\n const normalizedProvider = provider?.trim().toLocaleLowerCase() || ''\n const exact = options.find(option => option.id.toLocaleLowerCase() === normalizedId\n && (!normalizedProvider || option.provider.toLocaleLowerCase() === normalizedProvider))\n if (exact) return exact\n const byId = options.find(option => option.id.toLocaleLowerCase() === normalizedId)\n if (byId) return byId\n return { id, name: id, provider: provider?.trim() || '' }\n}\n\nexport function modelSelectionFromSessionInfo(payload: unknown): SessionModelSelection | undefined {\n const source = record(payload)\n const info = record(source.info)\n const model = string(source.model ?? info.model).trim()\n if (!model) return undefined\n const provider = string(source.provider ?? info.provider).trim()\n return { model, provider: provider || undefined }\n}\n","const FAST_MODE_PREFIX = 'hermes-yaoyao:fast-mode'\nconst THINKING_PREFIX = 'hermes-yaoyao:show-thinking'\n\nfunction scopedKey(prefix: string, userId: string, profile: string, sessionId?: string): string {\n return [prefix, userId || 'local', profile || 'default', sessionId || ''].map(encodeURIComponent).join('|')\n}\n\nexport function readSessionFastMode(userId: string, profile: string, sessionId: string): boolean {\n try { return localStorage.getItem(scopedKey(FAST_MODE_PREFIX, userId, profile, sessionId)) === '1' } catch { return false }\n}\n\nexport function writeSessionFastMode(userId: string, profile: string, sessionId: string, enabled: boolean): void {\n try {\n const key = scopedKey(FAST_MODE_PREFIX, userId, profile, sessionId)\n if (enabled) localStorage.setItem(key, '1')\n else localStorage.removeItem(key)\n } catch { /* optional local mirror */ }\n}\n\nexport function moveSessionFastMode(userId: string, profile: string, fromSessionId: string, toSessionId: string, enabled: boolean): void {\n writeSessionFastMode(userId, profile, fromSessionId, false)\n writeSessionFastMode(userId, profile, toSessionId, enabled)\n}\n\nexport function readAgentShowThinking(userId: string, profile: string): boolean {\n try { return localStorage.getItem(scopedKey(THINKING_PREFIX, userId, profile)) === '1' } catch { return false }\n}\n\nexport function writeAgentShowThinking(userId: string, profile: string, visible: boolean): void {\n try { localStorage.setItem(scopedKey(THINKING_PREFIX, userId, profile), visible ? '1' : '0') } catch { /* optional preference */ }\n}\n","import { computed, reactive, ref, watch } from 'vue'\nimport { defineStore } from 'pinia'\nimport type {\n ApprovalRequest, ChatAttachment, ChatMessage, ChatRouteState, JsonValue, ModelOption, RealtimeConnectionState, SessionSummary,\n} from '@shared/types'\nimport {\n deleteSession as deleteSessionApi, getMessages, getSession, getSessions, getSessionUnread, markSessionRead, updateSession, requestHistorySync,\n} from '@/api/sessions'\nimport { getModels } from '@/api/profiles'\nimport { ChatRpcSocket, RpcError } from '@/api/realtime'\nimport { ChatTranscriptClient } from '@/api/chatTranscript'\nimport type { TranscriptMessage, TranscriptSnapshot } from '@shared/chatTranscript'\nimport { ApiError } from '@/api/client'\nimport { encodeAttachment, imageAttachmentReference } from '@/utils/attachments'\nimport { ScopedCache } from '@/utils/cache'\nimport { createId, routeKey } from '@/utils/id'\nimport { applyChatEvent, chatHasUnfinishedOutput, mergeChatMessages, settleChatMessages } from '@/utils/messageReducer'\nimport { reconcileChatHistory } from '@/utils/chatHistory'\nimport { bool, normalizeChatMessage, number, record, string, values } from '@/utils/normalize'\nimport { appendSessionPage, pinnedSessionsFirst } from '@/utils/sessionOrder'\nimport { modelForSession, modelSelectionFromSessionInfo } from '@/utils/sessionModel'\nimport { moveSessionFastMode, readSessionFastMode, writeSessionFastMode } from '@/utils/sessionPreferences'\nimport { normalizeChatUsage } from '@/utils/contextUsage'\nimport { useAuthStore } from './auth'\n\ninterface CachedHistory { messages: ChatMessage[]; total: number; savedAt: number; transcript?: Omit<TranscriptSnapshot,'messages'> }\nconst historyCache = new ScopedCache<CachedHistory>('chat-history-v1')\nconst INFLIGHT_SESSION_STORAGE_PREFIX = 'hermes-yaoyao:inflight-chat-sessions:'\nconst SESSION_LIST_REFRESH_DEBOUNCE_MS = 200\n\ninterface InflightSessionMarker {\n profile: string\n sessionId: string\n}\n\nfunction sessionStorageForInFlightSessions(): Storage | undefined {\n if (typeof window === 'undefined') return undefined\n try { return window.sessionStorage } catch { return undefined }\n}\n\nfunction readInflightSessionMarkers(accountId: string): InflightSessionMarker[] {\n const storage = sessionStorageForInFlightSessions()\n if (!storage) return []\n try {\n const value: unknown = JSON.parse(storage.getItem(`${INFLIGHT_SESSION_STORAGE_PREFIX}${accountId}`) ?? '[]')\n if (!Array.isArray(value)) return []\n return value.flatMap(item => {\n const marker = record(item)\n const profile = string(marker.profile)\n const sessionId = string(marker.sessionId)\n return profile && sessionId ? [{ profile, sessionId }] : []\n })\n } catch { return [] }\n}\n\nfunction writeInflightSessionMarkers(accountId: string, markers: InflightSessionMarker[]): void {\n const storage = sessionStorageForInFlightSessions()\n if (!storage) return\n try {\n const key = `${INFLIGHT_SESSION_STORAGE_PREFIX}${accountId}`\n if (markers.length) storage.setItem(key, JSON.stringify(markers))\n else storage.removeItem(key)\n } catch { /* Storage can be unavailable in privacy-restricted browsers. */ }\n}\n\nfunction emptyRoute(profile: string, sessionId: string): ChatRouteState {\n return {\n route: { profile, sessionId }, messages: [], historySynced: false, hasMoreBefore: false,\n loadedMessageCount: 0, messageTotal: 0, isLoadingHistory: false, isStreaming: false,\n isQueued: false, generation: 0,\n }\n}\n\nfunction errorMessage(cause: unknown): string {\n return cause instanceof Error ? cause.message : '聊天请求失败'\n}\n\nfunction resultRecord(value: JsonValue): Record<string, unknown> { return record(value) }\n\nfunction optionalBoolean(value: unknown): boolean | undefined {\n if (typeof value === 'boolean') return value\n if (value === 'true' || value === 'fast') return true\n if (value === 'false' || value === 'normal') return false\n return undefined\n}\n\nexport const useChatStore = defineStore('chat', () => {\n const auth = useAuthStore()\n const sessions = ref<SessionSummary[]>([])\n const activeSessionId = ref<string>()\n const activeProfileName = ref<string>()\n const routes = reactive<Record<string, ChatRouteState>>({})\n const connectionState = ref<RealtimeConnectionState>('idle')\n const historySynced = computed(() => activeRouteState.value?.historySynced ?? false)\n const isLoading = ref(false)\n const isLoadingMoreSessions = ref(false)\n const hasMoreSessions = ref(false)\n const isSending = ref(false)\n const error = ref<string>()\n const models = ref<ModelOption[]>([])\n const unreadCounts = ref<Record<string, number>>({})\n const contextUsageRequests = new Map<string, number>()\n const selectedModel = ref<ModelOption>()\n const reasoningEffort = ref<string>()\n const socket = new ChatRpcSocket()\n const runtimeRoutes = new Map<string, string>()\n const desiredModelRoutes = new Set<string>()\n // Model selection warnings are local config.set replies, not transcript approvals.\n // Keep them separate so another viewer's transcript cannot dismiss them.\n const pendingModelConfirmations = reactive(new Map<string, { routeKey: string; model: ModelOption; approval: ApprovalRequest }>())\n let connectPromise: Promise<void> | undefined\n let reconnectTimer: number | undefined\n let reconnectAttempt = 0\n let sessionLoadGeneration = 0\n let sessionListProfile: string | undefined\n let sessionListRefreshTimer: number | undefined\n let nextSessionCursor: string | undefined\n let modelLoadGeneration = 0\n let unreadLoadGeneration = 0\n let historyLoadGeneration = 0\n let reconnectResumePromise: Promise<unknown> | undefined\n let persistedRecoveryPromise: Promise<void> | undefined\n const runtimePromises = new Map<string, Promise<ChatRouteState>>()\n const transcriptSupported = ref(false)\n const outboxCache = new ScopedCache<ChatMessage[]>('ordinary-outbox-v2')\n let transcript: ChatTranscriptClient | undefined\n let transcriptGeneration = 0\n\n function startTranscript(): void {\n const generation=++transcriptGeneration\n transcript?.close();transcript=undefined\n const profile=activeProfileName.value,id=activeSessionId.value,owner=accountId()\n if(!transcriptSupported.value||!profile||!id||id.startsWith('draft-')||sessionView==='history'||!sessions.value.some(s=>s.id===id&&s.owned===true))return\n const key=routeKey(profile,id),state=ensureRoute(profile,id),scope=cacheScope(profile)\n const current=()=>generation===transcriptGeneration&&owner===accountId()?routes[key]:undefined\n void (async()=>{\n const [cached,outbox]=await Promise.all([historyCache.get(scope,id),outboxCache.get(scope,id)])\n if(!current())return\n if(!state.messages.length&&cached?.messages.length)state.messages=cached.messages\n if(outbox?.length)state.messages=mergeChatMessages(state.messages,outbox)\n const client=new ChatTranscriptClient(profile,id,async value=>{\n const initial=current();if(!initial)return\n const canonical=value.messages.map(message=>{\n const mapped=normalizeChatMessage(message,id,profile)\n const local=initial.messages.find(m=>m.role==='user'&&mapped.clientMessageId&&m.clientMessageId===mapped.clientMessageId)\n if(!mapped.attachments?.length&&local?.attachments?.length)mapped.attachments=local.attachments\n if(message.status==='pending')mapped.stage='pending'\n return mapped\n })\n const ids=new Set(canonical.flatMap(m=>[m.id,m.clientMessageId].filter(Boolean)))\n const pending=initial.messages.filter(m=>m.role==='user'&&m.stage!=='settled'&&!ids.has(m.id)&&!ids.has(m.clientMessageId))\n // Unsent local inputs keep their original time among server messages;\n // appending the outbox would move old failures below every new reply.\n const messages=mergeChatMessages(canonical,pending)\n const {messages:_,...checkpoint}=value\n await historyCache.set(scope,id,{messages,total:value.total,savedAt:Date.now(),transcript:checkpoint},true)\n const beforeOutbox=current();if(!beforeOutbox)return\n const newerPending=beforeOutbox.messages.filter(m=>m.role==='user'&&m.stage!=='settled'&&!ids.has(m.id)&&!ids.has(m.clientMessageId))\n await outboxCache.set(scope,id,newerPending,true)\n // Usage events replace the route while storage is pending. Commit to\n // the current route after both writes, preserving any newer local send.\n const latest=current();if(!latest)return\n const usage=normalizeChatUsage(value.session)\n if(usage && (['contextTokens','contextLimit','percentUsed'] as const)\n .some(field => latest.usage?.[field] === undefined && usage[field] !== undefined)) {\n latest.usage={...usage,...latest.usage}\n }\n const latestPending=latest.messages.filter(m=>m.role==='user'&&m.stage!=='settled'&&!ids.has(m.id)&&!ids.has(m.clientMessageId))\n latest.messages=mergeChatMessages(canonical,latestPending);latest.messageTotal=value.total;latest.loadedMessageCount=canonical.length\n const approval=value.pendingApproval,clarification=value.pendingClarification\n latest.pendingApproval=approval?{id:string(approval.request_id??approval.id),sessionId:id,message:string(approval.message??approval.prompt),toolName:string(approval.tool_name),choices:values(approval.choices).map(String),payload:approval as Record<string,JsonValue>}:undefined\n latest.pendingClarification=clarification?{id:string(clarification.request_id??clarification.id),sessionId:id,question:string(clarification.question??clarification.prompt),payload:clarification as Record<string,JsonValue>}:undefined\n latest.liveStatus=value.liveStatus??undefined\n latest.hasMoreBefore=value.hasOlder;latest.historySynced=true;latest.isLoadingHistory=false;latest.error=value.error??undefined\n const wasStreaming=latest.isStreaming\n latest.isStreaming=value.running??canonical.some(m=>m.isStreaming||chatHasUnfinishedOutput([m]));latest.isQueued=value.queued??false\n if(wasStreaming&&!latest.isStreaming)void refreshContextUsage(latest).catch(()=>{})\n if(!latest.isStreaming)latest.liveStatus=undefined\n updateInflightMarker(latest)\n },error=>{const latest=current();if(latest){latest.error=error.message;latest.historySynced=false}},Math.max(150,state.messages.length))\n if(cached?.transcript?.protocol==='ordinary-chat-transcript-v2'){\n const canonical=cached.messages.map(m=>m.raw as unknown as TranscriptMessage).filter(m=>m?.id&&Number.isSafeInteger(m.revision)&&Number.isSafeInteger(m.seq))\n client.restore({...cached.transcript,messages:canonical})\n }\n transcript=client;await client.run()\n })().catch(error=>{const latest=current();if(latest)latest.error=errorMessage(error)})\n }\n watch(()=>[activeSessionId.value,activeProfileName.value,transcriptSupported.value,auth.user?.id],startTranscript)\n\n const activeRouteState = computed(() => {\n if (!activeSessionId.value || !activeProfileName.value) return undefined\n return routes[routeKey(activeProfileName.value, activeSessionId.value)]\n })\n const fastMode = computed(() => activeRouteState.value?.fastMode ?? false)\n const activeSession = computed(() => sessions.value.find(session => session.id === activeSessionId.value\n && (!activeProfileName.value || session.profile === activeProfileName.value)))\n const messages = computed(() => activeRouteState.value?.messages ?? [])\n const hasMoreBefore = computed(() => activeRouteState.value?.hasMoreBefore ?? false)\n const isStreaming = computed(() => activeRouteState.value?.isStreaming ?? false)\n const isQueued = computed(() => activeRouteState.value?.isQueued ?? false)\n const contextUsage = computed(() => activeRouteState.value?.usage)\n const pendingApproval = computed(() => {\n const state = activeRouteState.value\n if (!state) return undefined\n const key = routeKey(state.route.profile, state.route.sessionId)\n return [...pendingModelConfirmations.values()].find(value => value.routeKey === key)?.approval ?? state.pendingApproval\n })\n const pendingClarification = computed(() => activeRouteState.value?.pendingClarification)\n\n function ensureRoute(profile: string, sessionId: string): ChatRouteState {\n const key = routeKey(profile, sessionId)\n if (!routes[key]) {\n routes[key] = emptyRoute(profile, sessionId)\n routes[key].fastMode = readSessionFastMode(auth.user?.id ?? 'local', profile, sessionId)\n }\n return routes[key]\n }\n\n function persistFastMode(state: ChatRouteState): void {\n writeSessionFastMode(auth.user?.id ?? 'local', state.route.profile, state.route.sessionId, state.fastMode ?? false)\n }\n\n function syncSelectedModel(model?: string, provider?: string): void {\n const resolved = modelForSession(models.value, model, provider)\n if (resolved) selectedModel.value = resolved\n }\n\n function restoreSelectedSessionModel(key: string): void {\n const activeKey = activeSessionId.value && activeProfileName.value\n ? routeKey(activeProfileName.value, activeSessionId.value)\n : undefined\n if (key === activeKey) syncSelectedModel(activeSession.value?.model, activeSession.value?.provider)\n }\n\n function reconcileSessionModel(profile: string, sessionId: string, model: string, provider?: string): void {\n const key = routeKey(profile, sessionId)\n const sessionIndex = sessions.value.findIndex(session => session.id === sessionId && session.profile === profile)\n if (sessionIndex >= 0) {\n sessions.value.splice(sessionIndex, 1, {\n ...sessions.value[sessionIndex], model, provider,\n })\n }\n const activeKey = activeSessionId.value && activeProfileName.value\n ? routeKey(activeProfileName.value, activeSessionId.value)\n : undefined\n if (key === activeKey && !desiredModelRoutes.has(key)) syncSelectedModel(model, provider)\n }\n\n function reconcileSessionTitle(profile: string | undefined, sessionId: string, title: string): void {\n const normalized = title.trim()\n if (!sessionId || !normalized) return\n const index = sessions.value.findIndex(session => session.id === sessionId\n && (!profile || !session.profile || session.profile === profile))\n if (index < 0 || sessions.value[index].title === normalized) return\n sessions.value.splice(index, 1, { ...sessions.value[index], title: normalized })\n }\n\n function cancelSessionListRefresh(): void {\n if (sessionListRefreshTimer === undefined) return\n window.clearTimeout(sessionListRefreshTimer)\n sessionListRefreshTimer = undefined\n }\n\n function scheduleSessionListRefresh(): void {\n if (auth.status !== 'authenticated') return\n cancelSessionListRefresh()\n sessionListRefreshTimer = window.setTimeout(() => {\n sessionListRefreshTimer = undefined\n void loadSessions(sessionListProfile ?? auth.activeProfile?.name, sessionView).catch(() => undefined)\n }, SESSION_LIST_REFRESH_DEBOUNCE_MS)\n }\n\n function cacheScope(profile: string): string {\n return `${auth.user?.id ?? 'anonymous'}:${profile}`\n }\n\n function scheduleReconnect(): void {\n if (!auth.isAuthenticated || reconnectTimer !== undefined) return\n const delay = Math.min(15_000, 500 * 2 ** Math.min(reconnectAttempt, 5))\n reconnectAttempt += 1\n connectionState.value = 'reconnecting'\n reconnectTimer = window.setTimeout(() => {\n reconnectTimer = undefined\n void connect().catch(() => scheduleReconnect())\n }, delay)\n }\n\n function accountId(): string { return auth.user?.id ?? 'anonymous' }\n\n function updateInflightMarker(state: ChatRouteState): void {\n const markers = readInflightSessionMarkers(accountId())\n const matches = (marker: InflightSessionMarker) => marker.profile === state.route.profile\n && marker.sessionId === state.route.sessionId\n const shouldKeep = state.isStreaming || state.isQueued || Boolean(state.pendingApproval) || Boolean(state.pendingClarification)\n const next = shouldKeep\n ? [...markers.filter(marker => !matches(marker)), { profile: state.route.profile, sessionId: state.route.sessionId }]\n : markers.filter(marker => !matches(marker))\n writeInflightSessionMarkers(accountId(), next)\n }\n\n function clearInflightMarker(profile: string, sessionId: string): void {\n const markers = readInflightSessionMarkers(accountId())\n writeInflightSessionMarkers(accountId(), markers.filter(marker => marker.profile !== profile || marker.sessionId !== sessionId))\n }\n\n function recoverPersistedInflightSessions(): Promise<void> | undefined {\n if (!auth.isAuthenticated || persistedRecoveryPromise) return persistedRecoveryPromise\n const markers = readInflightSessionMarkers(accountId())\n if (!markers.length) return undefined\n const operation = Promise.all(markers.map(async marker => {\n const state = ensureRoute(marker.profile, marker.sessionId)\n try {\n const resumed = await ensureRuntime(state)\n updateInflightMarker(resumed)\n } catch {\n // Keep the marker. A transient reconnect failure must not turn into an\n // accidental interruption before Hermes's disconnect grace expires.\n }\n })).then(() => undefined)\n persistedRecoveryPromise = operation.finally(() => { persistedRecoveryPromise = undefined })\n return persistedRecoveryPromise\n }\n\n socket.onState((state, reason) => {\n connectionState.value = state\n if (state === 'ready') {\n reconnectAttempt = 0\n const active = activeRouteState.value\n if (active?.historySynced && (active.isStreaming || activeSession.value?.owned === true)\n && !active.route.sessionId.startsWith('draft-') && !active.runtimeSessionId && !reconnectResumePromise) {\n reconnectResumePromise = ensureRuntime(active)\n .then(current => refreshContextUsage(current))\n .catch(cause => { active.error = errorMessage(cause) })\n .finally(() => { reconnectResumePromise = undefined })\n }\n void recoverPersistedInflightSessions()\n }\n if (state === 'failed') {\n runtimeRoutes.clear()\n for (const route of Object.values(routes)) {\n route.runtimeSessionId = undefined\n route.serverFastMode = undefined\n }\n error.value = reason || '聊天实时连接已断开'\n scheduleReconnect()\n }\n })\n\n function migrateRoute(oldKey: string, storedSessionId: string, runtimeSessionId: string): ChatRouteState {\n const oldState = routes[oldKey]\n if (!oldState) throw new Error('会话状态已经失效')\n const newKey = routeKey(oldState.route.profile, storedSessionId)\n const target = routes[newKey]\n const migrated: ChatRouteState = {\n ...(target ?? oldState),\n route: { profile: oldState.route.profile, sessionId: storedSessionId },\n messages: target ? mergeChatMessages(target.messages, oldState.messages) : oldState.messages,\n runtimeSessionId,\n }\n routes[newKey] = migrated\n if (newKey !== oldKey) delete routes[oldKey]\n if (desiredModelRoutes.delete(oldKey)) desiredModelRoutes.add(newKey)\n runtimeRoutes.set(runtimeSessionId, newKey)\n if (activeSessionId.value === oldState.route.sessionId && activeProfileName.value === oldState.route.profile) {\n activeSessionId.value = storedSessionId\n }\n if (newKey !== oldKey) {\n moveSessionFastMode(auth.user?.id ?? 'local', oldState.route.profile, oldState.route.sessionId, storedSessionId, migrated.fastMode ?? false)\n }\n const draftIndex = sessions.value.findIndex(session => session.id === oldState.route.sessionId && session.profile === oldState.route.profile)\n const now = Date.now() / 1000\n const summary: SessionSummary = draftIndex >= 0\n ? { ...sessions.value[draftIndex], id: storedSessionId, owned: true,\n updatedAt: newKey === oldKey ? sessions.value[draftIndex].updatedAt : now }\n : { id: storedSessionId, profile: oldState.route.profile, source: 'web', owned: true, title: '新会话', messageCount: 0, toolCallCount: 0, startedAt: now, updatedAt: now }\n if (draftIndex >= 0) sessions.value.splice(draftIndex, 1, summary)\n else sessions.value.unshift(summary)\n return routes[newKey]\n }\n\n socket.onEvent(event => {\n if (event.type === 'gateway.ready') return\n const payload = record(event.payload)\n if (event.type === 'sessions.changed') {\n if(!transcriptSupported.value && payload.reason==='cache.synced' && typeof payload.profile==='string' && typeof payload.session_id==='string'){\n const state=routes[routeKey(payload.profile,payload.session_id)]\n if(state){\n state.historySyncRevision=(state.historySyncRevision??0)+1\n state.historySynced=false\n }\n if(state && state===activeRouteState.value && !state.isLoadingHistory)\n void loadHistory(state).catch(()=>{})\n }\n scheduleSessionListRefresh()\n return\n }\n const runtimeId = string(event.session_id ?? payload.session_id ?? payload.sessionId)\n let key = runtimeRoutes.get(runtimeId)\n if (!key) key = Object.keys(routes).find(candidate => routes[candidate].runtimeSessionId === runtimeId\n || routes[candidate].route.sessionId === runtimeId)\n if (event.type === 'session.title' || event.type === 'session.title.updated') {\n const state = key ? routes[key] : undefined\n const storedSessionId = state?.route.sessionId\n || string(payload.stored_session_id ?? payload.storedSessionId ?? payload.session_key\n ?? payload.session_id ?? payload.sessionId)\n const profile = state?.route.profile || string(event.profile ?? payload.profile) || undefined\n reconcileSessionTitle(profile, storedSessionId, string(payload.title))\n scheduleSessionListRefresh()\n if (!key) return\n }\n if (!key) return\n let state = routes[key]\n if(sessionView==='chat'&&(\n /^(message\\.|tool\\.|reasoning\\.|thinking\\.)/.test(event.type)\n || ['run.started','run.completed','run.failed','run.peer_user_message','peer.user.message'].includes(event.type))){\n // All ordinary message bodies and execution state come from the durable\n // transcript. Raw upstream frames cannot create a second representation.\n return\n }\n if (event.type === 'session.info') {\n const storedId = string(payload.stored_session_id ?? payload.storedSessionId ?? payload.session_key)\n if (storedId && storedId !== state.route.sessionId) {\n state = migrateRoute(key, storedId, runtimeId)\n key = routeKey(state.route.profile, storedId)\n }\n const liveSelection = modelSelectionFromSessionInfo(payload)\n if (liveSelection) {\n reconcileSessionModel(state.route.profile, state.route.sessionId, liveSelection.model, liveSelection.provider)\n }\n const usage = normalizeChatUsage(payload)\n if (usage) state.usage = { ...state.usage, ...usage }\n }\n const info = record(payload.info)\n const liveFastMode = optionalBoolean(payload.fast ?? info.fast)\n if (liveFastMode !== undefined && (event.type === 'session.info' || (event.type === 'session.command' && payload.action === 'fast'))) {\n state.serverFastMode = liveFastMode\n if (!state.fastModeDirty) state.fastMode = liveFastMode\n persistFastMode(state)\n }\n if(sessionView==='chat'&&!['session.usage','usage.update','context.update'].includes(event.type))return\n const attributedPayload = { ...payload, session_id: state.route.sessionId } as JsonValue\n const updated = applyChatEvent(state, {\n ...event, session_id: state.route.sessionId, profile: state.route.profile, payload: attributedPayload,\n })\n routes[key] = updated\n updateInflightMarker(updated)\n if (['message.complete', 'run.completed'].includes(event.type)) {\n void refreshContextUsage(updated).catch(() => undefined)\n }\n })\n\n async function connect(): Promise<void> {\n if (['connected', 'ready'].includes(connectionState.value)) return\n if (connectPromise) return connectPromise\n if (reconnectTimer !== undefined) {\n window.clearTimeout(reconnectTimer)\n reconnectTimer = undefined\n }\n connectPromise = socket.connect().then(()=>{if(auth.isAuthenticated)transcriptSupported.value=socket.transcriptSupported===true}).catch(cause => {\n connectionState.value = 'failed'\n error.value = errorMessage(cause)\n throw cause\n }).finally(() => { connectPromise = undefined })\n return connectPromise\n }\n\n function disconnect(): void {\n transcriptGeneration++;transcript?.close();transcript=undefined;transcriptSupported.value=false\n if (reconnectTimer !== undefined) window.clearTimeout(reconnectTimer)\n reconnectTimer = undefined\n socket.close()\n runtimeRoutes.clear()\n runtimePromises.clear()\n desiredModelRoutes.clear()\n pendingModelConfirmations.clear()\n cancelSessionListRefresh()\n for (const state of Object.values(routes)) {\n state.runtimeSessionId = undefined\n state.serverFastMode = undefined\n }\n }\n\n function switchProfile(profile: string): void {\n sessionLoadGeneration += 1\n modelLoadGeneration += 1\n unreadLoadGeneration += 1\n disconnect()\n activeSessionId.value = undefined\n activeProfileName.value = profile\n nextSessionCursor = undefined\n hasMoreSessions.value = false\n isLoadingMoreSessions.value = false\n error.value = undefined\n }\n\n function clearAccountState(): void {\n sessions.value = []\n nextSessionCursor = undefined\n hasMoreSessions.value = false\n isLoadingMoreSessions.value = false\n activeSessionId.value = undefined\n activeProfileName.value = undefined\n sessionListProfile = undefined\n cancelSessionListRefresh()\n runtimeRoutes.clear()\n for (const key of Object.keys(routes)) delete routes[key]\n unreadCounts.value = {}\n error.value = undefined\n }\n\n watch(() => auth.status, status => {\n if (status !== 'authenticated') {\n disconnect()\n clearAccountState()\n }\n })\n\n let sessionView: 'chat' | 'history' = 'chat'\n async function loadSessions(profile?: string, view: 'chat' | 'history' = sessionView): Promise<void> {\n sessionView = view\n const requestedProfile = profile || undefined\n sessionListProfile = requestedProfile\n const loadGeneration = ++sessionLoadGeneration\n isLoading.value = true\n error.value = undefined\n try {\n const page = await getSessions(requestedProfile, undefined, 100, sessionView)\n if (loadGeneration !== sessionLoadGeneration\n || (requestedProfile && auth.activeProfile?.name !== requestedProfile)) return\n // 9119 owns recency within each bucket. Pinning is an explicit user\n // command, so pinned sessions always form the visible top partition.\n sessions.value = pinnedSessionsFirst(page.items)\n nextSessionCursor = page.nextCursor ?? undefined\n hasMoreSessions.value = Boolean(nextSessionCursor)\n } catch (cause) {\n if (loadGeneration === sessionLoadGeneration) error.value = errorMessage(cause)\n throw cause\n } finally {\n if (loadGeneration === sessionLoadGeneration) isLoading.value = false\n }\n }\n\n async function loadMoreSessions(profile = auth.activeProfile?.name): Promise<void> {\n const cursor = nextSessionCursor\n const requestedProfile = profile || undefined\n if (!cursor || isLoadingMoreSessions.value) return\n const loadGeneration = sessionLoadGeneration\n isLoadingMoreSessions.value = true\n try {\n const page = await getSessions(requestedProfile, cursor, 100, sessionView)\n if (loadGeneration !== sessionLoadGeneration\n || (requestedProfile && auth.activeProfile?.name !== requestedProfile)) return\n sessions.value = appendSessionPage(sessions.value, page.items)\n nextSessionCursor = page.nextCursor ?? undefined\n hasMoreSessions.value = Boolean(nextSessionCursor)\n } catch (cause) {\n if (loadGeneration === sessionLoadGeneration) error.value = errorMessage(cause)\n throw cause\n } finally {\n if (loadGeneration === sessionLoadGeneration) isLoadingMoreSessions.value = false\n }\n }\n\n async function loadUnread(profile?: string): Promise<void> {\n const loadGeneration = ++unreadLoadGeneration\n const loaded = await getSessionUnread(profile)\n if (loadGeneration === unreadLoadGeneration && (!profile || auth.activeProfile?.name === profile)) {\n unreadCounts.value = loaded\n }\n }\n\n async function markRead(sessionId = activeSessionId.value, profile = activeProfileName.value): Promise<void> {\n if (!sessionId) return\n const state = profile ? routes[routeKey(profile, sessionId)] : undefined\n const summaryCount = sessions.value.find(session => session.id === sessionId)?.messageCount ?? 0\n const count = Math.max(state?.messageTotal ?? 0, summaryCount)\n await markSessionRead(sessionId, count, profile)\n unreadCounts.value = { ...unreadCounts.value, [sessionId]: 0 }\n }\n\n async function loadHistory(state: ChatRouteState, forceRefresh = false): Promise<void> {\n if(sessionView==='chat'&&sessions.value.some(s=>s.id===state.route.sessionId&&s.owned===true)){\n const cached=await historyCache.get(cacheScope(state.route.profile),state.route.sessionId)\n if(!state.messages.length&&cached?.messages.length)state.messages=cached.messages\n await connect()\n if(!transcriptSupported.value)throw new Error('普通聊天需要升级服务端后继续')\n if(state===activeRouteState.value)startTranscript()\n return\n }\n const key = routeKey(state.route.profile, state.route.sessionId)\n const generation = ++historyLoadGeneration\n state.generation = generation\n const syncRevision = state.historySyncRevision ?? 0\n // SSE replaces a route state object. Resolve the current object after each\n // await so history merges into its live tail instead of a detached copy.\n const current = () => routes[key]?.generation === generation ? routes[key] : undefined\n state.isLoadingHistory = true\n state.error = undefined\n const scope = cacheScope(state.route.profile)\n const cached = await historyCache.get(scope, state.route.sessionId)\n let latest = current()\n if (!latest) return\n if (cached?.messages.length) {\n latest.messages = mergeChatMessages(latest.messages, cached.messages, 'snapshot')\n latest.messageTotal = cached.total\n latest.loadedMessageCount = cached.messages.length\n }\n try {\n const page = await getMessages(state.route.sessionId, 0, 150, state.route.profile, false, sessionView)\n latest = current()\n if (!latest || (latest.historySyncRevision ?? 0) !== syncRevision) return\n if (forceRefresh && latest.isStreaming) {\n throw new Error('正在回复,请结束后再刷新历史')\n }\n const retained = forceRefresh ? latest.messages.filter(message => message.role === 'user' && message.stage !== 'settled') : latest.messages\n latest.messages = reconcileChatHistory(retained, page.messages, latest.isStreaming)\n latest.messageTotal = page.total\n latest.loadedMessageCount = page.returned\n latest.hasMoreBefore = page.hasMore\n latest.historySynced = true\n if (page.session) {\n const index = sessions.value.findIndex(session => session.id === page.session!.id && session.profile === page.session!.profile)\n if (index >= 0) sessions.value.splice(index, 1, page.session)\n }\n await historyCache.set(scope, state.route.sessionId, { messages: latest.messages, total: page.total, savedAt: Date.now() })\n } catch (cause) {\n latest = current()\n if (latest) latest.error = errorMessage(cause)\n if(cause instanceof ApiError && cause.code==='CHAT_HISTORY_SYNC_PENDING')return\n throw cause\n } finally {\n latest = current()\n if (latest) {\n latest.isLoadingHistory = false\n if ((latest.historySyncRevision ?? 0) !== syncRevision && latest === activeRouteState.value)\n void loadHistory(latest).catch(() => {})\n }\n }\n }\n\n async function selectSession(sessionId: string, profile?: string): Promise<void> {\n const session = sessions.value.find(item => item.id === sessionId && (!profile || item.profile === profile))\n const selectedProfile = profile ?? session?.profile ?? auth.activeProfile?.name ?? 'default'\n activeSessionId.value = sessionId\n activeProfileName.value = selectedProfile\n const state = ensureRoute(selectedProfile, sessionId)\n syncSelectedModel(session?.model, session?.provider)\n // REST owns history, but an owned chat also needs a runtime subscription:\n // another device can start a turn while this viewer has never sent one.\n // History-only sessions and unsent drafts must remain unattached.\n if (sessionId.startsWith('draft-')) state.historySynced = true\n else if (!state.historySynced) await loadHistory(state)\n const refreshed = sessions.value.find(item => item.id === sessionId && item.profile === selectedProfile)\n syncSelectedModel(refreshed?.model, refreshed?.provider)\n if (refreshed?.owned === true && !sessionId.startsWith('draft-')\n && activeSessionId.value === sessionId && activeProfileName.value === selectedProfile) {\n const current = await ensureRuntime(routes[routeKey(selectedProfile, sessionId)] ?? state).catch(cause => {\n const current = routes[routeKey(selectedProfile, sessionId)]\n if (current) current.error = errorMessage(cause)\n })\n if (current) void refreshContextUsage(current).catch(() => undefined)\n }\n }\n\n async function forceRefreshHistory(): Promise<void> {\n const state = activeRouteState.value\n if (!state || state.isLoadingHistory || state.isStreaming || state.isQueued || state.pendingApproval || state.pendingClarification || state.route.sessionId.startsWith('draft-')) return\n if(sessionView==='history'){await loadHistory(state);return}\n await requestHistorySync(state.route.sessionId,state.route.profile)\n state.error='历史正在后台补齐,完成后会自动更新'\n }\n\n async function loadOlder(): Promise<void> {\n if(sessionView==='chat'&&activeSession.value?.owned===true){await transcript?.loadOlder();return}\n const state = activeRouteState.value\n if (!state || state.isLoadingHistory || !state.hasMoreBefore) return\n const key = routeKey(state.route.profile, state.route.sessionId)\n const generation = state.generation\n const syncRevision = state.historySyncRevision ?? 0\n const current = () => routes[key]?.generation === generation ? routes[key] : undefined\n state.isLoadingHistory = true\n try {\n const page = await getMessages(state.route.sessionId, state.loadedMessageCount, 150, state.route.profile, false, sessionView)\n const latest = current()\n if (!latest) return\n latest.messages = mergeChatMessages(latest.messages, page.messages, 'prepend')\n latest.loadedMessageCount += page.returned\n latest.messageTotal = Math.max(latest.messageTotal, page.total)\n latest.hasMoreBefore = page.hasMore\n await historyCache.set(cacheScope(state.route.profile), state.route.sessionId, {\n messages: latest.messages, total: latest.messageTotal, savedAt: Date.now(),\n })\n } catch (cause) { const latest = current(); if (latest) latest.error = errorMessage(cause) }\n finally {\n const latest = current()\n if (latest) {\n latest.isLoadingHistory = false\n if ((latest.historySyncRevision ?? 0) !== syncRevision && latest === activeRouteState.value)\n void loadHistory(latest).catch(() => {})\n }\n }\n }\n\n function createSession(profile = auth.activeProfile?.name ?? 'default'): string {\n const id = `draft-${createId('session')}`\n const now = Date.now() / 1000\n sessions.value.unshift({ id, profile, source: 'web', title: '新会话', messageCount: 0, toolCallCount: 0, startedAt: now, updatedAt: now })\n ensureRoute(profile, id)\n activeSessionId.value = id\n activeProfileName.value = profile\n return id\n }\n function clearSelection(): void { activeSessionId.value = undefined }\n\n async function performEnsureRuntime(initialState: ChatRouteState): Promise<ChatRouteState> {\n if (initialState.runtimeSessionId) return initialState\n await connect()\n const initialKey = routeKey(initialState.route.profile, initialState.route.sessionId)\n if (initialState.route.sessionId.startsWith('draft-')) {\n const params: Record<string, JsonValue> = {\n profile: initialState.route.profile, source: 'web', close_on_disconnect: false,\n }\n if (reasoningEffort.value) params.reasoning_effort = reasoningEffort.value\n params.fast = initialState.fastMode ?? false\n const result = resultRecord(await socket.request('session.create', params))\n const runtimeId = string(result.session_id ?? result.sessionId)\n const storedId = string(result.stored_session_id ?? result.storedSessionId ?? result.session_key)\n if (!runtimeId || !storedId) throw new Error('Hermes 未返回新会话标识')\n const migrated = migrateRoute(initialKey, storedId, runtimeId)\n const info = record(result.info)\n const usage = normalizeChatUsage(result)\n if (usage) migrated.usage = { ...migrated.usage, ...usage }\n if (!desiredModelRoutes.has(routeKey(migrated.route.profile, migrated.route.sessionId))) {\n syncSelectedModel(string(result.model ?? info.model), string(result.provider ?? info.provider))\n }\n const liveFastMode = optionalBoolean(result.fast ?? info.fast)\n migrated.serverFastMode = liveFastMode ?? migrated.fastMode ?? false\n if (!migrated.fastModeDirty && liveFastMode !== undefined) migrated.fastMode = liveFastMode\n migrated.fastModeDirty = false\n persistFastMode(migrated)\n return migrated\n }\n const result = resultRecord(await socket.request('session.resume', {\n session_id: initialState.route.sessionId,\n profile: initialState.route.profile,\n source: 'web',\n omit_messages: true,\n }))\n const runtimeId = string(result.session_id ?? result.sessionId)\n if (!runtimeId) throw new Error('Hermes 未返回运行会话标识')\n const storedId = string(result.stored_session_id ?? result.storedSessionId ?? result.session_key, initialState.route.sessionId)\n const migrated = migrateRoute(initialKey, storedId, runtimeId)\n migrated.error = undefined\n const info = record(result.info)\n const usage = normalizeChatUsage(result)\n if (usage) migrated.usage = { ...migrated.usage, ...usage }\n if (!desiredModelRoutes.has(routeKey(migrated.route.profile, migrated.route.sessionId))) {\n syncSelectedModel(string(result.model ?? info.model), string(result.provider ?? info.provider))\n }\n const liveFastMode = optionalBoolean(result.fast ?? info.fast)\n migrated.serverFastMode = liveFastMode\n if (!migrated.fastModeDirty && liveFastMode !== undefined) migrated.fastMode = liveFastMode\n persistFastMode(migrated)\n // session.resume restores the execution route only. The server ingests its\n // snapshot into the canonical turn before clients receive transcript events.\n if (storedId !== initialState.route.sessionId) clearInflightMarker(initialState.route.profile, initialState.route.sessionId)\n updateInflightMarker(migrated)\n return migrated\n }\n\n async function ensureRuntime(initialState: ChatRouteState): Promise<ChatRouteState> {\n if (initialState.runtimeSessionId) return initialState\n const key = routeKey(initialState.route.profile, initialState.route.sessionId)\n const existing = runtimePromises.get(key)\n if (existing) return existing\n let operation: Promise<ChatRouteState>\n // Register the operation before connect can publish ready and re-enter.\n operation = Promise.resolve().then(() => performEnsureRuntime(initialState)).finally(() => {\n if (runtimePromises.get(key) === operation) runtimePromises.delete(key)\n })\n runtimePromises.set(key, operation)\n return operation\n }\n\n function updateDelivery(state: ChatRouteState, clientMessageId: string, patch: Partial<ChatMessage>): void {\n state.messages = state.messages.map(message => message.clientMessageId === clientMessageId || message.id === clientMessageId\n ? { ...message, ...patch, stage: message.stage === 'settled' && patch.stage === 'accepted' ? 'settled' : patch.stage ?? message.stage }\n : message)\n }\n\n async function send(\n text: string,\n files: File[] = [],\n mode: 'submit' | 'queue' | 'steer' = 'submit',\n ): Promise<void> {\n let state = activeRouteState.value\n if (!state) {\n createSession()\n state = activeRouteState.value!\n }\n const trimmed = text.trim()\n if (!trimmed && !files.length) return\n const clientMessageId = createId('message')\n const attachments: ChatAttachment[] = files.map((file, index) => ({\n id: `${clientMessageId}:${index}`, name: file.name, mimeType: file.type || 'application/octet-stream',\n size: file.size, kind: file.type.startsWith('image/') ? 'image' : file.type === 'application/pdf' ? 'pdf' : 'file',\n }))\n const optimistic: ChatMessage = {\n id: clientMessageId, clientMessageId, sessionId: state.route.sessionId, profile: state.route.profile,\n role: 'user', content: trimmed, timestamp: Date.now() / 1000, stage: 'preparing', attachments,\n }\n state.messages = mergeChatMessages(state.messages, [optimistic])\n isSending.value = true\n error.value = undefined\n let submitted = false\n try {\n state = await ensureRuntime(state)\n const runtimeId = state.runtimeSessionId!\n if (!await applyDesiredModel(state)) throw new Error('请先确认模型切换,再重新发送消息')\n if (reasoningEffort.value) {\n await socket.request('config.set', {\n session_id: runtimeId, key: 'reasoning', value: reasoningEffort.value, scope: 'session',\n })\n }\n const desiredFastMode = state.fastMode ?? false\n if (state.serverFastMode !== desiredFastMode) {\n await socket.request('config.set', {\n session_id: runtimeId, key: 'fast', value: desiredFastMode ? 'fast' : 'normal', scope: 'session',\n })\n state.serverFastMode = desiredFastMode\n state.fastModeDirty = false\n persistFastMode(state)\n }\n const parts = trimmed ? [trimmed] : []\n for (const [index, file] of files.entries()) {\n const encoded = await encodeAttachment(file)\n if (encoded.kind === 'image') {\n const result = resultRecord(await socket.request('image.attach_bytes', {\n session_id: runtimeId, content_base64: encoded.base64, filename: encoded.name, ext: encoded.extension,\n }))\n const path = string(result.image_path) || string(result.path) || string(result.ref_path)\n const reference = imageAttachmentReference(path, state.route.profile)\n if (reference) {\n attachments[index] = { ...attachments[index]!, ...reference }\n updateDelivery(state, clientMessageId, { attachments: [...attachments] })\n }\n parts.push([`[用户附加图片:${encoded.name}]`, path ? `@image:${path}` : '', '[screenshot]'].filter(Boolean).join('\\n'))\n } else if (encoded.kind === 'pdf') {\n await socket.request('pdf.attach', { session_id: runtimeId, content_base64: encoded.base64, filename: encoded.name })\n parts.push(`[用户附加 PDF:${encoded.name}]`)\n } else {\n const result = resultRecord(await socket.request('file.attach', {\n session_id: runtimeId, name: encoded.name, data_url: encoded.dataUrl,\n }))\n parts.push(`[用户附加文件:${encoded.name}]${string(result.ref_text) ? `\\n${string(result.ref_text)}` : ''}`)\n }\n }\n updateDelivery(state, clientMessageId, { stage: files.length ? 'attached' : 'pending', sessionId: state.route.sessionId })\n updateDelivery(state, clientMessageId, { stage: 'pending' })\n await outboxCache.set(cacheScope(state.route.profile),state.route.sessionId,state.messages.filter(m=>m.role==='user'&&m.stage!=='settled'),true)\n submitted = true\n const effectiveMode = mode === 'steer' && files.length ? 'queue' : mode\n const method = effectiveMode === 'steer' ? 'session.steer' : 'prompt.submit'\n const result = resultRecord(await socket.request(method, {\n session_id: runtimeId,\n text: parts.join('\\n\\n'),\n ...(effectiveMode === 'queue' ? { queued: true } : {}),\n }, 120_000, `web:prompt:${clientMessageId}`))\n const status = string(result.status, 'accepted').toLowerCase()\n if (effectiveMode === 'steer' && !['accepted', 'queued', 'steered', 'streaming'].includes(status)) {\n throw new RpcError(string(result.error ?? result.message, 'Hermes 拒绝了 Steer 请求'), status)\n }\n updateDelivery(state, clientMessageId, { stage: 'accepted' })\n // A delayed HTTP receipt confirms the input, not a newer execution state.\n // The transcript may already contain the completed reply at this point.\n updateInflightMarker(state)\n // The optimistic row remains local, but the sidebar is refreshed only\n // after a 9119 receipt and keeps the order returned by the server.\n void loadSessions(state.route.profile).catch(() => undefined)\n } catch (cause) {\n const explicitRejection = cause instanceof RpcError\n const stage = submitted && !explicitRejection ? 'unknown-receipt' : 'failed'\n updateDelivery(state, clientMessageId, { stage, error: errorMessage(cause) })\n state.error = errorMessage(cause)\n throw cause\n } finally { isSending.value = false }\n }\n\n async function interrupt(): Promise<void> {\n const state = activeRouteState.value\n if (!state) return\n const current = await ensureRuntime(state)\n await socket.request('session.interrupt', { session_id: current.runtimeSessionId! }, 15_000)\n current.isStreaming = false\n current.isQueued = false\n current.messages = settleChatMessages(current.messages)\n clearInflightMarker(current.route.profile, current.route.sessionId)\n }\n\n async function respondToApproval(requestId: string, approved: boolean | 'once' | 'session' | 'always' | 'deny'): Promise<void> {\n const state = activeRouteState.value\n if (!state) return\n const choice = typeof approved === 'boolean' ? approved ? 'once' : 'deny' : approved\n const modelConfirmation = pendingModelConfirmations.get(requestId)\n if (modelConfirmation) {\n pendingModelConfirmations.delete(requestId)\n const target = routes[modelConfirmation.routeKey]\n if (!target) throw new Error('模型确认请求已失效')\n const modelState = await ensureRuntime(target)\n if (choice === 'deny') {\n desiredModelRoutes.delete(modelConfirmation.routeKey)\n restoreSelectedSessionModel(modelConfirmation.routeKey)\n } else {\n try {\n if (await configureModel(modelState, modelConfirmation.model, true)) {\n desiredModelRoutes.delete(modelConfirmation.routeKey)\n }\n } catch (cause) {\n desiredModelRoutes.delete(modelConfirmation.routeKey)\n restoreSelectedSessionModel(modelConfirmation.routeKey)\n throw cause\n }\n }\n return\n }\n if (state.pendingApproval?.id !== requestId) return\n const current = await ensureRuntime(state)\n await socket.request('approval.respond', { session_id: current.runtimeSessionId!, choice })\n if (current.pendingApproval?.id === requestId) current.pendingApproval = undefined\n }\n\n async function respondToClarification(requestId: string, response: string): Promise<void> {\n const state = activeRouteState.value\n if (!state) return\n const current = await ensureRuntime(state)\n await socket.request('clarify.respond', { session_id: current.runtimeSessionId!, request_id: requestId, answer: response })\n if (current.pendingClarification?.id === requestId) current.pendingClarification = undefined\n }\n\n async function branchSession(): Promise<string | undefined> {\n const state = activeRouteState.value\n if (!state) return\n const current = await ensureRuntime(state)\n const result = resultRecord(await socket.request('session.branch', { session_id: current.runtimeSessionId! }))\n const runtimeId = string(result.session_id ?? result.sessionId)\n const storedId = string(result.stored_session_id ?? result.storedSessionId)\n if (!runtimeId || !storedId) throw new Error('Hermes 未返回分支会话标识')\n const next = emptyRoute(current.route.profile, storedId)\n next.runtimeSessionId = runtimeId\n routes[routeKey(current.route.profile, storedId)] = next\n runtimeRoutes.set(runtimeId, routeKey(current.route.profile, storedId))\n activeSessionId.value = storedId\n activeProfileName.value = current.route.profile\n // The branch was created by 9119, but its position remains server-owned.\n void loadSessions(current.route.profile).catch(() => undefined)\n return storedId\n }\n\n async function renameSession(id: string, title: string, profile?: string): Promise<void> {\n await updateSession(id, { title }, profile)\n await loadSessions(profile)\n }\n\n async function setSessionPinned(id: string, pinned: boolean, profile?: string): Promise<void> {\n await updateSession(id, { pinned }, profile)\n await loadSessions(profile)\n }\n\n async function removeSession(id: string, profile?: string): Promise<void> {\n if (!id.startsWith('draft-')) await deleteSessionApi(id, profile)\n sessions.value = sessions.value.filter(session => session.id !== id || (profile && session.profile !== profile))\n if (activeSessionId.value === id && (!profile || activeProfileName.value === profile)) {\n activeSessionId.value = undefined\n activeProfileName.value = undefined\n }\n }\n\n async function loadModels(profile = auth.activeProfile?.name): Promise<void> {\n const loadGeneration = ++modelLoadGeneration\n const loaded = await getModels(profile)\n if (loadGeneration !== modelLoadGeneration || (profile && auth.activeProfile?.name !== profile)) return\n models.value = loaded\n selectedModel.value = modelForSession(models.value, activeSession.value?.model, activeSession.value?.provider)\n ?? models.value.find(model => model.isDefault) ?? models.value[0]\n }\n\n async function refreshActiveSessionModel(): Promise<void> {\n const state = activeRouteState.value\n if (!state || state.route.sessionId.startsWith('draft-')) return\n const expectedKey = routeKey(state.route.profile, state.route.sessionId)\n const refreshed = await getSession(state.route.sessionId, state.route.profile)\n const current = activeRouteState.value\n if (!current || routeKey(current.route.profile, current.route.sessionId) !== expectedKey || !refreshed.model) return\n reconcileSessionModel(current.route.profile, current.route.sessionId, refreshed.model, refreshed.provider)\n }\n\n async function configureModel(state: ChatRouteState, model: ModelOption, confirmsExpensiveModel: boolean): Promise<boolean> {\n const result = resultRecord(await socket.request('config.set', {\n session_id: state.runtimeSessionId!,\n key: 'model',\n value: `${model.id} --provider ${model.provider} --session`,\n ...(confirmsExpensiveModel ? { confirm_expensive_model: true } : {}),\n }))\n if (bool(result.confirm_required ?? result.confirmRequired)) {\n const requestId = createId('expensive-model')\n const approval: ApprovalRequest = {\n id: requestId,\n sessionId: state.route.sessionId,\n message: string(result.confirm_message ?? result.confirmMessage ?? result.warning, '此模型可能产生较高费用,请确认后使用。'),\n choices: ['once', 'deny'],\n payload: result as Record<string, JsonValue>,\n }\n pendingModelConfirmations.set(requestId, { routeKey: routeKey(state.route.profile, state.route.sessionId), model, approval })\n return false\n }\n // Match iOS: switching a model invalidates the cached fast-mode server\n // state, so the desired mode is re-applied before the next prompt.\n state.serverFastMode = undefined\n return true\n }\n\n async function applyDesiredModel(state: ChatRouteState): Promise<boolean> {\n const key = routeKey(state.route.profile, state.route.sessionId)\n if (!desiredModelRoutes.has(key) || !selectedModel.value || !state.runtimeSessionId) return true\n if ([...pendingModelConfirmations.values()].some(value => value.routeKey === key)) return false\n const applied = await configureModel(state, selectedModel.value, false)\n if (applied) desiredModelRoutes.delete(key)\n return applied\n }\n\n async function setModel(model: ModelOption): Promise<void> {\n selectedModel.value = model\n const state = activeRouteState.value\n if (!state) return\n const key = routeKey(state.route.profile, state.route.sessionId)\n for (const [id, pending] of pendingModelConfirmations) {\n if (pending.routeKey === key) pendingModelConfirmations.delete(id)\n }\n desiredModelRoutes.add(key)\n if (!state.runtimeSessionId) return\n try {\n if (await configureModel(state, model, false)) desiredModelRoutes.delete(key)\n } catch (cause) {\n desiredModelRoutes.delete(key)\n restoreSelectedSessionModel(key)\n throw cause\n }\n }\n\n async function setFastMode(enabled: boolean): Promise<void> {\n const state = activeRouteState.value\n if (!state) return\n const previous = state.fastMode ?? false\n state.fastMode = enabled\n state.fastModeDirty = true\n persistFastMode(state)\n if (!state.runtimeSessionId || state.isStreaming || !['connected', 'ready'].includes(connectionState.value)) return\n try {\n await socket.request('config.set', {\n session_id: state.runtimeSessionId, key: 'fast', value: enabled ? 'fast' : 'normal', scope: 'session',\n })\n state.serverFastMode = enabled\n state.fastModeDirty = false\n } catch (cause) {\n state.fastMode = previous\n state.fastModeDirty = false\n persistFastMode(state)\n error.value = `快速模式未同步:${errorMessage(cause)}`\n throw cause\n }\n }\n\n async function refreshContextUsage(initialState = activeRouteState.value): Promise<void> {\n // Opening history is read-only. Resuming an old session merely to fetch\n // usage updates Hermes' last_active timestamp and incorrectly moves it\n // into today's sidebar group.\n if (!initialState || initialState.route.sessionId.startsWith('draft-') || !initialState.runtimeSessionId || initialState.isStreaming) return\n const key = routeKey(initialState.route.profile, initialState.route.sessionId)\n const runtimeId = initialState.runtimeSessionId\n const generation = initialState.generation\n const previousUsage = initialState.usage\n const request = (contextUsageRequests.get(key) ?? 0) + 1\n contextUsageRequests.set(key, request)\n // Use the same source order as mobile. Breakdown can supply the gauge when\n // session.usage only contains cumulative billing counters.\n const results = await Promise.allSettled([\n socket.request('session.usage', { session_id: runtimeId }, 15_000),\n socket.request('session.context_breakdown', { session_id: runtimeId }, 15_000),\n ])\n const current = routes[key]\n if (!current || current.generation !== generation || current.runtimeSessionId !== runtimeId\n || current.usage !== previousUsage || contextUsageRequests.get(key) !== request) return\n const usage = normalizeChatUsage(...results.flatMap(result => result.status === 'fulfilled' ? [result.value] : []))\n if (usage) current.usage = { ...current.usage, ...usage }\n }\n\n return {\n sessions, activeSessionId, activeProfileName, activeSession, routes, activeRouteState, messages,\n connectionState, historySynced, hasMoreBefore, isLoading, isLoadingMoreSessions, hasMoreSessions, isSending, isStreaming, isQueued,\n error, models, selectedModel, reasoningEffort, fastMode, contextUsage, pendingApproval, pendingClarification, unreadCounts,\n loadSessions, loadMoreSessions, selectSession, loadOlder, forceRefreshHistory, createSession, clearSelection, connect, disconnect, send, interrupt,\n respondToApproval, respondToClarification, branchSession, renameSession, setSessionPinned, removeSession,\n loadModels, setModel, setFastMode, refreshActiveSessionModel, refreshContextUsage, loadUnread, markRead, switchProfile,\n }\n})\n","import type { JsonValue } from '@shared/types'\nimport { apiRequest, apiUrl, unwrapData } from './client'\n\nconst BASE = '/api/app/kanban'\n\nexport interface KanbanStatus {\n available: boolean\n version?: string\n reason?: string\n}\n\nexport interface KanbanBoardMeta {\n slug: string\n name?: string | null\n description?: string | null\n icon?: string | null\n color?: string | null\n total?: number\n counts?: Record<string, number>\n is_current?: boolean\n default_workdir?: string | null\n default_workspace_kind?: string | null\n project_id?: string | null\n project_name?: string | null\n}\n\nexport interface KanbanBoardsResponse {\n boards: KanbanBoardMeta[]\n current: string\n}\n\nexport interface KanbanTask {\n id: string\n title: string\n body?: string | null\n result?: string | null\n status: string\n assignee?: string | null\n tenant?: string | null\n priority?: number\n created_by?: string | null\n created_at?: number\n started_at?: number | null\n completed_at?: number | null\n latest_summary?: string | null\n comment_count?: number\n model_override?: string | null\n provider_override?: string | null\n reasoning_effort?: string | null\n workspace_kind?: string | null\n workspace_path?: string | null\n branch_name?: string | null\n link_counts?: { parents: number; children: number }\n progress?: { done: number; total: number } | null\n warnings?: { count: number; highest_severity?: string | null } | null\n diagnostics?: KanbanDiagnostic[]\n}\n\nexport interface KanbanColumn {\n name: string\n tasks: KanbanTask[]\n}\n\nexport interface KanbanBoardSnapshot {\n columns: KanbanColumn[]\n tenants: string[]\n assignees: string[]\n latest_event_id: number\n now: number\n}\n\nexport interface KanbanProfile {\n name: string\n is_default: boolean\n description?: string\n description_auto?: boolean\n model?: string\n provider?: string\n}\n\nexport interface KanbanComment {\n id: string | number\n task_id?: string\n author: string\n body: string\n created_at: number\n}\n\nexport interface KanbanEvent {\n id: number\n task_id?: string\n run_id?: string | number | null\n kind: string\n payload?: JsonValue | string | null\n created_at: number\n}\n\nexport interface KanbanRun {\n id: string | number\n task_id?: string\n profile?: string | null\n status: string\n outcome?: string | null\n summary?: string | null\n error?: string | null\n metadata?: JsonValue | string | null\n worker_pid?: number | null\n started_at?: number | null\n ended_at?: number | null\n last_heartbeat_at?: number | null\n}\n\nexport interface KanbanDiagnostic {\n kind: string\n severity: 'warning' | 'error' | 'critical' | string\n title: string\n detail: string\n count?: number\n last_seen_at?: number\n}\n\nexport interface KanbanTaskDetail {\n task: KanbanTask\n comments: KanbanComment[]\n events: KanbanEvent[]\n links: { parents: string[]; children: string[] }\n child_results?: Array<{ id: string; title: string; status: string; latest_summary?: string | null; result?: string | null }>\n runs: KanbanRun[]\n}\n\nexport interface CreateKanbanBoardInput {\n slug: string\n name?: string\n description?: string\n}\n\nexport interface CreateKanbanTaskInput {\n title: string\n body?: string\n assignee?: string\n tenant?: string\n priority?: number\n workspace_kind?: 'scratch' | 'worktree' | 'dir'\n workspace_path?: string\n parents?: string[]\n triage?: boolean\n}\n\nexport type UpdateKanbanTaskInput = Partial<Pick<KanbanTask,\n 'title' | 'body' | 'assignee' | 'priority' | 'result' | 'model_override' | 'provider_override' | 'reasoning_effort'>> & {\n status?: string\n block_reason?: string\n summary?: string\n clear_model_override?: boolean\n clear_reasoning_effort?: boolean\n}\n\nfunction boardPath(path: string, board: string, query: Record<string, string | number | boolean | undefined> = {}): string {\n return apiUrl(`${BASE}${path}`, { ...query, board })\n}\n\nexport async function getKanbanStatus(): Promise<KanbanStatus> {\n return unwrapData(await apiRequest<KanbanStatus>(`${BASE}/status`))\n}\n\nexport async function listKanbanBoards(): Promise<KanbanBoardsResponse> {\n return unwrapData(await apiRequest<KanbanBoardsResponse>(`${BASE}/boards`))\n}\n\nexport async function createKanbanBoard(input: CreateKanbanBoardInput): Promise<{ board: KanbanBoardMeta; current: string }> {\n return unwrapData(await apiRequest(`${BASE}/boards`, {\n method: 'POST',\n body: { ...input, switch: false },\n }))\n}\n\nexport async function getKanbanBoard(board: string, includeArchived = false): Promise<KanbanBoardSnapshot> {\n return unwrapData(await apiRequest<KanbanBoardSnapshot>(boardPath('/board', board, {\n include_archived: includeArchived,\n })))\n}\n\nexport async function listKanbanProfiles(): Promise<KanbanProfile[]> {\n const payload = unwrapData(await apiRequest<{ profiles: KanbanProfile[] }>(`${BASE}/profiles`))\n return Array.isArray(payload.profiles) ? payload.profiles : []\n}\n\nexport async function getKanbanTask(board: string, id: string): Promise<KanbanTaskDetail> {\n return unwrapData(await apiRequest<KanbanTaskDetail>(boardPath(`/tasks/${encodeURIComponent(id)}`, board)))\n}\n\nexport async function createKanbanTask(board: string, input: CreateKanbanTaskInput): Promise<{ task: KanbanTask | null; warning?: string }> {\n return unwrapData(await apiRequest(boardPath('/tasks', board), {\n method: 'POST', body: input as unknown as JsonValue,\n }))\n}\n\nexport async function updateKanbanTask(board: string, id: string, input: UpdateKanbanTaskInput): Promise<{ task: KanbanTask | null }> {\n return unwrapData(await apiRequest(boardPath(`/tasks/${encodeURIComponent(id)}`, board), {\n method: 'PATCH', body: input as unknown as JsonValue,\n }))\n}\n\nexport async function deleteKanbanTask(board: string, id: string): Promise<void> {\n await apiRequest(boardPath(`/tasks/${encodeURIComponent(id)}`, board), { method: 'DELETE', body: {} })\n}\n\nexport async function addKanbanComment(board: string, id: string, comment: { body: string }): Promise<void> {\n await apiRequest(boardPath(`/tasks/${encodeURIComponent(id)}/comments`, board), {\n method: 'POST', body: comment,\n })\n}\n\nexport async function dispatchKanban(board: string): Promise<unknown> {\n return unwrapData(await apiRequest(boardPath('/dispatch', board), { method: 'POST', body: {} }))\n}\n","import { computed, ref, shallowRef, watch } from 'vue'\nimport { defineStore } from 'pinia'\nimport {\n addKanbanComment,\n createKanbanBoard as createBoardApi,\n createKanbanTask as createTaskApi,\n deleteKanbanTask as deleteTaskApi,\n dispatchKanban,\n getKanbanBoard,\n getKanbanStatus,\n getKanbanTask,\n listKanbanBoards,\n listKanbanProfiles,\n updateKanbanTask,\n type CreateKanbanBoardInput,\n type CreateKanbanTaskInput,\n type KanbanBoardMeta,\n type KanbanBoardSnapshot,\n type KanbanProfile,\n type KanbanTask,\n type KanbanTaskDetail,\n type UpdateKanbanTaskInput,\n} from '@/api/kanban'\nimport { ApiError } from '@/api/client'\nimport { useAuthStore } from './auth'\n\nexport type KanbanAvailability = 'checking' | 'available' | 'unsupported' | 'unavailable'\n\nconst BOARD_SELECTION_PREFIX = 'hermes-yaoyao:kanban-board:'\nconst POLL_INTERVAL_MS = 5_000\nconst MUTABLE_STATUSES = new Set(['triage', 'todo', 'ready', 'blocked', 'done'])\n\nfunction errorMessage(cause: unknown): string {\n return cause instanceof Error ? cause.message : '看板请求失败'\n}\n\nexport const useKanbanStore = defineStore('kanban', () => {\n const auth = useAuthStore()\n const availability = ref<KanbanAvailability>('checking')\n const pluginVersion = ref('')\n const boards = ref<KanbanBoardMeta[]>([])\n const currentBoardSlug = ref('')\n const selectedBoardSlug = ref('')\n const snapshot = shallowRef<KanbanBoardSnapshot>()\n const profiles = ref<KanbanProfile[]>([])\n const selectedTaskId = ref('')\n const selectedTask = shallowRef<KanbanTaskDetail>()\n const includeArchived = ref(false)\n const search = ref('')\n const assignee = ref('')\n const tenant = ref('')\n const isLoading = ref(false)\n const isTaskLoading = ref(false)\n const isMutating = ref(false)\n const error = ref('')\n const taskError = ref('')\n const lastUpdatedAt = ref(0)\n\n let pollTimer: number | undefined\n let generation = 0\n let boardRefresh: Promise<void> | undefined\n let boardRefreshGeneration = -1\n let boardRequestRevision = 0\n let taskRequestRevision = 0\n\n const canEdit = computed(() => auth.user?.role === 'admin')\n const selectedBoard = computed(() => boards.value.find(board => board.slug === selectedBoardSlug.value))\n const allTasks = computed(() => snapshot.value?.columns.flatMap(column => column.tasks) ?? [])\n const filteredColumns = computed(() => {\n const needle = search.value.trim().toLocaleLowerCase()\n return (snapshot.value?.columns ?? []).map(column => ({\n ...column,\n tasks: column.tasks.filter(task => (\n (!needle || `${task.title} ${task.body ?? ''} ${task.latest_summary ?? ''} ${task.id}`.toLocaleLowerCase().includes(needle))\n && (!assignee.value || task.assignee === assignee.value)\n && (!tenant.value || task.tenant === tenant.value)\n )),\n }))\n })\n\n function selectionKey(): string {\n return `${BOARD_SELECTION_PREFIX}${auth.user?.id || 'local'}`\n }\n\n function persistedSelection(): string {\n try { return localStorage.getItem(selectionKey())?.trim() ?? '' } catch { return '' }\n }\n\n function persistSelection(value: string): void {\n try { localStorage.setItem(selectionKey(), value) } catch { /* optional persistence */ }\n }\n\n function requireEditor(): void {\n if (!canEdit.value) throw new ApiError('看板编辑仅限管理员', 403, 'admin_required')\n }\n\n function requireMutableStatus(status: string): void {\n if (!MUTABLE_STATUSES.has(status)) {\n throw new ApiError('该状态由 Kanban 系统维护,客户端不能直接写入', 400, 'invalid_kanban_status')\n }\n }\n\n function cancelledMutation(): ApiError {\n return new ApiError('账号或看板上下文已变化,请重试', 0, 'REQUEST_ABORTED')\n }\n\n async function initialize(): Promise<void> {\n const expected = ++generation\n stopPolling()\n availability.value = 'checking'\n isLoading.value = true\n error.value = ''\n try {\n const status = await getKanbanStatus()\n if (expected !== generation) return\n pluginVersion.value = status.version || ''\n if (!status.available) {\n availability.value = 'unsupported'\n error.value = status.reason || '9119 尚未安装或启用 Kanban 插件'\n boards.value = []\n snapshot.value = undefined\n return\n }\n const [boardResult, profileResult] = await Promise.all([\n listKanbanBoards(),\n listKanbanProfiles(),\n ])\n if (expected !== generation) return\n availability.value = 'available'\n boards.value = boardResult.boards\n profiles.value = profileResult\n currentBoardSlug.value = boardResult.current\n const remembered = persistedSelection()\n selectedBoardSlug.value = boards.value.some(board => board.slug === remembered)\n ? remembered\n : boards.value.some(board => board.slug === boardResult.current)\n ? boardResult.current\n : boards.value[0]?.slug || ''\n if (selectedBoardSlug.value) await refreshBoard(false, true)\n if (expected !== generation) return\n startPolling()\n } catch (cause) {\n if (expected !== generation) return\n availability.value = 'unavailable'\n error.value = errorMessage(cause)\n } finally {\n if (expected === generation) isLoading.value = false\n }\n }\n\n async function refreshBoards(): Promise<void> {\n const expected = generation\n const result = await listKanbanBoards()\n if (expected !== generation) return\n boards.value = result.boards\n currentBoardSlug.value = result.current\n if (!boards.value.some(board => board.slug === selectedBoardSlug.value)) {\n selectedBoardSlug.value = boards.value.some(board => board.slug === result.current)\n ? result.current : boards.value[0]?.slug || ''\n }\n }\n\n async function refreshBoard(silent = false, forceAfterPending = false): Promise<void> {\n if (boardRefresh && boardRefreshGeneration === generation) {\n if (!forceAfterPending) return boardRefresh\n await boardRefresh\n }\n const slug = selectedBoardSlug.value\n if (!slug) return\n const expected = generation\n const revision = ++boardRequestRevision\n if (!silent) isLoading.value = true\n const operation = (async () => {\n try {\n const next = await getKanbanBoard(slug, includeArchived.value)\n if (expected !== generation || revision !== boardRequestRevision || selectedBoardSlug.value !== slug) return\n snapshot.value = next\n lastUpdatedAt.value = Date.now()\n error.value = ''\n } catch (cause) {\n if (expected === generation && revision === boardRequestRevision\n && selectedBoardSlug.value === slug) error.value = errorMessage(cause)\n } finally {\n if (!silent && expected === generation) isLoading.value = false\n }\n })()\n let tracked: Promise<void>\n tracked = operation.finally(() => {\n if (boardRefresh === tracked) {\n boardRefresh = undefined\n boardRefreshGeneration = -1\n }\n })\n boardRefresh = tracked\n boardRefreshGeneration = expected\n return tracked\n }\n\n async function selectBoard(slug: string): Promise<void> {\n if (slug === selectedBoardSlug.value || !boards.value.some(board => board.slug === slug)) return\n selectedBoardSlug.value = slug\n selectedTaskId.value = ''\n selectedTask.value = undefined\n taskError.value = ''\n snapshot.value = undefined\n persistSelection(slug)\n await refreshBoard(false, true)\n }\n\n async function selectTask(id: string): Promise<void> {\n selectedTaskId.value = id\n selectedTask.value = undefined\n taskError.value = ''\n await refreshTask(false)\n }\n\n function closeTask(): void {\n taskRequestRevision += 1\n selectedTaskId.value = ''\n selectedTask.value = undefined\n taskError.value = ''\n }\n\n async function refreshTask(silent = true): Promise<void> {\n const id = selectedTaskId.value\n const slug = selectedBoardSlug.value\n if (!id || !slug) return\n const expected = generation\n const revision = ++taskRequestRevision\n if (!silent) isTaskLoading.value = true\n try {\n const detail = await getKanbanTask(slug, id)\n if (expected !== generation || revision !== taskRequestRevision\n || selectedTaskId.value !== id || selectedBoardSlug.value !== slug) return\n selectedTask.value = detail\n taskError.value = ''\n } catch (cause) {\n if (expected === generation && revision === taskRequestRevision\n && selectedTaskId.value === id) taskError.value = errorMessage(cause)\n } finally {\n if (expected === generation && revision === taskRequestRevision) isTaskLoading.value = false\n }\n }\n\n async function authoritativeRefresh(taskId = selectedTaskId.value): Promise<void> {\n await Promise.all([\n refreshBoard(true, true),\n taskId && taskId === selectedTaskId.value ? refreshTask(true) : Promise.resolve(),\n ])\n }\n\n async function withMutation<T>(\n run: () => Promise<T>,\n taskId = selectedTaskId.value,\n allowBoardChange = false,\n ): Promise<T> {\n requireEditor()\n const expected = generation\n const expectedBoard = selectedBoardSlug.value\n isMutating.value = true\n error.value = ''\n try {\n const result = await run()\n if (expected !== generation || (!allowBoardChange && selectedBoardSlug.value !== expectedBoard)) {\n throw cancelledMutation()\n }\n boardRequestRevision += 1\n taskRequestRevision += 1\n await authoritativeRefresh(taskId)\n if (expected !== generation || (!allowBoardChange && selectedBoardSlug.value !== expectedBoard)) {\n throw cancelledMutation()\n }\n return result\n } catch (cause) {\n if (expected === generation && !(cause instanceof ApiError && cause.code === 'REQUEST_ABORTED')) {\n error.value = errorMessage(cause)\n }\n throw cause\n } finally {\n if (expected === generation) isMutating.value = false\n }\n }\n\n async function createBoard(input: CreateKanbanBoardInput): Promise<KanbanBoardMeta> {\n const expected = generation\n return withMutation(async () => {\n const result = await createBoardApi(input)\n if (expected !== generation) throw cancelledMutation()\n await refreshBoards()\n if (expected !== generation) throw cancelledMutation()\n selectedBoardSlug.value = result.board.slug\n persistSelection(result.board.slug)\n const nextSnapshot = await getKanbanBoard(result.board.slug, includeArchived.value)\n if (expected !== generation) throw cancelledMutation()\n snapshot.value = nextSnapshot\n return result.board\n }, '', true)\n }\n\n async function createTask(input: CreateKanbanTaskInput, targetStatus = 'ready'): Promise<KanbanTask | null> {\n requireMutableStatus(targetStatus)\n const slug = selectedBoardSlug.value\n if (!slug) throw new Error('尚未选择看板')\n return withMutation(async () => {\n const created = await createTaskApi(slug, { ...input, triage: targetStatus === 'triage' })\n if (created.task && created.task.status !== targetStatus) {\n const moved = await updateKanbanTask(slug, created.task.id, { status: targetStatus })\n return moved.task\n }\n return created.task\n }, '')\n }\n\n async function moveTask(task: KanbanTask, status: string): Promise<void> {\n if (status === task.status) return\n requireMutableStatus(status)\n const slug = selectedBoardSlug.value\n await withMutation(async () => {\n await updateKanbanTask(slug, task.id, { status })\n }, task.id)\n }\n\n async function updateTask(input: UpdateKanbanTaskInput): Promise<void> {\n if (input.status !== undefined) requireMutableStatus(input.status)\n const id = selectedTaskId.value\n const slug = selectedBoardSlug.value\n if (!id || !slug) return\n await withMutation(async () => { await updateKanbanTask(slug, id, input) }, id)\n }\n\n async function deleteTask(id = selectedTaskId.value): Promise<void> {\n const slug = selectedBoardSlug.value\n if (!id || !slug) return\n await withMutation(async () => { await deleteTaskApi(slug, id) }, '')\n if (selectedTaskId.value === id) closeTask()\n }\n\n async function comment(body: string): Promise<void> {\n const id = selectedTaskId.value\n const slug = selectedBoardSlug.value\n if (!id || !slug || !body.trim()) return\n await withMutation(async () => {\n await addKanbanComment(slug, id, {\n body: body.trim(),\n })\n }, id)\n }\n\n async function dispatch(): Promise<unknown> {\n const slug = selectedBoardSlug.value\n if (!slug) return\n return withMutation(() => dispatchKanban(slug), selectedTaskId.value)\n }\n\n async function setIncludeArchived(value: boolean): Promise<void> {\n includeArchived.value = value\n await refreshBoard(false, true)\n }\n\n function startPolling(): void {\n stopPolling()\n pollTimer = window.setInterval(() => {\n if (availability.value !== 'available' || document.visibilityState === 'hidden') return\n void refreshBoard(true)\n if (selectedTaskId.value) void refreshTask(true)\n }, POLL_INTERVAL_MS)\n }\n\n function stopPolling(): void {\n if (pollTimer !== undefined) window.clearInterval(pollTimer)\n pollTimer = undefined\n }\n\n function reset(): void {\n generation += 1\n boardRequestRevision += 1\n taskRequestRevision += 1\n stopPolling()\n availability.value = 'checking'\n pluginVersion.value = ''\n boards.value = []\n currentBoardSlug.value = ''\n selectedBoardSlug.value = ''\n snapshot.value = undefined\n profiles.value = []\n selectedTaskId.value = ''\n selectedTask.value = undefined\n includeArchived.value = false\n search.value = ''\n assignee.value = ''\n tenant.value = ''\n isLoading.value = false\n isTaskLoading.value = false\n isMutating.value = false\n error.value = ''\n taskError.value = ''\n lastUpdatedAt.value = 0\n }\n\n watch(\n () => `${auth.isAuthenticated ? 'authenticated' : 'anonymous'}:${auth.user?.id || ''}`,\n (identity, previous) => { if (identity !== previous) reset() },\n )\n\n return {\n availability, pluginVersion, boards, currentBoardSlug, selectedBoardSlug, selectedBoard, snapshot, profiles,\n selectedTaskId, selectedTask, includeArchived, search, assignee, tenant, isLoading, isTaskLoading, isMutating,\n error, taskError, lastUpdatedAt, canEdit, allTasks, filteredColumns,\n initialize, refreshBoards, refreshBoard, selectBoard, selectTask, closeTask, refreshTask, createBoard, createTask,\n moveTask, updateTask, deleteTask, comment, dispatch, setIncludeArchived, startPolling, stopPolling, reset,\n }\n})\n","// Generated by hermes-yaoyao/scripts/generate-laoa-avatars.mjs. Do not hand-edit.\n// LaoA-GrokBot 527c3b5746bed34da3a6d4f9747e483c84534a41 (MIT); legacy bodies OpenMausBot (Apache-2.0).\nexport const LAOA_DATA = {\"source\":{\"project\":\"LaoA-GrokBot\",\"commit\":\"527c3b5746bed34da3a6d4f9747e483c84534a41\",\"license\":\"MIT\"},\"faceBox\":228.541,\"shapes\":{\"circle\":{\"path\":\"M228.541 114.228 C228.541 130.133 225.184 145.994 218.738 160.534 C212.674 174.217 203.904 186.669 193.065 196.988 C155.933 232.34 99.497 238.596 55.5255 212.24 C45.097 205.99 35.6851 198.072 27.7451 188.866 C19.1926 178.953 12.3686 167.569 7.65781 155.351 C2.60712 142.264 0 128.257 0 114.228 C0 98.3219 3.35751 82.4611 9.80315 67.9215 C15.8672 54.2382 24.6377 41.7862 35.4767 31.4668 C72.6081 -3.88483 129.044 -10.1413 173.016 16.2153 C183.444 22.4653 192.856 30.3829 200.796 39.5896 C209.349 49.5018 216.173 60.8859 220.883 73.1037 C225.934 86.1906 228.541 100.198 228.541 114.228 Z\",\"bounds\":[0,-0.000018,228.541,228.455006],\"viewport\":[0,-0.043015,228.541,228.541],\"anchor\":[120,122.5,1]},\"square\":{\"path\":\"M55 10 C55 10 174 10 174 10 C204 10 219 25 219 55 C219 55 219 174 219 174 C219 204 204 219 174 219 C174 219 55 219 55 219 C25 219 10 204 10 174 C10 174 10 55 10 55 C10 25 25 10 55 10 Z\",\"bounds\":[10,10,209,209],\"viewport\":[10,10,209,209],\"anchor\":[120,122.5,1]},\"triangle\":{\"path\":\"M114 9 C119.333333 9 124 13 128 21 C128 21 220 194 220 194 C224.666667 204.666667 220.333333 210 207 210 C207 210 21 210 21 210 C7.666667 210 3.666667 204.666667 9 194 C9 194 101 21 101 21 C104.333333 13 108.666667 9 114 9 Z\",\"bounds\":[6.714286,9,215.100529,201],\"viewport\":[6.714286,1.949736,215.100529,215.100529],\"anchor\":[114.2705,135,0.648232]},\"capsule\":{\"path\":\"M61 31 C61 31 168 31 168 31 C202 31 220 65 220 114 C220 163 202 197 168 197 C168 197 61 197 61 197 C27 197 9 163 9 114 C9 65 27 31 61 31 Z\",\"bounds\":[9,31,211,166],\"viewport\":[9,8.5,211,211],\"anchor\":[120,122.5,0.857243]},\"hexagon\":{\"path\":\"M114 5 C114 5 207 58 207 58 C214.333333 62 218 68.666667 218 78 C218 78 218 153 218 153 C218 162.333333 214.333333 169 207 173 C207 173 128 218 128 218 C118.666667 223.333333 109.333333 223.333333 100 218 C100 218 21 173 21 173 C13.666667 169 10 162.333333 10 153 C10 153 10 78 10 78 C10 68.666667 13.666667 62 21 58 C21 58 100 12 100 12 C109.333333 7.333333 114 5 114 5 Z\",\"bounds\":[10,5,208,217],\"viewport\":[5.5,5,217,217],\"anchor\":[120,122.5,0.903046]},\"cloud\":{\"path\":\"M55 188 C21 188 6 169 12 142 C-1 113 20 86 51 84 C61 48 96 35 124 55 C151 28 195 46 195 82 C226 91 235 128 213 149 C214 174 193 190 165 188 Z\",\"bounds\":[8.084666,42,217.061825,146.168243],\"viewport\":[8.084666,6.553209,217.061825,217.061825],\"anchor\":[114.2705,125,0.723114]},\"droplet\":{\"path\":\"M114 5 C137 42 202 103 202 151 C202 196 165 222 114 222 C63 222 26 196 26 151 C26 103 91 42 114 5 Z\",\"bounds\":[26,5,176,217],\"viewport\":[5.5,5,217,217],\"anchor\":[114.2705,140,0.799557]},\"ellipse\":{\"path\":\"M222.2705 114.2705 C222.2705 162.87156 173.91726 202.2705 114.2705 202.2705 C54.62374 202.2705 6.2705 162.87156 6.2705 114.2705 C6.2705 65.66944 54.62374 26.2705 114.2705 26.2705 C173.91726 26.2705 222.2705 65.66944 222.2705 114.2705 Z\",\"bounds\":[6.2705,26.2705,216,176],\"viewport\":[6.2705,6.2705,216,216],\"anchor\":[120,122.5,0.849079]}},\"bodies\":{\"cursor\":{\"path\":\"M68.1612 9.8302 C68.831234 10.393712 69.501706 10.956705 70.172633 11.519154 C71.473231 12.612873 72.76878 13.712192 74.06094 14.815863 C76.21486 16.652222 78.406422 18.440939 80.600998 20.228405 C83.254447 22.393239 85.896206 24.572195 88.538851 26.750193 C90.735631 28.560646 92.933229 30.37007 95.133429 32.176365 C99.342117 35.633384 103.532995 39.10744 107.680527 42.637645 C109.992566 44.600401 112.351114 46.496137 114.728083 48.37919 C116.894556 50.12803 119.009216 51.935729 121.128942 53.740692 C123.047682 55.370493 124.985481 56.967974 126.959082 58.531476 C129.61943 60.639025 132.205397 62.825128 134.789056 65.025134 C136.707796 66.654935 138.645595 68.252416 140.619196 69.815918 C142.936319 71.651561 145.198846 73.542032 147.449253 75.458139 C150.11596 77.727456 152.814417 79.944432 155.557626 82.121157 C161.253424 86.684046 166.859244 91.359265 172.416574 96.089395 C174.728943 98.052453 177.087826 99.948479 179.465145 101.83181 C181.631618 103.58065 183.746278 105.388349 185.866004 107.193312 C187.784744 108.823113 189.722543 110.420594 191.696144 111.984096 C208.585019 125.429073 208.585019 125.429073 209.674343 134.041422 C210.226056 141.247584 209.259036 147.105107 204.76234 152.964438 C200.997198 157.019206 196.301874 160.965349 190.536607 161.358328 C190.12914 161.360617 189.721672 161.362907 189.301858 161.365266 C188.830866 161.369363 188.359874 161.37346 187.874609 161.377681 C187.107301 161.380009 187.107301 161.380009 186.324492 161.382385 C185.78139 161.386356 185.238289 161.390328 184.67873 161.39442 C183.499146 161.402761 182.319553 161.409826 181.139955 161.41577 C179.26633 161.425543 177.392774 161.439348 175.519183 161.454313 C170.191725 161.496252 164.864237 161.531864 159.536702 161.562474 C156.276035 161.581492 153.015446 161.606046 149.754843 161.63386 C148.518472 161.6433 147.282083 161.650652 146.045687 161.65578 C130.20765 161.722366 116.122166 163.77051 104.110929 175.187933 C101.273668 178.121188 98.933382 181.49907 96.535284 184.790091 C94.662461 187.338038 92.727917 189.838936 90.804324 192.348625 C87.653746 196.478727 84.525937 200.625264 81.412995 204.783783 C80.679154 205.76131 79.945264 206.738801 79.211323 207.716254 C77.794563 209.603742 76.386941 211.497599 74.984297 213.395594 C69.969699 220.137131 65.038901 226.744542 56.28284 228.392024 C48.307097 228.902538 41.854814 228.332827 35.49571 222.995722 C30.438415 218.155733 27.895411 212.353431 27.550951 205.403539 C27.516173 204.72367 27.481395 204.043802 27.445563 203.343331 C27.409792 202.59961 27.374022 201.855889 27.337167 201.089631 C27.297125 200.290022 27.256889 199.490422 27.216475 198.690832 C27.106207 196.497924 26.998722 194.304888 26.891687 192.111821 C26.776145 189.754577 26.657993 187.397464 26.540178 185.040333 C26.257518 179.374261 25.978905 173.707992 25.700605 168.041705 C25.569689 165.378314 25.438309 162.714946 25.306921 160.051579 C25.267717 159.256766 25.267717 159.256766 25.227721 158.445896 C25.174698 157.370935 25.121674 156.295974 25.068649 155.221013 C24.934589 152.503119 24.800566 149.785224 24.666585 147.067326 C24.639839 146.524792 24.613094 145.982258 24.585539 145.423284 C24.421628 142.097243 24.258108 138.771183 24.094845 135.44511 C23.405243 121.398569 22.698924 107.352996 21.97623 93.308121 C21.647065 86.90534 21.32378 80.50226 21.001302 74.09914 C20.742868 68.972682 20.479546 63.846522 20.210069 58.720633 C20.026397 55.217973 19.848861 51.715035 19.676035 48.211823 C19.576841 46.205016 19.474106 44.198564 19.36572 42.192221 C18.094317 18.580052 18.094317 18.580052 25.380544 8.865083 C37.931636 -4.997317 55.481838 -1.008206 68.1612 9.8302 Z\",\"bounds\":[18.726874,-0.006974,191.087499,228.548177],\"viewport\":[-0.003465,-0.006974,228.548177,228.548177],\"anchor\":[85.54,106.35,0.602064]},\"blob\":{\"path\":\"M224.983261 131.323825 C224.292417 141.255635 222.108097 150.893986 218.430311 160.23888 C214.752513 169.583774 209.758683 178.157057 203.44881 185.958716 C197.138937 193.760376 189.908636 200.513829 181.757895 206.219074 C173.607154 211.924319 164.930375 216.53186 155.727535 220.041676 C146.524706 223.551492 137.060895 225.983984 127.33609 227.339175 C117.611297 228.694354 107.829598 228.906726 97.990993 227.976301 C88.152377 227.045865 78.556952 224.841324 69.204705 221.362678 C59.852458 217.884033 51.183259 213.113434 43.197107 207.050904 C35.210955 200.988374 28.337451 193.876956 22.576572 185.71665 C16.815703 177.556332 12.373567 168.799125 9.250187 159.445017 C6.126807 150.090909 4.240551 140.582561 3.59142 130.919983 C2.942288 121.257394 3.319669 111.695919 4.72355 102.235569 C6.127431 92.775219 8.450855 83.519274 11.693833 74.467736 C14.936812 65.416197 19.171671 56.727981 24.39841 48.403085 C29.625161 40.078178 35.931494 32.489174 43.317409 25.636072 C50.703335 18.782969 59.023589 13.174878 68.278206 8.81182 C77.532823 4.448762 87.258252 1.704589 97.454516 0.579289 C107.650768 -0.54601 117.71241 -0.04363 127.639443 2.08644 C137.566475 4.21651 146.900283 7.63901 155.640866 12.353941 C164.38145 17.068871 172.362404 22.648493 179.583742 29.092806 C186.805067 35.537108 193.27785 42.5778 199.002079 50.21487 C204.726307 57.851941 209.647459 66.009331 213.765546 74.68704 C217.883632 83.364761 220.955485 92.490691 222.981106 102.064852 C225.006715 111.639014 225.674104 121.392005 224.983261 131.323825 Z\",\"bounds\":[3.283553,-0.004194,221.963248,228.548633],\"viewport\":[-0.00914,-0.004194,228.548633,228.548633],\"anchor\":[111.22,116.58,0.791]},\"circle\":{\"path\":\"M228.541 114.2705 C228.541 177.380349 177.380349 228.541 114.2705 228.541 C51.160651 228.541 0 177.380349 0 114.2705 C0 51.160651 51.160651 0 114.2705 0 C177.380349 0 228.541 51.160651 228.541 114.2705 Z\",\"bounds\":[0,0,228.541,228.541],\"viewport\":[0,0,228.541,228.541],\"anchor\":[113.82,110.27,0.791]},\"squircle\":{\"path\":\"M57.13525 0 C95.225413 0 133.315587 0 171.40575 0 C202.96068 0 228.541 25.58032 228.541 57.13525 C228.541 95.225413 228.541 133.315587 228.541 171.40575 C228.541 202.96068 202.96068 228.541 171.40575 228.541 C133.315587 228.541 95.225413 228.541 57.13525 228.541 C25.58032 228.541 0 202.96068 0 171.40575 C0 133.315587 0 95.225413 0 57.13525 C0 25.58032 25.58032 0 57.13525 0 Z\",\"bounds\":[0,0,228.541,228.541],\"viewport\":[0,0,228.541,228.541],\"anchor\":[111.78,111.79,0.791]},\"capsule\":{\"path\":\"M114.2705 0 C161.602895 0 199.973375 38.37048 199.973375 85.702875 C199.973375 104.747962 199.973375 123.793038 199.973375 142.838125 C199.973375 190.17052 161.602895 228.541 114.2705 228.541 C66.938105 228.541 28.567625 190.17052 28.567625 142.838125 C28.567625 123.793038 28.567625 104.747962 28.567625 85.702875 C28.567625 38.37048 66.938105 0 114.2705 0 Z\",\"bounds\":[28.567625,0,171.40575,228.541],\"viewport\":[0,0,228.541,228.541],\"anchor\":[113.82,131.68,0.791]},\"drop\":{\"path\":\"M114.2705 0.000038 C185.942819 88.616781 206.158088 118.155696 206.158088 136.653374 C206.158088 187.401487 165.018613 228.540962 114.2705 228.540962 C63.522387 228.540962 22.382912 187.401487 22.382912 136.653374 C22.382912 118.155696 42.598181 88.616781 114.2705 0.000038 Z\",\"bounds\":[22.382912,0.000038,183.775176,228.540924],\"viewport\":[0.000038,0.000038,228.540924,228.540924],\"anchor\":[112.47,138.8,0.791]},\"shield\":{\"path\":\"M60.220991 24.322358 C96.253997 -8.107347 132.287003 -8.107347 168.320009 24.322358 C182.412922 72.57709 196.505823 120.831809 210.598736 169.08654 C226.453259 208.722847 214.562367 228.541 174.92606 228.541 C134.489024 228.541 94.051976 228.541 53.61494 228.541 C13.978633 228.541 2.087741 208.722847 17.942264 169.08654 C32.035177 120.831809 46.128078 72.57709 60.220991 24.322358 Z\",\"bounds\":[11.147468,0.000079,206.246063,228.540921],\"viewport\":[0.000039,0.000079,228.540921,228.540921],\"anchor\":[112.38,170.61,0.663994]},\"hexagon\":{\"path\":\"M108.24241 1.740183 C112.261137 -0.58003 116.279863 -0.58003 120.29859 1.740183 C149.769246 18.755072 179.239913 35.769974 208.710568 52.784863 C212.729295 55.105076 214.738658 58.585395 214.738658 63.22582 C214.738658 97.255611 214.738658 131.285389 214.738658 165.31518 C214.738658 169.955605 212.729295 173.435924 208.710568 175.756137 C179.239913 192.771026 149.769246 209.785928 120.29859 226.800817 C116.279863 229.12103 112.261137 229.12103 108.24241 226.800817 C78.771754 209.785928 49.301087 192.771026 19.830432 175.756137 C15.811705 173.435924 13.802342 169.955605 13.802342 165.31518 C13.802342 131.285389 13.802342 97.255611 13.802342 63.22582 C13.802342 58.585395 15.811705 55.105076 19.830432 52.784863 C49.301087 35.769974 78.771754 18.755072 108.24241 1.740183 Z\",\"bounds\":[13.802342,0.000023,200.936316,228.540954],\"viewport\":[0.000023,0.000023,228.540954,228.540954],\"anchor\":[112.26,110.7,0.791]},\"diamond\":{\"path\":\"M107.202223 3.534153 C111.914408 -1.178032 116.626592 -1.178032 121.338777 3.534153 C155.894804 38.09018 190.45082 72.646196 225.006847 107.202223 C229.719032 111.914408 229.719032 116.626592 225.006847 121.338777 C190.45082 155.894804 155.894804 190.45082 121.338777 225.006847 C116.626592 229.719032 111.914408 229.719032 107.202223 225.006847 C72.646196 190.45082 38.09018 155.894804 3.534153 121.338777 C-1.178032 116.626592 -1.178032 111.914408 3.534153 107.202223 C38.09018 72.646196 72.646196 38.09018 107.202223 3.534153 Z\",\"bounds\":[0.000014,0.000014,228.540972,228.540972],\"viewport\":[0.000014,0.000014,228.540972,228.540972],\"anchor\":[112.53,109.95,0.784132]},\"star\":{\"path\":\"M114.2705 5.592764 C127.21806 27.822355 140.16562 50.051946 153.113192 72.281524 C178.255798 77.726075 203.398404 83.170613 228.541023 88.615152 C211.400445 107.798347 194.259868 126.98153 177.119291 146.164714 C179.710718 171.75921 182.302145 197.353707 184.89356 222.948216 C161.352544 212.574478 137.811516 202.200751 114.2705 191.827025 C90.729484 202.200751 67.188456 212.574478 43.64744 222.948216 C46.238855 197.353707 48.830282 171.75921 51.421709 146.164714 C34.281132 126.98153 17.140555 107.798347 -0.000023 88.615152 C25.142596 83.170613 50.285202 77.726075 75.427808 72.281524 C88.37538 50.051946 101.32294 27.822355 114.2705 5.592764 Z\",\"bounds\":[-0.000023,5.592764,228.541046,217.355452],\"viewport\":[-0.000023,-0.000033,228.541046,228.541046],\"anchor\":[113.82,125.43,0.629299]}},\"expressions\":[[[[130.36,45.98],[132.71,46.19],[134.98,46.81],[137.11,47.83],[138.97,49.28],[140.47,51.09],[141.68,53.12],[142.73,55.23],[143.76,57.36],[144.78,59.49],[145.79,61.62],[146.79,63.76],[147.76,65.91],[148.71,68.07],[149.63,70.25],[150.52,72.43],[151.37,74.63],[151.99,76.91],[152.1,79.26],[151.64,81.57],[150.59,83.68],[149.04,85.45],[147.1,86.78],[144.9,87.62],[142.56,87.93],[140.22,87.71],[137.98,86.99],[135.93,85.82],[134.17,84.24],[132.78,82.34],[131.69,80.25],[130.77,78.08],[129.87,75.89],[128.94,73.72],[128,71.56],[127.03,69.4],[126.05,67.26],[125.05,65.12],[124.03,62.99],[122.93,60.9],[121.87,58.79],[121.03,56.59],[120.72,54.26],[121.1,51.93],[122.15,49.83],[123.75,48.1],[125.76,46.89],[128.01,46.19]],[[176.61,37.08],[178.72,37.59],[180.7,38.48],[182.52,39.65],[184.2,41.03],[185.71,42.59],[187.03,44.31],[188.2,46.14],[189.26,48.03],[190.27,49.96],[191.26,51.89],[192.23,53.84],[193.16,55.8],[194.05,57.78],[194.92,59.77],[195.74,61.78],[196.53,63.8],[197.27,65.84],[197.97,67.9],[198.47,70.01],[198.63,72.18],[198.4,74.33],[197.58,76.33],[195.95,77.72],[193.83,78.08],[191.71,77.65],[189.76,76.69],[188.03,75.38],[186.53,73.82],[185.28,72.05],[184.25,70.13],[183.4,68.14],[182.63,66.11],[181.87,64.07],[181.07,62.05],[180.25,60.04],[179.39,58.05],[178.49,56.07],[177.57,54.1],[176.61,52.15],[175.62,50.22],[174.59,48.31],[173.53,46.41],[172.54,44.48],[171.86,42.42],[171.76,40.26],[172.62,38.3],[174.45,37.19]]],[[[86.14,124.79],[89.16,124.92],[92.06,125.76],[94.68,127.27],[96.86,129.36],[98.48,131.92],[99.51,134.76],[100.12,137.73],[100.56,140.72],[101.01,143.72],[101.52,146.71],[102.06,149.69],[102.62,152.67],[103.2,155.64],[103.81,158.61],[104.44,161.57],[105.11,164.52],[105.81,167.47],[106.49,170.42],[106.72,173.44],[106.01,176.37],[104.37,178.9],[102.03,180.81],[99.26,181.99],[96.27,182.46],[93.25,182.25],[90.34,181.43],[87.65,180.04],[85.32,178.11],[83.51,175.7],[82.37,172.9],[81.66,169.96],[80.98,167],[80.32,164.05],[79.69,161.08],[79.08,158.12],[78.5,155.14],[77.94,152.16],[77.4,149.18],[76.89,146.2],[76.4,143.21],[75.93,140.21],[75.56,137.21],[75.7,134.19],[76.6,131.3],[78.22,128.76],[80.47,126.74],[83.18,125.4]],[[147.23,112.87],[150.24,113.13],[153.07,114.19],[155.53,115.94],[157.46,118.26],[158.73,121.01],[159.53,123.93],[160.21,126.88],[160.88,129.84],[161.52,132.8],[162.15,135.76],[162.74,138.73],[163.32,141.71],[163.87,144.69],[164.39,147.67],[164.9,150.66],[165.39,153.65],[165.8,156.65],[165.76,159.67],[164.98,162.59],[163.56,165.26],[161.61,167.58],[159.23,169.45],[156.52,170.77],[153.57,171.46],[150.55,171.4],[147.67,170.52],[145.19,168.79],[143.45,166.33],[142.57,163.44],[142.08,160.45],[141.61,157.46],[141.11,154.47],[140.59,151.48],[140.04,148.5],[139.47,145.53],[138.87,142.56],[138.25,139.59],[137.6,136.63],[136.94,133.68],[136.25,130.72],[135.59,127.77],[135.47,124.75],[136.07,121.78],[137.34,119.04],[139.19,116.65],[141.53,114.74],[144.26,113.44]]],[[[104.84,104.08],[109.39,104.89],[113.63,106.73],[117.32,109.5],[120.25,113.08],[122.22,117.25],[123.15,121.77],[122.92,126.39],[121.86,130.89],[120.61,135.35],[119.37,139.81],[118.15,144.27],[116.94,148.74],[115.74,153.21],[114.56,157.69],[113.39,162.17],[112.24,166.65],[111.13,171.15],[110.04,175.65],[108.89,180.13],[106.98,184.33],[103.8,187.67],[99.75,189.87],[95.25,190.93],[90.63,190.93],[86.11,189.97],[81.86,188.16],[78.05,185.54],[74.89,182.18],[72.62,178.16],[71.54,173.67],[71.94,169.08],[73.01,164.57],[74.13,160.08],[75.26,155.59],[76.42,151.11],[77.59,146.63],[78.77,142.15],[79.97,137.68],[81.18,133.22],[82.41,128.75],[83.65,124.29],[84.87,119.83],[86.33,115.43],[88.67,111.46],[91.9,108.15],[95.83,105.72],[100.23,104.35]],[[174.26,115.55],[178.59,116.54],[182.37,118.86],[185.31,122.2],[187.23,126.21],[188.12,130.57],[188.06,135.02],[187.52,139.44],[186.86,143.85],[186.11,148.25],[185.25,152.62],[184.3,156.98],[183.24,161.31],[182.07,165.61],[180.79,169.88],[179.39,174.12],[177.89,178.31],[176.27,182.47],[174.47,186.55],[172.17,190.35],[169.21,193.68],[165.73,196.46],[161.84,198.64],[157.66,200.16],[153.27,200.91],[148.83,200.69],[144.65,199.19],[141.47,196.14],[140.18,191.91],[140.82,187.53],[142.46,183.38],[144.16,179.26],[145.73,175.09],[147.18,170.87],[148.51,166.62],[149.73,162.33],[150.84,158.01],[151.84,153.67],[152.74,149.3],[153.54,144.91],[154.24,140.51],[154.85,136.1],[155.58,131.7],[156.93,127.46],[159.15,123.6],[162.12,120.29],[165.73,117.68],[169.84,116]]],[[[44.72,103.35],[47.95,103.93],[51.04,105.05],[53.93,106.62],[56.58,108.57],[58.97,110.83],[61.09,113.35],[62.93,116.07],[64.5,118.97],[65.79,121.99],[66.8,125.13],[67.52,128.34],[67.94,131.6],[68.08,134.89],[67.9,138.17],[67.4,141.42],[66.56,144.6],[65.33,147.66],[63.71,150.52],[61.69,153.11],[59.3,155.36],[56.54,157.16],[53.51,158.42],[50.29,159.07],[47,159.09],[43.76,158.5],[40.67,157.39],[37.78,155.82],[35.13,153.87],[32.75,151.6],[30.63,149.09],[28.78,146.36],[27.21,143.47],[25.92,140.44],[24.92,137.31],[24.2,134.1],[23.77,130.84],[23.64,127.55],[23.81,124.27],[24.31,121.01],[25.16,117.84],[26.38,114.78],[28,111.92],[30.02,109.33],[32.42,107.08],[35.17,105.28],[38.21,104.02],[41.43,103.37]],[[114.62,83.64],[118.31,83.88],[121.94,84.6],[125.44,85.77],[128.77,87.38],[131.86,89.4],[134.67,91.81],[137.13,94.56],[139.2,97.62],[140.85,100.93],[142.05,104.42],[142.79,108.05],[143.05,111.73],[142.83,115.42],[142.13,119.05],[140.95,122.55],[139.34,125.88],[137.3,128.96],[134.88,131.75],[132.11,134.2],[129.05,136.27],[125.75,137.93],[122.25,139.13],[118.63,139.86],[114.94,140.1],[111.25,139.86],[107.63,139.14],[104.12,137.97],[100.8,136.36],[97.7,134.34],[94.9,131.93],[92.44,129.18],[90.36,126.12],[88.72,122.81],[87.51,119.31],[86.78,115.69],[86.52,112.01],[86.74,108.32],[87.44,104.69],[88.61,101.18],[90.23,97.86],[92.27,94.78],[94.69,91.99],[97.45,89.54],[100.51,87.47],[103.82,85.81],[107.31,84.61],[110.94,83.88]]],[[[90.44,99.25],[93.11,99.26],[95.74,99.79],[98.37,100.3],[101,100.82],[103.64,101.33],[106.27,101.85],[108.9,102.37],[111.53,102.89],[114.16,103.41],[116.79,103.94],[119.42,104.47],[122.06,105],[124.69,105.53],[127.32,106.06],[129.94,106.6],[132.57,107.14],[135.2,107.68],[137.65,108.73],[139.5,110.65],[140.44,113.14],[140.36,115.81],[139.35,118.28],[137.48,120.18],[135,121.14],[132.32,121.11],[129.7,120.56],[127.08,120],[124.45,119.46],[121.82,118.93],[119.19,118.4],[116.56,117.87],[113.93,117.35],[111.29,116.83],[108.66,116.32],[106.02,115.82],[103.39,115.31],[100.76,114.79],[98.12,114.28],[95.49,113.75],[92.86,113.22],[90.23,112.68],[87.77,111.66],[85.93,109.74],[85.01,107.24],[85.06,104.57],[86.07,102.1],[87.96,100.22]],[[156.6,112.56],[158.91,112.66],[161.18,113.15],[163.45,113.64],[165.72,114.13],[167.99,114.62],[170.26,115.12],[172.53,115.62],[174.8,116.12],[177.07,116.62],[179.34,117.13],[181.6,117.64],[183.87,118.15],[186.14,118.67],[188.4,119.18],[190.67,119.7],[192.94,120.2],[195.12,120.96],[196.7,122.63],[197.45,124.82],[197.53,127.14],[197.07,129.41],[196.08,131.51],[194.49,133.18],[192.33,133.97],[190.04,133.68],[187.79,133.09],[185.52,132.57],[183.26,132.05],[180.99,131.54],[178.72,131.03],[176.45,130.53],[174.18,130.03],[171.91,129.54],[169.64,129.05],[167.37,128.56],[165.1,128.07],[162.83,127.58],[160.56,127.08],[158.29,126.57],[156.02,126.05],[153.9,125.14],[152.26,123.51],[151.32,121.4],[151.08,119.1],[151.53,116.82],[152.65,114.8],[154.41,113.31]]],[[[79.94,130.44],[83.08,130.57],[86.11,131.41],[88.89,132.89],[91.27,134.94],[93.15,137.46],[94.39,140.35],[95.11,143.42],[95.65,146.52],[96.2,149.62],[96.78,152.72],[97.39,155.81],[98.04,158.89],[98.72,161.97],[99.43,165.04],[100.18,168.1],[100.97,171.15],[101.81,174.18],[102.64,177.22],[103.01,180.34],[102.35,183.4],[100.66,186.04],[98.19,187.98],[95.28,189.16],[92.17,189.6],[89.03,189.37],[85.99,188.56],[83.16,187.2],[80.63,185.33],[78.55,182.97],[77.05,180.21],[76.1,177.21],[75.28,174.17],[74.5,171.11],[73.74,168.06],[73.02,164.99],[72.33,161.92],[71.68,158.83],[71.06,155.75],[70.47,152.65],[69.91,149.55],[69.37,146.45],[68.97,143.32],[69.12,140.18],[70.04,137.18],[71.7,134.51],[74.03,132.41],[76.86,131.04]],[[168.95,136.28],[171.31,136.97],[172.99,138.76],[173.66,141.13],[173.36,143.58],[172.24,145.79],[170.45,147.49],[168.22,148.58],[165.89,149.43],[163.57,150.31],[161.24,151.18],[158.9,152.02],[156.56,152.85],[154.21,153.65],[151.85,154.44],[149.48,155.2],[147.11,155.94],[144.73,156.65],[142.34,157.34],[139.95,158.01],[137.55,158.66],[135.14,159.27],[132.73,159.86],[130.31,160.43],[127.84,160.54],[125.53,159.69],[123.77,157.96],[122.89,155.66],[123.09,153.21],[124.36,151.09],[126.34,149.61],[128.69,148.83],[131.1,148.24],[133.51,147.62],[135.91,146.98],[138.31,146.32],[140.7,145.65],[143.08,144.95],[145.46,144.23],[147.83,143.49],[150.2,142.73],[152.56,141.95],[154.91,141.15],[157.25,140.32],[159.59,139.48],[161.92,138.61],[164.24,137.72],[166.54,136.78]]],[[[119.79,105.35],[121.94,105.42],[124.03,105.87],[126,106.72],[127.77,107.93],[129.27,109.47],[130.45,111.26],[131.29,113.23],[131.73,115.33],[131.79,117.47],[131.53,119.6],[131.11,121.71],[130.66,123.81],[130.27,125.92],[129.88,128.03],[129.49,130.14],[129.07,132.25],[128.62,134.35],[127.96,136.39],[126.96,138.29],[125.62,139.96],[123.99,141.36],[122.13,142.43],[120.11,143.15],[118,143.5],[115.85,143.45],[113.75,143],[111.79,142.15],[110.03,140.93],[108.54,139.38],[107.36,137.59],[106.53,135.61],[106.1,133.51],[106.07,131.37],[106.35,129.24],[106.77,127.14],[107.22,125.04],[107.64,122.93],[108.05,120.82],[108.45,118.71],[108.84,116.6],[109.25,114.49],[109.86,112.44],[110.83,110.52],[112.16,108.84],[113.78,107.44],[115.65,106.38],[117.67,105.68]],[[174.73,114.1],[176.71,114.59],[178.5,115.55],[180.04,116.88],[181.27,118.5],[182.17,120.33],[182.71,122.29],[182.9,124.32],[182.82,126.36],[182.56,128.38],[182.23,130.39],[181.89,132.4],[181.53,134.41],[181.16,136.41],[180.75,138.41],[180.3,140.4],[179.82,142.38],[179.18,144.31],[178.28,146.15],[177.14,147.83],[175.74,149.31],[174.11,150.53],[172.29,151.44],[170.32,151.97],[168.29,152.07],[166.29,151.69],[164.45,150.83],[162.87,149.54],[161.66,147.91],[160.83,146.06],[160.38,144.07],[160.29,142.04],[160.53,140.01],[160.98,138.02],[161.43,136.03],[161.84,134.04],[162.24,132.04],[162.62,130.03],[162.93,128.02],[163.24,126],[163.6,124],[164.11,122.03],[164.91,120.15],[165.99,118.43],[167.35,116.91],[168.94,115.64],[170.74,114.69],[172.7,114.15]]],[[[105.72,72.58],[108.82,72.78],[111.75,73.82],[114.27,75.64],[116.39,77.92],[118.42,80.29],[120.45,82.66],[122.47,85.03],[124.48,87.41],[126.49,89.8],[128.48,92.2],[130.47,94.6],[132.45,97.01],[134.43,99.42],[136.4,101.83],[138.37,104.25],[140.3,106.7],[141.85,109.39],[142.65,112.4],[142.63,115.51],[141.8,118.5],[140.21,121.17],[137.95,123.31],[135.17,124.7],[132.11,125.26],[129.02,124.98],[126.12,123.86],[123.67,121.94],[121.61,119.6],[119.66,117.17],[117.69,114.75],[115.73,112.33],[113.75,109.92],[111.77,107.52],[109.77,105.12],[107.77,102.73],[105.76,100.34],[103.75,97.96],[101.72,95.59],[99.68,93.23],[97.63,90.89],[95.91,88.3],[94.95,85.34],[94.92,82.24],[95.84,79.27],[97.56,76.68],[99.9,74.63],[102.67,73.22]],[[176.73,63.75],[179.52,64.43],[182.02,65.85],[184.15,67.78],[185.85,70.1],[187.08,72.7],[187.76,75.5],[187.76,78.37],[187.23,81.2],[186.58,84.01],[185.89,86.8],[185.16,89.59],[184.39,92.36],[183.59,95.13],[182.76,97.89],[181.88,100.64],[180.98,103.37],[180.02,106.09],[179.03,108.79],[177.99,111.48],[176.9,114.15],[175.5,116.66],[173.51,118.72],[171,120.11],[168.18,120.66],[165.34,120.29],[162.75,119.04],[160.62,117.12],[159.02,114.73],[158,112.04],[157.63,109.19],[157.98,106.34],[158.83,103.59],[159.86,100.9],[160.87,98.2],[161.85,95.49],[162.79,92.76],[163.7,90.03],[164.57,87.29],[165.41,84.53],[166.21,81.76],[166.98,78.99],[167.7,76.2],[168.38,73.4],[169,70.58],[169.79,67.82],[171.41,65.46],[173.88,64.03]]],[[[64.12,83.43],[66.69,84.08],[68.9,85.53],[70.57,87.6],[71.56,90.05],[71.86,92.69],[71.53,95.32],[70.55,97.78],[69.06,99.99],[67.36,102.03],[65.64,104.06],[63.95,106.11],[62.28,108.18],[60.63,110.27],[59,112.38],[57.41,114.5],[55.84,116.65],[54.29,118.82],[52.78,121],[51.31,123.22],[49.86,125.45],[48.42,127.69],[46.67,129.68],[44.36,130.96],[41.73,131.22],[39.22,130.38],[37.16,128.72],[35.64,126.55],[34.65,124.08],[34.2,121.46],[34.29,118.81],[34.94,116.24],[36.12,113.86],[37.54,111.61],[39.04,109.41],[40.54,107.21],[42.06,105.03],[43.61,102.87],[45.18,100.73],[46.79,98.6],[48.41,96.5],[50.07,94.42],[51.74,92.35],[53.45,90.31],[55.17,88.28],[56.94,86.3],[59.04,84.67],[61.48,83.65]],[[104.23,93.09],[106.97,93.77],[109.4,95.24],[111.32,97.31],[112.59,99.85],[113.4,102.57],[114.13,105.32],[114.87,108.06],[115.62,110.8],[116.37,113.54],[117.14,116.28],[117.9,119.02],[118.67,121.75],[119.45,124.49],[120.23,127.22],[121.03,129.95],[121.83,132.68],[122.6,135.41],[122.98,138.22],[122.57,141.02],[121.34,143.57],[119.44,145.67],[117.05,147.19],[114.34,148.04],[111.51,148.14],[108.77,147.45],[106.33,146.01],[104.38,143.96],[103.07,141.44],[102.21,138.73],[101.43,136],[100.65,133.27],[99.87,130.53],[99.09,127.8],[98.32,125.06],[97.55,122.33],[96.79,119.59],[96.04,116.85],[95.28,114.11],[94.53,111.37],[93.79,108.62],[93.05,105.88],[92.73,103.07],[93.18,100.27],[94.42,97.72],[96.32,95.62],[98.7,94.08],[101.4,93.21]]],[[[108.14,135.9],[111.13,136.06],[114.08,136.56],[116.95,137.39],[119.71,138.55],[122.31,140.03],[124.71,141.81],[126.86,143.89],[128.73,146.23],[130.27,148.8],[131.44,151.55],[132.22,154.44],[132.56,157.41],[132.47,160.4],[131.93,163.34],[130.96,166.17],[129.6,168.83],[127.87,171.28],[125.83,173.46],[123.51,175.35],[120.96,176.91],[118.23,178.13],[115.36,179],[112.42,179.52],[109.43,179.7],[106.44,179.54],[103.49,179.04],[100.62,178.21],[97.86,177.06],[95.26,175.58],[92.86,173.79],[90.71,171.71],[88.84,169.37],[87.3,166.81],[86.13,164.06],[85.35,161.17],[85.01,158.2],[85.11,155.21],[85.64,152.26],[86.61,149.43],[87.97,146.77],[89.7,144.33],[91.74,142.14],[94.06,140.25],[96.61,138.69],[99.34,137.47],[102.21,136.6],[105.15,136.08]],[[175.67,128.81],[177.16,128.85],[178.62,129.14],[180.01,129.67],[181.28,130.44],[182.41,131.42],[183.36,132.57],[184.12,133.85],[184.68,135.23],[185.05,136.68],[185.24,138.15],[185.27,139.64],[185.13,141.13],[184.85,142.59],[184.42,144.02],[183.85,145.4],[183.15,146.72],[182.33,147.96],[181.38,149.11],[180.32,150.16],[179.15,151.08],[177.88,151.87],[176.53,152.49],[175.1,152.91],[173.62,153.11],[172.13,153.07],[170.67,152.78],[169.28,152.24],[168.01,151.47],[166.88,150.49],[165.93,149.35],[165.18,148.06],[164.61,146.68],[164.24,145.24],[164.05,143.76],[164.02,142.27],[164.16,140.78],[164.44,139.32],[164.87,137.89],[165.44,136.51],[166.14,135.2],[166.96,133.95],[167.91,132.8],[168.97,131.75],[170.14,130.83],[171.4,130.04],[172.76,129.43],[174.19,129.01]]],[[[103.39,78.25],[106.56,78.38],[109.59,79.28],[112.29,80.94],[114.43,83.28],[115.86,86.1],[116.52,89.2],[116.32,92.37],[115.62,95.46],[114.86,98.55],[114.1,101.63],[113.36,104.72],[112.63,107.81],[111.91,110.91],[111.2,114.01],[110.51,117.1],[109.82,120.21],[109.16,123.31],[108.52,126.42],[107.84,129.53],[106.8,132.52],[105.04,135.16],[102.66,137.25],[99.81,138.63],[96.7,139.2],[93.54,138.96],[90.53,137.95],[87.87,136.24],[85.71,133.92],[84.21,131.13],[83.48,128.05],[83.5,124.88],[84,121.74],[84.7,118.64],[85.4,115.54],[86.08,112.44],[86.77,109.34],[87.48,106.24],[88.19,103.15],[88.92,100.05],[89.66,96.96],[90.41,93.88],[91.18,90.8],[91.95,87.71],[93.1,84.76],[94.95,82.19],[97.4,80.19],[100.28,78.86]],[[161.99,91.57],[165.07,92],[167.9,93.28],[170.32,95.23],[172.22,97.69],[173.49,100.53],[174.05,103.59],[173.93,106.7],[173.45,109.78],[172.9,112.85],[172.33,115.91],[171.71,118.97],[171.06,122.02],[170.38,125.06],[169.66,128.09],[168.91,131.12],[168.13,134.14],[167.33,137.15],[166.5,140.16],[165.58,143.14],[164.33,145.98],[162.5,148.5],[160.15,150.53],[157.38,151.95],[154.34,152.61],[151.24,152.43],[148.32,151.38],[145.83,149.52],[143.99,147.01],[142.95,144.08],[142.73,140.98],[143.25,137.91],[144.09,134.91],[144.94,131.91],[145.76,128.9],[146.54,125.89],[147.29,122.86],[148.01,119.83],[148.69,116.79],[149.34,113.74],[149.95,110.68],[150.54,107.62],[151.09,104.55],[151.6,101.47],[152.44,98.48],[154,95.79],[156.21,93.6],[158.94,92.12]]],[[[47.23,91.05],[51.61,92.47],[55.26,95.29],[57.96,99.03],[59.7,103.31],[60.56,107.85],[61.28,112.42],[62.11,116.97],[63.06,121.51],[64.11,126.01],[65.28,130.49],[66.56,134.94],[67.95,139.35],[69.44,143.73],[71.05,148.07],[72.77,152.37],[74.62,156.61],[76.52,160.83],[78.06,165.19],[78.52,169.78],[77.62,174.3],[75.2,178.22],[71.44,180.86],[66.96,181.91],[62.36,181.55],[57.99,180.06],[54.03,177.68],[50.59,174.58],[47.77,170.92],[45.62,166.83],[43.74,162.6],[41.96,158.33],[40.29,154.01],[38.72,149.66],[37.27,145.26],[35.93,140.83],[34.69,136.37],[33.56,131.88],[32.55,127.37],[31.65,122.83],[30.85,118.27],[30.2,113.69],[30.08,109.07],[30.85,104.51],[32.49,100.19],[35.01,96.32],[38.44,93.24],[42.64,91.35]],[[108.93,73.38],[113.76,73.6],[118.38,75.01],[122.49,77.56],[125.82,81.07],[128.1,85.34],[129.65,89.93],[131.04,94.58],[132.43,99.22],[133.82,103.87],[135.22,108.51],[136.6,113.16],[137.99,117.81],[139.36,122.46],[140.73,127.11],[142.13,131.76],[143.51,136.41],[144.82,141.08],[145.51,145.86],[144.91,150.66],[143.09,155.14],[140.17,158.99],[136.38,162.01],[132,164.05],[127.26,165.03],[122.42,164.86],[117.79,163.48],[113.67,160.95],[110.36,157.43],[108.17,153.11],[106.72,148.49],[105.36,143.83],[103.99,139.18],[102.62,134.53],[101.24,129.88],[99.87,125.23],[98.48,120.58],[97.09,115.93],[95.7,111.29],[94.29,106.64],[92.89,102],[91.49,97.36],[90.81,92.57],[91.38,87.77],[93.14,83.26],[96.02,79.37],[99.79,76.34],[104.18,74.32]]],[[[102.86,129.56],[106.39,129.96],[109.85,130.76],[113.21,131.94],[116.4,133.5],[119.39,135.42],[122.13,137.69],[124.56,140.28],[126.64,143.16],[128.33,146.29],[129.59,149.61],[130.37,153.08],[130.66,156.62],[130.43,160.16],[129.68,163.63],[128.42,166.96],[126.7,170.07],[124.54,172.89],[122.02,175.39],[119.18,177.52],[116.07,179.25],[112.76,180.54],[109.31,181.4],[105.78,181.82],[102.23,181.83],[98.7,181.42],[95.24,180.62],[91.88,179.44],[88.69,177.88],[85.7,175.96],[82.96,173.69],[80.53,171.1],[78.45,168.22],[76.76,165.1],[75.5,161.77],[74.72,158.31],[74.44,154.77],[74.67,151.22],[75.41,147.75],[76.67,144.42],[78.39,141.32],[80.55,138.49],[83.07,135.99],[85.91,133.86],[89.02,132.14],[92.33,130.84],[95.78,129.99],[99.31,129.56]],[[180.44,141.06],[183.61,141.1],[186.72,141.68],[189.66,142.86],[192.28,144.63],[194.43,146.96],[196,149.71],[197,152.72],[197.48,155.86],[197.51,159.03],[197.15,162.18],[196.43,165.27],[195.38,168.26],[194.07,171.15],[192.52,173.92],[190.74,176.55],[188.77,179.03],[186.6,181.35],[184.25,183.48],[181.74,185.41],[179.06,187.12],[176.23,188.56],[173.28,189.71],[170.21,190.52],[167.07,190.95],[163.9,190.91],[160.78,190.33],[157.84,189.15],[155.22,187.37],[153.08,185.04],[151.51,182.29],[150.51,179.28],[150.03,176.15],[150,172.98],[150.36,169.83],[151.07,166.74],[152.12,163.74],[153.43,160.85],[154.99,158.09],[156.76,155.46],[158.74,152.98],[160.91,150.66],[163.25,148.53],[165.77,146.59],[168.45,144.89],[171.27,143.45],[174.23,142.3],[177.29,141.48]]],[[[86.02,131.33],[88.42,131.69],[90.54,132.87],[92.12,134.71],[93.03,136.97],[93.17,139.39],[92.41,141.69],[90.78,143.48],[88.59,144.52],[86.19,144.97],[83.78,145.34],[81.37,145.72],[78.96,146.09],[76.54,146.45],[74.13,146.81],[71.72,147.16],[69.3,147.5],[66.88,147.84],[64.47,148.16],[62.05,148.47],[59.62,148.76],[57.2,149.03],[54.77,149.27],[52.34,149.49],[49.91,149.68],[47.53,149.28],[45.52,147.92],[44.04,145.99],[43.12,143.74],[42.85,141.32],[43.44,138.97],[45.04,137.17],[47.33,136.4],[49.76,136.2],[52.19,135.96],[54.62,135.7],[57.04,135.43],[59.46,135.15],[61.89,134.85],[64.31,134.54],[66.72,134.22],[69.14,133.89],[71.56,133.54],[73.97,133.19],[76.38,132.83],[78.79,132.45],[81.2,132.06],[83.61,131.67]],[[153.42,116.84],[155.92,117.69],[157.78,119.56],[158.72,122.03],[158.73,124.68],[157.84,127.18],[156.08,129.15],[153.71,130.33],[151.13,131],[148.55,131.65],[145.98,132.32],[143.4,132.98],[140.82,133.63],[138.23,134.27],[135.65,134.9],[133.06,135.53],[130.47,136.15],[127.88,136.76],[125.29,137.36],[122.69,137.94],[120.09,138.51],[117.49,139.06],[114.88,139.59],[112.27,140.1],[109.62,140.12],[107.17,139.14],[105.28,137.29],[104.18,134.88],[104.06,132.23],[105.03,129.78],[106.92,127.93],[109.35,126.87],[111.96,126.34],[114.57,125.8],[117.17,125.24],[119.77,124.67],[122.37,124.09],[124.96,123.5],[127.56,122.9],[130.15,122.29],[132.74,121.68],[135.32,121.05],[137.91,120.41],[140.49,119.76],[143.07,119.11],[145.65,118.44],[148.22,117.76],[150.78,117.03]]],[[[83.36,65.84],[86.61,66.42],[89.57,67.88],[92,70.12],[93.67,72.97],[94.46,76.17],[94.31,79.47],[93.61,82.71],[92.8,85.92],[92.02,89.14],[91.27,92.36],[90.56,95.6],[89.88,98.84],[89.23,102.09],[88.62,105.34],[88.03,108.61],[87.51,111.88],[87.01,115.15],[86.5,118.42],[85.65,121.62],[84.11,124.54],[81.9,126.99],[79.13,128.79],[75.98,129.8],[72.68,129.91],[69.47,129.13],[66.6,127.49],[64.24,125.18],[62.49,122.38],[61.42,119.25],[61.08,115.97],[61.36,112.67],[61.87,109.4],[62.45,106.13],[63.01,102.87],[63.61,99.61],[64.24,96.36],[64.9,93.11],[65.6,89.87],[66.33,86.64],[67.09,83.42],[67.89,80.2],[68.73,77],[69.89,73.9],[71.7,71.14],[74.1,68.86],[76.93,67.16],[80.07,66.12]],[[119.49,99.16],[121.99,99.28],[124.44,99.82],[126.9,100.34],[129.36,100.86],[131.81,101.38],[134.27,101.91],[136.72,102.44],[139.17,102.98],[141.62,103.52],[144.08,104.07],[146.52,104.62],[148.97,105.18],[151.42,105.74],[153.86,106.31],[156.31,106.89],[158.75,107.47],[161.2,108.02],[163.49,109.03],[165.16,110.87],[165.95,113.24],[165.87,115.74],[164.94,118.05],[163.17,119.8],[160.79,120.55],[158.31,120.29],[155.88,119.65],[153.44,119.06],[150.99,118.49],[148.55,117.92],[146.1,117.36],[143.65,116.81],[141.2,116.26],[138.75,115.73],[136.29,115.2],[133.84,114.67],[131.38,114.15],[128.93,113.62],[126.47,113.1],[124.02,112.57],[121.56,112.04],[119.11,111.5],[116.81,110.53],[115.08,108.73],[114.22,106.39],[114.29,103.9],[115.28,101.61],[117.12,99.93]]],[[[168.71,85.67],[170.73,86],[172.64,86.75],[174.37,87.85],[175.88,89.24],[177.11,90.88],[178.04,92.71],[178.71,94.65],[179.21,96.64],[179.64,98.65],[180.05,100.66],[180.45,102.67],[180.83,104.69],[181.18,106.71],[181.5,108.74],[181.77,110.78],[181.88,112.82],[181.71,114.87],[181.22,116.86],[180.41,118.74],[179.27,120.45],[177.83,121.91],[176.12,123.03],[174.2,123.74],[172.16,123.99],[170.13,123.75],[168.21,123.04],[166.49,121.93],[165.03,120.48],[163.88,118.79],[163.02,116.93],[162.49,114.95],[162.17,112.92],[161.85,110.89],[161.51,108.87],[161.14,106.84],[160.77,104.83],[160.37,102.81],[159.96,100.8],[159.52,98.79],[159.24,96.76],[159.3,94.71],[159.71,92.7],[160.48,90.8],[161.58,89.08],[163.01,87.61],[164.73,86.49],[166.67,85.83]],[[206.57,78.24],[208.3,78.8],[209.77,79.87],[210.99,81.22],[212.01,82.73],[212.85,84.34],[213.53,86.03],[214.08,87.77],[214.54,89.54],[214.95,91.31],[215.34,93.09],[215.7,94.88],[216.04,96.67],[216.36,98.46],[216.64,100.26],[216.89,102.07],[217.11,103.88],[217.25,105.7],[217.26,107.52],[217.1,109.33],[216.75,111.12],[216.16,112.84],[215.3,114.44],[214.04,115.75],[212.34,116.35],[210.58,115.96],[209.11,114.89],[207.97,113.48],[207.1,111.88],[206.44,110.18],[205.97,108.42],[205.62,106.63],[205.35,104.83],[205.11,103.02],[204.85,101.22],[204.55,99.42],[204.22,97.63],[203.87,95.84],[203.49,94.05],[203.09,92.28],[202.67,90.5],[202.32,88.71],[202.1,86.91],[202.1,85.08],[202.32,83.28],[202.77,81.51],[203.54,79.86],[204.82,78.59]]],[[[39.78,104.3],[42.64,105.01],[45.03,106.74],[46.73,109.15],[47.75,111.93],[48.35,114.83],[48.81,117.76],[49.31,120.68],[49.87,123.6],[50.48,126.5],[51.15,129.39],[51.86,132.27],[52.63,135.13],[53.44,137.98],[54.3,140.82],[55.19,143.65],[56.13,146.46],[57.1,149.26],[58.1,152.05],[58.86,154.92],[58.96,157.87],[58.18,160.72],[56.43,163.09],[53.84,164.48],[50.9,164.62],[48.08,163.75],[45.58,162.16],[43.51,160.05],[41.89,157.57],[40.67,154.87],[39.67,152.08],[38.73,149.26],[37.81,146.44],[36.94,143.61],[36.11,140.76],[35.34,137.9],[34.61,135.03],[33.92,132.14],[33.28,129.24],[32.7,126.34],[32.16,123.42],[31.67,120.5],[31.23,117.57],[31.14,114.61],[31.65,111.69],[32.74,108.94],[34.47,106.54],[36.89,104.86]],[[108.97,125.73],[111.9,126.2],[114.63,127.37],[117,129.16],[118.84,131.49],[119.99,134.23],[120.32,137.18],[119.85,140.11],[118.59,142.8],[116.78,145.16],[114.84,147.42],[112.89,149.67],[110.93,151.92],[108.97,154.16],[107.01,156.39],[105.03,158.62],[103.05,160.85],[101.07,163.06],[99.07,165.28],[97.09,167.5],[95.09,169.71],[93.05,171.88],[90.69,173.67],[87.89,174.66],[84.93,174.81],[82.02,174.22],[79.31,173],[76.92,171.24],[74.99,168.98],[73.7,166.3],[73.26,163.37],[73.74,160.45],[75.2,157.86],[77.17,155.63],[79.18,153.43],[81.18,151.23],[83.17,149.02],[85.16,146.8],[87.14,144.58],[89.11,142.35],[91.08,140.11],[93.04,137.87],[95,135.63],[96.95,133.38],[98.89,131.12],[100.87,128.89],[103.25,127.12],[106.02,126.04]]],[[[115.43,87.59],[118.19,88.24],[120.69,89.59],[122.69,91.59],[124.03,94.09],[124.63,96.87],[124.41,99.7],[123.7,102.45],[122.9,105.18],[122.12,107.92],[121.34,110.65],[120.57,113.39],[119.79,116.13],[119.02,118.87],[118.25,121.61],[117.48,124.35],[116.72,127.09],[115.97,129.83],[115.23,132.58],[114.45,135.32],[113.3,137.91],[111.49,140.09],[109.13,141.65],[106.41,142.48],[103.58,142.56],[100.82,141.91],[98.33,140.54],[96.33,138.53],[94.99,136.03],[94.38,133.26],[94.57,130.43],[95.25,127.67],[96.02,124.93],[96.79,122.19],[97.55,119.45],[98.31,116.7],[99.08,113.96],[99.85,111.22],[100.62,108.49],[101.4,105.75],[102.18,103.01],[102.95,100.27],[103.74,97.54],[104.51,94.8],[105.68,92.21],[107.5,90.04],[109.88,88.5],[112.59,87.67]],[[155.37,78.64],[158.04,79.15],[160.48,80.37],[162.53,82.16],[164.33,84.22],[166.1,86.3],[167.85,88.4],[169.58,90.51],[171.29,92.64],[172.98,94.78],[174.65,96.94],[176.3,99.12],[177.92,101.32],[179.51,103.54],[181.06,105.79],[182.57,108.07],[184.03,110.37],[185.2,112.83],[185.77,115.5],[185.73,118.23],[185.07,120.87],[183.8,123.28],[181.94,125.26],[179.57,126.6],[176.89,127.03],[174.24,126.43],[171.99,124.92],[170.26,122.8],[168.75,120.53],[167.22,118.27],[165.66,116.03],[164.07,113.81],[162.45,111.6],[160.82,109.41],[159.16,107.25],[157.47,105.1],[155.76,102.97],[154.03,100.85],[152.28,98.76],[150.51,96.68],[148.74,94.6],[147.29,92.29],[146.49,89.69],[146.36,86.97],[146.94,84.31],[148.23,81.91],[150.19,80.02],[152.66,78.89]]],[[[92.71,76.24],[95.76,76.59],[98.73,77.35],[101.56,78.53],[104.21,80.08],[106.63,81.96],[108.78,84.16],[110.61,86.62],[112.09,89.31],[113.19,92.17],[113.91,95.15],[114.24,98.2],[114.18,101.27],[113.73,104.31],[112.9,107.26],[111.7,110.09],[110.15,112.73],[108.28,115.17],[106.12,117.35],[103.71,119.24],[101.08,120.83],[98.27,122.07],[95.33,122.95],[92.3,123.44],[89.23,123.51],[86.18,123.17],[83.21,122.41],[80.38,121.23],[77.73,119.69],[75.31,117.8],[73.16,115.61],[71.33,113.14],[69.86,110.45],[68.75,107.59],[68.02,104.61],[67.7,101.56],[67.76,98.49],[68.22,95.46],[69.05,92.5],[70.25,89.68],[71.8,87.03],[73.67,84.59],[75.83,82.41],[78.24,80.52],[80.87,78.93],[83.67,77.69],[86.61,76.81],[89.64,76.32]],[[157.73,102.08],[159.31,102.13],[160.86,102.42],[162.35,102.95],[163.74,103.69],[165.01,104.62],[166.15,105.72],[167.13,106.95],[167.96,108.29],[168.63,109.72],[169.13,111.22],[169.45,112.76],[169.59,114.34],[169.55,115.91],[169.31,117.47],[168.88,118.99],[168.28,120.45],[167.52,121.83],[166.58,123.1],[165.48,124.23],[164.25,125.22],[162.89,126.02],[161.43,126.63],[159.91,127.02],[158.34,127.2],[156.76,127.14],[155.21,126.85],[153.73,126.33],[152.33,125.59],[151.06,124.65],[149.93,123.56],[148.94,122.33],[148.11,120.99],[147.44,119.56],[146.95,118.06],[146.62,116.51],[146.48,114.94],[146.52,113.37],[146.76,111.8],[147.18,110.28],[147.78,108.83],[148.56,107.45],[149.5,106.18],[150.59,105.05],[151.83,104.07],[153.18,103.26],[154.64,102.65],[156.17,102.26]]],[[[57.98,112.03],[61.01,112.26],[63.82,113.41],[66.22,115.27],[68.09,117.67],[69.36,120.44],[70.14,123.39],[70.64,126.39],[71.07,129.41],[71.58,132.42],[72.15,135.41],[72.76,138.4],[73.4,141.38],[74.09,144.35],[74.82,147.31],[75.59,150.26],[76.42,153.2],[77.3,156.12],[78.16,159.04],[78.68,162.04],[78.42,165.07],[77.28,167.88],[75.25,170.13],[72.54,171.49],[69.52,171.87],[66.51,171.44],[63.69,170.32],[61.16,168.61],[59.03,166.44],[57.38,163.89],[56.23,161.06],[55.34,158.15],[54.53,155.21],[53.73,152.27],[52.97,149.31],[52.25,146.35],[51.57,143.38],[50.93,140.4],[50.34,137.41],[49.78,134.41],[49.26,131.4],[48.78,128.39],[48.37,125.37],[48.37,122.33],[49.06,119.36],[50.44,116.65],[52.47,114.39],[55.04,112.78]],[[117.45,101.46],[120.57,101.84],[123.48,103.02],[125.99,104.91],[127.97,107.35],[129.25,110.23],[130.05,113.27],[130.76,116.34],[131.46,119.41],[132.15,122.49],[132.85,125.56],[133.55,128.63],[134.24,131.71],[134.93,134.78],[135.61,137.86],[136.32,140.93],[137.01,144],[137.66,147.09],[137.87,150.22],[137.25,153.3],[135.83,156.1],[133.73,158.45],[131.15,160.23],[128.22,161.38],[125.11,161.83],[121.98,161.5],[119.05,160.37],[116.52,158.51],[114.57,156.05],[113.37,153.14],[112.64,150.08],[111.95,147],[111.27,143.93],[110.58,140.85],[109.89,137.78],[109.2,134.7],[108.51,131.63],[107.81,128.56],[107.12,125.48],[106.42,122.41],[105.71,119.34],[105.02,116.27],[104.83,113.13],[105.42,110.04],[106.79,107.22],[108.84,104.83],[111.41,103.02],[114.33,101.87]]],[[[113.75,120.08],[118.16,120.78],[122.31,122.43],[125.98,124.96],[128.94,128.29],[131.02,132.23],[132.12,136.56],[132.1,141.02],[131.16,145.38],[129.94,149.68],[128.69,153.98],[127.44,158.27],[126.19,162.56],[124.92,166.85],[123.64,171.14],[122.35,175.42],[121.05,179.69],[119.76,183.97],[118.46,188.25],[117.05,192.49],[114.84,196.36],[111.47,199.27],[107.42,201.12],[103.04,201.99],[98.58,201.97],[94.18,201.19],[89.97,199.7],[86.1,197.48],[82.8,194.48],[80.41,190.72],[79.31,186.41],[79.87,182],[81.24,177.74],[82.57,173.47],[83.88,169.2],[85.19,164.92],[86.48,160.64],[87.75,156.36],[89.02,152.07],[90.28,147.78],[91.53,143.49],[92.77,139.19],[93.97,134.88],[95.5,130.69],[97.93,126.95],[101.16,123.87],[105.02,121.64],[109.3,120.36]],[[181.19,127.71],[185.4,128.03],[189.23,129.79],[192.19,132.8],[194.06,136.59],[194.87,140.74],[194.76,144.98],[194.21,149.18],[193.55,153.37],[192.79,157.55],[191.91,161.69],[190.91,165.82],[189.8,169.91],[188.57,173.97],[187.22,177.99],[185.72,181.96],[184.07,185.87],[182.26,189.7],[180.26,193.44],[177.85,196.92],[174.93,199.99],[171.62,202.64],[168,204.85],[164.13,206.59],[160.07,207.78],[155.86,208.24],[151.69,207.6],[148.31,205.16],[147.33,201.11],[148.48,197.06],[150.4,193.28],[152.24,189.46],[153.93,185.56],[155.48,181.61],[156.89,177.62],[158.17,173.57],[159.32,169.49],[160.35,165.38],[161.26,161.23],[162.06,157.07],[162.7,152.87],[163.29,148.67],[164.12,144.52],[165.46,140.5],[167.49,136.78],[170.16,133.49],[173.37,130.73],[177.08,128.7]]],[[[52.43,111.88],[55.76,112.3],[59,113.21],[62.08,114.57],[64.96,116.3],[67.61,118.36],[70.01,120.71],[72.16,123.3],[74.02,126.1],[75.61,129.06],[76.9,132.17],[77.89,135.38],[78.56,138.68],[78.89,142.02],[78.86,145.39],[78.45,148.72],[77.63,151.98],[76.39,155.11],[74.74,158.03],[72.67,160.68],[70.2,162.96],[67.38,164.79],[64.28,166.08],[61,166.78],[57.64,166.91],[54.3,166.49],[51.07,165.57],[47.99,164.22],[45.11,162.49],[42.46,160.42],[40.05,158.07],[37.91,155.48],[36.04,152.68],[34.46,149.72],[33.16,146.62],[32.17,143.4],[31.51,140.11],[31.18,136.76],[31.21,133.4],[31.62,130.06],[32.44,126.8],[33.67,123.68],[35.33,120.75],[37.4,118.1],[39.86,115.82],[42.68,114],[45.79,112.71],[49.07,112.01]],[[126.89,95.19],[130.56,95.44],[134.16,96.17],[137.64,97.36],[140.94,98.99],[143.98,101.06],[146.73,103.5],[149.13,106.29],[151.14,109.37],[152.72,112.69],[153.86,116.19],[154.54,119.8],[154.74,123.47],[154.45,127.14],[153.67,130.74],[152.43,134.2],[150.76,137.48],[148.69,140.51],[146.25,143.27],[143.48,145.69],[140.43,147.75],[137.14,149.39],[133.66,150.59],[130.06,151.32],[126.39,151.56],[122.72,151.31],[119.11,150.59],[115.63,149.4],[112.34,147.76],[109.29,145.7],[106.54,143.26],[104.14,140.47],[102.13,137.39],[100.55,134.07],[99.41,130.57],[98.73,126.96],[98.53,123.28],[98.83,119.62],[99.6,116.02],[100.84,112.56],[102.51,109.28],[104.59,106.25],[107.03,103.49],[109.79,101.07],[112.84,99.01],[116.13,97.36],[119.61,96.16],[123.22,95.43]]],[[[72.34,79.33],[74.93,79.64],[77.52,79.94],[80.12,80.25],[82.71,80.57],[85.3,80.91],[87.88,81.26],[90.47,81.63],[93.05,82],[95.63,82.39],[98.21,82.79],[100.79,83.21],[103.37,83.63],[105.94,84.07],[108.51,84.52],[111.09,84.92],[113.65,85.44],[115.99,86.56],[117.75,88.47],[118.68,90.89],[118.57,93.48],[117.47,95.83],[115.57,97.6],[113.16,98.56],[110.56,98.58],[108,98.1],[105.43,97.64],[102.85,97.19],[100.28,96.76],[97.7,96.33],[95.12,95.93],[92.54,95.53],[89.96,95.14],[87.38,94.77],[84.79,94.4],[82.2,94.06],[79.62,93.72],[77.02,93.41],[74.43,93.11],[71.84,92.81],[69.24,92.5],[66.78,91.69],[64.99,89.83],[64.25,87.35],[64.5,84.76],[65.58,82.39],[67.38,80.53],[69.74,79.45]],[[136.83,90.25],[139.33,90.71],[141.8,91.34],[144.28,91.93],[146.75,92.53],[149.22,93.14],[151.69,93.77],[154.15,94.4],[156.62,95.05],[159.08,95.71],[161.53,96.38],[163.98,97.07],[166.43,97.76],[168.88,98.47],[171.32,99.2],[173.75,99.94],[176.19,100.67],[178.49,101.74],[180.18,103.62],[181.12,105.98],[181.31,108.51],[180.69,110.96],[179.21,113.01],[176.98,114.19],[174.46,114.13],[172.02,113.41],[169.58,112.66],[167.14,111.93],[164.7,111.22],[162.25,110.52],[159.8,109.84],[157.34,109.17],[154.88,108.52],[152.42,107.88],[149.95,107.26],[147.48,106.64],[145.01,106.03],[142.54,105.42],[140.06,104.81],[137.59,104.21],[135.12,103.61],[132.78,102.62],[130.96,100.86],[129.93,98.55],[129.77,96.02],[130.49,93.59],[132.06,91.61],[134.31,90.46]]],[[[107.05,116.19],[110.26,116.71],[113.26,118],[115.85,119.97],[117.92,122.49],[119.29,125.45],[120.04,128.63],[120.54,131.86],[121.04,135.09],[121.54,138.31],[122.06,141.54],[122.59,144.77],[123.12,147.99],[123.67,151.21],[124.22,154.43],[124.8,157.65],[125.4,160.86],[125.95,164.08],[126.04,167.34],[125.2,170.49],[123.53,173.28],[121.14,175.49],[118.26,177.02],[115.11,177.87],[111.85,178.04],[108.63,177.56],[105.58,176.41],[102.87,174.58],[100.72,172.14],[99.35,169.18],[98.61,166],[98.04,162.78],[97.47,159.57],[96.91,156.35],[96.36,153.13],[95.83,149.9],[95.3,146.68],[94.78,143.45],[94.27,140.22],[93.76,137],[93.26,133.77],[92.82,130.53],[92.96,127.27],[93.87,124.15],[95.55,121.35],[97.88,119.07],[100.68,117.41],[103.79,116.44]],[[189.21,121.96],[191.36,122.71],[192.8,124.5],[193.41,126.73],[193.32,129.04],[192.59,131.23],[191.22,133.09],[189.28,134.34],[187.12,135.19],[184.95,136],[182.78,136.83],[180.61,137.63],[178.43,138.43],[176.24,139.2],[174.05,139.95],[171.85,140.69],[169.64,141.4],[167.43,142.09],[165.21,142.76],[162.98,143.42],[160.75,144.05],[158.51,144.66],[156.27,145.25],[154.02,145.81],[151.72,145.98],[149.57,145.18],[148.01,143.49],[147.25,141.31],[147.31,139],[148.16,136.86],[149.7,135.14],[151.74,134.05],[153.97,133.43],[156.21,132.84],[158.45,132.22],[160.68,131.59],[162.91,130.93],[165.13,130.26],[167.34,129.58],[169.55,128.87],[171.76,128.15],[173.95,127.41],[176.15,126.65],[178.33,125.87],[180.51,125.08],[182.68,124.26],[184.84,123.41],[186.98,122.53]]],[[[98.62,121.53],[100.72,121.6],[102.78,122.03],[104.72,122.83],[106.49,123.97],[108.01,125.42],[109.24,127.12],[110.15,129.02],[110.66,131.05],[110.78,133.15],[110.62,135.25],[110.34,137.33],[110.04,139.42],[109.76,141.5],[109.49,143.59],[109.21,145.68],[108.92,147.76],[108.6,149.84],[108.08,151.88],[107.18,153.78],[105.92,155.45],[104.34,156.83],[102.51,157.86],[100.51,158.52],[98.43,158.81],[96.33,158.72],[94.28,158.27],[92.33,157.47],[90.57,156.33],[89.03,154.89],[87.78,153.21],[86.85,151.32],[86.29,149.3],[86.13,147.2],[86.28,145.11],[86.57,143.02],[86.9,140.94],[87.2,138.86],[87.49,136.78],[87.79,134.69],[88.08,132.61],[88.4,130.53],[88.96,128.5],[89.88,126.61],[91.15,124.94],[92.73,123.56],[94.56,122.52],[96.54,121.84]],[[155.31,127.29],[157.36,127.43],[159.33,127.99],[161.14,128.96],[162.7,130.29],[163.95,131.92],[164.84,133.77],[165.35,135.75],[165.49,137.8],[165.35,139.85],[165.07,141.89],[164.79,143.92],[164.53,145.96],[164.26,148],[163.97,150.04],[163.65,152.06],[163.27,154.09],[162.7,156.06],[161.83,157.92],[160.68,159.62],[159.29,161.13],[157.69,162.41],[155.9,163.42],[153.97,164.1],[151.94,164.41],[149.89,164.32],[147.9,163.82],[146.06,162.92],[144.47,161.62],[143.24,159.98],[142.41,158.1],[142,156.09],[142.01,154.04],[142.32,152.01],[142.64,149.98],[142.96,147.95],[143.25,145.92],[143.51,143.88],[143.73,141.83],[143.97,139.79],[144.27,137.76],[144.74,135.76],[145.53,133.87],[146.62,132.13],[147.98,130.59],[149.57,129.28],[151.35,128.27],[153.28,127.58]]]],\"pools\":{\"sleeping\":[13,22,4],\"waking\":[13],\"idle\":[0,8],\"listening\":[10,1,19],\"thinking\":[8,16,14,17,5],\"searching\":[15,9,3,20,12,18],\"working\":[7,16,11,10],\"excited\":[2,17,21,3,11],\"surprised\":[3,21],\"suspicious\":[14,5,23],\"angry\":[7,16],\"drowsy\":[4,22,13],\"happy\":[2,11,17,19],\"curious\":[3,21,0,15],\"confused\":[14,5,8],\"bored\":[4,22,0],\"proud\":[15,8,2],\"shy\":[0,24,13],\"sad\":[4,13,22],\"laughing\":[2,11,17],\"scared\":[3,21],\"playful\":[2,17,11,8],\"celebrate\":[2,8,17],\"orbit\":[0,8],\"radar\":[0,8],\"progress\":[0,8],\"spawning\":[3,0],\"humming\":[0,8],\"loading\":[0,8],\"dictating\":[10,1,19],\"sending\":[0,8],\"receiving\":[19,0,8],\"uploading\":[15,9,8],\"writing\":[15,9],\"notifying\":[3,21,0],\"alerting\":[3,21],\"bouncing\":[2,17],\"dragging\":[3,15,0],\"powering-down\":[13,22],\"thinking-dots\":[8,16,14,17,5]}} as const\n","var _a;\n/** A special constant with type `never` */\nexport const NEVER = /*@__PURE__*/ Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\n(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});\nexport const globalConfig = globalThis.__zod_globalConfig;\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","import { globalConfig } from \"./core.js\";\n// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const ratio = val / step;\n const roundedRatio = Math.round(ratio);\n // Use a relative epsilon scaled to the magnitude of the result\n const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);\n if (Math.abs(ratio - roundedRatio) < tolerance)\n return 0;\n return ratio - roundedRatio;\n}\nconst EVALUATING = /* @__PURE__*/ Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = /* @__PURE__*/ cached(() => {\n // Skip the probe under `jitless`: strict CSPs report the caught `new Function`\n // as a `securitypolicyviolation` even though the throw is swallowed.\n if (globalConfig.jitless) {\n return false;\n }\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n if (o instanceof Map)\n return new Map(o);\n if (o instanceof Set)\n return new Set(o);\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = /* @__PURE__*/ new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = /* @__PURE__*/ new Set([\n \"string\",\n \"number\",\n \"bigint\",\n \"boolean\",\n \"symbol\",\n \"undefined\",\n]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n if (a._zod.def.checks?.length) {\n throw new Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");\n }\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: b._zod.def.checks ?? [],\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\n// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined).\n// Used to respect `abort: true` in .refine() even for checks that have a `when` function.\nexport function explicitlyAborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue === false) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const message = iss.message\n ? iss.message\n : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\");\n const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;\n rest.path ?? (rest.path = []);\n rest.message = message;\n if (ctx?.reportInput) {\n rest.input = _input;\n }\n return rest;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error, path = []) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n","export const version = {\n major: 4,\n minor: 4,\n patch: 3,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n if (util.explicitlyAborted(payload))\n continue;\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // When normalize is off, require :// for http/https URLs\n // This prevents strings like \"http:example.com\" or \"https:/path\" from being silently accepted\n if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source) {\n if (!/^https?:\\/\\//i.test(trimmed)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid URL format\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n }\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n // atob ignores whitespace, so reject it up front.\n if (/\\s/.test(data))\n return false;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {\n const isPresent = key in input;\n if (result.issues.length) {\n // For optional-in/out schemas, ignore errors on absent keys.\n if (isOptionalIn && isOptionalOut && !isPresent) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (!isPresent && !isOptionalIn) {\n if (!result.issues.length) {\n final.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [key],\n });\n }\n return;\n }\n if (result.value === undefined) {\n if (isPresent) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalIn = _catchall.optin === \"optional\";\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n // skip __proto__ so it can't replace the result prototype via the\n // assignment setter on the plain {} we build into\n if (key === \"__proto__\")\n continue;\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalIn = el._zod.optin === \"optional\";\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalIn = schema?._zod?.optin === \"optional\";\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalIn && isOptionalOut) {\n // For optional-in/out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else if (!isOptionalIn) {\n doc.write(`\n const ${id}_present = ${k} in input;\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n if (!${id}_present && !${id}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${k}]\n });\n }\n\n if (${id}_present) {\n if (${id}.value === undefined) {\n newResult[${k}] = undefined;\n } else {\n newResult[${k}] = ${id}.value;\n }\n }\n\n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n // Fall back to union matching when the fast discriminator path fails:\n // - explicitly enabled via unionFallback, or\n // - during backward direction (encode), since codec-based discriminators\n // have different values in forward vs backward directions\n if (def.unionFallback || ctx.direction === \"backward\") {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n options: Array.from(disc.value.keys()),\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const optinStart = getTupleOptStart(items, \"optin\");\n const optoutStart = getTupleOptStart(items, \"optout\");\n if (!def.rest) {\n if (input.length < optinStart) {\n payload.issues.push({\n code: \"too_small\",\n minimum: optinStart,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n if (input.length > items.length) {\n payload.issues.push({\n code: \"too_big\",\n maximum: items.length,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n }\n }\n // Run every item in parallel, collecting results into an indexed\n // array. The post-processing in `handleTupleResults` walks them in\n // order so it can decide whether an absent optional-output error can\n // truncate the tail or must be reported to preserve required output.\n const itemResults = new Array(items.length);\n for (let i = 0; i < items.length; i++) {\n const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((rr) => {\n itemResults[i] = rr;\n }));\n }\n else {\n itemResults[i] = r;\n }\n }\n if (def.rest) {\n let i = items.length - 1;\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({ value: el, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((r) => handleTupleResult(r, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));\n }\n return handleTupleResults(itemResults, payload, items, input, optoutStart);\n };\n});\nfunction getTupleOptStart(items, key) {\n for (let i = items.length - 1; i >= 0; i--) {\n if (items[i]._zod[key] !== \"optional\")\n return i + 1;\n }\n return 0;\n}\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nfunction handleTupleResults(itemResults, final, items, input, optoutStart) {\n // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional\n // rule, but only after `optoutStart`: the first index where the output\n // tuple tail can be absent.\n for (let i = 0; i < items.length; i++) {\n const r = itemResults[i];\n const isPresent = i < input.length;\n if (r.issues.length) {\n if (!isPresent && i >= optoutStart) {\n final.value.length = i;\n break;\n }\n final.issues.push(...util.prefixIssues(i, r.issues));\n }\n final.value[i] = r.value;\n }\n // Drop trailing slots that produced `undefined` for absent input\n // (the array analog of an absent optional key on an object). The\n // `i >= input.length` floor is critical: an explicit `undefined`\n // *inside* the input must be preserved even when the schema is\n // optional-out (e.g. `z.string().or(z.undefined())` accepting an\n // explicit undefined value).\n for (let i = final.value.length - 1; i >= input.length; i--) {\n if (items[i]._zod.optout === \"optional\" && final.value[i] === undefined) {\n final.value.length = i;\n }\n else {\n break;\n }\n }\n return final;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (keyResult.issues.length) {\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n continue;\n }\n const outKey = keyResult.value;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n if (!Object.prototype.propertyIsEnumerable.call(input, key))\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n payload.fallback = true;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n payload.fallback = true;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (input === undefined && (result.issues.length || result.fallback)) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const input = payload.value;\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, input));\n return handleOptionalResult(result, input);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n payload.fallback = true;\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n payload.fallback = true;\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodPreprocess = /*@__PURE__*/ core.$constructor(\"$ZodPreprocess\", (inst, def) => {\n $ZodPipe.init(inst, def);\n});\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // Cache the resolved inner type on the shared `def` so all clones of this\n // lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance,\n // preserving identity for cycle detection on recursive schemas.\n util.defineLazy(inst._zod, \"innerType\", () => {\n const d = def;\n if (!d._cachedInner)\n d._cachedInner = def.getter();\n return d._cachedInner;\n });\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n","var _a;\nexport const $output = Symbol(\"ZodOutput\");\nexport const $input = Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link _cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn, params) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n }, params);\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n","import { globalRegistry } from \"./registries.js\";\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n external: params?.external ?? undefined,\n };\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n Object.assign(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && \"_prefault\" in result.schema)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema\n // defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes\n // multiple schemas map to the same seen object.\n // e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}` };\n }\n if (entry[1] === root) {\n return { ref: \"#\" };\n }\n // self-contained schema\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + defId };\n };\n // stored cached version in `def` property\n // remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema\n // or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/<root>` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n Object.assign(schema, refSchema);\n }\n // restore child's own properties (child wins)\n Object.assign(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema\n // This handles cases like: readonly().meta({id}).describe()\n // where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n Object.assign(result, root.def ?? root.schema);\n // The `id` in `.meta()` is a Zod-specific registration tag used to extract\n // schemas into $defs — it is not user-facing JSON Schema metadata. Strip it\n // from the output body where it would otherwise leak. The id is preserved\n // implicitly via the $defs key (and via $ref paths).\n const rootMetaId = ctx.metadataRegistry.get(schema)?.id;\n if (rootMetaId !== undefined && result.id === rootMetaId)\n delete result.id;\n // build defs object\n const defs = ctx.external?.defs ?? {};\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n if (seen.def.id === seen.defId)\n delete seen.def.id;\n defs[seen.defId] = seen.def;\n }\n }\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed\n // each call to finalize() is functionally independent\n // though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n if (_schema._zod.traits.has(\"$ZodCodec\"))\n return true;\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n","import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n if (exMin) {\n if (legacy) {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n else if (typeof minimum === \"number\") {\n json.minimum = minimum;\n }\n if (exMax) {\n if (legacy) {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n else if (typeof maximum === \"number\") {\n json.maximum = maximum;\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, {\n ...params,\n path: [...params.path, \"items\"],\n });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n","import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n Object.defineProperties(inst, {\n format: {\n value: (mapper) => core.formatError(inst, mapper),\n // enumerable: false,\n },\n flatten: {\n value: (mapper) => core.flattenError(inst, mapper),\n // enumerable: false,\n },\n addIssue: {\n value: (issue) => {\n inst.issues.push(issue);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n addIssues: {\n value: (issues) => {\n inst.issues.push(...issues);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n isEmpty: {\n get() {\n return inst.issues.length === 0;\n },\n // enumerable: false,\n },\n });\n // Object.defineProperty(inst, \"isEmpty\", {\n // get() {\n // return inst.issues.length === 0;\n // },\n // });\n};\nexport const ZodError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n","import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n","import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport * as checks from \"./checks.js\";\nimport * as iso from \"./iso.js\";\nimport * as parse from \"./parse.js\";\n// Lazy-bind builder methods.\n//\n// Builder methods (`.optional`, `.array`, `.refine`, ...) live as\n// non-enumerable getters on each concrete schema constructor's\n// prototype. On first access from an instance the getter allocates\n// `fn.bind(this)` and caches it as an own property on that instance,\n// so detached usage (`const m = schema.optional; m()`) still works\n// and the per-instance allocation only happens for methods actually\n// touched.\n//\n// One install per (prototype, group), memoized by `_installedGroups`.\nconst _installedGroups = /* @__PURE__ */ new WeakMap();\nfunction _installLazyMethods(inst, group, methods) {\n const proto = Object.getPrototypeOf(inst);\n let installed = _installedGroups.get(proto);\n if (!installed) {\n installed = new Set();\n _installedGroups.set(proto, installed);\n }\n if (installed.has(group))\n return;\n installed.add(group);\n for (const key in methods) {\n const fn = methods[key];\n Object.defineProperty(proto, key, {\n configurable: true,\n enumerable: false,\n get() {\n const bound = fn.bind(this);\n Object.defineProperty(this, key, {\n configurable: true,\n writable: true,\n enumerable: true,\n value: bound,\n });\n return bound;\n },\n set(v) {\n Object.defineProperty(this, key, {\n configurable: true,\n writable: true,\n enumerable: true,\n value: v,\n });\n },\n });\n }\n}\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n core.$ZodType.init(inst, def);\n Object.assign(inst[\"~standard\"], {\n jsonSchema: {\n input: createStandardJSONSchemaMethod(inst, \"input\"),\n output: createStandardJSONSchemaMethod(inst, \"output\"),\n },\n });\n inst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n inst.def = def;\n inst.type = def.type;\n Object.defineProperty(inst, \"_def\", { value: def });\n // Parse-family is intentionally kept as per-instance closures: these are\n // the hot path AND the most-detached methods (`arr.map(schema.parse)`,\n // `const { parse } = schema`, etc.). Eager closures here mean callers pay\n // ~12 closure allocations per schema but get monomorphic call sites and\n // detached usage that \"just works\".\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.spa = inst.safeParseAsync;\n inst.encode = (data, params) => parse.encode(inst, data, params);\n inst.decode = (data, params) => parse.decode(inst, data, params);\n inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);\n inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);\n inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);\n inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);\n inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);\n inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);\n // All builder methods are placed on the internal prototype as lazy-bind\n // getters. On first access per-instance, a bound thunk is allocated and\n // cached as an own property; subsequent accesses skip the getter. This\n // means: no per-instance allocation for unused methods, full\n // detachability preserved (`const m = schema.optional; m()` works), and\n // shared underlying function references across all instances.\n _installLazyMethods(inst, \"ZodType\", {\n check(...chks) {\n const def = this.def;\n return this.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...chks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), { parent: true });\n },\n with(...chks) {\n return this.check(...chks);\n },\n clone(def, params) {\n return core.clone(this, def, params);\n },\n brand() {\n return this;\n },\n register(reg, meta) {\n reg.add(this, meta);\n return this;\n },\n refine(check, params) {\n return this.check(refine(check, params));\n },\n superRefine(refinement, params) {\n return this.check(superRefine(refinement, params));\n },\n overwrite(fn) {\n return this.check(checks.overwrite(fn));\n },\n optional() {\n return optional(this);\n },\n exactOptional() {\n return exactOptional(this);\n },\n nullable() {\n return nullable(this);\n },\n nullish() {\n return optional(nullable(this));\n },\n nonoptional(params) {\n return nonoptional(this, params);\n },\n array() {\n return array(this);\n },\n or(arg) {\n return union([this, arg]);\n },\n and(arg) {\n return intersection(this, arg);\n },\n transform(tx) {\n return pipe(this, transform(tx));\n },\n default(d) {\n return _default(this, d);\n },\n prefault(d) {\n return prefault(this, d);\n },\n catch(params) {\n return _catch(this, params);\n },\n pipe(target) {\n return pipe(this, target);\n },\n readonly() {\n return readonly(this);\n },\n describe(description) {\n const cl = this.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n },\n meta(...args) {\n // overloaded: meta() returns the registered metadata, meta(data)\n // returns a clone with `data` registered. The mapped type picks\n // up the second overload, so we accept variadic any-args and\n // return `any` to satisfy both at runtime.\n if (args.length === 0)\n return core.globalRegistry.get(this);\n const cl = this.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n },\n isOptional() {\n return this.safeParse(undefined).success;\n },\n isNullable() {\n return this.safeParse(null).success;\n },\n apply(fn) {\n return fn(this);\n },\n });\n Object.defineProperty(inst, \"description\", {\n get() {\n return core.globalRegistry.get(inst)?.description;\n },\n configurable: true,\n });\n return inst;\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n _installLazyMethods(inst, \"_ZodString\", {\n regex(...args) {\n return this.check(checks.regex(...args));\n },\n includes(...args) {\n return this.check(checks.includes(...args));\n },\n startsWith(...args) {\n return this.check(checks.startsWith(...args));\n },\n endsWith(...args) {\n return this.check(checks.endsWith(...args));\n },\n min(...args) {\n return this.check(checks.minLength(...args));\n },\n max(...args) {\n return this.check(checks.maxLength(...args));\n },\n length(...args) {\n return this.check(checks.length(...args));\n },\n nonempty(...args) {\n return this.check(checks.minLength(1, ...args));\n },\n lowercase(params) {\n return this.check(checks.lowercase(params));\n },\n uppercase(params) {\n return this.check(checks.uppercase(params));\n },\n trim() {\n return this.check(checks.trim());\n },\n normalize(...args) {\n return this.check(checks.normalize(...args));\n },\n toLowerCase() {\n return this.check(checks.toLowerCase());\n },\n toUpperCase() {\n return this.check(checks.toUpperCase());\n },\n slugify() {\n return this.check(checks.slugify());\n },\n });\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n inst.email = (params) => inst.check(core._email(ZodEmail, params));\n inst.url = (params) => inst.check(core._url(ZodURL, params));\n inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));\n inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));\n inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));\n inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));\n inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));\n inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));\n inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));\n inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));\n inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));\n inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));\n inst.xid = (params) => inst.check(core._xid(ZodXID, params));\n inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));\n inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));\n inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));\n inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));\n inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));\n inst.e164 = (params) => inst.check(core._e164(ZodE164, params));\n // iso\n inst.datetime = (params) => inst.check(iso.datetime(params));\n inst.date = (params) => inst.check(iso.date(params));\n inst.time = (params) => inst.check(iso.time(params));\n inst.duration = (params) => inst.check(iso.duration(params));\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: core.regexes.httpProtocol,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\n/**\n * Validates a CUID v1 string.\n *\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n _installLazyMethods(inst, \"ZodNumber\", {\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n int(params) {\n return this.check(int(params));\n },\n safe(params) {\n return this.check(int(params));\n },\n positive(params) {\n return this.check(checks.gt(0, params));\n },\n nonnegative(params) {\n return this.check(checks.gte(0, params));\n },\n negative(params) {\n return this.check(checks.lt(0, params));\n },\n nonpositive(params) {\n return this.check(checks.lte(0, params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n step(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n finite() {\n return this;\n },\n });\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));\n inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));\n inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));\n inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n _installLazyMethods(inst, \"ZodArray\", {\n min(n, params) {\n return this.check(checks.minLength(n, params));\n },\n nonempty(params) {\n return this.check(checks.minLength(1, params));\n },\n max(n, params) {\n return this.check(checks.maxLength(n, params));\n },\n length(n, params) {\n return this.check(checks.length(n, params));\n },\n unwrap() {\n return this.element;\n },\n });\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.defineLazy(inst, \"shape\", () => {\n return def.shape;\n });\n _installLazyMethods(inst, \"ZodObject\", {\n keyof() {\n return _enum(Object.keys(this._zod.def.shape));\n },\n catchall(catchall) {\n return this.clone({ ...this._zod.def, catchall: catchall });\n },\n passthrough() {\n return this.clone({ ...this._zod.def, catchall: unknown() });\n },\n loose() {\n return this.clone({ ...this._zod.def, catchall: unknown() });\n },\n strict() {\n return this.clone({ ...this._zod.def, catchall: never() });\n },\n strip() {\n return this.clone({ ...this._zod.def, catchall: undefined });\n },\n extend(incoming) {\n return util.extend(this, incoming);\n },\n safeExtend(incoming) {\n return util.safeExtend(this, incoming);\n },\n merge(other) {\n return util.merge(this, other);\n },\n pick(mask) {\n return util.pick(this, mask);\n },\n omit(mask) {\n return util.omit(this, mask);\n },\n partial(...args) {\n return util.partial(ZodOptional, this, args[0]);\n },\n required(...args) {\n return util.required(ZodNonOptional, this, args[0]);\n },\n });\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n inst.rest = (rest) => inst.clone({\n ...inst._zod.def,\n rest: rest,\n });\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()\n if (!valueType || !valueType._zod) {\n return new ZodRecord({\n type: \"record\",\n keyType: string(),\n valueType: keyType,\n ...util.normalizeParams(valueType),\n });\n }\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output<core.$ZodRecordKey>;\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n payload.fallback = true;\n return payload;\n });\n }\n payload.value = output;\n payload.fallback = true;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport function invertCodec(codec) {\n const def = codec._zod.def;\n return new ZodCodec({\n type: \"pipe\",\n in: def.out,\n out: def.in,\n transform: def.reverseTransform,\n reverseTransform: def.transform,\n });\n}\nexport const ZodPreprocess = /*@__PURE__*/ core.$constructor(\"ZodPreprocess\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodPreprocess.init(inst, def);\n});\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn, params) {\n return core._superRefine(fn, params);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\nexport function preprocess(fn, schema) {\n return new ZodPreprocess({\n type: \"pipe\",\n in: transform(fn),\n out: schema,\n });\n}\n","// Adapted from OpenMausBot (3a84701), Apache-2.0. See THIRD_PARTY_NOTICES.md.\n/**\n * The mascot bodies a bot can wear.\n *\n * GENERATED FILE — do not hand-edit. Run `pnpm gen:bodies` to rebuild it from\n * `scripts/gen-mascot-bodies.ts`, which solves each face placement against the real\n * expression geometry and verifies that nothing clips.\n *\n * Every body carries the same face at the same size: the generator clamps the whole\n * catalog to the smallest face any one body can hold, so the mascot reads as one\n * character in different bodies rather than ten different mascots. Roomier bodies simply\n * end up with more margin around the face.\n *\n * The fields match `CursorSilhouette` exactly, so a body can be handed to the renderer\n * with no adapter in between.\n */\n\nimport { z } from \"zod\";\n\n/** Every selectable body id, in the order the picker shows them. */\nexport const MASCOT_BODY_IDS = [\"cursor\", \"blob\", \"circle\", \"squircle\", \"capsule\", \"drop\", \"shield\", \"hexagon\", \"diamond\", \"star\"] as const;\n\nexport type MascotBodyId = (typeof MASCOT_BODY_IDS)[number];\n\nexport const mascotBodySchema = z.enum(MASCOT_BODY_IDS);\n\nexport interface MascotBody {\n id: MascotBodyId;\n /** Human-readable name, used for the picker and the accessible label. */\n name: string;\n /** Transform mapping the outline into the face box. */\n fit: string;\n /** Body markup. `{{GRADIENT}}` is replaced with the bot's own gradient. */\n body: string;\n /** The same outline without a fill, used as the clip region. */\n clip: string;\n /** Where the face sits inside the body, in face-space units. */\n anchor: { x: number; y: number; scale: number };\n}\n\n/** The shipped mascot, and the fallback for any unrecognised value. */\nexport const DEFAULT_MASCOT_BODY: MascotBodyId = \"cursor\";\n\nexport const MASCOT_BODIES: Record<MascotBodyId, MascotBody> = {\n cursor: {\n id: \"cursor\",\n name: \"Cursor\",\n fit: \"translate(68.1612 9.8302) scale(0.593918)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M0 0 C1.12815992 0.94880479 2.25705591 1.89673511 3.38671875 2.84375 C5.57657936 4.68528228 7.75793952 6.53624249 9.93359375 8.39453125 C13.5602214 11.48647103 17.25022962 14.49819427 20.9453125 17.5078125 C25.41301487 21.15281776 29.86103386 24.8215994 34.31054688 28.48876953 C38.00933931 31.5370903 41.70951059 34.58367973 45.4140625 37.625 C52.50037463 43.44570076 59.55669812 49.29508834 66.54003906 55.23901367 C70.43289872 58.54377434 74.40406577 61.73568847 78.40625 64.90625 C82.05401433 67.85083084 85.6145398 70.89451533 89.18359375 73.93359375 C92.41424312 76.67774533 95.67698054 79.36747809 99 82 C103.47931906 85.54855146 107.83340036 89.22936876 112.18359375 92.93359375 C115.41424312 95.67774533 118.67698054 98.36747809 122 101 C125.9014198 104.09073517 129.71091352 107.27378506 133.5 110.5 C137.99002543 114.32092614 142.53350963 118.0537239 147.15234375 121.71875 C156.74255328 129.40144186 166.1812645 137.27326897 175.53833008 145.23754883 C179.4317456 148.54281661 183.40347641 151.73522157 187.40625 154.90625 C191.05401433 157.85083084 194.6145398 160.89451533 198.18359375 163.93359375 C201.41424312 166.67774533 204.67698054 169.36747809 208 172 C236.43637507 194.63776677 236.43637507 194.63776677 238.27050781 209.13867188 C239.19944445 221.27193361 237.57124038 231.13444436 230 241 C223.66050278 247.82715086 215.75482398 254.47140646 206.04764748 255.13307858 C205.3615811 255.13693349 204.67551472 255.1407884 203.96865845 255.14476013 C203.17563324 255.15165863 202.38260803 255.15855713 201.56555176 255.16566467 C200.27360901 255.16958473 200.27360901 255.16958473 198.95556641 255.17358398 C198.04112762 255.180271 197.12668884 255.18695801 196.18453979 255.19384766 C194.19843498 255.20789156 192.21231409 255.21978771 190.22618484 255.22979546 C187.07149762 255.24625057 183.91692738 255.26949556 180.76229858 255.29469299 C171.79227585 255.36530712 162.82220292 255.42526708 153.85205078 255.47680664 C148.36195434 255.5088283 142.87198905 255.55017011 137.38199997 255.59700203 C135.30028042 255.61289593 133.21853066 255.62527474 131.13676834 255.63390923 C104.46972494 255.74602279 80.75351522 259.19455182 60.52978516 278.41845703 C55.75259196 283.35727885 51.81217213 289.04473423 47.77441406 294.5859375 C44.62107661 298.87600364 41.36381878 303.08685058 38.125 307.3125 C32.82026548 314.26649347 27.55386673 321.24815866 22.3125 328.25 C21.07690581 329.89589556 19.84122979 331.5417297 18.60546875 333.1875 C16.22002164 336.36552908 13.84996009 339.55428087 11.48828125 342.75 C3.0450311 354.10095576 -5.25712203 365.22607871 -20 368 C-33.42903027 368.85957067 -44.2929604 367.90032788 -55 358.9140625 C-63.51513963 350.76480778 -67.79688328 340.99527428 -68.37686157 329.29350281 C-68.43541887 328.1487851 -68.49397617 327.00406738 -68.55430794 325.82466125 C-68.61453573 324.57243271 -68.67476353 323.32020416 -68.73681641 322.0300293 C-68.80423726 320.68369989 -68.87198477 319.33738681 -68.94003105 317.99108887 C-69.12569162 314.29881586 -69.30666938 310.60632592 -69.48688698 306.91378379 C-69.68142908 302.94481208 -69.88036562 298.97606035 -70.07873535 295.00727844 C-70.55465828 285.46711948 -71.02377004 275.92663022 -71.49235249 266.3861084 C-71.71278092 261.90166682 -71.93398876 257.41726373 -72.1552124 252.93286133 C-72.22122149 251.59460763 -72.22122149 251.59460763 -72.28856409 250.2293185 C-72.37783973 248.41936974 -72.46711776 246.6094211 -72.55639815 244.79947257 C-72.7821203 240.22326204 -73.00777832 235.64704836 -73.23336792 231.0708313 C-73.2783997 230.15734865 -73.32343148 229.24386601 -73.36982787 228.30270207 C-73.64581049 222.70253299 -73.92113412 217.10233189 -74.19602597 211.50210917 C-75.35713101 187.85146938 -76.54638525 164.20245932 -77.76320994 140.55462319 C-78.3174362 129.77404232 -78.86176258 118.9929594 -79.40472984 108.2118063 C-79.83986282 99.58021501 -80.28322749 90.94912395 -80.73695588 82.31848997 C-81.04621068 76.42094211 -81.34513355 70.52292566 -81.63612723 64.62444884 C-81.8031421 61.24551841 -81.97612174 57.86718776 -82.15861511 54.48903847 C-84.29931862 14.73242483 -84.29931862 14.73242483 -72.03125 -1.625 C-50.89854752 -24.96559677 -21.34867451 -18.24899383 0 0 Z \\\"/>\",\n clip: \"<path d=\\\"M0 0 C1.12815992 0.94880479 2.25705591 1.89673511 3.38671875 2.84375 C5.57657936 4.68528228 7.75793952 6.53624249 9.93359375 8.39453125 C13.5602214 11.48647103 17.25022962 14.49819427 20.9453125 17.5078125 C25.41301487 21.15281776 29.86103386 24.8215994 34.31054688 28.48876953 C38.00933931 31.5370903 41.70951059 34.58367973 45.4140625 37.625 C52.50037463 43.44570076 59.55669812 49.29508834 66.54003906 55.23901367 C70.43289872 58.54377434 74.40406577 61.73568847 78.40625 64.90625 C82.05401433 67.85083084 85.6145398 70.89451533 89.18359375 73.93359375 C92.41424312 76.67774533 95.67698054 79.36747809 99 82 C103.47931906 85.54855146 107.83340036 89.22936876 112.18359375 92.93359375 C115.41424312 95.67774533 118.67698054 98.36747809 122 101 C125.9014198 104.09073517 129.71091352 107.27378506 133.5 110.5 C137.99002543 114.32092614 142.53350963 118.0537239 147.15234375 121.71875 C156.74255328 129.40144186 166.1812645 137.27326897 175.53833008 145.23754883 C179.4317456 148.54281661 183.40347641 151.73522157 187.40625 154.90625 C191.05401433 157.85083084 194.6145398 160.89451533 198.18359375 163.93359375 C201.41424312 166.67774533 204.67698054 169.36747809 208 172 C236.43637507 194.63776677 236.43637507 194.63776677 238.27050781 209.13867188 C239.19944445 221.27193361 237.57124038 231.13444436 230 241 C223.66050278 247.82715086 215.75482398 254.47140646 206.04764748 255.13307858 C205.3615811 255.13693349 204.67551472 255.1407884 203.96865845 255.14476013 C203.17563324 255.15165863 202.38260803 255.15855713 201.56555176 255.16566467 C200.27360901 255.16958473 200.27360901 255.16958473 198.95556641 255.17358398 C198.04112762 255.180271 197.12668884 255.18695801 196.18453979 255.19384766 C194.19843498 255.20789156 192.21231409 255.21978771 190.22618484 255.22979546 C187.07149762 255.24625057 183.91692738 255.26949556 180.76229858 255.29469299 C171.79227585 255.36530712 162.82220292 255.42526708 153.85205078 255.47680664 C148.36195434 255.5088283 142.87198905 255.55017011 137.38199997 255.59700203 C135.30028042 255.61289593 133.21853066 255.62527474 131.13676834 255.63390923 C104.46972494 255.74602279 80.75351522 259.19455182 60.52978516 278.41845703 C55.75259196 283.35727885 51.81217213 289.04473423 47.77441406 294.5859375 C44.62107661 298.87600364 41.36381878 303.08685058 38.125 307.3125 C32.82026548 314.26649347 27.55386673 321.24815866 22.3125 328.25 C21.07690581 329.89589556 19.84122979 331.5417297 18.60546875 333.1875 C16.22002164 336.36552908 13.84996009 339.55428087 11.48828125 342.75 C3.0450311 354.10095576 -5.25712203 365.22607871 -20 368 C-33.42903027 368.85957067 -44.2929604 367.90032788 -55 358.9140625 C-63.51513963 350.76480778 -67.79688328 340.99527428 -68.37686157 329.29350281 C-68.43541887 328.1487851 -68.49397617 327.00406738 -68.55430794 325.82466125 C-68.61453573 324.57243271 -68.67476353 323.32020416 -68.73681641 322.0300293 C-68.80423726 320.68369989 -68.87198477 319.33738681 -68.94003105 317.99108887 C-69.12569162 314.29881586 -69.30666938 310.60632592 -69.48688698 306.91378379 C-69.68142908 302.94481208 -69.88036562 298.97606035 -70.07873535 295.00727844 C-70.55465828 285.46711948 -71.02377004 275.92663022 -71.49235249 266.3861084 C-71.71278092 261.90166682 -71.93398876 257.41726373 -72.1552124 252.93286133 C-72.22122149 251.59460763 -72.22122149 251.59460763 -72.28856409 250.2293185 C-72.37783973 248.41936974 -72.46711776 246.6094211 -72.55639815 244.79947257 C-72.7821203 240.22326204 -73.00777832 235.64704836 -73.23336792 231.0708313 C-73.2783997 230.15734865 -73.32343148 229.24386601 -73.36982787 228.30270207 C-73.64581049 222.70253299 -73.92113412 217.10233189 -74.19602597 211.50210917 C-75.35713101 187.85146938 -76.54638525 164.20245932 -77.76320994 140.55462319 C-78.3174362 129.77404232 -78.86176258 118.9929594 -79.40472984 108.2118063 C-79.83986282 99.58021501 -80.28322749 90.94912395 -80.73695588 82.31848997 C-81.04621068 76.42094211 -81.34513355 70.52292566 -81.63612723 64.62444884 C-81.8031421 61.24551841 -81.97612174 57.86718776 -82.15861511 54.48903847 C-84.29931862 14.73242483 -84.29931862 14.73242483 -72.03125 -1.625 C-50.89854752 -24.96559677 -21.34867451 -18.24899383 0 0 Z \\\"/>\",\n anchor: { x: 85.54, y: 106.35, scale: 0.791 },\n },\n blob: {\n id: \"blob\",\n name: \"Blob\",\n fit: \"translate(-0.7217 2.9555) scale(1.134706)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M198.91052 113.12915C198.30169 121.88191 196.37668 130.37605 193.1355 138.61157C189.89431 146.84709 185.49332 154.4026 179.93252 161.27809C174.37172 168.15358 167.99976 174.1053 160.81663 179.13325C153.6335 184.1612 145.98678 188.22176 137.87645 191.31491C129.76613 194.40806 121.42581 196.55178 112.85548 197.74609C104.28516 198.94039 95.66469 199.12755 86.99407 198.30758C78.32344 197.4876 69.86713 195.54477 61.62513 192.47909C53.38313 189.41341 45.74309 185.20915 38.70501 179.86633C31.66693 174.52351 25.60941 168.25632 20.53243 161.06476C15.45546 153.87319 11.54067 146.15559 8.78808 137.91195C6.03549 129.66831 4.37316 121.28874 3.80109 112.77325C3.22902 104.25775 3.5616 95.83136 4.79882 87.49409C6.03604 79.15682 8.08364 70.99969 10.94163 63.0227C13.79962 55.04571 17.53174 47.38891 22.13799 40.0523C26.74425 32.71568 32.30193 26.0276 38.81103 19.98806C45.32014 13.94852 52.65266 9.00619 60.80862 5.16109C68.96458 1.31599 77.53546 -1.10241 86.52128 -2.09412C95.50709 -3.08583 104.37427 -2.64309 113.12282 -0.76589C121.87137 1.11131 130.09712 4.12751 137.80007 8.28271C145.50302 12.43791 152.53652 17.35515 158.90058 23.03443C165.26463 28.7137 170.969 34.91856 176.01368 41.649C181.05836 48.37944 185.3953 55.56843 189.02451 63.21597C192.65372 70.86352 195.3609 78.90607 197.14605 87.34364C198.93119 95.78121 199.51935 104.37638 198.91052 113.12915Z\\\"/>\",\n clip: \"<path d=\\\"M198.91052 113.12915C198.30169 121.88191 196.37668 130.37605 193.1355 138.61157C189.89431 146.84709 185.49332 154.4026 179.93252 161.27809C174.37172 168.15358 167.99976 174.1053 160.81663 179.13325C153.6335 184.1612 145.98678 188.22176 137.87645 191.31491C129.76613 194.40806 121.42581 196.55178 112.85548 197.74609C104.28516 198.94039 95.66469 199.12755 86.99407 198.30758C78.32344 197.4876 69.86713 195.54477 61.62513 192.47909C53.38313 189.41341 45.74309 185.20915 38.70501 179.86633C31.66693 174.52351 25.60941 168.25632 20.53243 161.06476C15.45546 153.87319 11.54067 146.15559 8.78808 137.91195C6.03549 129.66831 4.37316 121.28874 3.80109 112.77325C3.22902 104.25775 3.5616 95.83136 4.79882 87.49409C6.03604 79.15682 8.08364 70.99969 10.94163 63.0227C13.79962 55.04571 17.53174 47.38891 22.13799 40.0523C26.74425 32.71568 32.30193 26.0276 38.81103 19.98806C45.32014 13.94852 52.65266 9.00619 60.80862 5.16109C68.96458 1.31599 77.53546 -1.10241 86.52128 -2.09412C95.50709 -3.08583 104.37427 -2.64309 113.12282 -0.76589C121.87137 1.11131 130.09712 4.12751 137.80007 8.28271C145.50302 12.43791 152.53652 17.35515 158.90058 23.03443C165.26463 28.7137 170.969 34.91856 176.01368 41.649C181.05836 48.37944 185.3953 55.56843 189.02451 63.21597C192.65372 70.86352 195.3609 78.90607 197.14605 87.34364C198.93119 95.78121 199.51935 104.37638 198.91052 113.12915Z\\\"/>\",\n anchor: { x: 111.22, y: 116.58, scale: 0.791 },\n },\n circle: {\n id: \"circle\",\n name: \"Circle\",\n fit: \"translate(0 0) scale(1.142705)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M200 100C200 155.22847 155.22847 200 100 200C44.77153 200 0 155.22847 0 100C0 44.77153 44.77153 0 100 0C155.22847 0 200 44.77153 200 100Z\\\"/>\",\n clip: \"<path d=\\\"M200 100C200 155.22847 155.22847 200 100 200C44.77153 200 0 155.22847 0 100C0 44.77153 44.77153 0 100 0C155.22847 0 200 44.77153 200 100Z\\\"/>\",\n anchor: { x: 113.82, y: 110.27, scale: 0.791 },\n },\n squircle: {\n id: \"squircle\",\n name: \"Squircle\",\n fit: \"translate(0 0) scale(1.142705)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M50 0C83.33333 0 116.66667 0 150 0C177.61424 0 200 22.38576 200 50C200 83.33333 200 116.66667 200 150C200 177.61424 177.61424 200 150 200C116.66667 200 83.33333 200 50 200C22.38576 200 0 177.61424 0 150C0 116.66667 0 83.33333 0 50C0 22.38576 22.38576 0 50 0Z\\\"/>\",\n clip: \"<path d=\\\"M50 0C83.33333 0 116.66667 0 150 0C177.61424 0 200 22.38576 200 50C200 83.33333 200 116.66667 200 150C200 177.61424 177.61424 200 150 200C116.66667 200 83.33333 200 50 200C22.38576 200 0 177.61424 0 150C0 116.66667 0 83.33333 0 50C0 22.38576 22.38576 0 50 0Z\\\"/>\",\n anchor: { x: 111.78, y: 111.79, scale: 0.791 },\n },\n capsule: {\n id: \"capsule\",\n name: \"Capsule\",\n fit: \"translate(0 0) scale(1.142705)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M100 0C141.42136 0 175 33.57864 175 75C175 91.66667 175 108.33333 175 125C175 166.42136 141.42136 200 100 200C58.57864 200 25 166.42136 25 125C25 108.33333 25 91.66667 25 75C25 33.57864 58.57864 0 100 0Z\\\"/>\",\n clip: \"<path d=\\\"M100 0C141.42136 0 175 33.57864 175 75C175 91.66667 175 108.33333 175 125C175 166.42136 141.42136 200 100 200C58.57864 200 25 166.42136 25 125C25 108.33333 25 91.66667 25 75C25 33.57864 58.57864 0 100 0Z\\\"/>\",\n anchor: { x: 113.82, y: 131.68, scale: 0.791 },\n },\n drop: {\n id: \"drop\",\n name: \"Drop\",\n fit: \"translate(-3.5341 -3.5341) scale(1.178046)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M100 3C160.84 78.2235 178 103.298 178 119C178 162.07821 143.07821 197 100 197C56.92179 197 22 162.07821 22 119C22 103.298 39.16 78.2235 100 3Z\\\"/>\",\n clip: \"<path d=\\\"M100 3C160.84 78.2235 178 103.298 178 119C178 162.07821 143.07821 197 100 197C56.92179 197 22 162.07821 22 119C22 103.298 39.16 78.2235 100 3Z\\\"/>\",\n anchor: { x: 112.47, y: 138.8, scale: 0.791 },\n },\n shield: {\n id: \"shield\",\n name: \"Shield\",\n fit: \"translate(-12.1611 -24.3222) scale(1.264316)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M57.25 38.475C85.75 12.825 114.25 12.825 142.75 38.475C153.89667 76.64167 165.04333 114.80833 176.19 152.975C188.73 184.325 179.325 200 147.975 200C115.99167 200 84.00833 200 52.025 200C20.675 200 11.27 184.325 23.81 152.975C34.95667 114.80833 46.10333 76.64167 57.25 38.475Z\\\"/>\",\n clip: \"<path d=\\\"M57.25 38.475C85.75 12.825 114.25 12.825 142.75 38.475C153.89667 76.64167 165.04333 114.80833 176.19 152.975C188.73 184.325 179.325 200 147.975 200C115.99167 200 84.00833 200 52.025 200C20.675 200 11.27 184.325 23.81 152.975C34.95667 114.80833 46.10333 76.64167 57.25 38.475Z\\\"/>\",\n anchor: { x: 112.38, y: 170.61, scale: 0.791 },\n },\n hexagon: {\n id: \"hexagon\",\n name: \"Hexagon\",\n fit: \"translate(-4.1077 -4.1077) scale(1.183782)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M94.90777 4.94C98.30259 2.98 101.69741 2.98 105.09223 4.94C129.98757 19.31333 154.88292 33.68667 179.77826 48.06C183.17308 50.02 184.87049 52.96 184.87049 56.88C184.87049 85.62667 184.87049 114.37333 184.87049 143.12C184.87049 147.04 183.17308 149.98 179.77826 151.94C154.88292 166.31333 129.98757 180.68667 105.09223 195.06C101.69741 197.02 98.30259 197.02 94.90777 195.06C70.01243 180.68667 45.11708 166.31333 20.22174 151.94C16.82692 149.98 15.12951 147.04 15.12951 143.12C15.12951 114.37333 15.12951 85.62667 15.12951 56.88C15.12951 52.96 16.82692 50.02 20.22174 48.06C45.11708 33.68667 70.01243 19.31333 94.90777 4.94Z\\\"/>\",\n clip: \"<path d=\\\"M94.90777 4.94C98.30259 2.98 101.69741 2.98 105.09223 4.94C129.98757 19.31333 154.88292 33.68667 179.77826 48.06C183.17308 50.02 184.87049 52.96 184.87049 56.88C184.87049 85.62667 184.87049 114.37333 184.87049 143.12C184.87049 147.04 183.17308 149.98 179.77826 151.94C154.88292 166.31333 129.98757 180.68667 105.09223 195.06C101.69741 197.02 98.30259 197.02 94.90777 195.06C70.01243 180.68667 45.11708 166.31333 20.22174 151.94C16.82692 149.98 15.12951 147.04 15.12951 143.12C15.12951 114.37333 15.12951 85.62667 15.12951 56.88C15.12951 52.96 16.82692 50.02 20.22174 48.06C45.11708 33.68667 70.01243 19.31333 94.90777 4.94Z\\\"/>\",\n anchor: { x: 112.26, y: 110.7, scale: 0.791 },\n },\n diamond: {\n id: \"diamond\",\n name: \"Diamond\",\n fit: \"translate(-5.9383 -5.9383) scale(1.202088)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M94.12 7.88C98.04 3.96 101.96 3.96 105.88 7.88C134.62667 36.62667 163.37333 65.37333 192.12 94.12C196.04 98.04 196.04 101.96 192.12 105.88C163.37333 134.62667 134.62667 163.37333 105.88 192.12C101.96 196.04 98.04 196.04 94.12 192.12C65.37333 163.37333 36.62667 134.62667 7.88 105.88C3.96 101.96 3.96 98.04 7.88 94.12C36.62667 65.37333 65.37333 36.62667 94.12 7.88Z\\\"/>\",\n clip: \"<path d=\\\"M94.12 7.88C98.04 3.96 101.96 3.96 105.88 7.88C134.62667 36.62667 163.37333 65.37333 192.12 94.12C196.04 98.04 196.04 101.96 192.12 105.88C163.37333 134.62667 134.62667 163.37333 105.88 192.12C101.96 196.04 98.04 196.04 94.12 192.12C65.37333 163.37333 36.62667 134.62667 7.88 105.88C3.96 101.96 3.96 98.04 7.88 94.12C36.62667 65.37333 65.37333 36.62667 94.12 7.88Z\\\"/>\",\n anchor: { x: 112.53, y: 109.95, scale: 0.791 },\n },\n star: {\n id: \"star\",\n name: \"Star\",\n fit: \"translate(-8.3327 3.1407) scale(1.226032)\",\n body: \"<path fill=\\\"{{GRADIENT}}\\\" d=\\\"M100 2C110.56054 20.13133 121.12108 38.26266 131.68163 56.39398C152.18893 60.83477 172.69623 65.27555 193.20354 69.71633C179.22301 85.3629 165.24248 101.00946 151.26195 116.65602C153.37562 137.5319 155.48929 158.40778 157.60295 179.28367C138.40197 170.82244 119.20098 162.36122 100 153.9C80.79902 162.36122 61.59803 170.82244 42.39705 179.28367C44.51071 158.40778 46.62438 137.5319 48.73805 116.65602C34.75752 101.00946 20.77699 85.3629 6.79646 69.71633C27.30377 65.27555 47.81107 60.83477 68.31837 56.39398C78.87892 38.26266 89.43946 20.13133 100 2Z\\\"/>\",\n clip: \"<path d=\\\"M100 2C110.56054 20.13133 121.12108 38.26266 131.68163 56.39398C152.18893 60.83477 172.69623 65.27555 193.20354 69.71633C179.22301 85.3629 165.24248 101.00946 151.26195 116.65602C153.37562 137.5319 155.48929 158.40778 157.60295 179.28367C138.40197 170.82244 119.20098 162.36122 100 153.9C80.79902 162.36122 61.59803 170.82244 42.39705 179.28367C44.51071 158.40778 46.62438 137.5319 48.73805 116.65602C34.75752 101.00946 20.77699 85.3629 6.79646 69.71633C27.30377 65.27555 47.81107 60.83477 68.31837 56.39398C78.87892 38.26266 89.43946 20.13133 100 2Z\\\"/>\",\n anchor: { x: 113.82, y: 125.43, scale: 0.791 },\n },\n};\n\n/** Runtime-safe read of an untrusted persisted or streamed body id. */\nexport function botMascotBody(value: unknown): MascotBodyId {\n return mascotBodySchema.safeParse(value).data ?? DEFAULT_MASCOT_BODY;\n}\n","// Original two-eye geometry from LaoA-GrokBot (MIT). See THIRD_PARTY_NOTICES.md.\nimport { LAOA_DATA } from './laoa-data'\nexport const FACE_BOX = 228.541\nexport const FACE_CENTRE: [number, number] = [120, 122.5]\nexport const GAZE_TRAVEL = { x: 13.2, y: 8.4 }\nexport type Ring = [number, number][]\n/** Preserve the authored eye positions, including each expression's look direction. */\nexport const EXPRESSIONS: Ring[][] = LAOA_DATA.expressions.map(ex => ex.map(ring => ring.map(p => [p[0], p[1]])))\nexport const EXPRESSION_COUNT = EXPRESSIONS.length\n","import { LAOA_DATA } from './laoa-data'\n// Adapted from OpenMausBot (3a84701), Apache-2.0. See THIRD_PARTY_NOTICES.md.\n/**\n * CursorAvatar — an animated mascot built on the \"cursor\" silhouette.\n *\n * Data and frame functions retained from OpenMausBot; the host below is framework-neutral.\n *\n * import CursorAvatar from './CursorAvatar'\n *\n * <CursorAvatar state=\"thinking\" silhouette={MASCOT_BODIES.cursor} size={160} />\n *\n * The state drives everything — which expressions cycle, how often, and when it blinks.\n * Set `state` and it animates itself; see CURSOR_STATES for the full list.\n *\n * Props of note:\n * state one of CURSOR_STATES\n * expression pin a single face and stop the cycling\n * lookAround how much each expression glances around. 0 = always straight ahead\n * gaze / turn aim the eyes, or rotate the head around its implied sphere\n *\n * Made with Blob Studio.\n */\n\nimport { MASCOT_BODIES } from \"./mascot-bodies\"\nimport {\n EXPRESSIONS,\n EXPRESSION_COUNT,\n FACE_BOX,\n FACE_CENTRE,\n GAZE_TRAVEL,\n type Ring,\n} from \"./cursor-face-data\"\n\nexport {\n EXPRESSIONS,\n EXPRESSION_COUNT,\n FACE_BOX,\n FACE_CENTRE,\n GAZE_TRAVEL,\n}\nexport type { Ring }\n\n/* ------------------------------------------------------------------- shape */\n\nexport interface CursorSilhouette {\n viewBox?: string\n /** Human-readable name, used for the accessible label. */\n name: string\n /** Transform mapping the artwork into the 228.541-unit face box. '' for none. */\n fit: string\n /** SVG markup for the body. The token {{GRADIENT}} is replaced with the instance gradient. */\n body: string\n /** SVG markup defining the clip region — the union of the silhouette's filled shapes. */\n clip: string\n /** Where the face sits inside the silhouette, in face-space units. */\n anchor: { x: number; y: number; scale: number }\n}\n\n// The generator solves this body's face placement once; `MASCOT_BODIES.cursor`\n// is the single source of truth desktop and iOS both build from. Its shape\n// carries one extra field (`id`) that `CursorSilhouette` does not, so it is\n// derived here rather than assigned directly.\nconst { id: _cursorBodyId, ...cursorSilhouette } = MASCOT_BODIES.cursor;\nexport const DEFAULT_SILHOUETTE: CursorSilhouette = cursorSilhouette;\n\nexport const DEFAULT_GRADIENT: [string, string, string] = [\"#9FE6B5\",\"#3FAE6E\",\"#1C7A4C\"]\n\nconst VIEW_BOX = `-15 -15 ${FACE_BOX + 30} ${FACE_BOX + 30}`\nconst SPHERE_C = 114.2705\nconst SPHERE_R = 105\n\n/* ------------------------------------------------------------------ motion */\n\n/**\n * How the body itself moves. The face engine on its own leaves the silhouette perfectly\n * still, which reads as dead for states literally named `bouncing` or `spawning`.\n *\n * All of this is shape-agnostic — it moves whatever silhouette it is given, so an uploaded\n * logo animates exactly like the built-in circle.\n *\n * bob vertical travel, [amplitude in face units, period ms]\n * sway rotation, [degrees, period ms]\n * pulse uniform scale, [fraction, period ms] — breathing\n * circle orbital drift, [radius, period ms]\n * jitter fast nervous shake, [amplitude, period ms]\n * tilt constant lean, degrees\n * squash 0..1, how much a bob squashes the body at the bottom of its arc\n * enter one-shot on entering the state, [starting scale, duration ms]\n * settle scale it eases to and holds, for exits like powering-down\n */\nexport interface BodyMotion {\n bob?: [number, number]\n sway?: [number, number]\n pulse?: [number, number]\n circle?: [number, number]\n jitter?: [number, number]\n tilt?: number\n squash?: number\n enter?: [number, number]\n settle?: number\n}\n\nexport const MOTION = {\n // Lifecycle — quiet, breathing, alive but not busy.\n sleeping: { pulse: [0.028, 4600], tilt: 2 },\n waking: { enter: [0.92, 700], pulse: [0.03, 2200] },\n idle: { pulse: [0.014, 3600] },\n listening: { bob: [2, 2600], pulse: [0.012, 2600] },\n thinking: { sway: [1.6, 3000], pulse: [0.01, 3000] },\n searching: { bob: [3, 1400], sway: [2.2, 1400] },\n working: { bob: [2.5, 900], squash: 0.22 },\n\n // Reactions — the loud half.\n excited: { bob: [9, 520], sway: [3, 1040], squash: 0.35 },\n surprised: { enter: [1.14, 340], jitter: [0.8, 120] },\n suspicious: { sway: [2.4, 2600], tilt: -3 },\n angry: { jitter: [1.3, 95], tilt: 2 },\n drowsy: { pulse: [0.026, 5000], tilt: 3 },\n happy: { bob: [5, 820], squash: 0.28 },\n curious: { sway: [3.4, 1900], tilt: -4 },\n confused: { sway: [3, 2200] },\n bored: { pulse: [0.016, 5200], tilt: 2 },\n proud: { bob: [1.6, 2400], pulse: [0.02, 2400] },\n shy: { pulse: [0.016, 3000], tilt: 4 },\n sad: { pulse: [0.02, 4600], tilt: 3 },\n laughing: { bob: [7, 430], squash: 0.4 },\n scared: { jitter: [2.2, 75] },\n playful: { bob: [6, 620], sway: [5, 1240], squash: 0.3 },\n celebrate: { bob: [10, 480], sway: [4, 960], squash: 0.35 },\n\n // Agent morphs — the mascot standing in for a process.\n orbit: { circle: [6, 3200] },\n radar: { sway: [6, 2400], pulse: [0.012, 2400] },\n progress: { pulse: [0.022, 1600] },\n\n // Product cycle.\n spawning: { enter: [0.02, 820], pulse: [0.014, 3600] },\n humming: { pulse: [0.016, 2800] },\n loading: { sway: [2.2, 1500], pulse: [0.012, 1500] },\n dictating: { bob: [2, 2000] },\n writing: { bob: [1.6, 1100] },\n sending: { bob: [3, 900] },\n receiving: { bob: [3, 900] },\n uploading: { bob: [3, 1000] },\n notifying: { bob: [4, 700], sway: [2.5, 700] },\n alerting: { jitter: [2.6, 85] },\n dragging: { tilt: -6, sway: [2, 900] },\n bouncing: { bob: [12, 560], squash: 0.45 },\n 'powering-down': { settle: 0.05, tilt: 4 },\n} satisfies Record<CursorState, BodyMotion>\n\n/** How long a `settle` takes to reach its resting scale. */\nconst SETTLE_MS = 1400\n\n/* ----------------------------------------------------------------- effects */\n\n/**\n * Confetti, motion ribbons, and glyph morphs.\n *\n * All three are shape-agnostic: they orbit, burst around, or stand in for whatever\n * silhouette they are given, so an uploaded logo behaves exactly like the built-in circle.\n *\n * These layers are driven imperatively from the frame loop rather than through React\n * state. A celebrate burst is ~14 elements changing every frame, and a page showing all\n * states at once would otherwise re-render continuously.\n */\n\nconst TAU = Math.PI * 2\n\n/** Deterministic per-particle randomness — same seed, same particle, every run. */\nconst hash01 = (n: number) => {\n const x = Math.sin(n * 127.1 + 311.7) * 43758.5453\n return x - Math.floor(x)\n}\n\nconst CONFETTI_COLORS = ['#F472B6', '#C084FC', '#818CF8', '#38BDF8', '#34D399', '#FACC15', '#FB7185']\nconst RIBBON_COLORS = ['#4ADE80', '#34D399', '#22D3EE', '#60A5FA']\n\nexport interface ConfettiSpec {\n /** How many pieces are in flight per burst. */\n count: number\n /** Milliseconds between bursts. */\n period: number\n /** How long one piece lives, ms. */\n life: number\n /** Radius the pieces launch from, so a burst clears the face instead of covering it. */\n origin: number\n /** How far pieces travel beyond that, in face units. */\n spread: number\n}\n\nexport interface TrailSpec {\n /** How many ribbons orbit the body. */\n count: number\n /** Milliseconds for one full orbit. */\n period: number\n /** Orbit radius, in face units. */\n radius: number\n}\n\nexport interface GlyphSpec {\n /** Markup drawn in place of the body. {{GRADIENT}} is replaced with the body paint. */\n markup: string\n /** Milliseconds between appearances. */\n period: number\n /** How long the glyph is held, ms. */\n hold: number\n}\n\nexport interface StateEffects {\n confetti?: ConfettiSpec\n trails?: TrailSpec\n glyph?: GlyphSpec\n}\n\ninterface EffectsByState extends Partial<Record<CursorState, StateEffects>> {}\n\n/**\n * The exclamation mark the mascot becomes when something needs attention — drawn as a\n * tapered bar and a dot so it reads as a character rather than a rectangle.\n */\nconst GLYPH_BANG =\n '<path fill=\"{{GRADIENT}}\" d=\"M99 58 Q99 43 114.3 43 Q129.6 43 129.6 58 L123 150 Q122 161 114.3 161 Q106.6 161 105.6 150 Z\"/>' +\n '<circle fill=\"{{GRADIENT}}\" cx=\"114.3\" cy=\"188\" r=\"15\"/>'\n\n/** The question mark for genuine confusion. Stroked, so it stays light against the body. */\nconst GLYPH_QUERY =\n '<path fill=\"none\" stroke=\"{{GRADIENT}}\" stroke-width=\"19\" stroke-linecap=\"round\" ' +\n 'd=\"M88 76 A27 27 0 1 1 114.3 112 L114.3 132\"/>' +\n '<circle fill=\"{{GRADIENT}}\" cx=\"114.3\" cy=\"170\" r=\"13\"/>'\n\nexport const EFFECTS: EffectsByState = {\n // Celebration — the loud burst.\n // Travel is deliberately bounded: the viewBox only carries 15 units of margin, so a\n // piece thrown much past ~130 from centre would be clipped mid-flight.\n celebrate: { confetti: { count: 16, period: 1500, life: 1300, origin: 74, spread: 54 } },\n excited: { confetti: { count: 9, period: 2000, life: 1100, origin: 72, spread: 44 } },\n laughing: { confetti: { count: 7, period: 2400, life: 1000, origin: 70, spread: 38 } },\n\n // Work in flight — ribbons circling the body.\n working: { trails: { count: 3, period: 2200, radius: 126 } },\n orbit: { trails: { count: 3, period: 2600, radius: 128 } },\n radar: { trails: { count: 2, period: 2000, radius: 132 } },\n progress: { trails: { count: 3, period: 1800, radius: 124 } },\n loading: { trails: { count: 2, period: 2200, radius: 126 } },\n uploading: { trails: { count: 2, period: 1700, radius: 122 } },\n sending: { trails: { count: 2, period: 1500, radius: 120 } },\n receiving: { trails: { count: 2, period: 1500, radius: 120 } },\n\n // The mascot standing aside to show a symbol.\n alerting: { glyph: { markup: GLYPH_BANG, period: 2600, hold: 1100 } },\n notifying: { glyph: { markup: GLYPH_BANG, period: 4200, hold: 900 } },\n confused: { glyph: { markup: GLYPH_QUERY, period: 5200, hold: 1200 } },\n}\n\nconst SVG_NS = 'http://www.w3.org/2000/svg'\n\n/** Grows or shrinks a layer's pool of <path> children to exactly `count`. */\nfunction poolPaths(layer: SVGGElement, count: number): SVGPathElement[] {\n while (layer.childNodes.length > count) layer.removeChild(layer.lastChild!)\n while (layer.childNodes.length < count) {\n const path = document.createElementNS(SVG_NS, 'path')\n path.setAttribute('stroke-linecap', 'round')\n path.setAttribute('fill', 'none')\n layer.appendChild(path)\n }\n return Array.from(layer.querySelectorAll<SVGPathElement>(':scope > path'))\n}\n\n/** Confetti: short curved strokes thrown outward, arcing down as they fade. */\nfunction drawConfetti(\n layer: SVGGElement,\n spec: ConfettiSpec,\n elapsed: number,\n strength: number,\n cx: number,\n cy: number\n) {\n const paths = poolPaths(layer, spec.count)\n for (let i = 0; i < spec.count; i++) {\n const path = paths[i]\n const seedA = hash01(i + 1)\n const seedB = hash01(i + 41)\n const seedC = hash01(i + 91)\n\n // Stagger the pieces across the burst window so they don't leave as one wall.\n const t = (((elapsed + seedC * spec.period) % spec.period) / spec.life) * 1\n if (t > 1) {\n path.setAttribute('opacity', '0')\n continue\n }\n\n const angle = seedA * TAU\n const travel = spec.spread * (0.45 + seedB * 0.55) * (1 - (1 - t) * (1 - t))\n const distance = (spec.origin + travel) * strength\n const gravity = 34 * strength * t * t\n const x = cx + Math.cos(angle) * distance\n const y = cy + Math.sin(angle) * distance + gravity\n const length = 11 + seedB * 12\n const spin = angle + (seedC - 0.5) * 5 * t\n const ex = x + Math.cos(spin) * length\n const ey = y + Math.sin(spin) * length\n // A slight bend reads as paper rather than a matchstick.\n const bend = (seedA - 0.5) * length * 0.7\n const mx = (x + ex) / 2 - Math.sin(spin) * bend\n const my = (y + ey) / 2 + Math.cos(spin) * bend\n\n path.setAttribute('d', `M${x.toFixed(1)} ${y.toFixed(1)} Q${mx.toFixed(1)} ${my.toFixed(1)} ${ex.toFixed(1)} ${ey.toFixed(1)}`)\n path.setAttribute('stroke', CONFETTI_COLORS[i % CONFETTI_COLORS.length])\n path.setAttribute('stroke-width', (4 + seedB * 2.4).toFixed(1))\n path.setAttribute('opacity', (t < 0.12 ? t / 0.12 : 1 - (t - 0.12) / 0.88).toFixed(3))\n }\n}\n\n/** Ribbons: arcs sweeping around the body on their own periods. */\nfunction drawTrails(\n layer: SVGGElement,\n spec: TrailSpec,\n elapsed: number,\n strength: number,\n cx: number,\n cy: number\n) {\n const paths = poolPaths(layer, spec.count)\n const SAMPLES = 12\n for (let i = 0; i < spec.count; i++) {\n const path = paths[i]\n const seedA = hash01(i + 3)\n const seedB = hash01(i + 29)\n const direction = i % 2 === 0 ? 1 : -1\n const period = spec.period * (0.8 + seedA * 0.5)\n const radius = spec.radius * strength * (0.78 + seedB * 0.4)\n const start = direction * (elapsed / period) * TAU + seedA * TAU\n const span = 0.85 + seedB * 0.7\n\n let d = ''\n for (let s = 0; s <= SAMPLES; s++) {\n const k = s / SAMPLES\n const angle = start + span * k\n // Breathe the radius along the arc so the ribbon curls instead of tracing a circle.\n const r = radius * (1 + Math.sin(k * Math.PI) * 0.14)\n const x = cx + Math.cos(angle) * r\n const y = cy + Math.sin(angle) * r * 0.78\n d += (s === 0 ? 'M' : 'L') + x.toFixed(1) + ' ' + y.toFixed(1)\n }\n path.setAttribute('d', d)\n path.setAttribute('stroke', RIBBON_COLORS[i % RIBBON_COLORS.length])\n path.setAttribute('stroke-width', (5 + seedA * 3).toFixed(1))\n path.setAttribute('opacity', '0.85')\n }\n}\n\n/** How present the glyph is right now, 0..1, with eased edges. */\nfunction glyphAmount(spec: GlyphSpec, elapsed: number): number {\n const position = elapsed % spec.period\n const start = spec.period - spec.hold\n if (position < start) return 0\n const into = position - start\n const remaining = spec.hold - into\n const EASE = 200\n return Math.max(0, Math.min(1, Math.min(into, remaining) / EASE))\n}\n\nexport interface EffectFrame {\n trails: SVGGElement | null\n confetti: SVGGElement | null\n glyph: SVGGElement | null\n bodyContent: SVGGElement | null\n state: CursorState\n elapsed: number\n strength: number\n paint: string\n showEffects: boolean\n showGlyphs: boolean\n showTrails?: boolean\n}\n\n/** Called once per frame from the engine loop. */\nexport function updateEffects(frame: EffectFrame) {\n const spec = EFFECTS[frame.state]\n const centre = FACE_BOX / 2\n const strength = frame.strength\n\n if (frame.trails) {\n if (spec?.trails && frame.showEffects && frame.showTrails !== false && strength > 0) {\n drawTrails(frame.trails, spec.trails, frame.elapsed, strength, centre, centre)\n } else if (frame.trails.childNodes.length) {\n frame.trails.replaceChildren()\n }\n }\n\n if (frame.confetti) {\n if (spec?.confetti && frame.showEffects && strength > 0) {\n drawConfetti(frame.confetti, spec.confetti, frame.elapsed, strength, centre, centre)\n } else if (frame.confetti.childNodes.length) {\n frame.confetti.replaceChildren()\n }\n }\n\n if (frame.glyph && frame.bodyContent) {\n if (spec?.glyph && frame.showGlyphs) {\n const amount = glyphAmount(spec.glyph, frame.elapsed)\n const markup = spec.glyph.markup.replace(/\\{\\{GRADIENT\\}\\}/g, frame.paint)\n if (frame.glyph.getAttribute('data-glyph') !== markup) {\n frame.glyph.setAttribute('data-glyph', markup)\n frame.glyph.innerHTML = markup\n }\n frame.glyph.style.opacity = String(amount)\n // Scale up as it arrives, so the swap reads as a transformation.\n const scale = 0.72 + 0.28 * amount\n frame.glyph.setAttribute(\n 'transform',\n `translate(${centre} ${centre}) scale(${scale.toFixed(3)}) translate(${-centre} ${-centre})`\n )\n // The body steps aside rather than sitting behind the glyph.\n frame.bodyContent.style.opacity = String(1 - amount)\n } else {\n if (frame.glyph.getAttribute('data-glyph')) {\n frame.glyph.removeAttribute('data-glyph')\n frame.glyph.replaceChildren()\n }\n frame.glyph.style.opacity = '0'\n frame.bodyContent.style.opacity = '1'\n }\n }\n}\n\n/* ------------------------------------------------------------------ states */\n\nexport type CursorState =\n | \"sleeping\"\n | \"waking\"\n | \"idle\"\n | \"listening\"\n | \"thinking\"\n | \"searching\"\n | \"working\"\n | \"excited\"\n | \"surprised\"\n | \"suspicious\"\n | \"angry\"\n | \"drowsy\"\n | \"happy\"\n | \"curious\"\n | \"confused\"\n | \"bored\"\n | \"proud\"\n | \"shy\"\n | \"sad\"\n | \"laughing\"\n | \"scared\"\n | \"playful\"\n | \"celebrate\"\n | \"orbit\"\n | \"radar\"\n | \"progress\"\n | \"spawning\"\n | \"humming\"\n | \"loading\"\n | \"dictating\"\n | \"sending\"\n | \"receiving\"\n | \"uploading\"\n | \"writing\"\n | \"notifying\"\n | \"alerting\"\n | \"bouncing\"\n | \"dragging\"\n | \"powering-down\"\n\n/**\n * Which expressions a state cycles through. The first is its resting face, chosen as the\n * pool's most forward-facing member so a mascot at rest looks at you rather than past you.\n */\nexport const POOLS: Record<CursorState, number[]> = Object.fromEntries(Object.entries(LAOA_DATA.pools).map(([key,values]) => [key,[...values]])) as Record<CursorState, number[]>\n\n/** How long a state holds an expression before drifting to another, in ms. */\nconst EXPR_CADENCE = {\n sleeping: [\n 6000,\n 10000\n ],\n waking: [\n 800,\n 800\n ],\n idle: [\n 9000,\n 16000\n ],\n listening: [\n 2800,\n 5000\n ],\n thinking: [\n 2000,\n 3600\n ],\n searching: [\n 1000,\n 1800\n ],\n working: [\n 1800,\n 3200\n ],\n excited: [\n 1100,\n 2000\n ],\n surprised: [\n 2500,\n 4000\n ],\n suspicious: [\n 2600,\n 4500\n ],\n angry: [\n 2200,\n 3800\n ],\n drowsy: [\n 4000,\n 8000\n ],\n happy: [\n 2500,\n 4500\n ],\n curious: [\n 1800,\n 3200\n ],\n confused: [\n 2200,\n 3800\n ],\n bored: [\n 3500,\n 6000\n ],\n proud: [\n 3500,\n 6000\n ],\n shy: [\n 3000,\n 5500\n ],\n sad: [\n 4000,\n 7000\n ],\n laughing: [\n 1200,\n 2400\n ],\n scared: [\n 900,\n 1800\n ],\n playful: [\n 1500,\n 3000\n ],\n celebrate: [\n 1400,\n 2600\n ],\n orbit: [\n 4000,\n 8000\n ],\n radar: [\n 4000,\n 8000\n ],\n progress: [\n 4000,\n 8000\n ],\n spawning: [\n 1200,\n 1200\n ],\n humming: [\n 5000,\n 9000\n ],\n loading: [\n 6000,\n 10000\n ],\n dictating: [\n 4000,\n 8000\n ],\n sending: [\n 4000,\n 8000\n ],\n receiving: [\n 4000,\n 8000\n ],\n uploading: [\n 4000,\n 8000\n ],\n writing: [\n 4000,\n 8000\n ],\n notifying: [\n 1500,\n 2600\n ],\n alerting: [\n 2000,\n 3600\n ],\n bouncing: [\n 3000,\n 6000\n ],\n dragging: [\n 1600,\n 3000\n ],\n \"powering-down\": [\n 6000,\n 9000\n ]\n} satisfies Record<CursorState, [number, number]>\n\n/** Blink cadence in ms, or null for states that never blink. */\nconst BLINK = {\n sleeping: null,\n waking: null,\n idle: [\n 6000,\n 14000\n ],\n listening: [\n 3000,\n 7000\n ],\n thinking: [\n 3500,\n 7000\n ],\n searching: [\n 1600,\n 4000\n ],\n working: [\n 2800,\n 5500\n ],\n excited: [\n 2000,\n 4000\n ],\n surprised: [\n 1800,\n 3500\n ],\n suspicious: [\n 4500,\n 8000\n ],\n angry: [\n 3500,\n 7000\n ],\n drowsy: null,\n happy: [\n 2500,\n 5000\n ],\n curious: [\n 2500,\n 5500\n ],\n confused: [\n 2800,\n 5500\n ],\n bored: [\n 4000,\n 8000\n ],\n proud: [\n 3500,\n 7000\n ],\n shy: [\n 3000,\n 6000\n ],\n sad: [\n 4000,\n 8000\n ],\n laughing: [\n 2500,\n 5000\n ],\n scared: [\n 1200,\n 3000\n ],\n playful: [\n 2000,\n 4500\n ],\n celebrate: [\n 2200,\n 4500\n ],\n orbit: null,\n radar: null,\n progress: null,\n spawning: null,\n humming: [\n 4000,\n 8000\n ],\n loading: null,\n dictating: null,\n sending: null,\n receiving: null,\n uploading: null,\n writing: null,\n notifying: [\n 2000,\n 4000\n ],\n alerting: null,\n bouncing: null,\n dragging: [\n 2200,\n 4500\n ],\n \"powering-down\": null\n} satisfies Record<CursorState, [number, number] | null>\n\n/** Grouping, for pickers and docs. */\nexport const STATE_GROUPS = {\n \"Cycle de vie\": [\n \"sleeping\",\n \"waking\",\n \"idle\",\n \"listening\",\n \"thinking\",\n \"searching\",\n \"working\"\n ],\n \"Réactions\": [\n \"excited\",\n \"surprised\",\n \"suspicious\",\n \"angry\",\n \"drowsy\",\n \"happy\",\n \"curious\",\n \"confused\",\n \"bored\",\n \"proud\",\n \"shy\",\n \"sad\",\n \"laughing\",\n \"scared\",\n \"playful\",\n \"celebrate\"\n ],\n \"Morphes agent\": [\n \"orbit\",\n \"radar\",\n \"progress\"\n ],\n \"Cycle produit\": [\n \"spawning\",\n \"humming\",\n \"loading\",\n \"dictating\",\n \"writing\",\n \"sending\",\n \"receiving\",\n \"uploading\",\n \"notifying\",\n \"alerting\",\n \"dragging\",\n \"bouncing\",\n \"powering-down\"\n ]\n} satisfies Record<string, CursorState[]>\n\nconst isCursorState = (state: string): state is CursorState => state in POOLS\nexport const CURSOR_STATES = Object.keys(POOLS).filter(isCursorState)\n\n/* ------------------------------------------------------------------- maths */\n\nconst clamp = (v: number, min: number, max: number) => Math.max(min, Math.min(max, v))\nconst noTimestamp = (): number | null => null\n\nconst toPath = (ring: Ring) =>\n 'M' + ring.map(p => p[0].toFixed(2) + ' ' + p[1].toFixed(2)).join('L') + 'Z'\n\nconst clone = (rings: Ring[]): Ring[] =>\n rings.map(r => r.map((p): [number, number] => [p[0], p[1]]))\n\n/** Ring centroid for eye projection. */\nconst ringCentre = (ring: Ring): [number, number] => {\n let x = 0\n let y = 0\n for (const p of ring) {\n x += p[0]\n y += p[1]\n }\n return [x / ring.length, y / ring.length]\n}\n\n/** Face-space transform placing the face inside a silhouette. */\nexport const anchorTransform = (a: { x: number; y: number; scale: number }) =>\n `translate(${a.x} ${a.y}) scale(${a.scale}) translate(${-FACE_CENTRE[0]} ${-FACE_CENTRE[1]})`\n\n/** Overshooting ease, so a pop-in lands with a little life instead of stopping dead. */\nconst easeOutBack = (t: number) => {\n const c = 1.7\n const u = t - 1\n return 1 + (c + 1) * u * u * u + c * u * u\n}\n\nconst easeInOut = (t: number) => (t < 0.5 ? 2 * t * t : 1 - 2 * (1 - t) * (1 - t))\n\n/**\n * Builds the body's transform for this frame.\n *\n * `elapsed` is time since the state was entered, which is what one-shot entrances need;\n * loops read it too so every mascot on a page doesn't pulse in lockstep.\n */\nexport function bodyTransform(motion: BodyMotion, elapsed: number, strength: number): string {\n if (strength <= 0) return ''\n const centre = FACE_BOX / 2\n const ground = FACE_BOX\n const wave = (period: number, phase = 0) => Math.sin((elapsed / period) * Math.PI * 2 + phase)\n\n let dx = 0\n let dy = 0\n let rotation = motion.tilt ? motion.tilt * strength : 0\n let scale = 1\n let sx = 1\n let sy = 1\n\n if (motion.bob) {\n const [amplitude, period] = motion.bob\n const p = wave(period)\n dy -= amplitude * strength * p\n if (motion.squash) {\n // Squash at the bottom of the arc, stretch at the top. Volume roughly conserved.\n const amount = motion.squash * strength * Math.max(0, -p)\n sy = 1 - amount * 0.5\n sx = 1 + amount * 0.5\n }\n }\n if (motion.circle) {\n const [radius, period] = motion.circle\n dx += radius * strength * wave(period)\n dy += radius * strength * wave(period, Math.PI / 2)\n }\n if (motion.sway) {\n const [degrees, period] = motion.sway\n rotation += degrees * strength * wave(period)\n }\n if (motion.pulse) {\n const [fraction, period] = motion.pulse\n scale *= 1 + fraction * strength * wave(period)\n }\n if (motion.jitter) {\n const [amplitude, period] = motion.jitter\n // Two incommensurate waves read as nervous rather than metronomic.\n dx += amplitude * strength * wave(period)\n dy += amplitude * strength * wave(period * 0.63, 1.1)\n }\n if (motion.enter) {\n const [from, duration] = motion.enter\n const t = elapsed / duration\n scale *= t >= 1 ? 1 : from + (1 - from) * easeOutBack(Math.max(t, 0))\n }\n if (motion.settle !== undefined) {\n const t = Math.min(Math.max(elapsed / SETTLE_MS, 0), 1)\n scale *= 1 + (motion.settle - 1) * easeInOut(t) * strength\n }\n\n const parts: string[] = []\n if (dx || dy) parts.push(`translate(${dx.toFixed(2)} ${dy.toFixed(2)})`)\n if (rotation) parts.push(`rotate(${rotation.toFixed(2)} ${centre} ${centre})`)\n if (scale !== 1) {\n parts.push(`translate(${centre} ${centre}) scale(${scale.toFixed(4)}) translate(${-centre} ${-centre})`)\n }\n if (sx !== 1 || sy !== 1) {\n // Squash pivots on the ground, not the middle — otherwise it floats instead of landing.\n parts.push(`translate(${centre} ${ground}) scale(${sx.toFixed(4)} ${sy.toFixed(4)}) translate(${-centre} ${-ground})`)\n }\n return parts.join(' ')\n}\n\n/* --------------------------------------------------------------- component */\n\n\nexport interface CursorOptions {\n state: CursorState\n paused: boolean\n color: string\n silhouette: CursorSilhouette\n gaze?: { x?: number; y?: number }\n expression?: number\n fixedTime?: number\n /** Live activity rings. A saved \"working\" face does not wear them. */\n ribbons?: boolean\n /** Draw activity around an uploaded avatar without drawing a replacement face. */\n effectsOnly?: boolean\n}\ntype Engine = ReturnType<typeof newEngine>\nfunction newEngine() {\n return { current: clone(EXPRESSIONS[0]), target: EXPRESSIONS[0], expression: 0, morph: 1, velocity: 0, blinkStart: noTimestamp(), spinStart: noTimestamp(), spinDuration: 900, last: 0, stateStart: 0, lastState: 'idle' as CursorState, lastBodyTransform: '',\n props: {state: 'idle' as CursorState, expression: undefined as number | undefined, gaze: undefined as {x?:number;y?:number}|undefined, turn:0, spring:7, eyeScale:1, paused:true, motionStrength:0, effects:true, glyphs:true, ribbons:true} }\n}\nlet nextId = 0\nexport function mountCursorAvatar(svg: SVGSVGElement, initial: CursorOptions) {\n const uid = `maus-${++nextId}`\n const engine = { current: newEngine() }\n const paintRef = { current: initial.color }\n const node = <T extends Element>(id: string) => ({ current: svg.querySelector<T>(`[data-part=\"${id}\"]`)! })\n svg.setAttribute('viewBox', VIEW_BOX)\n svg.innerHTML = `<defs><clipPath id=\"${uid}-clip\" data-part=\"clip\" /></defs><g data-part=\"trails\"/><g data-part=\"bodyGroup\"><g data-part=\"bodyContent\"><g data-part=\"outline\"/><g clip-path=\"url(#${uid}-clip)\"><g data-part=\"face\"><path data-part=\"eye0\" fill=\"white\"/><path data-part=\"eye1\" fill=\"white\"/></g></g></g><g data-part=\"glyph\" opacity=\"0\"/></g><g data-part=\"confetti\"/>`\n const eye0=node<SVGPathElement>('eye0'), eye1=node<SVGPathElement>('eye1')\n const bodyGroup=node<SVGGElement>('bodyGroup'), bodyContent=node<SVGGElement>('bodyContent'), trailLayer=node<SVGGElement>('trails'), confettiLayer=node<SVGGElement>('confetti'), glyphLayer=node<SVGGElement>('glyph')\n const selectExpression = (index:number, immediate = false) => {\n const e=engine.current, i=((index % EXPRESSION_COUNT)+EXPRESSION_COUNT)%EXPRESSION_COUNT\n if (i === e.expression && e.morph >= 1 && !immediate) return\n e.current=displayed(e)\n e.target=EXPRESSIONS[i];e.expression=i;e.morph=immediate?1:0;e.velocity=0\n }\n const draw = (e: Engine, now: number, spinTurn: number) => {\n const p = e.props\n const rings = displayed(e)\n const gx = clamp(p.gaze?.x ?? 0, -1, 1) * GAZE_TRAVEL.x\n const gy = clamp(p.gaze?.y ?? 0, -1, 1) * GAZE_TRAVEL.y\n const radians = (((p.turn ?? 0) + spinTurn) * Math.PI) / 180\n const base = p.eyeScale ?? 1\n const blink = blinkScale(e, now)\n\n rings.forEach((ring, index) => {\n const el = index === 0 ? eye0.current : eye1.current\n if (!el) return\n const c = ringCentre(ring)\n const baseLongitude = Math.asin(clamp((c[0] - SPHERE_C) / SPHERE_R, -1, 1))\n const longitude = baseLongitude + radians\n const depth = Math.cos(longitude)\n const perspective = Math.max(depth, 0.02) / Math.max(Math.cos(baseLongitude), 0.02)\n el.setAttribute('d', toPath(ring))\n el.setAttribute(\n 'transform',\n `translate(${(SPHERE_C + SPHERE_R * Math.sin(longitude) + gx).toFixed(2)} ${(\n c[1] + gy\n ).toFixed(2)}) scale(${clamp(perspective * base, 0.02, 2.4).toFixed(4)} ${clamp(\n blink * base,\n 0.02,\n 2.4\n ).toFixed(4)}) translate(${(-c[0]).toFixed(2)} ${(-c[1]).toFixed(2)})`\n )\n el.style.opacity = depth > 0.02 ? '1' : '0'\n })\n\n // The body. One-shot entrances need time since the state began, so track that here\n // rather than in an effect — the loop already has the clock.\n const bodyEl = bodyGroup.current\n if (bodyEl) {\n if (p.state !== e.lastState) {\n e.lastState = p.state\n e.stateStart = now\n }\n const transform = bodyTransform(\n MOTION[p.state] ?? {},\n now - e.stateStart,\n p.motionStrength ?? 1\n )\n if (transform !== e.lastBodyTransform) {\n e.lastBodyTransform = transform\n if (transform) bodyEl.setAttribute('transform', transform)\n else bodyEl.removeAttribute('transform')\n }\n }\n\n updateEffects({\n trails: trailLayer.current,\n confetti: confettiLayer.current,\n glyph: glyphLayer.current,\n bodyContent: bodyContent.current,\n state: p.state,\n elapsed: now - e.stateStart,\n strength: p.motionStrength ?? 1,\n paint: paintRef.current,\n showEffects: p.effects !== false,\n showGlyphs: p.glyphs !== false,\n showTrails: p.ribbons !== false,\n })\n }\n\n\n let options=initial, frame=0, blinkTimer: ReturnType<typeof setTimeout>|undefined, expressionTimer:ReturnType<typeof setTimeout>|undefined, disposed=false\n function stop() { cancelAnimationFrame(frame);frame=0;clearTimeout(blinkTimer);clearTimeout(expressionTimer) }\n function armBlink() {\n const range=BLINK[options.state]\n if(options.paused||options.fixedTime!==undefined||!range)return\n blinkTimer=setTimeout(()=>{engine.current.blinkStart=performance.now();armBlink()},range[0]+Math.random()*(range[1]-range[0]))\n }\n function armExpression() {\n if(options.paused||options.fixedTime!==undefined||options.expression!==undefined)return\n const [lo,hi]=EXPR_CADENCE[options.state]\n expressionTimer=setTimeout(()=>{const pool=POOLS[options.state].filter(i=>i!==engine.current.expression);selectExpression(pool.length?pool[Math.floor(Math.random()*pool.length)]:POOLS[options.state][0]);armExpression()},lo+Math.random()*(hi-lo))\n }\n function step(now:number) {\n frame=0\n if(disposed||options.paused||options.fixedTime!==undefined)return\n const e=engine.current, dt=Math.min((now-e.last)/1000,.1);e.last=now\n e.velocity+=(-14*e.velocity-49*(e.morph-1))*dt;e.morph+=e.velocity*dt\n if(!Number.isFinite(e.morph)){e.morph=1;e.velocity=0}\n draw(e,now,0);frame=requestAnimationFrame(step)\n }\n let lastBody = '', lastClip = ''\n function update(next:CursorOptions) {\n const changed=options.state!==next.state||options.expression!==next.expression\n const resume=options.paused!==next.paused||options.fixedTime!==next.fixedTime\n options=next\n svg.setAttribute('viewBox', next.silhouette.viewBox ?? VIEW_BOX)\n const e=engine.current, now=performance.now();paintRef.current=next.color\n e.props={...e.props,state:next.state,expression:next.expression,gaze:next.gaze,paused:next.paused,motionStrength:next.paused?0:1,ribbons:next.ribbons!==false}\n const [vx,vy,vw,vh] = (next.silhouette.viewBox ?? VIEW_BOX).split(/\\s+/).map(Number)\n const cx = vx + vw / 2, cy = vy + vh / 2\n const hasTrails = !next.paused && next.ribbons !== false && !!EFFECTS[next.state]?.trails\n bodyGroup.current.style.visibility = next.effectsOnly ? 'hidden' : ''\n // Leave room for live ribbons while keeping the saved silhouette and resting size.\n bodyContent.current.setAttribute('transform', hasTrails ? `translate(${cx} ${cy}) scale(.72) translate(${-cx} ${-cy})` : '')\n trailLayer.current.setAttribute('transform', `translate(${cx} ${cy}) scale(${Math.min(vw,vh) / FACE_BOX}) translate(${-FACE_BOX / 2} ${-FACE_BOX / 2})`)\n const outline=node<SVGGElement>('outline').current, clip=node<SVGClipPathElement>('clip').current, face=node<SVGGElement>('face').current\n const body=next.silhouette.body.replace(/\\{\\{GRADIENT\\}\\}/g,next.color)\n if(lastBody!==body){outline.innerHTML=body;lastBody=body}\n if(lastClip!==next.silhouette.clip){clip.innerHTML=next.silhouette.clip;lastClip=next.silhouette.clip}\n outline.setAttribute('transform',next.silhouette.fit||'');clip.setAttribute('transform',next.silhouette.fit||'');face.setAttribute('transform',anchorTransform(next.silhouette.anchor))\n if(changed||next.paused||e.last===0)selectExpression(next.expression??POOLS[next.state][0],next.paused||e.last===0)\n if(changed||e.last===0){e.stateStart=now;e.lastState=next.state}\n e.last=now\n if(changed||resume||!frame){stop();armBlink();armExpression()}\n draw(e,next.paused ? e.stateStart+(next.fixedTime??0) : next.fixedTime===undefined?now:e.stateStart+next.fixedTime,0)\n if(!next.paused&&next.fixedTime===undefined&&!frame)frame=requestAnimationFrame(step)\n }\n update(initial)\n return {update,dispose(){disposed=true;stop();svg.replaceChildren()}}\n}\nfunction displayed(e: { current: Ring[]; target: Ring[]; morph: number }): Ring[] {\n const m = clamp(e.morph, 0, 1)\n return e.current.map((ring, eye) =>\n ring.map((p, i): [number, number] => [\n p[0] + (e.target[eye][i][0] - p[0]) * m,\n p[1] + (e.target[eye][i][1] - p[1]) * m,\n ])\n )\n}\n\nfunction blinkScale(e: { blinkStart: number | null }, now: number) {\n if (e.blinkStart === null) return 1\n const t = (now - e.blinkStart) / 320\n if (t >= 1) {\n e.blinkStart = null\n return 1\n }\n // Fast close, slower open.\n return Math.max(t < 0.42 ? 1 - t / 0.42 : (t - 0.42) / 0.58, 0.04)\n}\n","// Shared LaoA-GrokBot geometry; see THIRD_PARTY_NOTICES.md.\nimport type { CursorSilhouette } from './cursor-engine'\nimport { LAOA_DATA } from './laoa-data'\nfunction silhouette(name: string, geometry: {path:string;anchor:readonly number[];viewport:readonly number[]}): CursorSilhouette {\n const [x,y,scale] = geometry.anchor\n return {name,fit:'',body:`<path d=\"${geometry.path}\" fill=\"{{GRADIENT}}\"/>`,clip:`<path d=\"${geometry.path}\"/>`,anchor:{x,y,scale},viewBox:geometry.viewport.join(' ')}\n}\nexport const MASCOT_SILHOUETTES = Object.fromEntries(Object.entries(LAOA_DATA.shapes).map(([id,value]) => [id==='ellipse'?'oval':id,silhouette(id,value)])) as Record<string,CursorSilhouette>\nexport const LAOA_BODIES = Object.fromEntries(Object.entries(LAOA_DATA.bodies).map(([id,value]) => [id,silhouette(id,value)])) as Record<keyof typeof LAOA_DATA.bodies,CursorSilhouette>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport { decodeAgentAvatar } from '@shared/agentIdentity'\nimport { mountCursorAvatar, type CursorState } from './maus/cursor-engine'\nimport { MASCOT_SILHOUETTES, LAOA_BODIES } from './maus/silhouettes'\ntype MascotState = 'idle' | 'working' | 'loading' | 'notifying' | 'waiting' | 'success' | 'failure'\nconst props = withDefaults(defineProps<{ name: string; avatar?: string; size?: number; state?: MascotState; animated?: boolean; fixedTime?: number; expressionIndex?: number; activityKey?: string | number }>(), { avatar: '', size: 32, state: 'idle', animated: undefined })\nconst host = ref<HTMLElement>(), svg = ref<SVGSVGElement>(), visible = ref(true), foreground = ref(true), reduced = ref(false), hover = ref(false)\nconst gaze = ref({x:0,y:0})\nconst oneShot = ref<CursorState>()\nconst beatEnded = ref(false), imageFailed = ref(false)\nlet beat: ReturnType<typeof setTimeout> | undefined\nlet observer: IntersectionObserver | undefined\nlet media: MediaQueryList | undefined\nlet renderer: ReturnType<typeof mountCursorAvatar> | undefined\n// Missing metadata during refresh is not a configured green mascot.\nconst identity = computed(() => decodeAgentAvatar(props.avatar))\nconst hasImage = computed(() => identity.value?.avatarMode === 'image' && !!identity.value.imageDataURL && !imageFailed.value)\nconst hasMascot = computed(() => identity.value?.avatarMode === 'mascot')\nconst hasVisual = computed(() => hasImage.value || hasMascot.value)\nconst radius = computed(() => identity.value?.imageCrop === 'circle' ? '50%' : identity.value?.imageCrop === 'square' ? '0' : '22%')\nconst states: Record<MascotState, CursorState> = {idle:'idle',working:'working',loading:'loading',waiting:'alerting',notifying:'notifying',success:'happy',failure:'sad'}\nconst runtimeActive = computed(() => props.state !== 'idle' && !beatEnded.value)\nconst imageActivity = computed(() => hasImage.value && runtimeActive.value && ['working', 'loading'].includes(props.state))\nconst state = computed<CursorState>(() => runtimeActive.value ? states[props.state] : oneShot.value ?? identity.value?.expression ?? 'idle')\nconst live = computed(() => hasVisual.value && visible.value && foreground.value && !reduced.value && props.animated !== false && (props.animated === true || props.size >= 56 || runtimeActive.value || !!oneShot.value || hover.value))\nconst options = computed(() => identity.value && hasVisual.value ? ({ state: state.value, paused: !live.value, color: identity.value.color, gaze: gaze.value,\n silhouette: hasImage.value ? MASCOT_SILHOUETTES.circle : identity.value.bodyId ? LAOA_BODIES[identity.value.bodyId] : MASCOT_SILHOUETTES[identity.value.shape === 'ellipse' ? 'oval' : identity.value.shape], fixedTime: props.fixedTime, expression: props.expressionIndex,\n effectsOnly: hasImage.value, ribbons: runtimeActive.value || state.value !== 'working' }) : undefined)\nfunction sync() {\n if (!svg.value || !options.value || (hasImage.value && !imageActivity.value)) { renderer?.dispose();renderer=undefined;return }\n if (!renderer) renderer=mountCursorAvatar(svg.value, options.value)\n else renderer.update(options.value)\n}\nfunction pointer(event: PointerEvent) {\n if (reduced.value || props.animated === false) return\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n hover.value=true\n gaze.value={x:Math.max(-1,Math.min(1,(event.clientX-rect.left)/rect.width*2-1)),y:Math.max(-1,Math.min(1,(event.clientY-rect.top)/rect.height*2-1))}\n}\nfunction leave() { hover.value=false;gaze.value={x:0,y:0} }\nfunction visibility() { foreground.value=document.visibilityState!=='hidden' }\nfunction motion() { reduced.value=media?.matches ?? false }\nwatch(() => props.avatar, () => { imageFailed.value=false })\nwatch(() => [props.state, props.activityKey] as const, ([next]) => {\n clearTimeout(beat);beatEnded.value=false;oneShot.value=undefined\n if(props.fixedTime === undefined && ['success','failure','notifying'].includes(next)) beat=setTimeout(()=>{beatEnded.value=true},1400)\n},{immediate:true})\nwatch([options,svg,imageActivity],sync,{flush:'post'})\nonMounted(()=>{\n visibility();media=window.matchMedia?.('(prefers-reduced-motion: reduce)');motion();media?.addEventListener('change',motion)\n document.addEventListener('visibilitychange',visibility)\n if(typeof IntersectionObserver!=='undefined' && host.value){observer=new IntersectionObserver(entries=>{visible.value=entries[0]?.isIntersecting ?? false});observer.observe(host.value)}\n sync()\n})\nonBeforeUnmount(()=>{renderer?.dispose();observer?.disconnect();clearTimeout(beat);media?.removeEventListener('change',motion);document.removeEventListener('visibilitychange',visibility)})\n</script>\n<template>\n <span ref=\"host\" class=\"agent-avatar\" :class=\"[`agent-avatar--${props.state}`, {'agent-avatar--image':hasImage, 'agent-avatar--image-active': imageActivity && live}]\" :style=\"{width:`${size}px`,height:`${size}px`}\" role=\"img\" :aria-label=\"`${name} 的头像`\" @pointermove=\"pointer\" @pointerleave=\"leave\" :data-animated=\"live && (!hasImage || imageActivity)\" :data-expression=\"state\">\n <span v-if=\"!hasVisual\" class=\"agent-avatar__placeholder\" aria-hidden=\"true\" />\n <img @error=\"imageFailed = true\" v-if=\"hasImage\" :src=\"identity?.imageDataURL\" alt=\"\" :style=\"{borderRadius:radius}\" />\n <svg v-if=\"hasMascot || imageActivity\" ref=\"svg\" aria-hidden=\"true\" />\n </span>\n</template>\n<style scoped>\n.agent-avatar{display:block;position:relative;flex:0 0 auto;overflow:visible;line-height:1;background:transparent}.agent-avatar img,.agent-avatar svg{display:block;width:100%;height:100%;object-fit:cover}\n.agent-avatar__placeholder{display:block;width:100%;height:100%;border-radius:50%;background:var(--surface-soft);box-shadow:inset 0 0 0 1px var(--line)}\n.agent-avatar svg{overflow:visible;pointer-events:none}.agent-avatar--image svg{position:absolute;inset:0}.agent-avatar--image-active img{transform:scale(.72)}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport AppIcon from './AppIcon.vue'\nimport AgentAvatar from './AgentAvatar.vue'\n\nexport type TeamAvatarMember = {\n name: string\n activityKey?: number\n avatar?: string\n state?: 'idle' | 'working' | 'waiting' | 'loading' | 'success' | 'failure' | 'notifying'\n}\n\nconst props = withDefaults(defineProps<{\n name: string\n avatar?: string\n members?: TeamAvatarMember[]\n fallbackKey?: string\n size?: number\n}>(), {\n avatar: '',\n members: () => [],\n fallbackKey: '',\n size: 32,\n})\n\nconst hasUploadedImage = computed(() => /^data:image\\/(png|jpeg|webp);base64,/i.test(props.avatar))\n\nconst clusterMembers = computed(() => {\n const entries = props.members.slice(0, 3).map(member => ({\n name: member.name,\n avatar: member.avatar || '',\n state: member.state || 'idle', activityKey: member.activityKey,\n }))\n return entries\n})\n</script>\n\n<template>\n <span\n class=\"team-avatar\"\n :style=\"{ width: `${size}px`, height: `${size}px` }\"\n role=\"img\"\n :aria-label=\"`${name}团队头像`\"\n >\n <img v-if=\"hasUploadedImage\" class=\"team-avatar__image\" :src=\"avatar\" alt=\"\" />\n <AppIcon v-else-if=\"!clusterMembers.length\" name=\"groups\" :size=\"size\" />\n <span v-else class=\"team-avatar__cluster\" aria-hidden=\"true\">\n <AgentAvatar\n v-for=\"(member, index) in clusterMembers\"\n :key=\"`${member.name}:${index}`\"\n class=\"team-avatar__member\"\n :class=\"`team-avatar__member--${index + 1}`\"\n :name=\"member.name\"\n :avatar=\"member.avatar\"\n :state=\"member.state\" :activity-key=\"member.activityKey\"\n :size=\"Math.round(size * .64)\"\n />\n </span>\n </span>\n</template>\n\n<style scoped>\n.team-avatar { position: relative; display: block; flex: 0 0 auto; overflow: visible; }\n.team-avatar__image { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }\n.team-avatar__cluster { position: absolute; inset: 0; display: block; }\n.team-avatar__member { position: absolute; }\n.team-avatar__member--1 { z-index: 3; left: 0; top: 18%; }\n.team-avatar__member--2 { z-index: 2; top: 0; right: 0; }\n.team-avatar__member--3 { z-index: 1; right: 1%; bottom: 0; }\n</style>\n","<script setup lang=\"ts\">\nimport AgentAvatar from '@/components/common/AgentAvatar.vue'\nimport TeamAvatar from '@/components/common/TeamAvatar.vue'\nimport { defaultAgentIdentity, encodeAgentAvatar, type AgentMascotShape } from '@shared/agentIdentity'\nconst avatar = (shape: AgentMascotShape) => encodeAgentAvatar({...defaultAgentIdentity('preview'), shape})\n\nconst shapes = [\n { name: '圆圆', avatar: avatar('circle') },\n { name: '方方', avatar: avatar('square') },\n { name: '小三角', avatar: avatar('triangle') },\n] as const\n\nconst states = [\n { name: '工作中', detail: '状态驱动的眼睛和身体动作', avatar: avatar('triangle'), state: 'working' },\n { name: '有新消息', detail: '头像弹跳并提醒', avatar: avatar('triangle'), state: 'notifying' },\n { name: '等待你操作', detail: '状态驱动的眼睛和身体动作', avatar: avatar('square'), state: 'waiting' },\n] as const\n\nconst teamMembers = shapes.map(item => ({ name: item.name, avatar: item.avatar }))\n</script>\n\n<template>\n <main class=\"identity-fixture\">\n <header>\n <span>跨端角色系统</span>\n <h1>自定义机器人角色</h1>\n <p>采用 OpenMausBot 的纯色轮廓、五官与状态动画。</p>\n </header>\n <section class=\"shape-row\" aria-label=\"三种头像形状\">\n <article v-for=\"item in shapes\" :key=\"item.name\">\n <AgentAvatar :name=\"item.name\" :avatar=\"item.avatar\" :size=\"88\" />\n <strong>{{ item.name }}</strong>\n </article>\n </section>\n <section class=\"state-list\" aria-label=\"头像状态动画\">\n <article v-for=\"item in states\" :key=\"item.name\">\n <AgentAvatar :name=\"item.name\" :avatar=\"item.avatar\" :size=\"58\" :state=\"item.state\" />\n <div><strong>{{ item.name }}</strong><span>{{ item.detail }}</span></div>\n </article>\n </section>\n <section class=\"group-preview\" aria-label=\"群聊组合头像\">\n <TeamAvatar name=\"产品设计团队\" :members=\"teamMembers\" fallback-key=\"design-team\" :size=\"92\" />\n <div><strong>产品设计团队</strong><span>群聊图标由成员角色自动组成</span></div>\n </section>\n </main>\n</template>\n\n<style scoped>\n.identity-fixture{min-height:100vh;box-sizing:border-box;padding:72px clamp(28px,7vw,100px);background:var(--canvas);color:var(--text-primary)}header{max-width:850px}header>span{color:var(--accent);font-size:13px;font-weight:750;letter-spacing:.12em;text-transform:uppercase}h1{margin:13px 0 12px;font-size:clamp(38px,5vw,68px);letter-spacing:-.045em;line-height:1.02}header p{max-width:720px;margin:0;color:var(--text-muted);font-size:18px;line-height:1.65}.shape-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:760px;gap:28px;margin-top:60px}.shape-row article{display:grid;place-items:center;gap:16px;min-height:160px;border:1px solid var(--line);border-radius:22px;background:var(--surface-raised)}.shape-row strong{font-size:14px}.state-list{display:grid;max-width:760px;gap:14px;margin-top:28px}.state-list article{display:flex;align-items:center;gap:20px;padding:19px 24px;border:1px solid var(--line);border-radius:20px;background:var(--surface-soft)}.state-list div{display:grid;gap:5px}.state-list strong{font-size:18px}.state-list span{color:var(--text-muted);font-size:13px}@media(max-width:620px){.identity-fixture{padding:44px 22px}.shape-row{gap:10px}.shape-row article{min-height:132px}.state-list article{padding:16px}}\n.group-preview{display:flex;max-width:712px;align-items:center;gap:28px;margin-top:18px;padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--surface-raised)}.group-preview>div{display:grid;gap:6px}.group-preview strong{font-size:20px}.group-preview span{color:var(--text-muted);font-size:13px}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, watch } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport LoadingScreen from '@/components/app/LoadingScreen.vue'\nimport LoginView from '@/views/LoginView.vue'\nimport PasswordChangeView from '@/views/PasswordChangeView.vue'\nimport { useUnreadStore } from '@/stores/unread'\nimport { useAuthStore } from '@/stores/auth'\nimport { useChatStore } from '@/stores/chat'\nimport { useKanbanStore } from '@/stores/kanban'\nimport { useThemeStore } from '@/stores/theme'\nimport AgentIdentityFixture from '@/components/app/AgentIdentityFixture.vue'\n\nconst unread=useUnreadStore()\nconst auth = useAuthStore()\nwatch(()=>auth.isAuthenticated ? `${auth.serverIdentity?.serverId ?? location.origin}:${auth.user?.id ?? ''}` : '',()=>{\n if(auth.isAuthenticated&&auth.user)unread.start(auth.user.id)\n else { unread.reset();void window.yaoyaoDesktop?.unreadState?.(null).catch(()=>{}) }\n},{immediate:true})\nconst chat = useChatStore()\nconst kanban = useKanbanStore()\nconst theme = useThemeStore()\nconst route = useRoute()\nconst router = useRouter()\nconst allowedRoute = computed(() => !auth.isBotOnly || /^\\/conversations(?:\\/|$)/.test(route.path))\nwatch([() => auth.isBotOnly, () => route.path], () => {\n if (!allowedRoute.value) void router.replace('/conversations')\n}, { immediate: true, flush: 'sync' })\nconst agentIdentityFixture = import.meta.env.DEV\n && new URLSearchParams(window.location.search).get('fixture') === 'agent-identity'\n\nconst pageTitle = computed(() => {\n const name = route.name === 'computer' ? '电脑接管' : route.name === 'bot-automations' ? '自动化' : route.path.startsWith('/history')\n ? '历史记录'\n : route.path.startsWith('/conversations')\n ? '聊天'\n : route.path.startsWith('/kanban')\n ? kanban.selectedBoard?.name || kanban.selectedBoardSlug || '看板'\n : route.path.startsWith('/files')\n ? '文件库'\n : chat.activeSession?.title || '对话'\n return `${name} · 夭夭 AI`\n})\n\nwatch(() => theme.resolvedTheme, value => {\n document.documentElement.classList.toggle('dark', value === 'dark')\n document.documentElement.dataset.theme = value\n document.querySelector('meta[name=\"theme-color\"]')?.setAttribute('content', value === 'dark' ? '#181817' : '#f8f8f6')\n}, { immediate: true })\n\nwatch(pageTitle, value => { document.title = value }, { immediate: true })\n\nonMounted(() => {\n if (!agentIdentityFixture) void router.isReady().then(() => auth.bootstrap())\n})\n</script>\n\n<template>\n <AgentIdentityFixture v-if=\"agentIdentityFixture\" />\n <LoadingScreen v-else-if=\"auth.status === 'checking'\" />\n <LoginView v-else-if=\"!auth.isAuthenticated\" />\n <PasswordChangeView v-else-if=\"auth.user?.mustChangePassword\" />\n <RouterView v-else-if=\"allowedRoute\" />\n <LoadingScreen v-else />\n</template>\n","export type InterfaceMode = 'chat' | 'bots'\nconst KEY = 'hermes-yaoyao:interface-mode'\n\nexport function savedInterfacePath(): '/chat' | '/conversations' {\n try { return localStorage.getItem(KEY) === 'chat' ? '/chat' : '/conversations' }\n catch { return '/conversations' }\n}\n\nexport function rememberInterfacePath(path: string): void {\n const mode: InterfaceMode | undefined = /^\\/conversations(?:\\/|$)/.test(path) ? 'bots'\n : /^\\/chat(?:\\/|$)/.test(path) ? 'chat' : undefined\n if (!mode) return\n try { localStorage.setItem(KEY, mode) } catch { /* storage may be unavailable */ }\n}\n","import { createRouter, createWebHistory } from 'vue-router'\nimport { rememberInterfacePath, savedInterfacePath } from '@/utils/interfaceMode'\n\nconst router = createRouter({\n history: createWebHistory(),\n routes: [\n { path: '/', redirect: () => savedInterfacePath() },\n { path: '/chat/:sessionId?', name: 'chat', component: () => import('@/views/ChatView.vue') },\n { path: '/history/:sessionId?', name: 'history', component: () => import('@/views/HistoryView.vue') },\n { path: '/conversations/computer/:agentId', name: 'computer', component: () => import('@/views/ComputerViewerView.vue') },\n { path: '/conversations/automations', name: 'bot-automations', component: () => import('@/views/BotAutomationsView.vue') },\n { path: '/conversations/:id?', name: 'conversations', component: () => import('@/views/ConversationsView.vue') },\n { path: '/kanban/:boardSlug?', name: 'kanban', component: () => import('@/views/KanbanView.vue') },\n { path: '/files', name: 'files', component: () => import('@/views/FilesView.vue') },\n { path: '/artifacts', redirect: '/chat' },\n { path: '/:pathMatch(.*)*', redirect: '/chat' },\n ],\n scrollBehavior: () => ({ top: 0 }),\n})\nrouter.afterEach(to => { if (to.name !== 'computer') rememberInterfacePath(to.path) })\n\nexport default router\n","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport router from './router'\nimport './styles/global.css'\n\nconst app = createApp(App)\napp.config.errorHandler = (error, _instance, info) => {\n console.error(`Vue render error (${info})`, error)\n}\nrouter.onError((error) => {\n console.error('Router navigation error', error)\n})\n\napp.use(createPinia()).use(router).mount('#app')\n"],"file":"index-CWamgtSb.js"}
|