@cuongtran001/kanna 1.63.2 → 1.63.3

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.
Files changed (199) hide show
  1. package/README.md +5 -9
  2. package/dist/client/assets/{BoardsPage-BJalB-bc.js → BoardsPage-AckCuswi.js} +1 -1
  3. package/dist/client/assets/BoardsRoutePage-DzKwKy3f.js +1 -0
  4. package/dist/client/assets/ChatPage-DsaH8CTz.js +93 -0
  5. package/dist/client/assets/{CronJobRow-CPbO_jwU.js → CronJobRow-Bx9gRqKW.js} +1 -1
  6. package/dist/client/assets/{CronJobsPage-Ck3SNgGi.js → CronJobsPage-v0-2X1oX.js} +1 -1
  7. package/dist/client/assets/{FilePreviewSheet-XEuUtDPn.js → FilePreviewSheet-B6SDxSD0.js} +2 -2
  8. package/dist/client/assets/{FlowSurface-BCbeMTJe.js → FlowSurface-CLC-ZFar.js} +1 -1
  9. package/dist/client/assets/{GenUIBlock-BJy_dfs-.js → GenUIBlock-CC79Ujro.js} +2 -2
  10. package/dist/client/assets/{KannaSocketProvider-D7Lzlt35.js → KannaSocketProvider-B2sHsWP5.js} +1 -1
  11. package/dist/client/assets/{LocalProjectsPage-9LJkQjhT.js → LocalProjectsPage-DYBkcEAm.js} +1 -1
  12. package/dist/client/assets/SettingsPage-CZqMkMRW.js +9 -0
  13. package/dist/client/assets/{StackBoardsRoutePage-t_EaFNG4.js → StackBoardsRoutePage-Clviz0hX.js} +1 -1
  14. package/dist/client/assets/{ToolCallMessage-RbF9XT2B.js → ToolCallMessage-BfNbWGmc.js} +1 -1
  15. package/dist/client/assets/{VChartSurface-CKuPelsn.js → VChartSurface-CUbxyBo3.js} +1 -1
  16. package/dist/client/assets/{WorkflowsPage-B6qUmQA3.js → WorkflowsPage-rengzb97.js} +1 -1
  17. package/dist/client/assets/{WorkflowsSection-DxO0S4An.js → WorkflowsSection-DuXdLsMO.js} +1 -1
  18. package/dist/client/assets/{chart-renderer-DjYZvNxh.js → chart-renderer-D7ukB2wg.js} +1 -1
  19. package/dist/client/assets/{chatSounds-FD2DQzF6.js → chatSounds-BLg2xPDZ.js} +1 -1
  20. package/dist/client/assets/chevron-left-RbFvmeyK.js +1 -0
  21. package/dist/client/assets/{clipboard.adapter-GN9nnYak.js → clipboard.adapter-CgdNwn-1.js} +1 -1
  22. package/dist/client/assets/{columnStyle-DjA7hA9k.js → columnStyle-CMCF0ds6.js} +1 -1
  23. package/dist/client/assets/{createScopedStore-BoLB9Rhc.js → createScopedStore-BrD5NHWx.js} +1 -1
  24. package/dist/client/assets/{dist-CimtOoGK.js → dist-DNSTHlSo.js} +1 -1
  25. package/dist/client/assets/editor-icons-DY4uKeEY.js +1 -0
  26. package/dist/client/assets/{ellipsis-Cd7sO0LO.js → ellipsis-OHg0x_x1.js} +1 -1
  27. package/dist/client/assets/{flow-kinds-CW2TU_83.js → flow-kinds-Ki2DP9nP.js} +1 -1
  28. package/dist/client/assets/{folder-C7sXCaHj.js → folder-CnWzWIG5.js} +1 -1
  29. package/dist/client/assets/{formatters-wSVyvDFZ.js → formatters-BGORekd-.js} +1 -1
  30. package/dist/client/assets/{genui-EzBIAYFE.js → genui-C9i6j0XZ.js} +1 -1
  31. package/dist/client/assets/{globe-xmRpmpma.js → globe-BjR1tyE4.js} +1 -1
  32. package/dist/client/assets/{host-DCaA9W-Z.js → host-D9tJwZXl.js} +1 -1
  33. package/dist/client/assets/{index-CDqjh7nt.js → index-CesRxZ0X.js} +7 -7
  34. package/dist/client/assets/index-CxDE9VOy.css +1 -0
  35. package/dist/client/assets/{info-D4MMvZFe.js → info-DNYekoE-.js} +1 -1
  36. package/dist/client/assets/{input-C4fvDiQ4.js → input-DgW9uRZN.js} +1 -1
  37. package/dist/client/assets/{lexicalToReact-sPUyOWk6.js → lexicalToReact-CZvp9Pgz.js} +3 -3
  38. package/dist/client/assets/{log-aTaDVF_e.js → log-DnEvbp3E.js} +1 -1
  39. package/dist/client/assets/{monitor-_CRKcV1h.js → monitor-qbWfUdBG.js} +1 -1
  40. package/dist/client/assets/{pencil-fNBeUUCf.js → pencil-C965rrpd.js} +1 -1
  41. package/dist/client/assets/{pendingActionsStore-COTh4Ztq.js → pendingActionsStore-CxhI19V9.js} +1 -1
  42. package/dist/client/assets/{play-BAmkJfn6.js → play-uofLR7yT.js} +1 -1
  43. package/dist/client/assets/{plus-c75CkNEO.js → plus-D4CI6rj1.js} +1 -1
  44. package/dist/client/assets/{popover-CHM4skzh.js → popover-Bc646hKn.js} +1 -1
  45. package/dist/client/assets/{pushClient-BJH_ITRB.js → pushClient-CxnHu9h4.js} +1 -1
  46. package/dist/client/assets/runDetached-DfQXHAaY.js +1 -0
  47. package/dist/client/assets/{segmented-control-DNOwRupT.js → segmented-control-CKGX29Kl.js} +1 -1
  48. package/dist/client/assets/{select-dLHiAls6.js → select-BjeajpVt.js} +1 -1
  49. package/dist/client/assets/{settings-header-button-CGKCzFyk.js → settings-header-button-BYvHR6Xl.js} +1 -1
  50. package/dist/client/assets/{sidebarPendingActions-Dyp80Lv_.js → sidebarPendingActions-xgMTnfRY.js} +1 -1
  51. package/dist/client/assets/{square-pen-B1IxmScM.js → square-pen-DmppQdTd.js} +1 -1
  52. package/dist/client/assets/{state-mark-BhTZfcYe.js → state-mark-C3kEL1hX.js} +1 -1
  53. package/dist/client/assets/{status-pill-CwhJhaMy.js → status-pill-Bo1Nb6HX.js} +1 -1
  54. package/dist/client/assets/{terminal-Bnj7qFGw.js → terminal-DfCF-J4p.js} +1 -1
  55. package/dist/client/assets/{timer.adapter-DHt2zwsL.js → timer.adapter-C2RhP4d6.js} +1 -1
  56. package/dist/client/assets/{tools-3gJcj3hK.js → tools-t5T_3UBg.js} +1 -1
  57. package/dist/client/assets/{triangle-alert-CWrc0CIO.js → triangle-alert-CYQhobyY.js} +1 -1
  58. package/dist/client/assets/useAppGlobalState-DUa3pkCF.js +1 -0
  59. package/dist/client/assets/useKannaState-FcieR5qb.js +5 -0
  60. package/dist/client/assets/useTheme-D9sKDPEm.js +1 -0
  61. package/dist/client/index.html +35 -35
  62. package/package.json +2 -2
  63. package/src/server/agent-coordinator-types.ts +0 -6
  64. package/src/server/agent-coordinator.ts +6 -45
  65. package/src/server/agent.compaction.test.ts +1 -13
  66. package/src/server/agent.oauth-account-info.test.ts +0 -3
  67. package/src/server/agent.oauth-release.test.ts +0 -2
  68. package/src/server/agent.oauth-rotation.test.ts +0 -9
  69. package/src/server/agent.oauth-token-share-cap.test.ts +0 -1
  70. package/src/server/agent.openrouter-model.test.ts +0 -2
  71. package/src/server/agent.openrouter-watchdog.test.ts +0 -3
  72. package/src/server/agent.sdk-workflow-register.test.ts +2 -64
  73. package/src/server/agent.test.ts +1 -319
  74. package/src/server/app-settings.test.ts +14 -17
  75. package/src/server/app-settings.ts +22 -37
  76. package/src/server/auto-continue/e2e.test.ts +0 -1
  77. package/src/server/background-task-output-registry.test.ts +1 -1
  78. package/src/server/background-task-output-registry.ts +1 -1
  79. package/src/server/claude-cancel-handler.test.ts +0 -58
  80. package/src/server/claude-cancel-handler.ts +1 -17
  81. package/src/server/claude-harness-stream.test.ts +134 -0
  82. package/src/server/{claude-pty/jsonl-path.test.ts → claude-projects-path.adapter.test.ts} +1 -19
  83. package/src/server/{claude-pty/jsonl-path.adapter.ts → claude-projects-path.adapter.ts} +0 -11
  84. package/src/server/claude-send-command.test.ts +0 -1
  85. package/src/server/claude-session-config-helpers.test.ts +1 -90
  86. package/src/server/claude-session-config-helpers.ts +1 -38
  87. package/src/server/claude-session-error-handler.test.ts +0 -1
  88. package/src/server/claude-session-lifecycle.test.ts +2 -36
  89. package/src/server/claude-session-lifecycle.ts +2 -8
  90. package/src/server/claude-session-runner.test.ts +8 -36
  91. package/src/server/claude-session-runner.ts +1 -26
  92. package/src/server/claude-session-spawner.test.ts +5 -64
  93. package/src/server/claude-session-spawner.ts +49 -115
  94. package/src/server/claude-session-start.test.ts +1 -14
  95. package/src/server/claude-session-start.ts +0 -8
  96. package/src/server/claude-session-state-queries.test.ts +1 -2
  97. package/src/server/claude-session-state.test.ts +0 -1
  98. package/src/server/claude-session-state.ts +0 -4
  99. package/src/server/claude-subagent-wiring.test.ts +2 -68
  100. package/src/server/claude-subagent-wiring.ts +3 -50
  101. package/src/server/claude-turn-starter-types.ts +0 -3
  102. package/src/server/claude-turn-starter.test.ts +0 -28
  103. package/src/server/claude-turn-starter.ts +0 -5
  104. package/src/server/event-store.test.ts +0 -2
  105. package/src/server/events.ts +1 -2
  106. package/src/server/harness-types.ts +1 -2
  107. package/src/server/import-subagent-drill.e2e.test.ts +1 -1
  108. package/src/server/imported-subagents-dir.test.ts +1 -1
  109. package/src/server/imported-subagents-dir.ts +1 -1
  110. package/src/server/kanna-mcp.test.ts +0 -75
  111. package/src/server/kanna-mcp.ts +1 -47
  112. package/src/server/server.test.ts +5 -7
  113. package/src/server/server.ts +2 -18
  114. package/src/server/subagent-orchestrator.test.ts +0 -1
  115. package/src/server/subagent-provider-run.test.ts +48 -10
  116. package/src/server/subagent-provider-run.ts +12 -3
  117. package/src/server/tool-callback.test.ts +1 -1
  118. package/src/server/ws-router-agent-ctrl.test.ts +0 -45
  119. package/src/server/ws-router-agent-ctrl.ts +1 -31
  120. package/src/server/ws-router-broadcast.ts +0 -27
  121. package/src/server/ws-router-defaults.test.ts +2 -3
  122. package/src/server/ws-router-defaults.ts +2 -3
  123. package/src/server/ws-router-envelope.ts +0 -15
  124. package/src/server/ws-router-observability.test.ts +1 -1
  125. package/src/server/ws-router-settings.test.ts +2 -2
  126. package/src/server/ws-router.test.ts +2 -2
  127. package/src/server/ws-router.ts +0 -8
  128. package/src/shared/app-settings-types.ts +9 -20
  129. package/src/shared/claude-api-error-classification.ts +1 -1
  130. package/src/shared/protocol.ts +1 -11
  131. package/dist/client/assets/BoardsRoutePage-BTTjJX-Y.js +0 -1
  132. package/dist/client/assets/ChatPage-DH8wtQyD.js +0 -93
  133. package/dist/client/assets/SettingsPage-CKrZ6dGQ.js +0 -9
  134. package/dist/client/assets/chevron-left-CJ0qv9kF.js +0 -1
  135. package/dist/client/assets/editor-icons-CONDQZof.js +0 -1
  136. package/dist/client/assets/index-C-UYaDk6.css +0 -1
  137. package/dist/client/assets/runDetached-DqQ3k2ji.js +0 -1
  138. package/dist/client/assets/useAppGlobalState-DKOGrO5l.js +0 -1
  139. package/dist/client/assets/useKannaState-D7R_-dM6.js +0 -5
  140. package/dist/client/assets/useTheme-B57LIKyx.js +0 -1
  141. package/src/server/agent.pty-rotation.test.ts +0 -322
  142. package/src/server/claude-pty/auth.test.ts +0 -38
  143. package/src/server/claude-pty/auth.ts +0 -17
  144. package/src/server/claude-pty/claude-session-registry.adapter.ts +0 -68
  145. package/src/server/claude-pty/claude-session-registry.test.ts +0 -149
  146. package/src/server/claude-pty/driver.test.ts +0 -1153
  147. package/src/server/claude-pty/driver.ts +0 -829
  148. package/src/server/claude-pty/env.test.ts +0 -79
  149. package/src/server/claude-pty/env.ts +0 -20
  150. package/src/server/claude-pty/jsonl-to-event.test.ts +0 -882
  151. package/src/server/claude-pty/jsonl-to-event.ts +0 -357
  152. package/src/server/claude-pty/parity-matrix.test.ts +0 -437
  153. package/src/server/claude-pty/pid-registry.adapter.ts +0 -164
  154. package/src/server/claude-pty/pid-registry.test.ts +0 -178
  155. package/src/server/claude-pty/preflight/binary-fingerprint.adapter.ts +0 -20
  156. package/src/server/claude-pty/preflight/binary-fingerprint.test.ts +0 -32
  157. package/src/server/claude-pty/pty-instance-registry.test.ts +0 -208
  158. package/src/server/claude-pty/pty-instance-registry.ts +0 -172
  159. package/src/server/claude-pty/pty-memory-sampler.adapter.test.ts +0 -103
  160. package/src/server/claude-pty/pty-memory-sampler.adapter.ts +0 -86
  161. package/src/server/claude-pty/pty-process.adapter.ts +0 -60
  162. package/src/server/claude-pty/pty-process.test.ts +0 -49
  163. package/src/server/claude-pty/resolve-binary.adapter.ts +0 -106
  164. package/src/server/claude-pty/resolve-binary.test.ts +0 -118
  165. package/src/server/claude-pty/runtime-dir.adapter.ts +0 -19
  166. package/src/server/claude-pty/sandbox/detect.adapter.ts +0 -17
  167. package/src/server/claude-pty/sandbox/detect.test.ts +0 -17
  168. package/src/server/claude-pty/sandbox/platform.test.ts +0 -35
  169. package/src/server/claude-pty/sandbox/platform.ts +0 -27
  170. package/src/server/claude-pty/sandbox/preflight-io.adapter.ts +0 -14
  171. package/src/server/claude-pty/sandbox/preflight.test.ts +0 -69
  172. package/src/server/claude-pty/sandbox/preflight.ts +0 -44
  173. package/src/server/claude-pty/sandbox/profile-linux.adapter.ts +0 -63
  174. package/src/server/claude-pty/sandbox/profile-linux.test.ts +0 -90
  175. package/src/server/claude-pty/sandbox/profile-macos.adapter.ts +0 -72
  176. package/src/server/claude-pty/sandbox/profile-macos.test.ts +0 -68
  177. package/src/server/claude-pty/sandbox/wrap.adapter.ts +0 -58
  178. package/src/server/claude-pty/sandbox/wrap.test.ts +0 -82
  179. package/src/server/claude-pty/settings-writer.adapter.ts +0 -23
  180. package/src/server/claude-pty/settings-writer.test.ts +0 -22
  181. package/src/server/claude-pty/smoke-test-io.adapter.ts +0 -28
  182. package/src/server/claude-pty/smoke-test.test.ts +0 -199
  183. package/src/server/claude-pty/smoke-test.ts +0 -182
  184. package/src/server/claude-pty/tui-control.test.ts +0 -300
  185. package/src/server/claude-pty/tui-control.ts +0 -174
  186. package/src/server/claude-pty/tui-source.adapter.test.ts +0 -374
  187. package/src/server/claude-pty/tui-source.adapter.ts +0 -294
  188. package/src/server/http-server.adapter.test.ts +0 -18
  189. package/src/server/http-server.adapter.ts +0 -39
  190. package/src/server/kanna-mcp-http.test.ts +0 -274
  191. package/src/server/kanna-mcp-http.ts +0 -194
  192. package/src/server/kanna-mcp-tools/ask-user-question.test.ts +0 -108
  193. package/src/server/kanna-mcp-tools/ask-user-question.ts +0 -55
  194. package/src/server/kanna-mcp-tools/exit-plan-mode.test.ts +0 -61
  195. package/src/server/kanna-mcp-tools/exit-plan-mode.ts +0 -49
  196. package/src/server/mcp-zod-compat.adapter.ts +0 -20
  197. package/src/shared/pty-instance.ts +0 -43
  198. /package/src/server/{claude-pty/output-ring.test.ts → output-ring.test.ts} +0 -0
  199. /package/src/server/{claude-pty/output-ring.ts → output-ring.ts} +0 -0
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{P as r,q as i,t as a}from"./useQuery-Cqr8_M0q.js";import{a as o,c as s,f as c,n as l,r as u,s as d,t as f}from"./pendingActionsStore-COTh4Ztq.js";import{i as p,r as m}from"./host-DCaA9W-Z.js";import{t as ee}from"./globe-xmRpmpma.js";import{t as te}from"./info-D4MMvZFe.js";import{n as h,t as g}from"./triangle-alert-CWrc0CIO.js";import{t as _}from"./play-BAmkJfn6.js";import{t as v}from"./createScopedStore-BoLB9Rhc.js";import{F as y,S as b}from"./genui-EzBIAYFE.js";var x={name:`arrow-down-right`,size:24,node:[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]};x.node;var S=c(x),C={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};C.node;var w=c(C),T={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};T.node;var E=c(T),D={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};D.node;var O=c(D),k={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};k.node;var A=c(k),j={name:`rectangle-horizontal`,size:24,node:[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`2`,key:`9lu3g6`}]]};j.node;var ne=c(j),M={name:`shield-question-mark`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`shield-question`]};M.node;var re=c(M),N={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};N.node;var P=c(N);function F(e){return e.type??`static`}function I(e){let t=new Map(e.nodes.map(e=>[e.id,0]));for(let n of e.edges)n.from!==n.to&&t.set(n.to,(t.get(n.to)??0)+1);let n=new Set,r=[];for(;r.length<e.nodes.length;){let i=e.nodes.find(e=>!n.has(e.id)&&t.get(e.id)===0)??e.nodes.find(e=>!n.has(e.id));if(!i)break;n.add(i.id),r.push(i);for(let n of e.edges)n.from===i.id&&n.to!==i.id&&t.set(n.to,(t.get(n.to)??0)-1)}return r}function L(e){let t=new Map(e.nodes.map(e=>[e.id,e])),n=new Map((e.groups??[]).map(e=>[e.id,e.label])),r=(e,n)=>{let r=t.get(e);return r?[{node:r,edge:n}]:[]};return I(e).map(t=>({node:t,groupLabel:t.group?n.get(t.group)??null:null,incoming:e.edges.filter(e=>e.to===t.id).flatMap(e=>r(e.from,e)),outgoing:e.edges.filter(e=>e.from===t.id).flatMap(e=>r(e.to,e))}))}function R(e){return{step:e.node.label,edge:F(e.edge),...e.edge.label?{label:e.edge.label}:{}}}function z(e,t){let n=L(e).find(e=>e.node.id===t);if(!n)return null;let{node:r}=n;return{...e.title?{diagram:e.title}:{},step:r.label,...r.description?{description:r.description}:{},...r.kind?{kind:r.kind}:{},...r.status?{status:r.status}:{},...n.groupLabel?{group:n.groupLabel}:{},...r.path?{path:r.path}:{},...r.line?{line:r.line}:{},upstream:n.incoming.map(R),downstream:n.outgoing.map(R)}}function B(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`h${(t>>>0).toString(16)}:${e.length}`}var V=e(t(),1),H=e(n(),1),U=(0,V.createContext)(null);function W({value:e,children:t}){return(0,H.jsx)(U.Provider,{value:e,children:t})}function G(){let e=(0,V.useContext)(U);if(!e)throw Error(`GenUI components render only inside a GenUI view`);return e}var K=v(`GenUIView`,()=>e=>({pendingAgentMessage:null,previewPath:null,previewProbe:null,refreshNonce:{},notice:null,proposeAgentMessage:t=>e({pendingAgentMessage:t,notice:null}),cancelAgentMessage:()=>e({pendingAgentMessage:null}),openPreview:t=>e({previewPath:t,previewProbe:null}),closePreview:()=>e({previewPath:null,previewProbe:null}),setPreviewProbe:t=>e({previewProbe:t}),refreshDataset:t=>e(e=>({refreshNonce:{...e.refreshNonce,[t]:(e.refreshNonce[t]??0)+1}})),showNotice:t=>e({notice:t})})),q=10,J=`genui-dataset`;function Y(e){return e.source===`file`?(e.refreshSeconds??q)*1e3:e.source===`mcp`&&e.refreshSeconds?e.refreshSeconds*1e3:!1}function X(e){let{spec:t}=G();return e?t.datasets?.[e]??null:null}function ie(e,t){let n=m(),i=X(e),o=K.useScopedStore(t=>e?t.refreshNonce[e]??0:0),s=i!==null&&i.source!==`inline`&&n.queryDataset!==null&&t!==null,c=(0,V.useMemo)(()=>!i||i.source!==`inline`||!t?null:y(i,i.rows,t),[i,t]),l=n.queryDataset,u=a({queryKey:[J,n.chatId,e,i?B(JSON.stringify(i)):null,t?JSON.stringify(t):null,o],queryFn:async()=>{if(!i||!t||!l)throw Error(`dataset is not queryable`);return await l(i,t,o>0)},enabled:s,placeholderData:r,refetchInterval:i&&s&&!n.readonly?Y(i):!1,retry:!1});if(!i)return{status:`error`,message:`This view refers to a dataset "${e??``}" it does not declare`};if(!t)return{status:`loading`};if(c)return c.ok?{status:`ok`,result:c.result,refreshing:!1}:{status:`error`,message:c.message};if(!n.queryDataset)return{status:`unavailable`,message:`Live data is not included in a shared view`};if(u.error)return{status:`error`,message:b.source_unavailable};let d=u.data;if(!d)return{status:`loading`};switch(d.status){case`ok`:return{status:`ok`,result:d.result,refreshing:u.isPlaceholderData};case`needs_approval`:return d;case`error`:return{status:`error`,message:`${b[d.code]}: ${d.message}`}}}var ae={neutral:`text-muted-foreground`,positive:`text-success-text`,negative:`text-destructive-text`,attention:`text-warning-text`,info:`text-info-text`};function Z(e){return ae[e]}function oe({tone:e,className:t}){let n=s(`h-3.5 w-3.5 shrink-0`,t);switch(e){case`positive`:return(0,H.jsx)(p,{className:n,"aria-hidden":`true`});case`negative`:return(0,H.jsx)(E,{className:n,"aria-hidden":`true`});case`attention`:return(0,H.jsx)(g,{className:n,"aria-hidden":`true`});case`info`:return(0,H.jsx)(te,{className:n,"aria-hidden":`true`});case`neutral`:return(0,H.jsx)(h,{className:n,"aria-hidden":`true`})}}function se(e){return e===`positive`?`positive`:e===`negative`?`negative`:`neutral`}function Q({trend:e,className:t}){let n=s(`h-3.5 w-3.5 shrink-0`,t);return e===`up`?(0,H.jsx)(w,{className:n,"aria-hidden":`true`}):e===`down`?(0,H.jsx)(S,{className:n,"aria-hidden":`true`}):(0,H.jsx)(h,{className:n,"aria-hidden":`true`})}function ce({component:e}){return(0,H.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,H.jsx)(g,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),e,` could not be shown: its settings changed to an unsupported value`]})}function le({server:e,tool:t}){let n=m(),r=i(),a=f(`genui.dataset.approve`,n.chatId??``,e,t),s=u(a),c=n.approveTool;return c?(0,H.jsx)(o,{size:`sm`,variant:`outline`,pending:s,onClick:()=>{l(a,async()=>{await c(e,t),await r.invalidateQueries({queryKey:[J,n.chatId]})})},children:`Allow for this chat`}):null}function ue({state:e,minHeight:t,emptyLabel:n}){return(0,H.jsx)(`div`,{className:`flex items-center justify-center rounded-md border border-dashed border-border px-3 py-4 text-sm`,style:t?{minHeight:t}:void 0,children:(0,H.jsx)(de,{state:e,emptyLabel:n})})}function de({state:e,emptyLabel:t}){switch(e.status){case`loading`:return(0,H.jsxs)(`span`,{className:`flex items-center gap-2 text-muted-foreground`,role:`status`,children:[(0,H.jsx)(d,{}),` Loading data…`]});case`needs_approval`:return(0,H.jsxs)(`span`,{className:`flex flex-col items-center gap-2 text-center text-muted-foreground`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-foreground`,children:[(0,H.jsx)(re,{className:`h-4 w-4`,"aria-hidden":`true`}),`Action requires approval`]}),(0,H.jsx)(`span`,{className:`max-w-prose text-xs`,children:e.message}),(0,H.jsx)(le,{server:e.server,tool:e.tool})]});case`unavailable`:return(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:t??e.message});case`error`:return(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-destructive-text`,role:`alert`,children:[(0,H.jsx)(g,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`}),e.message]})}}function fe({label:e,minHeight:t}){return(0,H.jsx)(`div`,{className:`flex items-center justify-center rounded-md border border-dashed border-border px-3 py-4 text-sm text-muted-foreground`,style:t?{minHeight:t}:void 0,children:e})}var $={start:{icon:_,label:`Start`},end:{icon:P,label:`End`},process:{icon:ne,label:`Step`},decision:{icon:A,label:`Decision`},store:{icon:O,label:`Store`},external:{icon:ee,label:`External`}},pe={neutral:`bg-muted-foreground`,positive:`bg-success`,negative:`bg-destructive`,attention:`bg-warning`,info:`bg-info`};function me({node:e,className:t}){let n=$[e.kind??`process`],r=n.icon;return(0,H.jsx)(r,{className:s(`h-3.5 w-3.5 shrink-0 text-muted-foreground`,t),"aria-label":n.label})}function he({node:e}){if(!e.status)return null;let t=e.tone??`neutral`;return(0,H.jsxs)(`span`,{className:s(`flex shrink-0 items-center gap-1 text-xs font-medium whitespace-nowrap tabular-nums`,Z(t)),children:[(0,H.jsx)(`span`,{className:s(`h-1.5 w-1.5 rounded-full`,pe[t]),"aria-hidden":`true`}),e.status]})}function ge(e){if(!e.path)return null;let t=e.path.split(`/`).pop()??e.path;return e.line?`${t}:${e.line}`:t}export{B as _,ue as a,L as b,oe as c,Z as d,X as f,G as g,W as h,ge as i,Q as l,K as m,me as n,fe as o,ie as p,he as r,ce as s,$ as t,se as u,F as v,z as y};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{P as r,q as i,t as a}from"./useQuery-Cqr8_M0q.js";import{a as o,c as s,f as c,n as l,r as u,s as d,t as f}from"./pendingActionsStore-CxhI19V9.js";import{i as p,r as m}from"./host-D9tJwZXl.js";import{t as ee}from"./globe-BjR1tyE4.js";import{t as te}from"./info-DNYekoE-.js";import{n as h,t as g}from"./triangle-alert-CYQhobyY.js";import{t as _}from"./play-uofLR7yT.js";import{t as v}from"./createScopedStore-BrD5NHWx.js";import{F as y,S as b}from"./genui-C9i6j0XZ.js";var x={name:`arrow-down-right`,size:24,node:[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]};x.node;var S=c(x),C={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};C.node;var w=c(C),T={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};T.node;var E=c(T),D={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};D.node;var O=c(D),k={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};k.node;var A=c(k),j={name:`rectangle-horizontal`,size:24,node:[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`2`,key:`9lu3g6`}]]};j.node;var ne=c(j),M={name:`shield-question-mark`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`shield-question`]};M.node;var re=c(M),N={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};N.node;var P=c(N);function F(e){return e.type??`static`}function I(e){let t=new Map(e.nodes.map(e=>[e.id,0]));for(let n of e.edges)n.from!==n.to&&t.set(n.to,(t.get(n.to)??0)+1);let n=new Set,r=[];for(;r.length<e.nodes.length;){let i=e.nodes.find(e=>!n.has(e.id)&&t.get(e.id)===0)??e.nodes.find(e=>!n.has(e.id));if(!i)break;n.add(i.id),r.push(i);for(let n of e.edges)n.from===i.id&&n.to!==i.id&&t.set(n.to,(t.get(n.to)??0)-1)}return r}function L(e){let t=new Map(e.nodes.map(e=>[e.id,e])),n=new Map((e.groups??[]).map(e=>[e.id,e.label])),r=(e,n)=>{let r=t.get(e);return r?[{node:r,edge:n}]:[]};return I(e).map(t=>({node:t,groupLabel:t.group?n.get(t.group)??null:null,incoming:e.edges.filter(e=>e.to===t.id).flatMap(e=>r(e.from,e)),outgoing:e.edges.filter(e=>e.from===t.id).flatMap(e=>r(e.to,e))}))}function R(e){return{step:e.node.label,edge:F(e.edge),...e.edge.label?{label:e.edge.label}:{}}}function z(e,t){let n=L(e).find(e=>e.node.id===t);if(!n)return null;let{node:r}=n;return{...e.title?{diagram:e.title}:{},step:r.label,...r.description?{description:r.description}:{},...r.kind?{kind:r.kind}:{},...r.status?{status:r.status}:{},...n.groupLabel?{group:n.groupLabel}:{},...r.path?{path:r.path}:{},...r.line?{line:r.line}:{},upstream:n.incoming.map(R),downstream:n.outgoing.map(R)}}function B(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`h${(t>>>0).toString(16)}:${e.length}`}var V=e(t(),1),H=e(n(),1),U=(0,V.createContext)(null);function W({value:e,children:t}){return(0,H.jsx)(U.Provider,{value:e,children:t})}function G(){let e=(0,V.useContext)(U);if(!e)throw Error(`GenUI components render only inside a GenUI view`);return e}var K=v(`GenUIView`,()=>e=>({pendingAgentMessage:null,previewPath:null,previewProbe:null,refreshNonce:{},notice:null,proposeAgentMessage:t=>e({pendingAgentMessage:t,notice:null}),cancelAgentMessage:()=>e({pendingAgentMessage:null}),openPreview:t=>e({previewPath:t,previewProbe:null}),closePreview:()=>e({previewPath:null,previewProbe:null}),setPreviewProbe:t=>e({previewProbe:t}),refreshDataset:t=>e(e=>({refreshNonce:{...e.refreshNonce,[t]:(e.refreshNonce[t]??0)+1}})),showNotice:t=>e({notice:t})})),q=10,J=`genui-dataset`;function Y(e){return e.source===`file`?(e.refreshSeconds??q)*1e3:e.source===`mcp`&&e.refreshSeconds?e.refreshSeconds*1e3:!1}function X(e){let{spec:t}=G();return e?t.datasets?.[e]??null:null}function ie(e,t){let n=m(),i=X(e),o=K.useScopedStore(t=>e?t.refreshNonce[e]??0:0),s=i!==null&&i.source!==`inline`&&n.queryDataset!==null&&t!==null,c=(0,V.useMemo)(()=>!i||i.source!==`inline`||!t?null:y(i,i.rows,t),[i,t]),l=n.queryDataset,u=a({queryKey:[J,n.chatId,e,i?B(JSON.stringify(i)):null,t?JSON.stringify(t):null,o],queryFn:async()=>{if(!i||!t||!l)throw Error(`dataset is not queryable`);return await l(i,t,o>0)},enabled:s,placeholderData:r,refetchInterval:i&&s&&!n.readonly?Y(i):!1,retry:!1});if(!i)return{status:`error`,message:`This view refers to a dataset "${e??``}" it does not declare`};if(!t)return{status:`loading`};if(c)return c.ok?{status:`ok`,result:c.result,refreshing:!1}:{status:`error`,message:c.message};if(!n.queryDataset)return{status:`unavailable`,message:`Live data is not included in a shared view`};if(u.error)return{status:`error`,message:b.source_unavailable};let d=u.data;if(!d)return{status:`loading`};switch(d.status){case`ok`:return{status:`ok`,result:d.result,refreshing:u.isPlaceholderData};case`needs_approval`:return d;case`error`:return{status:`error`,message:`${b[d.code]}: ${d.message}`}}}var ae={neutral:`text-muted-foreground`,positive:`text-success-text`,negative:`text-destructive-text`,attention:`text-warning-text`,info:`text-info-text`};function Z(e){return ae[e]}function oe({tone:e,className:t}){let n=s(`h-3.5 w-3.5 shrink-0`,t);switch(e){case`positive`:return(0,H.jsx)(p,{className:n,"aria-hidden":`true`});case`negative`:return(0,H.jsx)(E,{className:n,"aria-hidden":`true`});case`attention`:return(0,H.jsx)(g,{className:n,"aria-hidden":`true`});case`info`:return(0,H.jsx)(te,{className:n,"aria-hidden":`true`});case`neutral`:return(0,H.jsx)(h,{className:n,"aria-hidden":`true`})}}function se(e){return e===`positive`?`positive`:e===`negative`?`negative`:`neutral`}function Q({trend:e,className:t}){let n=s(`h-3.5 w-3.5 shrink-0`,t);return e===`up`?(0,H.jsx)(w,{className:n,"aria-hidden":`true`}):e===`down`?(0,H.jsx)(S,{className:n,"aria-hidden":`true`}):(0,H.jsx)(h,{className:n,"aria-hidden":`true`})}function ce({component:e}){return(0,H.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,H.jsx)(g,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),e,` could not be shown: its settings changed to an unsupported value`]})}function le({server:e,tool:t}){let n=m(),r=i(),a=f(`genui.dataset.approve`,n.chatId??``,e,t),s=u(a),c=n.approveTool;return c?(0,H.jsx)(o,{size:`sm`,variant:`outline`,pending:s,onClick:()=>{l(a,async()=>{await c(e,t),await r.invalidateQueries({queryKey:[J,n.chatId]})})},children:`Allow for this chat`}):null}function ue({state:e,minHeight:t,emptyLabel:n}){return(0,H.jsx)(`div`,{className:`flex items-center justify-center rounded-md border border-dashed border-border px-3 py-4 text-sm`,style:t?{minHeight:t}:void 0,children:(0,H.jsx)(de,{state:e,emptyLabel:n})})}function de({state:e,emptyLabel:t}){switch(e.status){case`loading`:return(0,H.jsxs)(`span`,{className:`flex items-center gap-2 text-muted-foreground`,role:`status`,children:[(0,H.jsx)(d,{}),` Loading data…`]});case`needs_approval`:return(0,H.jsxs)(`span`,{className:`flex flex-col items-center gap-2 text-center text-muted-foreground`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-foreground`,children:[(0,H.jsx)(re,{className:`h-4 w-4`,"aria-hidden":`true`}),`Action requires approval`]}),(0,H.jsx)(`span`,{className:`max-w-prose text-xs`,children:e.message}),(0,H.jsx)(le,{server:e.server,tool:e.tool})]});case`unavailable`:return(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:t??e.message});case`error`:return(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-destructive-text`,role:`alert`,children:[(0,H.jsx)(g,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`}),e.message]})}}function fe({label:e,minHeight:t}){return(0,H.jsx)(`div`,{className:`flex items-center justify-center rounded-md border border-dashed border-border px-3 py-4 text-sm text-muted-foreground`,style:t?{minHeight:t}:void 0,children:e})}var $={start:{icon:_,label:`Start`},end:{icon:P,label:`End`},process:{icon:ne,label:`Step`},decision:{icon:A,label:`Decision`},store:{icon:O,label:`Store`},external:{icon:ee,label:`External`}},pe={neutral:`bg-muted-foreground`,positive:`bg-success`,negative:`bg-destructive`,attention:`bg-warning`,info:`bg-info`};function me({node:e,className:t}){let n=$[e.kind??`process`],r=n.icon;return(0,H.jsx)(r,{className:s(`h-3.5 w-3.5 shrink-0 text-muted-foreground`,t),"aria-label":n.label})}function he({node:e}){if(!e.status)return null;let t=e.tone??`neutral`;return(0,H.jsxs)(`span`,{className:s(`flex shrink-0 items-center gap-1 text-xs font-medium whitespace-nowrap tabular-nums`,Z(t)),children:[(0,H.jsx)(`span`,{className:s(`h-1.5 w-1.5 rounded-full`,pe[t]),"aria-hidden":`true`}),e.status]})}function ge(e){if(!e.path)return null;let t=e.path.split(`/`).pop()??e.path;return e.line?`${t}:${e.line}`:t}export{B as _,ue as a,L as b,oe as c,Z as d,X as f,G as g,W as h,ge as i,Q as l,K as m,me as n,fe as o,ie as p,he as r,ce as s,$ as t,se as u,F as v,z as y};
@@ -1 +1 @@
1
- import{f as e}from"./pendingActionsStore-COTh4Ztq.js";var t={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};t.node;var n=e(t);export{n as t};
1
+ import{f as e}from"./pendingActionsStore-CxhI19V9.js";var t={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};t.node;var n=e(t);export{n as t};
@@ -1 +1 @@
1
- function e(e){return e.split(/[\s_-]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}var t=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function n(e){let n=e.trim();for(let e of t){let t=n.match(e);if(!t)continue;let r=(t[2]??t[1]??``).trim();if(r)return r}return n}function r(e){return e.split(`/`).pop()||e}var i=864e5;function a(e,t){let n=Math.max(0,t-e),r=Math.floor(n/1e3),i=Math.floor(r/3600),a=Math.floor(r%3600/60),o=r%60;return i>0?`${i}h ${a}m`:a>0?`${a}m ${o}s`:`${o}s`}function o(e){let t=new Date(e);return`${t.getHours().toString().padStart(2,`0`)}:${t.getMinutes().toString().padStart(2,`0`)}`}function s(e,t){if(e===void 0)return null;let n=Math.max(0,t-e),r=6e4,a=60*r,o=i,s=7*o;return n<r?`now`:n<a?`${Math.floor(n/r)}m`:n<o?`${Math.floor(n/a)}h`:n<s?`${Math.floor(n/o)}d`:`${Math.floor(n/s)}w`}function c(e,t){return e.length<=t?e:`${e.slice(0,t-1).trimEnd()}…`}var l=80;function u(e){return c(e,l)}export{o as a,c,s as i,a as n,r as o,n as r,e as s,u as t};
1
+ function e(e){return e.split(/[\s_-]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}var t=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function n(e){let n=e.trim();for(let e of t){let t=n.match(e);if(!t)continue;let r=(t[2]??t[1]??``).trim();if(r)return r}return n}function r(e){return e.split(`/`).pop()||e}var i=864e5;function a(e){let t=new Date(e);return`${t.getHours().toString().padStart(2,`0`)}:${t.getMinutes().toString().padStart(2,`0`)}`}function o(e,t){if(e===void 0)return null;let n=Math.max(0,t-e),r=6e4,a=60*r,o=i,s=7*o;return n<r?`now`:n<a?`${Math.floor(n/r)}m`:n<o?`${Math.floor(n/a)}h`:n<s?`${Math.floor(n/o)}d`:`${Math.floor(n/s)}w`}function s(e,t){return e.length<=t?e:`${e.slice(0,t-1).trimEnd()}…`}var c=80;function l(e){return s(e,c)}export{r as a,a as i,n,e as o,o as r,s,l as t};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,c as n,l as r,s as i,u as a}from"./useTheme-B57LIKyx.js";import"./tools-3gJcj3hK.js";var o=e({BIGINT_FORMAT_RANGES:()=>Fe,CONSTANT_CATCH:()=>vt,Class:()=>st,NUMBER_FORMAT_RANGES:()=>Pe,aborted:()=>y,allowsEval:()=>Se,assert:()=>f,assertEqual:()=>s,assertIs:()=>u,assertNever:()=>d,assertNotEqual:()=>c,assignProp:()=>h,attachSchema:()=>qe,base64ToUint8Array:()=>tt,base64urlToUint8Array:()=>rt,cached:()=>ne,captureStackTrace:()=>be,cleanEnum:()=>et,cleanRegex:()=>ie,clone:()=>Ae,cloneDef:()=>me,codePointLength:()=>Xe,constantCatch:()=>yt,createTransparentProxy:()=>je,defineLazy:()=>se,defineLazyInternal:()=>S,derived:()=>dt,esc:()=>ve,escapeRegex:()=>ke,explicitlyAborted:()=>Ge,extend:()=>ze,finalizeIssue:()=>x,floatSafeRemainder:()=>ae,getElementAtPath:()=>he,getEnumValues:()=>p,getLengthableOrigin:()=>Ze,getParsedType:()=>Ee,getSizableOrigin:()=>Je,hexToUint8Array:()=>at,hide:()=>ut,installLazyProp:()=>_t,isObject:()=>xe,isPlainObject:()=>Ce,issue:()=>$e,joinValues:()=>m,jsonStringifyReplacer:()=>ee,members:()=>ct,merge:()=>He,mergeDefs:()=>_,normalizeParams:()=>v,nullish:()=>re,numKeys:()=>Te,objectClone:()=>ce,omit:()=>Re,optionalKeys:()=>Ne,own:()=>lt,parsedType:()=>Qe,partial:()=>Ue,pick:()=>Ie,prefixIssues:()=>b,primitiveTypes:()=>Oe,promiseAllObject:()=>ge,propertyKeyTypes:()=>De,randomString:()=>_e,rawShape:()=>le,required:()=>We,safeExtend:()=>Ve,shallowClone:()=>we,slugify:()=>ye,stringifyPrimitive:()=>Me,toZod:()=>l,uint8ArrayToBase64:()=>nt,uint8ArrayToBase64url:()=>it,uint8ArrayToHex:()=>ot,unwrapMessage:()=>Ke});function s(e){return e}function c(e){return e}function l(){return e=>e}function u(e){}function d(e){throw Error(`Unexpected value in exhaustive check`)}function f(e){}function p(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t=`|`){return e.map(e=>Me(e)).join(t)}function ee(e,t){return typeof t==`bigint`?t.toString():t}var te=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ne(e){return new te(e)}function re(e){return e==null}function ie(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ae(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var oe=Symbol(`evaluating`);function se(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==oe)return r===void 0&&(r=oe,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ce(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function le(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function g(e){return le(e._zod.def)??e._zod.def.shape}function ue(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return h(this,t,e),e},enumerable:!0,configurable:!0})}function de(e,t,n){t in e?h(e,t,n):e[t]=n}function fe(e,t,n,r){let i=g(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ue(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):de(e,a,r?r(n.value,a):n.value))}}function pe(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ue(e,n,()=>t[n]):de(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function me(e){return _(e._zod.def)}function he(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function ge(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function _e(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ne(()=>{if(w.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return xe(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Te(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var Ee=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},De=new Set([`string`,`number`,`symbol`]),Oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ae(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function v(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function je(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function Me(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ne(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Fe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ie(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return fe(i,e,Le(e,t)),Ae(e,_(n,{shape:i,checks:[]}))}function Le(e,t){let n=g(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Re(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Le(e,t)),a={};return fe(a,e,Reflect.ownKeys(g(e)).filter(e=>!i.has(e))),Ae(e,_(n,{shape:a,checks:[]}))}function ze(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=g(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ae(e,_(e._zod.def,{shape:Be(e,t)}))}function Be(e,t){let n={};return fe(n,e,Reflect.ownKeys(g(e))),pe(n,t),n}function Ve(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ae(e,_(e._zod.def,{shape:Be(e,t)}))}function He(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return fe(n,e,Reflect.ownKeys(g(e))),fe(n,t,Reflect.ownKeys(g(t))),Ae(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Ue(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Le(t,n)):void 0,o={};return fe(o,t,Reflect.ownKeys(g(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Ae(t,_(t._zod.def,{shape:o,checks:[]}))}function We(e,t,n){let r=n?new Set(Le(t,n)):void 0,i={};return fe(i,t,Reflect.ownKeys(g(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Ae(t,_(t._zod.def,{shape:i}))}function y(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function b(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ke(e){return typeof e==`string`?e:e?.message}function qe(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function x(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ke(e.inst?._zod.def?.error?.(e))??Ke(a?.(e))??Ke(t?.error?.(e))??Ke(n.customError?.(e))??Ke(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}function Je(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}var Ye=/[\uD800-\uDBFF]/;function Xe(e){let t=e.length;if(!Ye.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ze(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Qe(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function $e(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function et(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function tt(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function nt(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function rt(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return tt(t+`=`.repeat((4-t.length%4)%4))}function it(e){return nt(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function at(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function ot(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var st=class{constructor(...e){}};function ct(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ft(e,n,r.value)}}function lt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ut(e,t,n){return lt(e,t,n,!1)}function dt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return lt(this,n,r(this))},set(e){lt(this,n,e)}})}return t}function ft(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:lt(this,t,n.bind(this))},set(e){lt(this,t,e)}})}function pt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var mt,ht=!1,gt={configurable:!0,get(){ht=!0}};function S(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&mt!==e._zod){mt=void 0;return}mt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,gt);let e=ht;ht=!1;try{let r=n(this);return ht?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ht||=e,r}catch(n){throw delete this[t],ht||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function _t(e,t,n,r){let i=pt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var vt=`~constantCatch`;function yt(e){let t=()=>e;return t[vt]=!0,t}var bt,xt=Object.freeze({status:`aborted`}),St={value:void 0,enumerable:!1},Ct=`captureStackTrace`in Error?Error:null;function wt(e){let t=Ct;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ct=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){St.value=new a(r);try{Object.defineProperty(n,"_zod",St)}finally{St.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ct(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?wt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Tt=Symbol(`zod_brand`),Et=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Dt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(bt=globalThis).__zod_globalConfig??(bt.__zod_globalConfig={});var w=globalThis.__zod_globalConfig;function T(e){return e&&Object.assign(w,e),w}function Ot(){let e=this._zod;return e.message??=JSON.stringify(e.def,ee,2),e.message}function kt(e){this._zod.message=e}var At={get:Ot,set:kt,enumerable:!0,configurable:!0},jt={value:void 0,enumerable:!1},Mt=new WeakSet([Object.prototype,Error.prototype]),Nt=(e,t)=>{e.name=`$ZodError`,jt.value=t,Object.defineProperty(e,"issues",jt),jt.value=void 0,Object.defineProperty(e,"message",At);let n=Object.getPrototypeOf(e);Mt.has(n)||(Mt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Pt=C(`$ZodError`,Nt),E=C(`$ZodError`,Nt,void 0,{Parent:Error});function Ft(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function It(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Ft(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Lt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Rt(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;s<e.length;){let n=e[s],i=s===e.length-1;typeof n==`string`?(r.properties??(r.properties={}),Object.prototype.hasOwnProperty.call(r.properties,n)||Object.defineProperty(r.properties,n,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),r=r.properties[n]):(r.items??(r.items=[]),(a=r.items)[n]??(a[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(o)),s++}}};return r(e),n}function zt(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Bt(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${zt(e.path)}`);return t.join(`
1
+ import{r as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,c as n,l as r,s as i,u as a}from"./useTheme-D9sKDPEm.js";import"./tools-t5T_3UBg.js";var o=e({BIGINT_FORMAT_RANGES:()=>Fe,CONSTANT_CATCH:()=>vt,Class:()=>st,NUMBER_FORMAT_RANGES:()=>Pe,aborted:()=>y,allowsEval:()=>Se,assert:()=>f,assertEqual:()=>s,assertIs:()=>u,assertNever:()=>d,assertNotEqual:()=>c,assignProp:()=>h,attachSchema:()=>qe,base64ToUint8Array:()=>tt,base64urlToUint8Array:()=>rt,cached:()=>ne,captureStackTrace:()=>be,cleanEnum:()=>et,cleanRegex:()=>ie,clone:()=>Ae,cloneDef:()=>me,codePointLength:()=>Xe,constantCatch:()=>yt,createTransparentProxy:()=>je,defineLazy:()=>se,defineLazyInternal:()=>S,derived:()=>dt,esc:()=>ve,escapeRegex:()=>ke,explicitlyAborted:()=>Ge,extend:()=>ze,finalizeIssue:()=>x,floatSafeRemainder:()=>ae,getElementAtPath:()=>he,getEnumValues:()=>p,getLengthableOrigin:()=>Ze,getParsedType:()=>Ee,getSizableOrigin:()=>Je,hexToUint8Array:()=>at,hide:()=>ut,installLazyProp:()=>_t,isObject:()=>xe,isPlainObject:()=>Ce,issue:()=>$e,joinValues:()=>m,jsonStringifyReplacer:()=>ee,members:()=>ct,merge:()=>He,mergeDefs:()=>_,normalizeParams:()=>v,nullish:()=>re,numKeys:()=>Te,objectClone:()=>ce,omit:()=>Re,optionalKeys:()=>Ne,own:()=>lt,parsedType:()=>Qe,partial:()=>Ue,pick:()=>Ie,prefixIssues:()=>b,primitiveTypes:()=>Oe,promiseAllObject:()=>ge,propertyKeyTypes:()=>De,randomString:()=>_e,rawShape:()=>le,required:()=>We,safeExtend:()=>Ve,shallowClone:()=>we,slugify:()=>ye,stringifyPrimitive:()=>Me,toZod:()=>l,uint8ArrayToBase64:()=>nt,uint8ArrayToBase64url:()=>it,uint8ArrayToHex:()=>ot,unwrapMessage:()=>Ke});function s(e){return e}function c(e){return e}function l(){return e=>e}function u(e){}function d(e){throw Error(`Unexpected value in exhaustive check`)}function f(e){}function p(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t=`|`){return e.map(e=>Me(e)).join(t)}function ee(e,t){return typeof t==`bigint`?t.toString():t}var te=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ne(e){return new te(e)}function re(e){return e==null}function ie(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ae(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var oe=Symbol(`evaluating`);function se(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==oe)return r===void 0&&(r=oe,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ce(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function le(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function g(e){return le(e._zod.def)??e._zod.def.shape}function ue(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return h(this,t,e),e},enumerable:!0,configurable:!0})}function de(e,t,n){t in e?h(e,t,n):e[t]=n}function fe(e,t,n,r){let i=g(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ue(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):de(e,a,r?r(n.value,a):n.value))}}function pe(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ue(e,n,()=>t[n]):de(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function me(e){return _(e._zod.def)}function he(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function ge(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function _e(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ne(()=>{if(w.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return xe(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Te(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var Ee=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},De=new Set([`string`,`number`,`symbol`]),Oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ae(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function v(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function je(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function Me(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ne(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Fe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ie(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return fe(i,e,Le(e,t)),Ae(e,_(n,{shape:i,checks:[]}))}function Le(e,t){let n=g(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Re(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Le(e,t)),a={};return fe(a,e,Reflect.ownKeys(g(e)).filter(e=>!i.has(e))),Ae(e,_(n,{shape:a,checks:[]}))}function ze(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=g(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ae(e,_(e._zod.def,{shape:Be(e,t)}))}function Be(e,t){let n={};return fe(n,e,Reflect.ownKeys(g(e))),pe(n,t),n}function Ve(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ae(e,_(e._zod.def,{shape:Be(e,t)}))}function He(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return fe(n,e,Reflect.ownKeys(g(e))),fe(n,t,Reflect.ownKeys(g(t))),Ae(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Ue(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Le(t,n)):void 0,o={};return fe(o,t,Reflect.ownKeys(g(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Ae(t,_(t._zod.def,{shape:o,checks:[]}))}function We(e,t,n){let r=n?new Set(Le(t,n)):void 0,i={};return fe(i,t,Reflect.ownKeys(g(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Ae(t,_(t._zod.def,{shape:i}))}function y(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function b(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ke(e){return typeof e==`string`?e:e?.message}function qe(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function x(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ke(e.inst?._zod.def?.error?.(e))??Ke(a?.(e))??Ke(t?.error?.(e))??Ke(n.customError?.(e))??Ke(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}function Je(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}var Ye=/[\uD800-\uDBFF]/;function Xe(e){let t=e.length;if(!Ye.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ze(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Qe(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function $e(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function et(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function tt(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function nt(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function rt(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return tt(t+`=`.repeat((4-t.length%4)%4))}function it(e){return nt(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function at(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function ot(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var st=class{constructor(...e){}};function ct(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ft(e,n,r.value)}}function lt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ut(e,t,n){return lt(e,t,n,!1)}function dt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return lt(this,n,r(this))},set(e){lt(this,n,e)}})}return t}function ft(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:lt(this,t,n.bind(this))},set(e){lt(this,t,e)}})}function pt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var mt,ht=!1,gt={configurable:!0,get(){ht=!0}};function S(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&mt!==e._zod){mt=void 0;return}mt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,gt);let e=ht;ht=!1;try{let r=n(this);return ht?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ht||=e,r}catch(n){throw delete this[t],ht||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function _t(e,t,n,r){let i=pt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var vt=`~constantCatch`;function yt(e){let t=()=>e;return t[vt]=!0,t}var bt,xt=Object.freeze({status:`aborted`}),St={value:void 0,enumerable:!1},Ct=`captureStackTrace`in Error?Error:null;function wt(e){let t=Ct;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ct=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){St.value=new a(r);try{Object.defineProperty(n,"_zod",St)}finally{St.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ct(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?wt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Tt=Symbol(`zod_brand`),Et=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Dt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(bt=globalThis).__zod_globalConfig??(bt.__zod_globalConfig={});var w=globalThis.__zod_globalConfig;function T(e){return e&&Object.assign(w,e),w}function Ot(){let e=this._zod;return e.message??=JSON.stringify(e.def,ee,2),e.message}function kt(e){this._zod.message=e}var At={get:Ot,set:kt,enumerable:!0,configurable:!0},jt={value:void 0,enumerable:!1},Mt=new WeakSet([Object.prototype,Error.prototype]),Nt=(e,t)=>{e.name=`$ZodError`,jt.value=t,Object.defineProperty(e,"issues",jt),jt.value=void 0,Object.defineProperty(e,"message",At);let n=Object.getPrototypeOf(e);Mt.has(n)||(Mt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Pt=C(`$ZodError`,Nt),E=C(`$ZodError`,Nt,void 0,{Parent:Error});function Ft(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function It(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Ft(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Lt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Rt(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;s<e.length;){let n=e[s],i=s===e.length-1;typeof n==`string`?(r.properties??(r.properties={}),Object.prototype.hasOwnProperty.call(r.properties,n)||Object.defineProperty(r.properties,n,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),r=r.properties[n]):(r.items??(r.items=[]),(a=r.items)[n]??(a[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(o)),s++}}};return r(e),n}function zt(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Bt(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${zt(e.path)}`);return t.join(`
2
2
  `)}function Vt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ht=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Et;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>x(e,o,T())));throw be(n,a?.callee??t),n}return s.value};return t},Ut=Ht(E),Wt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>x(e,o,T())));throw be(n,a?.callee??t),n}return s.value};return t},Gt=Wt(E),Kt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Et;return a.issues.length?Jt(e,a.issues,i):{success:!0,data:a.value}},qt=Kt(E);function Jt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>x(e,n,T()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Yt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Jt(e,a.issues,i):{success:!0,data:a.value}},Xt=Yt(E),Zt=Symbol.for(`zod.compile.invalid`),Qt=Symbol.for(`zod.compile.fallback`),$t=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Zt)return!0;if(r.definite===!0&&n===void 0)return!1}return en(e,t,n)});function en(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Qt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Et;return a.issues.length===0}var tn=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},nn=e=>{let t=Ht(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Vt(n,a))};return n},rn=nn(E),an=e=>{let t=Ht(e),n=(e,r,i,a)=>t(e,r,i,Vt(n,a));return n},on=an(E),sn=e=>{let t=Wt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Vt(n,a))};return n},cn=sn(E),ln=e=>{let t=Wt(e),n=async(e,r,i,a)=>await t(e,r,i,Vt(n,a));return n},un=ln(E),dn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Kt(e)(t,n,i)},fn=dn(E),pn=e=>(t,n,r)=>Kt(e)(t,n,r),mn=pn(E),hn=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Yt(e)(t,n,i)},gn=hn(E),_n=e=>async(t,n,r)=>Yt(e)(t,n,r),vn=_n(E),yn=e({anyString:()=>cr,base64:()=>qn,base64url:()=>Jn,bigint:()=>ur,boolean:()=>pr,browserEmail:()=>zn,cidrv4:()=>Gn,cidrv6:()=>Kn,creditCard:()=>$n,cuid:()=>bn,cuid2:()=>xn,currencyCode:()=>er,date:()=>ir,datetime:()=>sr,domain:()=>Xn,duration:()=>Dn,e164:()=>Qn,email:()=>Pn,emoji:()=>Vn,extendedDuration:()=>On,guid:()=>kn,hex:()=>vr,hostname:()=>Yn,html5Email:()=>Fn,httpProtocol:()=>Zn,iban:()=>tr,idnEmail:()=>Rn,integer:()=>dr,ipv4:()=>Hn,ipv6:()=>Un,ksuid:()=>wn,lowercase:()=>gr,mac:()=>Wn,md5_base64:()=>Sr,md5_base64url:()=>Cr,md5_hex:()=>xr,nanoid:()=>Tn,nanoidOfLength:()=>En,null:()=>mr,number:()=>fr,rfc5322Email:()=>In,sha1_base64:()=>Tr,sha1_base64url:()=>Er,sha1_hex:()=>wr,sha256_base64:()=>Or,sha256_base64url:()=>kr,sha256_hex:()=>Dr,sha384_base64:()=>jr,sha384_base64url:()=>Mr,sha384_hex:()=>Ar,sha512_base64:()=>Pr,sha512_base64url:()=>Fr,sha512_hex:()=>Nr,string:()=>lr,time:()=>or,ulid:()=>Sn,undefined:()=>hr,unicodeEmail:()=>Ln,uppercase:()=>_r,uuid:()=>An,uuid4:()=>jn,uuid6:()=>Mn,uuid7:()=>Nn,xid:()=>Cn}),bn=/^[cC][0-9a-z]{6,}$/,xn=/^[0-9a-z]+$/,Sn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Cn=/^[0-9a-vA-V]{20}$/,wn=/^[A-Za-z0-9]{27}$/,Tn=/^[a-zA-Z0-9_-]{21}$/;function En(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Dn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,On=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,An=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jn=An(4),Mn=An(6),Nn=An(7),Pn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Fn=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,In=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ln=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Rn=Ln,zn=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Bn=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Vn(){return new RegExp(Bn,`u`)}var Hn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Un=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Wn=e=>{let t=ke(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Gn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Kn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Yn=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Xn=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Zn=/^https?$/,Qn=/^\+[1-9]\d{6,14}$/,$n=/^\d(?:[ -]?\d){11,18}$/,er=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,tr=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,nr=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function rr(e){return RegExp(`^${e}$`)}var ir=rr(nr);function ar(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function or(e){return RegExp(`^${ar(e)}$`)}function sr(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${ar({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${ar({precision:e.precision})}`:n;return RegExp(`^${nr}T(?:${r})$`)}var cr=/^[\s\S]{0,}$/,lr=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ur=/^-?\d+n?$/,dr=/^-?\d+$/,fr=/^-?\d+(?:\.\d+)?$/,pr=/^(?:true|false)$/i,mr=/^null$/i,hr=/^undefined$/i,gr=/^[^A-Z]*$/,_r=/^[^a-z]*$/,vr=/^[0-9a-fA-F]*$/;function yr(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function br(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var xr=/^[0-9a-fA-F]{32}$/,Sr=yr(22,`==`),Cr=br(22),wr=/^[0-9a-fA-F]{40}$/,Tr=yr(27,`=`),Er=br(27),Dr=/^[0-9a-fA-F]{64}$/,Or=yr(43,`=`),kr=br(43),Ar=/^[0-9a-fA-F]{96}$/,jr=yr(64,``),Mr=br(64),Nr=/^[0-9a-fA-F]{128}$/,Pr=yr(86,`==`),Fr=br(86),D=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ir=e=>{let t=e.value;return!re(t)&&t.size!==void 0},Lr=e=>{let t=e.value;return!re(t)&&t.length!==void 0},Rr={number:`number`,bigint:`bigint`,object:`date`},zr=C(`$ZodCheckLessThan`,(e,t)=>{D.init(e,t);let n=Rr[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Rr[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Br=C(`$ZodCheckGreaterThan`,(e,t)=>{D.init(e,t);let n=Rr[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Rr[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vr=C(`$ZodCheckMultipleOf`,(e,t)=>{D.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ae(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Hr=C(`$ZodCheckNumberFormat`,(e,t)=>{D.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Pe[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ur=C(`$ZodCheckBigIntFormat`,(e,t)=>{D.init(e,t);let[n,r]=Fe[t.format];e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Wr=C(`$ZodCheckMaxSize`,(e,t)=>{var n;D.init(e,t),(n=e._zod.def).when??(n.when=Ir),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Je(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Gr=C(`$ZodCheckMinSize`,(e,t)=>{var n;D.init(e,t),(n=e._zod.def).when??(n.when=Ir),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Je(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Kr=C(`$ZodCheckSizeEquals`,(e,t)=>{var n;D.init(e,t),(n=e._zod.def).when??(n.when=Ir),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Je(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),qr=C(`$ZodCheckMaxLength`,(e,t)=>{var n;D.init(e,t),(n=e._zod.def).when??(n.when=Lr),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Xe(r):i)<=t.maximum)return;let a=Ze(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jr=C(`$ZodCheckMinLength`,(e,t)=>{var n;D.init(e,t),(n=e._zod.def).when??(n.when=Lr),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Xe(r):i)>=t.minimum)return;let a=Ze(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Yr=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;D.init(e,t),(n=e._zod.def).when??(n.when=Lr),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Xe(r):i;if(a===t.length)return;let o=Ze(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Xr=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;D.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Zr=C(`$ZodCheckRegex`,(e,t)=>{Xr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Qr=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=gr,Xr.init(e,t)}),$r=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=_r,Xr.init(e,t)}),ei=C(`$ZodCheckIncludes`,(e,t)=>{D.init(e,t);let n=ke(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ti=C(`$ZodCheckStartsWith`,(e,t)=>{D.init(e,t);let n=RegExp(`^${ke(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ni=C(`$ZodCheckEndsWith`,(e,t)=>{D.init(e,t);let n=RegExp(`.*${ke(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function ri(e,t,n){e.issues.length&&t.issues.push(...b(n,e.issues))}var ii=C(`$ZodCheckProperty`,(e,t)=>{D.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>ri(n,e,t.property));ri(n,e,t.property)}}),ai=C(`$ZodCheckProperties`,(e,t)=>{D.init(e,t),ut(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:`object`,code:`invalid_type`,input:r.value,inst:e});return}n??=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]);let i=r.value,a;for(let[e,t]of n){let n=t._zod.run({value:i[e],issues:[]},{});n instanceof Promise?(a??=[],a.push(n.then(t=>ri(t,r,e)))):ri(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),oi=C(`$ZodCheckMimeType`,(e,t)=>{D.init(e,t);let n=new Set(t.mime);e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),si=C(`$ZodCheckOverwrite`,(e,t)=>{D.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ci=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
3
3
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
4
4
  `)}\n};`)(...Object.values(this.closed))}},li={major:4,minor:6,patch:5},O=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=li;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=y(t),a;for(let o of n){if(o._zod.def.when){if(Ge(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Et;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(qe(t.issues,n,e),i||=y(t,n))});else{if(t.issues.length===n)continue;qe(t.issues,n,e),i||=y(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(y(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Et;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Et;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return ut(this,`~standard`,fi(this))},set"~standard"(e){lt(this,`~standard`,e)}}),ui=(e,t)=>e.issues.length?{issues:e.issues.map(e=>x(e,t,T()))}:{value:e.value};async function di(e,t){let n={async:!0};return ui(await e._zod.run({value:t,issues:[]},n),n)}function fi(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return ui(r,n)}catch{}return di(e,t)},vendor:`zod`,version:1}}var pi=C(`$ZodString`,(e,t)=>{O.init(e,t),e._zod.pattern=t.pattern??cr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),k=C(`$ZodStringFormat`,(e,t)=>{Xr.init(e,t),pi.init(e,t)}),mi=C(`$ZodGUID`,(e,t)=>{t.pattern??=kn,k.init(e,t)}),hi=C(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=An(e)}else t.pattern??=An();k.init(e,t)}),gi=C(`$ZodEmail`,(e,t)=>{t.pattern??=Pn,k.init(e,t)});function _i(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function vi(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?_i(e)||2:yi(e,t)}function yi(e,t){if(!t.normalize&&t.protocol?.source===Zn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var bi=/[\t\n\r]/g;function xi(e){return e.replace(bi,``)}function Si(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ci(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var wi=C(`$ZodURL`,(e,t)=>{k.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=vi(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=xi(r);return}t.hostname&&!Si(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Ci(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:xi(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ti=C(`$ZodEmoji`,(e,t)=>{t.pattern??=Vn(),k.init(e,t)}),Ei=C(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Tn:En(t.length),k.init(e,t)}),Di=C(`$ZodCUID`,(e,t)=>{t.pattern??=bn,k.init(e,t)}),Oi=C(`$ZodCUID2`,(e,t)=>{t.pattern??=xn,k.init(e,t)}),ki=C(`$ZodULID`,(e,t)=>{t.pattern??=Sn,k.init(e,t)}),Ai=C(`$ZodXID`,(e,t)=>{t.pattern??=Cn,k.init(e,t)}),ji=C(`$ZodKSUID`,(e,t)=>{t.pattern??=wn,k.init(e,t)}),Mi=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=sr(t),k.init(e,t)}),Ni=C(`$ZodISODate`,(e,t)=>{t.pattern??=ir,k.init(e,t)}),Pi=C(`$ZodISOTime`,(e,t)=>{t.pattern??=or(t),k.init(e,t)}),Fi=C(`$ZodISODuration`,(e,t)=>{t.pattern??=Dn,k.init(e,t)}),Ii=C(`$ZodIPv4`,(e,t)=>{t.pattern??=Hn,k.init(e,t)}),Li=/^[0-9a-fA-F:.]+$/;function Ri(e){return Li.test(e)?_i(`http://[${e}]`):!1}var zi=C(`$ZodIPv6`,(e,t)=>{t.pattern??=Un,k.init(e,t),e._zod.check=n=>{Ri(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Bi=C(`$ZodMAC`,(e,t)=>{t.pattern??=Wn(t.delimiter),k.init(e,t)}),Vi=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Gn,k.init(e,t)});function Hi(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Ri(n)}var Ui=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Kn,k.init(e,t),e._zod.check=n=>{Hi(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Wi(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Gi=/^[0-9a-zA-Z+/]*={0,2}$/,Ki=C(`$ZodBase64`,(e,t)=>{t.pattern??=Gi,k.init(e,t),e._zod.check=n=>{Wi(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),qi=/^[A-Za-z0-9_-]*$/;function Ji(e){if(!qi.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Wi(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Yi=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=qi,k.init(e,t),e._zod.check=n=>{Ji(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Xi=C(`$ZodE164`,(e,t)=>{t.pattern??=Qn,k.init(e,t)}),Zi=/[- ]/g;function Qi(e){let t=e.length,n=1,r=0;for(;t;){let i=e.charCodeAt(--t)-48;n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function $i(e){return $n.test(e)?Qi(e.replace(Zi,``)):!1}var ea=C(`$ZodCreditCard`,(e,t)=>{t.pattern??=$n,k.init(e,t),e._zod.check=n=>{$i(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}});function ta(e){let t=0,n=e.length;for(let r=4;r<n;r++){let n=e.charCodeAt(r);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}for(let n=0;n<4;n++){let r=e.charCodeAt(n);t=(r>=65?t*100+(r-55):t*10+(r-48))%97}return t===1}function na(e){return tr.test(e)?ta(e):!1}var ra=C(`$ZodIBAN`,(e,t)=>{t.pattern??=tr,k.init(e,t),e._zod.check=n=>{na(n.value)||n.issues.push({code:`invalid_format`,format:`iban`,input:n.value,inst:e,continue:!t.abort})}});function ia(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var aa=C(`$ZodJWT`,(e,t)=>{k.init(e,t),e._zod.check=n=>{ia(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),oa=C(`$ZodCustomStringFormat`,(e,t)=>{k.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),sa=C(`$ZodNumber`,(e,t)=>{O.init(e,t),e._zod.pattern=fr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ca=C(`$ZodNumberFormat`,(e,t)=>{Hr.init(e,t),sa.init(e,t)}),la=C(`$ZodBoolean`,(e,t)=>{O.init(e,t),e._zod.pattern=pr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ua=C(`$ZodBigInt`,(e,t)=>{O.init(e,t),e._zod.pattern=ur,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),da=C(`$ZodBigIntFormat`,(e,t)=>{Ur.init(e,t),ua.init(e,t)}),fa=C(`$ZodSymbol`,(e,t)=>{O.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),pa=C(`$ZodUndefined`,(e,t)=>{O.init(e,t),e._zod.pattern=hr,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),ma=C(`$ZodNull`,(e,t)=>{O.init(e,t),e._zod.pattern=mr,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),ha=C(`$ZodAny`,(e,t)=>{O.init(e,t),e._zod.parse=e=>e}),ga=C(`$ZodUnknown`,(e,t)=>{O.init(e,t),e._zod.parse=e=>e}),_a=C(`$ZodNever`,(e,t)=>{O.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),va=C(`$ZodVoid`,(e,t)=>{O.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),ya=C(`$ZodDate`,(e,t)=>{O.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function ba(e,t,n){e.issues.length&&t.issues.push(...b(n,e.issues)),t.value[n]=e.value}var xa=C(`$ZodArray`,(e,t)=>{O.init(e,t);let n=w.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>ba(t,r,e)));else if(ba(c,r,e),s&&c.issues.length!==0&&y(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Sa(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...b(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Ca=[];function wa(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Ca,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Ne(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Ta(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(y(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Sa(e,n,i,t,d,f))):Sa(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Ea=C(`$ZodObject`,(e,t)=>{O.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ne(()=>wa(t));S(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||h(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=xe,o=t.catchall,s,c=w.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(y(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Sa(n,t,e,r,a,o))):Sa(s,t,e,r,a,o)}return o?Ta(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Da=C(`$ZodObjectJIT`,(e,t)=>{Ea.init(e,t);let n=e._zod.parse,r=ne(()=>wa(t)),i=w.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new ci([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
@@ -1 +1 @@
1
- import{f as e}from"./pendingActionsStore-COTh4Ztq.js";var t={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};t.node;var n=e(t);export{n as t};
1
+ import{f as e}from"./pendingActionsStore-CxhI19V9.js";var t={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};t.node;var n=e(t);export{n as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{f as r}from"./pendingActionsStore-COTh4Ztq.js";var i={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};i.node;var a=r(i),o=e(t(),1),s=e(n(),1),c={chatId:null,readonly:!0,workspaceRoot:null,queryDataset:null,approveTool:null,sendToAgent:null,openLink:()=>{},ChartRenderer:null,FlowRenderer:null},l=(0,o.createContext)(c);function u({value:e,children:t}){return(0,s.jsx)(l.Provider,{value:e,children:t})}function d(){return(0,o.useContext)(l)}export{a as i,c as n,d as r,u as t};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{f as r}from"./pendingActionsStore-CxhI19V9.js";var i={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};i.node;var a=r(i),o=e(t(),1),s=e(n(),1),c={chatId:null,readonly:!0,workspaceRoot:null,queryDataset:null,approveTool:null,sendToAgent:null,openLink:()=>{},ChartRenderer:null,FlowRenderer:null},l=(0,o.createContext)(c);function u({value:e,children:t}){return(0,s.jsx)(l.Provider,{value:e,children:t})}function d(){return(0,o.useContext)(l)}export{a as i,c as n,d as r,u as t};