@readmagic/workmate 0.0.7 → 0.0.8

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 (558) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-CwLtQld4.js +1 -0
  2. package/dist/chunks/App-Ba52HvYC.js +1 -0
  3. package/dist/chunks/{ApproveApiKey-B2HJUD7h.js → ApproveApiKey-CEIfuUh0.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-D2MLQu2P.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-IGDrkbWl.js +2 -0
  6. package/dist/chunks/{BypassPermissionsModeDialog-DllL8dxU.js → BypassPermissionsModeDialog-GYhq--JR.js} +1 -1
  7. package/dist/chunks/{ClaudeMdExternalIncludesDialog-BZSyRqeq.js → ClaudeMdExternalIncludesDialog-C-CTa-95.js} +1 -1
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-Catv6BCJ.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-BeQXqUtX.js +1 -0
  10. package/dist/chunks/{DiffDialog-B7hx8i_Y.js → DiffDialog-AC5DSJrq.js} +6 -6
  11. package/dist/chunks/Doctor-B9Rxsoy0.js +1 -0
  12. package/dist/chunks/Doctor-lhUBhEy5.js +3 -0
  13. package/dist/chunks/ExitFlow-Cu8SoQHs.js +2 -0
  14. package/dist/chunks/Grove-Bc4CofEj.js +11 -0
  15. package/dist/chunks/{HybridTransport-rK83Qijz.js → HybridTransport-BJPOG2wl.js} +3 -3
  16. package/dist/chunks/{InvalidConfigDialog-DdO0AxyF.js → InvalidConfigDialog-BI13il58.js} +1 -1
  17. package/dist/chunks/{InvalidSettingsDialog-s1G0DwXF.js → InvalidSettingsDialog-CtOheV1K.js} +1 -1
  18. package/dist/chunks/MCPConnectionManager-ao-P3xSA.js +1 -0
  19. package/dist/chunks/MCPToolListView-dkofcJs4.js +1 -0
  20. package/dist/chunks/{McpParsingWarnings-Du5IxZos.js → McpParsingWarnings-BS4JoR5l.js} +1 -1
  21. package/dist/chunks/MessageSelector-B88b2ypw.js +3 -0
  22. package/dist/chunks/Messages-BPeI7lLV.js +11 -0
  23. package/dist/chunks/Onboarding-c2fQ8Io_.js +1 -0
  24. package/dist/chunks/{PromptInputFooterSuggestions-BmsFdOu9.js → PromptInputFooterSuggestions-D1cH9sDX.js} +1 -1
  25. package/dist/chunks/{PromptInputHelpMenu-DX-0wEDo.js → PromptInputHelpMenu-DDD5WuK0.js} +1 -1
  26. package/dist/chunks/QueryEngine-Cv_meCam.js +1 -0
  27. package/dist/chunks/REPL-BXhAQOXb.js +139 -0
  28. package/dist/chunks/REPL-YqjLnr3A.js +1 -0
  29. package/dist/chunks/RemoteSessionManager-CT7T8BaR.js +2 -0
  30. package/dist/chunks/ResumeConversation-CIZCjms9.js +1 -0
  31. package/dist/chunks/{SSETransport-5VK5okFv.js → SSETransport-CrwbKuVt.js} +3 -3
  32. package/dist/chunks/SearchExtraToolsTool-Dx6093yw.js +1 -0
  33. package/dist/chunks/Settings-CyUm0AtU.js +2 -0
  34. package/dist/chunks/{TeleportProgress-DxN0bQL2.js → TeleportProgress-C3qyp5zy.js} +1 -1
  35. package/dist/chunks/TeleportRepoMismatchDialog-BV--nyYn.js +1 -0
  36. package/dist/chunks/TeleportResumeWrapper-Blo2cZg-.js +1 -0
  37. package/dist/chunks/ThemePicker-EQ6hPUeI.js +1 -0
  38. package/dist/chunks/TrustDialog-BukWGvHZ.js +1 -0
  39. package/dist/chunks/{ValidationErrorsList-BYsDtAvX.js → ValidationErrorsList-DokTJQwi.js} +1 -1
  40. package/dist/chunks/{WelcomeV2-C1BfrqC5.js → WelcomeV2-Ci9VwPYh.js} +1 -1
  41. package/dist/chunks/{add-dir-DfLYgwox.js → add-dir-DPQV0qml.js} +1 -1
  42. package/dist/chunks/{agentDisplay-CMmHIl86.js → agentDisplay-DBQYOaOh.js} +1 -1
  43. package/dist/chunks/agents-DmybpgDN.js +103 -0
  44. package/dist/chunks/{agents-DE_4mAHG.js → agents-HlKk68Qc.js} +1 -1
  45. package/dist/chunks/allErrors-BPn_2TrB.js +1 -0
  46. package/dist/chunks/analytics-CkYUHW_U.js +1 -0
  47. package/dist/chunks/ant-DjdvlLOo.js +1 -0
  48. package/dist/chunks/api-AMgj1zf_.js +1 -0
  49. package/dist/chunks/api-CF5IVtj0.js +1 -0
  50. package/dist/chunks/{asciicast-CbAjUHT_.js → asciicast-BJNYO5sh.js} +1 -1
  51. package/dist/chunks/asciicast-CH6hdK0a.js +1 -0
  52. package/dist/chunks/auth-CNjDn1VY.js +15 -0
  53. package/dist/chunks/auth-CZzP483s.js +1 -0
  54. package/dist/chunks/auth-DDSBm_Yj.js +1 -0
  55. package/dist/chunks/{autoMode-ZW70mpr0.js → autoMode-Cr0AhS1G.js} +5 -5
  56. package/dist/chunks/{autonomy-CwbWsCnv.js → autonomy-ARUQt-Lu.js} +1 -1
  57. package/dist/chunks/{autonomy-Oui8yK8G.js → autonomy-D4xZLOdJ.js} +7 -7
  58. package/dist/chunks/{autonomyPanel-Mq50H7iM.js → autonomyPanel-BQK9MoeB.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping--eBgphcg.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-VV1V_Y2Z.js +1 -0
  61. package/dist/chunks/{banner-CWkrK10u.js → banner-Ca7rki2V.js} +2 -2
  62. package/dist/chunks/bg-BK_9J6F6.js +1 -0
  63. package/dist/chunks/{bg-WnYN5ifx.js → bg-DxRHF1yn.js} +2 -2
  64. package/dist/chunks/{branch-DU5O9KZ0.js → branch-BYq0zpzT.js} +1 -1
  65. package/dist/chunks/{break-cache-C_p7Kmx2.js → break-cache-BKvoMOZx.js} +2 -2
  66. package/dist/chunks/bridgeConfig-C82un7rJ.js +1 -0
  67. package/dist/chunks/{bridgeConfig-CE6dMsiJ.js → bridgeConfig-jDEva6Eh.js} +1 -1
  68. package/dist/chunks/bridgeMessaging-YqYdl6ej.js +1 -0
  69. package/dist/chunks/bridgePointer-DIM0sj0x.js +1 -0
  70. package/dist/chunks/btw-CUV3nRrE.js +1 -0
  71. package/dist/chunks/caches-BZ59_En6.js +1 -0
  72. package/dist/chunks/caches-Cg-HtWKG.js +1 -0
  73. package/dist/chunks/capacityWake-CKOiRELo.js +3 -0
  74. package/dist/chunks/ccrClient-BC2q3k44.js +1 -0
  75. package/dist/chunks/{claudeDesktop-Fe-QL-sN.js → claudeDesktop-DQXL5bGm.js} +1 -1
  76. package/dist/chunks/{clear-D8m2utXW.js → clear-1etSJhdg.js} +1 -1
  77. package/dist/chunks/{cliLaunch-BkPAatcs.js → cliLaunch-CQjLYRzM.js} +1 -1
  78. package/dist/chunks/client-DQXvVKND.js +1 -0
  79. package/dist/chunks/{client-C6MbjvOB.js → client-DQwf_b9o.js} +1 -1
  80. package/dist/chunks/client-DkgC-mFB.js +1 -0
  81. package/dist/chunks/{color-DWhgZH7A.js → color-CBsNbt1s.js} +1 -1
  82. package/dist/chunks/commands-qM5z_Uld.js +1 -0
  83. package/dist/chunks/compact-BclJiRJe.js +2 -0
  84. package/dist/chunks/completionCache-BMHAktkM.js +1 -0
  85. package/dist/chunks/config-CE058cvr.js +3 -0
  86. package/dist/chunks/config-D81avYye.js +1 -0
  87. package/dist/chunks/config-DpOOllGk.js +1 -0
  88. package/dist/chunks/context-noninteractive-Ct_ttQfP.js +29 -0
  89. package/dist/chunks/context-noninteractive-DJb8H_hN.js +1 -0
  90. package/dist/chunks/context-sR9fJmXE.js +1 -0
  91. package/dist/chunks/conversation-D48Kt3ar.js +1 -0
  92. package/dist/chunks/conversation-fOFTa7k5.js +1 -0
  93. package/dist/chunks/{createSSHSession-BOdTAX3N.js → createSSHSession-BmHXA2me.js} +1 -1
  94. package/dist/chunks/createSession-C4rukWkv.js +1 -0
  95. package/dist/chunks/createSession-CSwlW2T2.js +1 -0
  96. package/dist/chunks/crossProjectResume-lDFB2ZcY.js +40 -0
  97. package/dist/chunks/cwd-5Xr-Qka6.js +1 -0
  98. package/dist/chunks/cwd-C5ce-7WB.js +1 -0
  99. package/dist/chunks/{daemon-YtZbMQtn.js → daemon-ZtpTZWgQ.js} +1 -1
  100. package/dist/chunks/{datadog-DqHxqiwY.js → datadog-BJn5ECIu.js} +1 -1
  101. package/dist/chunks/{debug-BrXObCdR.js → debug-RZ4NuXyS.js} +1 -1
  102. package/dist/chunks/debugUtils-D30M1cbN.js +1 -0
  103. package/dist/chunks/{detached-TYk4hMFj.js → detached-jrVP11oU.js} +1 -1
  104. package/dist/chunks/{detectRepository-BPr0VWNO.js → detectRepository-CFiHe6Rv.js} +1 -1
  105. package/dist/chunks/detectRepository-DqQvyj_a.js +1 -0
  106. package/dist/chunks/{diff-CJEKvOA5.js → diff-BKiK3xHv.js} +1 -1
  107. package/dist/chunks/directoryCompletion-BagQcynj.js +1 -0
  108. package/dist/chunks/doctor-BEHYm34V.js +1 -0
  109. package/dist/chunks/{entry-DE0uMIf0.js → entry-BzL1MFQG.js} +4 -4
  110. package/dist/chunks/esm-BLPbfHQd.js +1 -0
  111. package/dist/chunks/{execFileNoThrow-D244NytW.js → execFileNoThrow-CCX-JY8h.js} +1 -1
  112. package/dist/chunks/{execSyncWrapper-CCMQShK-.js → execSyncWrapper-dhRSYGFW.js} +1 -1
  113. package/dist/chunks/exit-DE2YiAhQ.js +1 -0
  114. package/dist/chunks/{lazySchema-DULtBUCI.js → external-CEp-aPkt.js} +1 -1
  115. package/dist/chunks/extraUsage-Dw7AXiH7.js +1 -0
  116. package/dist/chunks/extractMemories-DxTUMiv3.js +1 -0
  117. package/dist/chunks/fast-CHmMkIpE.js +1 -0
  118. package/dist/chunks/fast-uQASHWqR.js +1 -0
  119. package/dist/chunks/fileSuggestions-Dyu2kQtE.js +3 -0
  120. package/dist/chunks/firstPartyEventLogger-D5ohKbIe.js +5 -0
  121. package/dist/chunks/firstPartyEventLogger-LsNY6yOt.js +1 -0
  122. package/dist/chunks/flushGate-Cnsu4HET.js +1 -0
  123. package/dist/chunks/gemini-Cudre91e.js +1 -0
  124. package/dist/chunks/generateRecap-CiFxXlmH.js +1 -0
  125. package/dist/chunks/generateSessionName-DitoBxJT.js +1 -0
  126. package/dist/chunks/{genericProcessUtils-CdQTApYX.js → genericProcessUtils-DVfMHhfy.js} +1 -1
  127. package/dist/chunks/git-BerW9bId.js +6 -0
  128. package/dist/chunks/git-D6dOU2mT.js +1 -0
  129. package/dist/chunks/githubRepoPathMapping-DGr0kJ8D.js +1 -0
  130. package/dist/chunks/{goal-B4GsR54_.js → goal-DuUayfDg.js} +3 -3
  131. package/dist/chunks/grok-tRbmZzEh.js +1 -0
  132. package/dist/chunks/grove-Cv19v6Sv.js +7 -0
  133. package/dist/chunks/help-DkqxbFDM.js +1 -0
  134. package/dist/chunks/{hooks-CkA9bhHl.js → hooks-BZJTWD07.js} +2 -2
  135. package/dist/chunks/hooks-CsP42iOp.js +1 -0
  136. package/dist/chunks/initReplBridge-DdsSWVqN.js +1 -0
  137. package/dist/chunks/{install-Dzlm4u58.js → install-BI---dv0.js} +1 -1
  138. package/dist/chunks/{instrumentation-Yt31gxWN.js → instrumentation-CcWzhGfE.js} +4 -4
  139. package/dist/chunks/{job-BXujwZNa.js → job-B0ftcqPF.js} +1 -1
  140. package/dist/chunks/{jwtUtils-DE2GPUcx.js → jwtUtils-C0cE-1Ey.js} +1 -1
  141. package/dist/chunks/keybindings-DZU3vwo3.js +2 -0
  142. package/dist/chunks/language-DHhXLb_Y.js +1 -0
  143. package/dist/chunks/{language-Ca4B018X.js → language-s-dLbdVz.js} +1 -1
  144. package/dist/chunks/launchLocalMemory-twLxpPvg.js +3 -0
  145. package/dist/chunks/{launchOnboarding-gOVAFEFp.js → launchOnboarding-BWz2XSb9.js} +1 -1
  146. package/dist/chunks/lazySchema-B4D4qJVE.js +1 -0
  147. package/dist/chunks/{loadAgentsDir-x3rlgED4.js → loadAgentsDir-ByO8eJqU.js} +1710 -1977
  148. package/dist/chunks/loadAgentsDir-CMNFLt7R.js +1 -0
  149. package/dist/chunks/loadPluginHooks-BPnxcgrL.js +1 -0
  150. package/dist/chunks/{localSearch-DtplGF-l.js → localSearch-CHHCH16D.js} +1 -1
  151. package/dist/chunks/localSearch-DzQODFap.js +1 -0
  152. package/dist/chunks/log-CZ0zYP_c.js +1 -0
  153. package/dist/chunks/logoV2Utils-CGUJ-5gY.js +1 -0
  154. package/dist/chunks/{magicDocs-qdDB_mKb.js → magicDocs-C5i5ruuU.js} +3 -3
  155. package/dist/chunks/{main-D862LI_d.js → main-BLD4QAQg.js} +2 -2
  156. package/dist/chunks/{main-OWFSddRx.js → main-D4Uk-WUs.js} +87 -84
  157. package/dist/chunks/{managedEnv-Aq5BXfY7.js → managedEnv-C-9XSN14.js} +1 -1
  158. package/dist/chunks/managedEnv-DLVRBaA9.js +1 -0
  159. package/dist/chunks/{mappers-04gNXJ3w.js → mappers-CHRFic5q.js} +1 -1
  160. package/dist/chunks/mcp-BMVdGknC.js +1 -0
  161. package/dist/chunks/mcp-COS5RJFS.js +6 -0
  162. package/dist/chunks/mcp-tGsOW1GN.js +2 -0
  163. package/dist/chunks/memoize-B8hfb1JN.js +1 -0
  164. package/dist/chunks/memory-DR6poqeH.js +1 -0
  165. package/dist/chunks/{mode-DY087x_x.js → mode-QV-NW1Wd.js} +2 -2
  166. package/dist/chunks/model-BF_4ebyl.js +1 -0
  167. package/dist/chunks/{model-D0EfJBuw.js → model-BNU_ulDJ.js} +1 -1
  168. package/dist/chunks/model-CwO-g1RW.js +1 -0
  169. package/dist/chunks/nativeInstaller-B-lNJjM-.js +1 -0
  170. package/dist/chunks/observationStore-BpjlK0pG.js +3 -0
  171. package/dist/chunks/omit-DZCEXri5.js +1 -0
  172. package/dist/chunks/onChangeAppState-BmfM5g-D.js +1 -0
  173. package/dist/chunks/{openai-EYRnUsco.js → openai-DPH6rXOZ.js} +3 -3
  174. package/dist/chunks/{panel-BSZGX6jN.js → panel-mD094ALT.js} +1 -1
  175. package/dist/chunks/{panelCall-dMvRPAGE.js → panelCall-SbffM7G4.js} +1 -1
  176. package/dist/chunks/parser-DrBC8nWp.js +1 -0
  177. package/dist/chunks/{parser-DFwaTGf7.js → parser-dbHRgXb8.js} +1 -1
  178. package/dist/chunks/partition-DKuAFJkc.js +1 -0
  179. package/dist/chunks/{path-D5U-tm91.js → path-Cv9QMBAX.js} +1 -1
  180. package/dist/chunks/permissions-ey-bfanE.js +3 -0
  181. package/dist/chunks/{pidLock-CbC_il6r.js → pidLock-DJnS_38v.js} +2 -2
  182. package/dist/chunks/{pipeTransport-CqCnc-Ys.js → pipeTransport-DVOKR4c_.js} +1 -1
  183. package/dist/chunks/{plan-rsb_83Fo.js → plan-Brg9XnRr.js} +1 -1
  184. package/dist/chunks/{platform-BrYefG_2.js → platform-DCXXznJg.js} +1 -1
  185. package/dist/chunks/plugin-CRwa39Y1.js +17 -0
  186. package/dist/chunks/{pluginAutoupdate-0k03PVff.js → pluginAutoupdate-D0LIP7cy.js} +1 -1
  187. package/dist/chunks/pluginBlocklist-PwHHD3nj.js +1 -0
  188. package/dist/chunks/pluginCliCommands-BJM5Bdpf.js +1 -0
  189. package/dist/chunks/pluginFlagging-pBxSselw.js +1 -0
  190. package/dist/chunks/pluginOperations-C7p_Qr2r.js +2 -0
  191. package/dist/chunks/pluginStartupCheck-C0HqhG6D.js +1 -0
  192. package/dist/chunks/pluginStartupCheck-Di4LjHXf.js +1 -0
  193. package/dist/chunks/{plugins-CQNKZmjP.js → plugins-DUKNjLq6.js} +4 -4
  194. package/dist/chunks/pollConfig-BgpfHQPJ.js +1 -0
  195. package/dist/chunks/{poorMode-CBOtooa0.js → poorMode-CYXmr_mU.js} +1 -1
  196. package/dist/chunks/poorMode-CejPNCp-.js +1 -0
  197. package/dist/chunks/print-gyTOCJzk.js +23 -0
  198. package/dist/chunks/processBashCommand-Cze9vCm6.js +1 -0
  199. package/dist/chunks/processSlashCommand-BRajh1v7.js +5 -0
  200. package/dist/chunks/prompt-B7joRiqj.js +139 -0
  201. package/dist/chunks/prompt-DqSMh2x9.js +1 -0
  202. package/dist/chunks/prompt-Eysh8Et_.js +1 -0
  203. package/dist/chunks/{promptEditor-CyTzyjwG.js → promptEditor-R_acDAgI.js} +2 -2
  204. package/dist/chunks/{protocolHandler-JR8pASdH.js → protocolHandler-RNKkhq91.js} +1 -1
  205. package/dist/chunks/{proxy-CRN7jYIi.js → proxy-BmtEnJ02.js} +1 -1
  206. package/dist/chunks/rcDebugLog-CARUIORE.js +1 -0
  207. package/dist/chunks/reconciler-BfkO6X2X.js +4 -0
  208. package/dist/chunks/refresh-C1X3sptR.js +1 -0
  209. package/dist/chunks/registerProtocol-DoKqmqu2.js +36 -0
  210. package/dist/chunks/{reload-plugins-B9ApSp2m.js → reload-plugins-C0osFcNh.js} +1 -1
  211. package/dist/chunks/remoteBridgeCore-Cddqv2WW.js +1 -0
  212. package/dist/chunks/remoteManagedSettings-B1mnRDmA.js +1 -0
  213. package/dist/chunks/rename-B3tf-YiD.js +1 -0
  214. package/dist/chunks/{renderOptions-BUJB9nAm.js → renderOptions-ChLwxtVu.js} +1 -1
  215. package/dist/chunks/replBridgeHandle-CNwNIijW.js +1 -0
  216. package/dist/chunks/{resume-BicEjsPd.js → resume-Be1G_GBL.js} +2 -2
  217. package/dist/chunks/ripgrep-C2PhTJDh.js +1 -0
  218. package/dist/chunks/{ripgrep-BXmXjAzA.js → ripgrep-gaT9Njwi.js} +1 -1
  219. package/dist/chunks/{runtimeObserver-CiwnPFjK.js → runtimeObserver-CsIwinzh.js} +1 -1
  220. package/dist/chunks/runtimeObserver-Dbxxw4ls.js +10 -0
  221. package/dist/chunks/sandbox-adapter-C6GBuJPB.js +1 -0
  222. package/dist/chunks/sandbox-toggle-jEySONTW.js +1 -0
  223. package/dist/chunks/searchExtraTools-C_UTryh_.js +1 -0
  224. package/dist/chunks/session-DDI1Eb2x.js +2 -0
  225. package/dist/chunks/sessionFileAccessHooks-DfJ7Htfl.js +1 -0
  226. package/dist/chunks/sessionIdCompat-DMayYBrf.js +1 -0
  227. package/dist/chunks/sessionMemory-CQBxPkTQ.js +1 -0
  228. package/dist/chunks/sessionMemory-s0ALUHvc.js +1 -0
  229. package/dist/chunks/sessionMemoryUtils-xt7dTHGC.js +1 -0
  230. package/dist/chunks/sessionObserver-C2sYqWL3.js +1 -0
  231. package/dist/chunks/sessionObserver-DoYc0ZOP.js +20 -0
  232. package/dist/chunks/sessionState-CjNY991n.js +11 -0
  233. package/dist/chunks/sessionStorage-DqsY-7pi.js +1 -0
  234. package/dist/chunks/{sessionTitle-DAnM73S0.js → sessionTitle-B0OYf5nM.js} +3 -3
  235. package/dist/chunks/sessionTracing-CwsXt_uA.js +11 -0
  236. package/dist/chunks/settings-BWtOA9A7.js +1 -0
  237. package/dist/chunks/settings-hQDLwPVj.js +20 -0
  238. package/dist/chunks/settingsSync-DdFagwHV.js +1 -0
  239. package/dist/chunks/setup-DzC22EkN.js +3 -0
  240. package/dist/chunks/{shadowedRuleDetection-C6R5zOUe.js → shadowedRuleDetection-C86PTj1m.js} +1 -1
  241. package/dist/chunks/{shellQuote-DkSy9MYE.js → shellQuote-BUVKMu_P.js} +1 -1
  242. package/dist/chunks/{sideQuestion-hUhxls9r.js → sideQuestion-C780iYwd.js} +3 -3
  243. package/dist/chunks/sinks-5G_xhc1Q.js +1 -0
  244. package/dist/chunks/{sinks-BuE17DeZ.js → sinks-Cftq7Es0.js} +2 -2
  245. package/dist/chunks/skillChangeDetector-plLveEbf.js +1 -0
  246. package/dist/chunks/skillGapStore-Dc1arohs.js +5 -0
  247. package/dist/chunks/skillLifecycle-DP6mY1Kp.js +8 -0
  248. package/dist/chunks/{skillSearchPanel-Cll9ccA5.js → skillSearchPanel-CpLTImaL.js} +4 -4
  249. package/dist/chunks/{skills-BPPeYBy7.js → skills-zGYaYfFV.js} +1 -1
  250. package/dist/chunks/{src-D06Xyj4g.js → src-BN7QRYLl.js} +1 -1
  251. package/dist/chunks/startupProfiler-DCn_NxMH.js +3 -0
  252. package/dist/chunks/startupProfiler-JbpAkfNE.js +1 -0
  253. package/dist/chunks/{state-ix0xIunV.js → state-C2OSZkV1.js} +1 -1
  254. package/dist/chunks/state-DU9lRJ9x.js +1 -0
  255. package/dist/chunks/{stats-CqfF4Axp.js → stats-Duk7_xjQ.js} +1 -1
  256. package/dist/chunks/{status-D4IQpsNK.js → status-CFw-FpZM.js} +2 -2
  257. package/dist/chunks/{status-CC9Q-2Yn.js → status-peiVB_2j.js} +1 -1
  258. package/dist/chunks/statusNoticeHelpers-B5U5c9PE.js +1 -0
  259. package/dist/chunks/{stringUtils-DGLPkqJ4.js → stringUtils-B6FudhoZ.js} +1 -1
  260. package/dist/chunks/switcher-BAMqSX7Z.js +1 -0
  261. package/dist/chunks/switcher-hgBgVzLb.js +1 -0
  262. package/dist/chunks/syncCache-Zl9kZRRl.js +1 -0
  263. package/dist/chunks/{tasks-CZvWJYGr.js → tasks-BxpyRhmD.js} +1 -1
  264. package/dist/chunks/teleport-CwxeD5vL.js +1 -0
  265. package/dist/chunks/{templateJobs-D1BdhZsv.js → templateJobs-DR5fKFiO.js} +1 -1
  266. package/dist/chunks/{terminalSetup-Cn6jeYw1.js → terminalSetup-DgRBt-JJ.js} +1 -1
  267. package/dist/chunks/terminalSetup-DlaFWI81.js +33 -0
  268. package/dist/chunks/{theme-Cg4GNOoQ.js → theme-Bz6esfST.js} +1 -1
  269. package/dist/chunks/{tmux-BY7IdQ1f.js → tmux-DSU9tYIo.js} +1 -1
  270. package/dist/chunks/{toolEventObserver-SFwURL5F.js → toolEventObserver-BSekCkM2.js} +1 -1
  271. package/dist/chunks/toolPool-B7SIoDw5.js +1 -0
  272. package/dist/chunks/{trustedDevice-CKedohmT.js → trustedDevice-B0x9X0fb.js} +1 -1
  273. package/dist/chunks/trustedDevice-CjHQtVkO.js +1 -0
  274. package/dist/chunks/{types-Dut4311z.js → types-D7_37tP2.js} +2 -2
  275. package/dist/chunks/{udsClient-BuCtv7dN.js → udsClient-CHoMMH28.js} +1 -1
  276. package/dist/chunks/{up-BHkC97_C.js → up-B8wBSpLg.js} +1 -1
  277. package/dist/chunks/{updateCCB-C2G-U-qA.js → updateCCB-D_kGQKPT.js} +1 -1
  278. package/dist/chunks/{upstreamproxy-DyR_eXO8.js → upstreamproxy-Hmq-n8fw.js} +1 -1
  279. package/dist/chunks/useExitOnCtrlCDWithKeybindings-Cce612uS.js +1 -0
  280. package/dist/chunks/useMainLoopModel-BICP6_Fi.js +1 -0
  281. package/dist/chunks/useManagePlugins-DtbY_vPL.js +1 -0
  282. package/dist/chunks/useMergedTools-Ckx2IEhF.js +1 -0
  283. package/dist/chunks/{useSearchInput-C5OzQnX6.js → useSearchInput-BAgljZUl.js} +1 -1
  284. package/dist/chunks/useSettingsErrors-CAJR_wpd.js +1 -0
  285. package/dist/chunks/userAgent-BxTG7IMk.js +1 -0
  286. package/dist/chunks/{util-8EHwfg4A.js → util-DDtmyq_r.js} +1 -1
  287. package/dist/chunks/validatePlugin-AHl-g4ct.js +1 -0
  288. package/dist/chunks/{vim-CNDzwoTd.js → vim-kg-mRVbu.js} +1 -1
  289. package/dist/chunks/{which-CKQnSouy.js → which-CHLNJmtJ.js} +1 -1
  290. package/dist/chunks/windowsPaths-Pmx8LDR6.js +1 -0
  291. package/dist/chunks/{windowsPaths-DtapVxOo.js → windowsPaths-o62uq6LF.js} +1 -1
  292. package/dist/chunks/{workSecret-CNWiR2uQ.js → workSecret-DG9shvG0.js} +1 -1
  293. package/dist/chunks/workerRegistry-C7H_lsQX.js +6 -0
  294. package/dist/chunks/worktree-O2p-mJdF.js +1 -0
  295. package/dist/cli.js +1 -1
  296. package/package.json +1 -1
  297. package/dist/chunks/AddWorkspaceDirectory-CFrrXnt9.js +0 -1
  298. package/dist/chunks/App-Buad9Llp.js +0 -1
  299. package/dist/chunks/ApproveApiKey-BQbHdvc3.js +0 -1
  300. package/dist/chunks/AssistantSessionChooser-4lm4eXQ8.js +0 -1
  301. package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +0 -2
  302. package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +0 -1
  303. package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +0 -1
  304. package/dist/chunks/DesktopHandoff-DaP4Riar.js +0 -1
  305. package/dist/chunks/Dialog-vfLXEPed.js +0 -1
  306. package/dist/chunks/Doctor-89OgoAUA.js +0 -1
  307. package/dist/chunks/Doctor-CuKJ-nGt.js +0 -3
  308. package/dist/chunks/ExitFlow-DnPydE17.js +0 -2
  309. package/dist/chunks/Feedback-SmGiR3mf.js +0 -2
  310. package/dist/chunks/Grove-CjN9DO47.js +0 -11
  311. package/dist/chunks/Grove-Cq88VBmM.js +0 -1
  312. package/dist/chunks/ListItem-vfLXEPed.js +0 -1
  313. package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +0 -1
  314. package/dist/chunks/MessageSelector-iIroHvXo.js +0 -3
  315. package/dist/chunks/Messages-D4Hm4gaY.js +0 -11
  316. package/dist/chunks/Onboarding-BiZByBK-.js +0 -1
  317. package/dist/chunks/OverageCreditUpsell-BM7szLgm.js +0 -1
  318. package/dist/chunks/PluginSettings-uY5KTCtK.js +0 -17
  319. package/dist/chunks/QueryEngine-CGYaShXD.js +0 -1
  320. package/dist/chunks/REPL-CRJB2t2z.js +0 -142
  321. package/dist/chunks/REPL-u4Yq29Du.js +0 -1
  322. package/dist/chunks/RemoteCallout-B-tyvQOe.js +0 -1
  323. package/dist/chunks/RemoteSessionManager-DCd0O5_l.js +0 -2
  324. package/dist/chunks/ResumeConversation-DAAXlOCd.js +0 -1
  325. package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +0 -1
  326. package/dist/chunks/Settings-CUjWlncb.js +0 -2
  327. package/dist/chunks/TeleportRepoMismatchDialog-A5Ss0kuk.js +0 -1
  328. package/dist/chunks/TeleportResumeWrapper-Bz14mUqR.js +0 -1
  329. package/dist/chunks/ThemePicker-CVSRqTzW.js +0 -1
  330. package/dist/chunks/TrustDialog-CY8an_Tg.js +0 -1
  331. package/dist/chunks/TungstenTool-Cb7gJvq4.js +0 -1
  332. package/dist/chunks/TungstenTool-CxMQVCuF.js +0 -1
  333. package/dist/chunks/agents-DJtPfvnL.js +0 -103
  334. package/dist/chunks/allErrors-CQE2k0zO.js +0 -1
  335. package/dist/chunks/analytics-BotDBGh0.js +0 -1
  336. package/dist/chunks/ant-ClQkuQjZ.js +0 -1
  337. package/dist/chunks/api-2cdIPaeq.js +0 -1
  338. package/dist/chunks/api-CG-lhKe-.js +0 -1
  339. package/dist/chunks/asciicast-BsWpcxrc.js +0 -1
  340. package/dist/chunks/assistant-Bje16tQx.js +0 -1
  341. package/dist/chunks/assistant-C83quuNj.js +0 -1
  342. package/dist/chunks/assistant-z2o4-UJe.js +0 -1
  343. package/dist/chunks/auth-DMfEiQrC.js +0 -1
  344. package/dist/chunks/auth-D_cGl8WD.js +0 -1
  345. package/dist/chunks/auth-DqcKPbw8.js +0 -15
  346. package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +0 -1
  347. package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +0 -17
  348. package/dist/chunks/bg-B0iMGM9C.js +0 -1
  349. package/dist/chunks/bridge-DNNxtPlz.js +0 -2
  350. package/dist/chunks/bridgeConfig-DP9dD1Cv.js +0 -1
  351. package/dist/chunks/bridgeEnabled-Cc0mGlTb.js +0 -1
  352. package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +0 -1
  353. package/dist/chunks/bridgeMain-CwxMa_pd.js +0 -1
  354. package/dist/chunks/bridgeMain-D11t1BYQ.js +0 -68
  355. package/dist/chunks/bridgeMessaging-DdvApEqW.js +0 -1
  356. package/dist/chunks/bridgePointer-DqHMHa2B.js +0 -1
  357. package/dist/chunks/browser-BmZuQom6.js +0 -1
  358. package/dist/chunks/btw-CejSEdNl.js +0 -1
  359. package/dist/chunks/caches-5HVQSevy.js +0 -3
  360. package/dist/chunks/caches-B-nJoHLM.js +0 -1
  361. package/dist/chunks/capacityWake-CV_x9H8j.js +0 -1
  362. package/dist/chunks/ccrClient-BFyfO67b.js +0 -1
  363. package/dist/chunks/client-DKXCfdde.js +0 -1
  364. package/dist/chunks/client-xxikkAoZ.js +0 -1
  365. package/dist/chunks/commands-CxJpmEKF.js +0 -1
  366. package/dist/chunks/commitAttribution-DM6SBMwl.js +0 -1
  367. package/dist/chunks/commitAttribution-DPnHHKSA.js +0 -2
  368. package/dist/chunks/compact-CblM7306.js +0 -2
  369. package/dist/chunks/completionCache-MN3_MqK8.js +0 -4
  370. package/dist/chunks/completionCache-c4aiyZ_f.js +0 -1
  371. package/dist/chunks/config-BLVBFi5v.js +0 -1
  372. package/dist/chunks/config-CMnqm6Se.js +0 -1
  373. package/dist/chunks/config-DRDuVyzE.js +0 -3
  374. package/dist/chunks/context-CdSMMM-0.js +0 -1
  375. package/dist/chunks/context-noninteractive-CPkf2vB9.js +0 -1
  376. package/dist/chunks/context-noninteractive-DNury4JI.js +0 -54
  377. package/dist/chunks/conversation-DCMw_rsE.js +0 -1
  378. package/dist/chunks/conversation-pUtvc-cE.js +0 -1
  379. package/dist/chunks/createSession-8Ei-Lj7V.js +0 -1
  380. package/dist/chunks/createSession-CjqxVh_Q.js +0 -1
  381. package/dist/chunks/cron-3LntnnhJ.js +0 -1
  382. package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +0 -40
  383. package/dist/chunks/cwd--nvsx73T.js +0 -1
  384. package/dist/chunks/cwd-CYmmnQVS.js +0 -1
  385. package/dist/chunks/debugUtils-NO5KtXqi.js +0 -1
  386. package/dist/chunks/desktop-Z5FAfunZ.js +0 -1
  387. package/dist/chunks/detectRepository-BTPgN89l.js +0 -1
  388. package/dist/chunks/directoryCompletion-CW2ckkQg.js +0 -1
  389. package/dist/chunks/doctor-BA2ZLDTl.js +0 -1
  390. package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +0 -1
  391. package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +0 -1
  392. package/dist/chunks/esm-5w3xFBnt.js +0 -1
  393. package/dist/chunks/exit-Dt9kHtJO.js +0 -1
  394. package/dist/chunks/extra-usage-C7E2Z1p1.js +0 -1
  395. package/dist/chunks/extra-usage-D0Kkjp-2.js +0 -1
  396. package/dist/chunks/extra-usage-core-DjdaD1qO.js +0 -1
  397. package/dist/chunks/extra-usage-noninteractive-BnD1RhKK.js +0 -1
  398. package/dist/chunks/extraUsage-CpgRTcMk.js +0 -1
  399. package/dist/chunks/extractMemories-DhUprYa7.js +0 -1
  400. package/dist/chunks/fast-C4ZevUNL.js +0 -1
  401. package/dist/chunks/fast-CChxlAAF.js +0 -1
  402. package/dist/chunks/feedback-BIhBhV6n.js +0 -1
  403. package/dist/chunks/file-DcZWPH2V.js +0 -12
  404. package/dist/chunks/fileStateCache-DDW5toIs.js +0 -1
  405. package/dist/chunks/files-Cz1-PK3r.js +0 -2
  406. package/dist/chunks/firstPartyEventLogger-BXY1IJ2D.js +0 -5
  407. package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +0 -1
  408. package/dist/chunks/flushGate-CgHq81Gw.js +0 -1
  409. package/dist/chunks/gemini-C1J-x1g7.js +0 -1
  410. package/dist/chunks/generateRecap-C0jjCg0Z.js +0 -1
  411. package/dist/chunks/generateSessionName-w0BMtwS7.js +0 -1
  412. package/dist/chunks/git-CbcnOf0E.js +0 -1
  413. package/dist/chunks/git-Do0wJvux.js +0 -6
  414. package/dist/chunks/githubRepoPathMapping-8D0kpsif.js +0 -1
  415. package/dist/chunks/grok-ffNyU3Lt.js +0 -1
  416. package/dist/chunks/grove-BQisE2JM.js +0 -7
  417. package/dist/chunks/heapdump-DiCjAPR3.js +0 -5
  418. package/dist/chunks/help-2hn8VK2-.js +0 -1
  419. package/dist/chunks/hooks-CBmrBO-J.js +0 -1
  420. package/dist/chunks/hostGuard-BHI6Q8Mt.js +0 -1
  421. package/dist/chunks/inboundAttachments-C5K3XPTC.js +0 -1
  422. package/dist/chunks/inboundAttachments-IH-g95jo.js +0 -1
  423. package/dist/chunks/index.min-D75yiGLN.js +0 -1
  424. package/dist/chunks/initReplBridge-C-P4dgAG.js +0 -1
  425. package/dist/chunks/keybindings-D8FXoO89.js +0 -2
  426. package/dist/chunks/language-Baosud0X.js +0 -1
  427. package/dist/chunks/launchAgentsPlatform-D6DmNuDt.js +0 -1
  428. package/dist/chunks/launchCommand-1qkTCKpf.js +0 -1
  429. package/dist/chunks/launchLocalMemory-C0FzUq7x.js +0 -3
  430. package/dist/chunks/launchLocalVault-DkYAre4O.js +0 -3
  431. package/dist/chunks/launchMemoryStores-D2rKWAPs.js +0 -1
  432. package/dist/chunks/launchSchedule-IZdFstT_.js +0 -1
  433. package/dist/chunks/launchSkillStore-B7LamM1d.js +0 -1
  434. package/dist/chunks/launchTeleport-C2BQMfYP.js +0 -3
  435. package/dist/chunks/launchVault-C60WUcCI.js +0 -1
  436. package/dist/chunks/loadAgentsDir-B9c3Emvg.js +0 -1
  437. package/dist/chunks/loadPluginHooks-BhNdAjeY.js +0 -1
  438. package/dist/chunks/localSearch-BLCGsdyM.js +0 -1
  439. package/dist/chunks/log-BMCygSzM.js +0 -1
  440. package/dist/chunks/logoV2Utils-gGK9gErT.js +0 -1
  441. package/dist/chunks/managedEnv-BHoeDjpS.js +0 -1
  442. package/dist/chunks/mcp-BSNdwbxR.js +0 -1
  443. package/dist/chunks/mcp-CMnDNI-4.js +0 -6
  444. package/dist/chunks/mcp-D1yA9E56.js +0 -2
  445. package/dist/chunks/memoize-B0zhbT8Z.js +0 -1
  446. package/dist/chunks/memory-D1zbyjxN.js +0 -1
  447. package/dist/chunks/model-CZViyZnE.js +0 -1
  448. package/dist/chunks/model-DLLkVV6S.js +0 -1
  449. package/dist/chunks/nativeInstaller-yj81F75v.js +0 -1
  450. package/dist/chunks/observationStore-DzCdXq8U.js +0 -4
  451. package/dist/chunks/onChangeAppState-DhGKPG9g.js +0 -1
  452. package/dist/chunks/output-style-BM3qAHLA.js +0 -1
  453. package/dist/chunks/overageCreditGrant-Du3dOYVu.js +0 -1
  454. package/dist/chunks/panel-Be-OxtqL.js +0 -1
  455. package/dist/chunks/parser-Bf6iasPV.js +0 -1
  456. package/dist/chunks/partition-C4FWzYVm.js +0 -1
  457. package/dist/chunks/passes-Daz-ARWD.js +0 -1
  458. package/dist/chunks/permissions-CeYKbtSC.js +0 -1
  459. package/dist/chunks/permissions-Cn_6f8CB.js +0 -1
  460. package/dist/chunks/permissions-DF8tAmDF.js +0 -3
  461. package/dist/chunks/plugin-Cm31-nej.js +0 -1
  462. package/dist/chunks/pluginBlocklist-wPFCUPdm.js +0 -1
  463. package/dist/chunks/pluginCliCommands-DhL9LbH0.js +0 -1
  464. package/dist/chunks/pluginFlagging-CAdaFV_D.js +0 -1
  465. package/dist/chunks/pluginOperations-Cs_Z4C6O.js +0 -2
  466. package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +0 -1
  467. package/dist/chunks/pluginStartupCheck-KeU0efTj.js +0 -1
  468. package/dist/chunks/policyLimits-D2s8M8P2.js +0 -1
  469. package/dist/chunks/pollConfig-2nFzv6Hy.js +0 -1
  470. package/dist/chunks/poor-DXumVTR4.js +0 -1
  471. package/dist/chunks/poorMode-yNZL5uYf.js +0 -1
  472. package/dist/chunks/print-uxCF5ka5.js +0 -23
  473. package/dist/chunks/privacy-settings-BncbJCV0.js +0 -1
  474. package/dist/chunks/processBashCommand-CGdwvPmD.js +0 -1
  475. package/dist/chunks/processSlashCommand-DQarepEb.js +0 -5
  476. package/dist/chunks/prompt-BgOdcHkd.js +0 -1
  477. package/dist/chunks/prompt-CE3sFmZV.js +0 -139
  478. package/dist/chunks/prompt-CLJKFebn.js +0 -1
  479. package/dist/chunks/rate-limit-options-C-EqWjeI.js +0 -1
  480. package/dist/chunks/rcDebugLog-DBB9r8aw.js +0 -11
  481. package/dist/chunks/reconciler-CYD_XpG4.js +0 -4
  482. package/dist/chunks/referral-CKmHHxj_.js +0 -1
  483. package/dist/chunks/refresh-ZqZdmLK5.js +0 -1
  484. package/dist/chunks/registerProtocol-wZv2uiW_.js +0 -36
  485. package/dist/chunks/release-notes-B5K7wVqZ.js +0 -4
  486. package/dist/chunks/releaseNotes-B8gbyFFJ.js +0 -2
  487. package/dist/chunks/remote-env-CAt1dHIS.js +0 -1
  488. package/dist/chunks/remoteBridgeCore-Bk3UdSLJ.js +0 -1
  489. package/dist/chunks/remoteManagedSettings-bswzAB6W.js +0 -1
  490. package/dist/chunks/rename-CE_U6KE6.js +0 -1
  491. package/dist/chunks/ripgrep-BfIpz5uC.js +0 -1
  492. package/dist/chunks/runtimeObserver-BrGF5QWX.js +0 -10
  493. package/dist/chunks/sandbox-adapter-BtMiHImm.js +0 -1
  494. package/dist/chunks/sandbox-toggle-D8eebdyI.js +0 -1
  495. package/dist/chunks/sanitization-DV-94a9Z.js +0 -1
  496. package/dist/chunks/searchExtraTools-hLLPuh7c.js +0 -1
  497. package/dist/chunks/semver-BMRJYn3q.js +0 -1
  498. package/dist/chunks/session-BZIlR9Gc.js +0 -2
  499. package/dist/chunks/sessionDiscovery-DfDqTrF1.js +0 -1
  500. package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +0 -1
  501. package/dist/chunks/sessionMemory-D37S0-jX.js +0 -1
  502. package/dist/chunks/sessionMemory-DmlAG3jq.js +0 -1
  503. package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +0 -1
  504. package/dist/chunks/sessionObserver-BUw2rzKl.js +0 -1
  505. package/dist/chunks/sessionObserver-KgquhGWw.js +0 -20
  506. package/dist/chunks/sessionStorage-CucBSK5Q.js +0 -1
  507. package/dist/chunks/sessionTracing-_Hh5VXxt.js +0 -11
  508. package/dist/chunks/settings-BeLFUeie.js +0 -19
  509. package/dist/chunks/settings-Cl16Haug.js +0 -1
  510. package/dist/chunks/settingsSync-BNvFYH3c.js +0 -1
  511. package/dist/chunks/setup-D8kXv3ts.js +0 -3
  512. package/dist/chunks/sinks-FevoYQqP.js +0 -1
  513. package/dist/chunks/skill-learning-CMdxGtxr.js +0 -5
  514. package/dist/chunks/skillChangeDetector-C65ZLSYV.js +0 -1
  515. package/dist/chunks/skillGapStore-D18LRJAM.js +0 -5
  516. package/dist/chunks/skillGapStore-Ep62R-2_.js +0 -1
  517. package/dist/chunks/skillGenerator-Bc7WwNT8.js +0 -8
  518. package/dist/chunks/skillLearning-Cs9fJgkV.js +0 -1
  519. package/dist/chunks/skillLearning-duPZl69A.js +0 -1
  520. package/dist/chunks/skillPanel-Cyzby746.js +0 -28
  521. package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +0 -1
  522. package/dist/chunks/startupProfiler-DIWVcO4e.js +0 -1
  523. package/dist/chunks/startupProfiler-xa3NmN7Z.js +0 -3
  524. package/dist/chunks/state-BOa-3Av3.js +0 -1
  525. package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +0 -1
  526. package/dist/chunks/stickers-D5teCKMN.js +0 -1
  527. package/dist/chunks/syncCache-CANQZ9mQ.js +0 -1
  528. package/dist/chunks/systemPromptSections-CR_AoPIX.js +0 -1
  529. package/dist/chunks/systemPromptSections-DN0HGVye.js +0 -1
  530. package/dist/chunks/tag-DDbNqBMu.js +0 -11
  531. package/dist/chunks/teleport-Dk5j03Ix.js +0 -1
  532. package/dist/chunks/terminalSetup-3JNy6i_J.js +0 -33
  533. package/dist/chunks/thinkback-p-vKIRW_.js +0 -1
  534. package/dist/chunks/thinkback-play-DnPTDE8B.js +0 -1
  535. package/dist/chunks/thinkback-rFA1do6F.js +0 -1
  536. package/dist/chunks/toolEventObserver-CzsCuUMc.js +0 -1
  537. package/dist/chunks/toolPool-BR27AMJO.js +0 -1
  538. package/dist/chunks/trustedDevice-BYt39fui.js +0 -1
  539. package/dist/chunks/tui-C2yuCuOU.js +0 -6
  540. package/dist/chunks/types-Bh9S_JG5.js +0 -3
  541. package/dist/chunks/types-DHkZVzJe.js +0 -1
  542. package/dist/chunks/ultrareviewCommand-C_4OSBTW.js +0 -3
  543. package/dist/chunks/undercover-D30rKimg.js +0 -31
  544. package/dist/chunks/undercover-DRSwLozU.js +0 -1
  545. package/dist/chunks/upgrade-Bi-bIz7R.js +0 -1
  546. package/dist/chunks/upgrade-Chs-OQFd.js +0 -1
  547. package/dist/chunks/upload-D8FWMSQx.js +0 -1
  548. package/dist/chunks/usage-BxVeUt60.js +0 -1
  549. package/dist/chunks/usage-DUO7Yy1f.js +0 -1
  550. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js +0 -1
  551. package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +0 -1
  552. package/dist/chunks/useManagePlugins-B11_87VN.js +0 -1
  553. package/dist/chunks/useMergedTools-CR56my9t.js +0 -1
  554. package/dist/chunks/useSettingsErrors-B9vOZL41.js +0 -1
  555. package/dist/chunks/validatePlugin-6q1qmnAC.js +0 -1
  556. package/dist/chunks/windowsPaths-9pEkw0oV.js +0 -1
  557. package/dist/chunks/workerRegistry-CvyHvwx-.js +0 -1
  558. package/dist/chunks/worktree-ogmNCIpz.js +0 -1
@@ -0,0 +1,5 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$t as t,er as n,mt as r,t as i}from"./state-C2OSZkV1.js";import{$d as a,Aa as o,Au as s,Bs as c,By as l,C as u,Dc as d,Ec as f,Fh as p,Fu as m,G as h,Hy as g,Ia as _,Ji as v,LS as y,La as b,Lb as x,Li as S,Mh as C,Mu as w,Na as T,Of as E,Pa as D,QC as O,RS as k,Rb as A,Ru as j,Ui as M,Us as ee,Va as te,Vi as ne,Vs as re,W as ie,Wb as ae,XC as oe,Yi as se,ZC as ce,Zi as N,_b as le,af as ue,ao as de,bD as fe,cD as pe,co as me,dg as he,dv as ge,ef as P,eo as _e,gh as ve,hh as F,if as ye,il as be,jh as xe,ju as Se,k as Ce,kf as we,lD as I,mb as Te,pg as Ee,rf as De,rl as Oe,to as ke,uD as L,uo as R,uv as Ae,wc as z,yD as je,zu as Me}from"./loadAgentsDir-ByO8eJqU.js";import{A as B,D as Ne,a as V,d as Pe,l as H,p as Fe,z as Ie}from"./debug-RZ4NuXyS.js";import{Cn as Le,Dt as Re,Ot as ze,bn as Be}from"./settings-hQDLwPVj.js";import{J as Ve,T as U,o as He,s as W,w as G}from"./log-CZ0zYP_c.js";import{n as Ue,r as K}from"./analytics-CkYUHW_U.js";import{_n as We,gi as Ge,hi as Ke,vn as qe}from"./model-CwO-g1RW.js";import{ct as Je,ot as Ye}from"./esm-BLPbfHQd.js";import{E as Xe,T as Ze,w as Qe}from"./sessionTracing-CwsXt_uA.js";import{randomUUID as q}from"crypto";function $e(e,t,n,r,i){let a=0;for(let o of Re){let s=n[o];if(s)for(let n of s)for(let s of n.hooks){let c=s.once?()=>{H(`Removing one-shot hook for event ${o} in skill '${r}'`),ue(e,t,o,s)}:void 0;De(e,t,o,n.matcher||``,s,c,i),a++}}a>0&&H(`Registered ${a} hooks from skill '${r}'`)}var J=e((()=>{ze(),V(),ye()}));function et(e){let t=e.trim();if(!t.startsWith(`/`))return null;let n=t.slice(1).split(` `);if(!n[0])return null;let r=n[0],i=!1,a=1;n.length>1&&n[1]===`(MCP)`&&(r+=` (MCP)`,i=!0,a=2);let o=n.slice(a).join(` `);return{commandName:r,args:o,isMcp:i}}var tt=e((()=>{}));function nt(){return!1}function rt(){if(!nt())throw Error(`ToolUseContext.options.allowBackgroundForkedSlashCommands is test-only and cannot be enabled outside NODE_ENV=test.`)}async function it(e,t,n,r,i,a,o){let s=E(),c=e.pluginInfo?L(e.pluginInfo.repository).marketplace:void 0;K(`tengu_slash_command_forked`,{command_name:e.name,invocation_trigger:`user-slash`,...e.pluginInfo&&{_PROTO_plugin_name:e.pluginInfo.pluginManifest.name,...c&&{_PROTO_marketplace_name:c},...w(e.pluginInfo)}});let{skillContent:l,modifiedGetAppState:u,baseAgent:f,promptMessages:p}=await d(e,t,n);H(`Executing forked slash command /${e.name} with agent ${f.agentType}`);let m=await n.getAppState(),h=n.options.allowBackgroundForkedSlashCommands===!0;h&&rt();let g=!1;if(m.kairosEnabled&&h&&(g=!0),g){let t=y(),r=N(e),i=Ke(),c=e=>A({value:e,mode:`prompt`,priority:`later`,isMeta:!0,skipSlashCommands:!0,workload:i}),l=async()=>{if(!o?.runId)return;let e=await xe({runId:o.runId,rootDir:o.rootDir,priority:`later`,workload:i});for(let t of e)x(t)},d=async e=>{o?.runId&&await C({runId:o.runId,rootDir:o.rootDir,error:e instanceof Error?e.message:String(e)})};return(async()=>{let i=Date.now()+$;for(;Date.now()<i&&n.getAppState().mcp.clients.some(e=>e.type===`pending`);)await qe(Q);let o=n.options.refreshTools?.()??n.options.tools,d=[];for await(let r of P({agentDefinition:f,promptMessages:p,toolUseContext:{...n,getAppState:u,abortController:t},canUseTool:a,isAsync:!0,querySource:`agent:custom`,model:e.model,availableTools:o,override:{agentId:s}}))d.push(r);let m=z(d,`Command completed`);H(`Background forked command /${r} completed (agent ${s})`),c(`<scheduled-task-result command="/${r}">\n${m}\n</scheduled-task-result>`);try{await l()}catch(e){W(e)}})().catch(async e=>{W(e),c(`<scheduled-task-result command="/${r}" status="failed">\n${e instanceof Error?e.message:String(e)}\n</scheduled-task-result>`),await d(e)}),{messages:[],shouldQuery:!1,command:e,deferAutonomyCompletion:!!o?.runId}}let _=[],v=[],S=`forked-command-${e.name}`,T=0,D=e=>(T++,{type:`progress`,data:{message:e,type:`agent_progress`,prompt:l,agentId:s},parentToolUseID:S,toolUseID:`${S}-${T}`,timestamp:new Date().toISOString(),uuid:q()}),O=()=>{i({jsx:Me(v,{tools:n.options.tools,verbose:!1}),shouldHidePromptInput:!1,shouldContinueAnimation:!0,showSpinner:!0})};O();try{for await(let t of P({agentDefinition:f,promptMessages:p,toolUseContext:{...n,getAppState:u},canUseTool:a,isAsync:!1,querySource:`agent:custom`,model:e.model,availableTools:n.options.tools})){_.push(t);let e=me([t]);if(t.type===`assistant`){let r=Te(t);r>0&&n.setResponseLength(e=>e+r);let i=e[0];i&&i.type===`assistant`&&(v.push(D(t)),O())}if(t.type===`user`){let t=e[0];t&&t.type===`user`&&(v.push(D(t)),O())}}}finally{i(null)}let k=z(_,`Command completed`);return H(`Forked slash command /${e.name} completed with agent ${s}`),process.env.USER_TYPE===`ant`&&(k=`[ANT-ONLY] API calls: ${Be(F(s))}\n${k}`),{messages:[b({content:R({inputString:`/${N(e)} ${t}`.trim(),precedingInputBlocks:r})}),b({content:`<local-command-stdout>\n${k}\n</local-command-stdout>`})],shouldQuery:!1,command:e,resultText:k}}function at(e){return!/[^a-zA-Z0-9:\-_]/.test(e)}async function ot(e,t,r,i,a,o,s,c,l,u){let d=et(e);if(!d){K(`tengu_input_slash_missing`,{});let e="Commands are in the form `/command [args]`";return{messages:[T(),...i,b({content:R({inputString:e,precedingInputBlocks:t})})],shouldQuery:!1,resultText:e}}let{commandName:f,args:p,isMcp:m}=d,h=m?`mcp`:S().has(f)?f:`custom`;if(!v(f,a.options.commands)){let r=!1;try{await Pe().stat(`/${f}`),r=!0}catch{}if(at(f)&&!r){K(`tengu_input_slash_invalid`,{input:f});let e=`Unknown skill: ${f}`;return{messages:[T(),...i,b({content:R({inputString:e,precedingInputBlocks:t})}),...p?[D(`Args from unknown skill: ${p}`,`warning`)]:[]],shouldQuery:!1,resultText:e}}let a=q();return n(a),K(`tengu_input_prompt`,{}),Ze(`user_prompt`,{prompt_length:String(e.length),prompt:Xe(e),"prompt.id":a}),{messages:[b({content:R({inputString:e,precedingInputBlocks:t}),uuid:s}),...i],shouldQuery:!0}}let{messages:g,shouldQuery:_,allowedTools:y,model:x,command:C,resultText:E,nextInput:O,submitNextInput:k,deferAutonomyCompletion:A}=await st(f,p,o,a,t,r,c,l,s,u);if(g.length===0){let e={input:h};if(C.type===`prompt`&&C.pluginInfo){let{pluginManifest:t,repository:n}=C.pluginInfo,{marketplace:r}=L(n),i=I(r);e._PROTO_plugin_name=t.name,r&&(e._PROTO_marketplace_name=r),e.plugin_repository=i?n:`third-party`,e.plugin_name=i?t.name:`third-party`,i&&t.version&&(e.plugin_version=t.version),Object.assign(e,w(C.pluginInfo))}return K(`tengu_input_command`,{...e,invocation_trigger:`user-slash`,...process.env.USER_TYPE===`ant`&&{skill_name:f,...C.type===`prompt`&&{skill_source:C.source},...C.loadedFrom&&{skill_loaded_from:C.loadedFrom},...C.kind&&{skill_kind:C.kind}}}),{messages:[],shouldQuery:!1,model:x,nextInput:O,submitNextInput:k,deferAutonomyCompletion:A}}if(g.length===2&&g[1].type===`user`&&typeof g[1].message.content==`string`&&g[1].message.content.startsWith(`Unknown command:`))return e.startsWith(`/var`)||e.startsWith(`/tmp`)||e.startsWith(`/private`)||K(`tengu_input_slash_invalid`,{input:f}),{messages:[T(),...g],shouldQuery:_,allowedTools:y,model:x};let j={input:h};if(C.type===`prompt`&&C.pluginInfo){let{pluginManifest:e,repository:t}=C.pluginInfo,{marketplace:n}=L(t),r=I(n);j._PROTO_plugin_name=e.name,n&&(j._PROTO_marketplace_name=n),j.plugin_repository=r?t:`third-party`,j.plugin_name=r?e.name:`third-party`,r&&e.version&&(j.plugin_version=e.version),Object.assign(j,w(C.pluginInfo))}K(`tengu_input_command`,{...j,invocation_trigger:`user-slash`,...process.env.USER_TYPE===`ant`&&{skill_name:f,...C.type===`prompt`&&{skill_source:C.source},...C.loadedFrom&&{skill_loaded_from:C.loadedFrom},...C.kind&&{skill_kind:C.kind}}});let M=g.length>0&&g[0]&&ke(g[0]);return{messages:_||g.every(de)||M?g:[T(),...g],shouldQuery:_,allowedTools:y,model:x,resultText:E,nextInput:O,submitNextInput:k,deferAutonomyCompletion:A}}async function st(e,t,n,r,i,a,s,c,l,u){let d=M(e,r.options.commands);if(d.type===`prompt`&&d.userInvocable!==!1&&Se(e),d.userInvocable===!1)return{messages:[b({content:R({inputString:`/${e}`,precedingInputBlocks:i})}),b({content:`This skill can only be invoked by Claude, not directly by users. Ask Claude to use the "${e}" skill for you.`})],shouldQuery:!1,command:d};try{switch(d.type){case`local-jsx`:return new Promise(e=>{let a=!1,s=(n,r)=>{if(a=!0,r?.display===`skip`){e({messages:[],shouldQuery:!1,command:d,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput});return}let s=(r?.metaMessages??[]).map(e=>b({content:e,isMeta:!0})),c=ge()&&typeof n==`string`&&n.endsWith(` dismissed`),l=r?.displayArgs??t;e({messages:r?.display===`system`?c?s:[o(Y(d,l)),o(`<local-command-stdout>${n}</local-command-stdout>`),...s]:[b({content:R({inputString:Y(d,l),precedingInputBlocks:i})}),b(n?{content:`<local-command-stdout>${n}</local-command-stdout>`}:{content:`<local-command-stdout>${je}</local-command-stdout>`}),...s],shouldQuery:r?.shouldQuery??!1,command:d,nextInput:r?.nextInput,submitNextInput:r?.submitNextInput})};d.load().then(e=>e.call(s,{...r,canUseTool:c},t)).then(t=>{if(t!=null){if(r.options.isNonInteractiveSession){e({messages:[],shouldQuery:!1,command:d});return}a||n({jsx:t,shouldHidePromptInput:!0,showSpinner:!1,isLocalJSXCommand:!0,isImmediate:d.immediate===!0})}}).catch(t=>{W(t),!a&&(a=!0,n({jsx:null,shouldHidePromptInput:!1,clearLocalJSX:!0}),e({messages:[],shouldQuery:!1,command:d}))})});case`local`:{let e=b({content:R({inputString:Y(d,d.isSensitive&&t.trim()?`***`:t),precedingInputBlocks:i})});try{let n=T(),i=await(await d.load()).call(t,r);if(i.type===`skip`)return{messages:[],shouldQuery:!1,command:d};if(i.type===`compact`){let t=[n,e,...i.displayText?[b({content:`<local-command-stdout>${i.displayText}</local-command-stdout>`,timestamp:new Date(Date.now()+100).toISOString()})]:[]],r={...i.compactionResult,messagesToKeep:[...i.compactionResult.messagesToKeep??[],...t]};return g(),{messages:he(r),shouldQuery:!1,command:d}}return{messages:[e,o(`<local-command-stdout>${i.value}</local-command-stdout>`)],shouldQuery:!1,command:d,resultText:i.value}}catch(t){return W(t),{messages:[e,o(`<local-command-stderr>${String(t)}</local-command-stderr>`)],shouldQuery:!1,command:d}}}case`prompt`:try{return d.context===`fork`?await it(d,t,r,i,n,c??ie,u):await Z(d,t,r,i,a,l)}catch(e){return e instanceof Ne?{messages:[b({content:R({inputString:Y(d,t),precedingInputBlocks:i})}),_({toolUse:!1})],shouldQuery:!1,command:d}:{messages:[b({content:R({inputString:Y(d,t),precedingInputBlocks:i})}),b({content:`<local-command-stderr>${String(e)}</local-command-stderr>`})],shouldQuery:!1,command:d}}}}catch(e){if(e instanceof B)return{messages:[b({content:R({inputString:e.message,precedingInputBlocks:i})})],shouldQuery:!1,command:d};throw e}}function Y(e,t){return te(N(e),t)}function X(e,t=`loading`){return[`<${G}>${e}</${G}>`,`<${U}>${e}</${U}>`,`<skill-format>true</skill-format>`].join(`
2
+ `)}function ct(e,t){return[`<${G}>${e}</${G}>`,`<${U}>/${e}</${U}>`,t?`<command-args>${t}</command-args>`:null].filter(Boolean).join(`
3
+ `)}function lt(e,t){return e.userInvocable===!1&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`||e.loadedFrom===`mcp`)?X(e.name,e.progressMessage):ct(e.name,t)}async function ut(e,t,n,r,i=[]){let a=ne(e,n);if(!a)throw new B(`Unknown command: ${e}`);if(a.type!==`prompt`)throw Error(`Unexpected ${a.type} command. Expected 'prompt' command. Use /${e} directly in the main conversation.`);return Z(a,t,r,[],i)}async function Z(e,t,n,a=[],o=[],s){let l=await e.getPromptForCommand(t,n),u=!ce(`hooks`)||O(e.source);if(e.hooks&&u){let t=r();$e(n.setAppState,t,e.hooks,e.name,e.type===`prompt`?e.skillRoot:void 0)}let d=e.source?`${e.source}:${e.name}`:e.name,f=l.filter(e=>e.type===`text`).map(e=>e.text).join(`
4
+
5
+ `);i(e.name,d,f,Ye()?.agentId??null);let p=lt(e,t),m=Ce(e.allowedTools??[]),h=o.length>0||a.length>0?[...o,...a,...l]:l,g=await be(re(l.filter(e=>e.type===`text`).map(e=>e.text).join(` `),n,null,[],n.messages,`repl_main_thread`,{skipSkillDiscovery:!0}));return{messages:[b({content:p,uuid:s}),b({content:h,isMeta:!0}),...g,c({type:`command_permissions`,allowedTools:m,model:e.model})],shouldQuery:!0,allowedTools:m,model:e.model,command:e}}var Q,$;e((()=>{t(),se(),fe(),Ve(),Ue(),ve(),Ee(),l(),a(),j(),k(),Je(),ee(),V(),Ie(),Le(),f(),Fe(),Ae(),Oe(),J(),He(),ae(),_e(),u(),h(),pe(),oe(),tt(),We(),s(),Qe(),m(),le(),we(),p(),Ge(),Q=200,$=1e4}))();export{X as formatSkillLoadingMetadata,ut as processPromptSlashCommand,ot as processSlashCommand};
@@ -0,0 +1,139 @@
1
+ import{a as e,n as t,o as n,r,t as i}from"./rolldown-runtime-DaDcL9Zw.js";import{c as a,l as o,o as s}from"./envUtils-DSxRz_kt.js";import{n as c,t as l}from"./defineProperty-C-QyHrDq.js";import{A as u,C as d,M as f,w as p}from"./external-CEp-aPkt.js";import{n as m,r as h,t as g}from"./lazySchema-B4D4qJVE.js";import{M as _,S as v,w as y,z as b}from"./debug-RZ4NuXyS.js";import{G as x,J as S,K as C,Q as w,W as T,q as E}from"./settings-hQDLwPVj.js";import{J as D,U as O}from"./log-CZ0zYP_c.js";import{i as k,o as A}from"./platform-DCXXznJg.js";import{_ as j,u as M}from"./model-CwO-g1RW.js";import{join as N,parse as P,resolve as F,sep as I}from"node:path";import{createHash as L}from"node:crypto";import{appendFile as ee,mkdir as te,readFile as R,readdir as ne,rm as re,writeFile as ie}from"node:fs/promises";function ae(e){return e.filter(e=>e.data?.type!==`hook_progress`)}function oe(e,t){return e.name===t||(e.aliases?.includes(t)??!1)}function se(e,t){return e.find(e=>oe(e,t))}function ce(e){return{...ue,userFacingName:()=>e.name,...e}}var le,ue,de=t((()=>{le=()=>({mode:`default`,additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!0}),ue={isEnabled:()=>!0,isConcurrencySafe:e=>!1,isReadOnly:e=>!1,isDestructive:e=>!1,checkPermissions:(e,t)=>Promise.resolve({behavior:`allow`,updatedInput:e}),toAutoClassifierInput:e=>``,userFacingName:e=>``}})),z,fe=t((()=>{z=`Bash`}));function pe(){return`A powerful search tool built on ripgrep
2
+
3
+ Usage:
4
+ - ALWAYS use ${B} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${z} command. The ${B} tool has been optimized for correct permissions and access.
5
+ - Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
6
+ - Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
7
+ - Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
8
+ - Use ${S} tool for open-ended searches requiring multiple rounds
9
+ - Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
10
+ - Multiline matching: By default patterns match within single lines only. For cross-line patterns like \`struct \\{[\\s\\S]*?field\`, use \`multiline: true\`
11
+ `}var B,me=t((()=>{w(),fe(),B=`Grep`})),he,ge,_e,ve,ye=t((()=>{he=`Edit`,ge=`/.claude/**`,_e=`~/.claude/**`,ve=`File has been unexpectedly modified. Read it again before attempting to write it.`}));function be(e){let t=e.trim();if(!t)return null;if(t.endsWith(`-`)){let e=parseInt(t.slice(0,-1),10);return isNaN(e)||e<1?null:{firstPage:e,lastPage:1/0}}let n=t.indexOf(`-`);if(n===-1){let e=parseInt(t,10);return isNaN(e)||e<1?null:{firstPage:e,lastPage:e}}let r=parseInt(t.slice(0,n),10),i=parseInt(t.slice(n+1),10);return isNaN(r)||isNaN(i)||r<1||i<1||i<r?null:{firstPage:r,lastPage:i}}function xe(){return!M().toLowerCase().includes(`claude-3-haiku`)}function Se(e){let t=e.startsWith(`.`)?e.slice(1):e;return Ce.has(t.toLowerCase())}var Ce,we=t((()=>{j(),Ce=new Set([`pdf`])}));function Te(e,t,n){return`Reads a file from the local filesystem. You can access any file directly by using this tool.
12
+ Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
13
+
14
+ Usage:
15
+ - The file_path parameter must be an absolute path, not a relative path
16
+ - By default, it reads up to ${De} lines starting from the beginning of the file${t}
17
+ ${n}
18
+ ${e}
19
+ - This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.${xe()?`
20
+ - This tool can read PDF files (.pdf). For large PDFs (more than 10 pages), you MUST provide the pages parameter to read specific page ranges (e.g., pages: "1-5"). Reading a large PDF without the pages parameter will fail. Maximum 20 pages per request.`:``}
21
+ - This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
22
+ - This tool can only read files, not directories. To read a directory, use an ls command via the ${z} tool.
23
+ - You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
24
+ - If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`}var V,Ee,De,Oe,ke,Ae,je,Me=t((()=>{we(),fe(),V=`Read`,Ee=`File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current — refer to that instead of re-reading.`,De=2e3,Oe=`Read a file from the local filesystem.`,ke=`- Results are returned using cat -n format, with line numbers starting at 1`,Ae=`- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters`,je=`- When you already know which part of the file you need, only read that part. This can be important for larger files.`}));function Ne(){return`\n- If this is an existing file, you MUST use the ${V} tool first to read the file's contents. This tool will fail if you did not read the file first.`}function Pe(){return`Writes a file to the local filesystem.
25
+
26
+ Usage:
27
+ - This tool will overwrite the existing file if there is one at the provided path.${Ne()}
28
+ - Prefer the Edit tool for modifying existing files \u2014 it only sends the diff. Only use this tool to create new files or for complete rewrites.
29
+ - NEVER create documentation files (*.md) or README files unless explicitly requested by the User.
30
+ - Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`}var Fe,Ie=t((()=>{Me(),Fe=`Write`})),Le,Re,ze=t((()=>{Le=`Glob`,Re=`- Fast file pattern matching tool that works with any codebase size
31
+ - Supports glob patterns like "**/*.js" or "src/**/*.ts"
32
+ - Returns matching file paths sorted by modification time
33
+ - Use this tool when you need to find files by name patterns
34
+ - When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead`})),Be,Ve=t((()=>{Be=`NotebookEdit`})),He,Ue=t((()=>{He=`TodoWrite`})),We,Ge=t((()=>{We=`TaskCreate`})),Ke,qe=t((()=>{Ke=`TaskUpdate`})),Je,Ye=t((()=>{Je=`Skill`})),H,Xe,Ze=t((()=>{H=`ExitPlanMode`,Xe=`ExitPlanMode`})),Qe=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??(this._str=this._items.reduce((e,t)=>`${e}${t}`,``))}get names(){return this._names??(this._names=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{}))}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),$e=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Qe(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),U=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Qe(),n=$e(),r=Qe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=$e();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=k(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(j(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
35
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function j(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${L(e)}`}e.not=j;var M=I(e.operators.AND);function N(...e){return e.reduce(M)}e.and=N;var P=I(e.operators.OR);function F(...e){return e.reduce(P)}e.or=F;function I(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${L(n)} ${e} ${L(r)}`}function L(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),W=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=U(),n=Qe();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),G=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),et=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=U(),n=W(),r=G();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),tt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=et(),n=U(),r=G(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),nt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),rt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),it=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=nt(),n=rt(),r=et(),i=U(),a=W(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
36
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
37
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
38
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),at=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=U(),n=W();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),K=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=U(),n=W(),r=G(),i=W();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),ot=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=U(),n=G(),r=K(),i=et();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),st=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=U(),n=W();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),ct=i(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),lt=i(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),ut=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=W(),n=ct(),r=lt(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),dt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=tt(),n=it(),r=rt(),i=it(),a=at(),o=ot(),s=st(),c=U(),l=G(),u=ut(),d=W(),f=et();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&A(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),j(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&A(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return N(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);N(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function A({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function j(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&M(e),t.return((0,c._)`${l.default.errors} === 0`))}function M({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function N(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ae(e,`$ref`,h.all.$ref.definition));return}p.jtd||F(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),P(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):P(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function P(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ae(e,n.keyword,n.definition,t.type)})}function F(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(I(e,t),e.opts.allowUnionTypes||L(e,t),ee(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{R(e.dataTypes,t)||re(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),ne(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&re(e,`use allowUnionTypes to allow union type keyword`)}function ee(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>te(t,e))&&re(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function R(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function ne(e,t){let n=[];for(let r of e.dataTypes)R(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function re(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var ie=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,ce(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=ie;function ae(e,t,n,r){let i=new ie(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var oe=/^\/(?:[^~]|~0|~1)*$/,se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ce(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!oe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=se.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=ce})),ft=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),pt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ut();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),mt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=U(),n=ft(),r=G(),i=ut(),a=W(),o=dt(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o=o||new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),ht=r({$id:()=>gt,additionalProperties:()=>!1,default:()=>xt,description:()=>_t,properties:()=>bt,required:()=>yt,type:()=>vt}),gt,_t,vt,yt,bt,xt,St=t((()=>{gt=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,_t=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,vt=`object`,yt=[`$data`],bt={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},xt={$id:gt,description:_t,type:vt,required:yt,properties:bt,additionalProperties:!1}})),Ct=i(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),wt=i(((e,t)=>{var{isUUID:n}=Ct(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||(e.path=`/`),e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),Tt=i(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=Ct(),{SCHEMES:d,getSchemeHandler:f}=wt();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(i.host))try{i.host=new URL(`http://`+i.host).hostname}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&(i.path=o(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var T={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=T,t.exports.default=T,t.exports.fastUri=T})),Et=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Tt();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),Dt=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=dt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var r=U();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var i=ft(),a=pt(),o=nt(),s=mt(),c=U(),l=ut(),u=it(),d=W(),f=(St(),e(ht).default),p=Et(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,o.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await i.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new s.SchemaEnv({schema:{},schemaId:n});if(t=s.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,l.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,d.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:o}=this.opts;if(typeof e==`object`)a=e[o];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let c=this._cache.get(e);if(c!==void 0)return c;n=(0,l.normalizeId)(a||n);let u=l.getSchemaRefs.call(this,e,n);return c=new s.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:u}),this._cache.set(c.schema,c),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=c),r&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):s.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=i.default,x.MissingRefError=a.default,t.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,d.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),Ot=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),kt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=pt(),n=K(),r=U(),i=G(),a=mt(),o=W(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),At=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ot(),n=kt();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),jt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),Mt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),Nt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),Pt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W(),r=Nt();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),Ft=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K(),n=W(),r=U();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),It=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),Lt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K(),n=U(),r=W();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),Rt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),zt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ct();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Bt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=it(),n=U(),r=W(),i=zt();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),Vt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W(),r=zt();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),Ht=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W(),r=zt();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??(d=(0,n.useFunc)(i,r.default)),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),Ut=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=jt(),n=Mt(),r=Pt(),i=Ft(),a=It(),o=Lt(),s=Rt(),c=Bt(),l=Vt(),u=Ht();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Wt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=U(),n=W(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),Gt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=U(),n=W(),r=K(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Kt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Gt();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),qt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W(),r=K(),i=Wt();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Jt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Yt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=U(),n=W(),r=K();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
39
+ missingProperty: ${i},
40
+ depsCount: ${n},
41
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Xt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),Zt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K(),n=U(),r=G(),i=W();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),Qt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=dt(),n=K(),r=W(),i=Zt();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),$t=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K(),n=U(),r=W(),i=W();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),en=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=W();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),tn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:K().validateUnion,error:{message:`must match a schema in anyOf`}}})),nn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),rn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=W();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),an=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=W(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),on=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=W();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),sn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Wt(),n=Kt(),r=Gt(),i=qt(),a=Jt(),o=Yt(),s=Xt(),c=Zt(),l=Qt(),u=$t(),d=en(),f=tn(),p=nn(),m=rn(),h=an(),g=on();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),cn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),ln=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[cn().default]})),un=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),dn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=At(),n=Ut(),r=sn(),i=ln(),a=un();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),fn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),pn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=U(),n=fn(),r=mt(),i=pt(),a=W();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(t||o(c)),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),mn=r({$id:()=>gn,$schema:()=>hn,default:()=>xn,definitions:()=>vn,properties:()=>bn,title:()=>_n,type:()=>yn}),hn,gn,_n,vn,yn,bn,xn,Sn=t((()=>{hn=`http://json-schema.org/draft-07/schema#`,gn=`http://json-schema.org/draft-07/schema#`,_n=`Core schema meta-schema`,vn={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},yn=[`object`,`boolean`],bn={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},xn={$schema:hn,$id:gn,title:_n,definitions:vn,type:yn,properties:bn,default:!0}})),Cn=i(((t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=Dt(),i=dn(),a=pn(),o=(Sn(),e(mn).default),s=[`/properties`],c=`http://json-schema.org/draft-07/schema`,l=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(e,c,!1),this.refs[`http://json-schema.org/schema`]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};t.Ajv=l,n.exports=t=l,n.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var u=dt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=U();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=ft();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=pt();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),wn,Tn=t((()=>{wn=`EnterPlanMode`})),En,Dn,On,kn,An=t((()=>{Ze(),En=`AskUserQuestion`,Dn=`Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.`,On={markdown:`
42
+ Preview feature:
43
+ Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
44
+ - ASCII mockups of UI layouts or components
45
+ - Code snippets showing different implementations
46
+ - Diagram variations
47
+ - Configuration examples
48
+
49
+ Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
50
+ `,html:`
51
+ Preview feature:
52
+ Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
53
+ - HTML mockups of UI layouts or components
54
+ - Formatted code snippets showing different implementations
55
+ - Visual comparisons or diagrams
56
+
57
+ Preview content must be a self-contained HTML fragment (no <html>/<body> wrapper, no <script> or <style> tags — use inline style attributes instead). Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
58
+ `},kn=`Use this tool when you need to ask the user questions during execution. This allows you to:
59
+ 1. Gather user preferences or requirements
60
+ 2. Clarify ambiguous instructions
61
+ 3. Get decisions on implementation choices as you work
62
+ 4. Offer choices to the user about what direction to take.
63
+
64
+ Usage notes:
65
+ - Users will always be able to select "Other" to provide custom text input
66
+ - Use multiSelect: true to allow multiple answers to be selected for a question
67
+ - If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
68
+
69
+ Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${H} for plan approval. IMPORTANT: Do not reference "the plan" in your questions (e.g., "Do you have feedback about the plan?", "Does the plan look good?") because the user cannot see the plan in the UI until you call ${H}. If you need plan approval, use ${H} instead.
70
+ `})),jn,Mn=t((()=>{jn=`PowerShell`}));function Nn(){return k()===`windows`?process.env.USER_TYPE===`ant`?!a(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL):o(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL):!1}var Pn,Fn=t((()=>{fe(),Mn(),s(),A(),Pn=[z,jn]})),In,Ln=t((()=>{In=`TaskGet`})),Rn,zn=t((()=>{Rn=`TaskList`})),Bn,Vn=t((()=>{Bn=`SearchExtraTools`}));function Hn(e){return e.isNonInteractiveSession}function Un(e){let t=Yn.get(e);if(t)return t;let n=Wn(e);return Yn.set(e,n),n}function Wn(e){try{let t=new Gn.Ajv({allErrors:!0});if(!t.validateSchema(e))return{error:t.errorsText(t.errors)};let n=t.compile(e);return{tool:{...Jn,inputJSONSchema:e,async call(e){if(!n(e)){let e=n.errors?.map(e=>`${e.instancePath||`root`}: ${e.message}`).join(`, `);throw new _(`Output does not match required schema: ${e}`,`StructuredOutput schema mismatch: ${(e??``).slice(0,150)}`)}return{data:`Structured output provided successfully`,structured_output:e}}}}}catch(e){return{error:e instanceof Error?e.message:String(e)}}}var Gn,Kn,qn,q,Jn,Yn,Xn=t((()=>{Gn=n(Cn(),1),h(),de(),b(),g(),v(),Kn=m(()=>p({}).passthrough()),qn=m(()=>u().describe(`Structured output tool result`)),q=`StructuredOutput`,Jn=ce({isMcp:!1,isEnabled(){return!0},isConcurrencySafe(){return!0},isReadOnly(){return!0},isOpenWorld(){return!1},name:q,searchHint:`return the final response as structured JSON`,maxResultSizeChars:1e5,async description(){return`Return structured output in the requested format`},async prompt(){return`Use this tool to return your final response in the requested structured format. You MUST call this tool exactly once at the end of your response to provide the structured output.`},get inputSchema(){return Kn()},get outputSchema(){return qn()},async call(e){return{data:`Structured output provided successfully`,structured_output:e}},async checkPermissions(e){return{behavior:`allow`,updatedInput:e}},renderToolUseMessage(e){let t=Object.keys(e);return t.length===0?null:t.length<=3?t.map(t=>`${t}: ${y(e[t])}`).join(`, `):`${t.length} fields: ${t.slice(0,3).join(`, `)}…`},renderToolUseRejectedMessage(){return`Structured output rejected`},renderToolUseErrorMessage(){return`Structured output error`},renderToolUseProgressMessage(){return null},renderToolResultMessage(e){return e},mapToolResultToToolResultBlockParam(e,t){return{tool_use_id:t,type:`tool_result`,content:e}}}),Yn=new WeakMap})),Zn,Qn,$n,er=t((()=>{D(),Zn=`Sleep`,Qn=`Wait for a specified duration`,$n=`Wait for a specified duration. The user can interrupt the sleep at any time.
71
+
72
+ Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something.
73
+
74
+ You may receive <${O}> prompts — these are periodic check-ins. Look for useful work to do before sleeping.
75
+
76
+ You can call this concurrently with other tools — it won't interfere with them.
77
+
78
+ Prefer this over \`Bash(sleep ...)\` — it doesn't hold a shell process.
79
+
80
+ Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity — balance accordingly.`})),tr,nr=t((()=>{tr=`Interact with Language Server Protocol (LSP) servers to get code intelligence features.
81
+
82
+ Supported operations:
83
+ - goToDefinition: Find where a symbol is defined
84
+ - findReferences: Find all references to a symbol
85
+ - hover: Get hover information (documentation, type info) for a symbol
86
+ - documentSymbol: Get all symbols (functions, classes, variables) in a document
87
+ - workspaceSymbol: Search for symbols across the entire workspace
88
+ - goToImplementation: Find implementations of an interface or abstract method
89
+ - prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
90
+ - incomingCalls: Find all functions/methods that call the function at a position
91
+ - outgoingCalls: Find all functions/methods called by the function at a position
92
+
93
+ All operations require:
94
+ - filePath: The file to operate on
95
+ - line: The line number (1-based, as shown in editors)
96
+ - character: The character offset (1-based, as shown in editors)
97
+
98
+ Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.`})),rr=r({VERIFY_PLAN_EXECUTION_TOOL_NAME:()=>ir}),ir,ar=t((()=>{ir=`VerifyPlanExecution`})),or,sr=t((()=>{or=`ExecuteExtraTool`})),cr,lr=t((()=>{cr=`EnterWorktree`})),ur,dr=t((()=>{ur=`ExitWorktree`})),fr=t((()=>{})),J,Y,pr,mr,hr,gr,X=t((()=>{J=`Workflow`,Y=`.claude/workflows`,pr=`.claude/workflow-runs`,mr=[`.ts`,`.js`,`.mjs`],hr=1e3,gr=4096}));function _r(e){return{[br]:e}}function vr(e){return typeof e==`object`&&!!e&&br in e}function yr(e){return e[br]}var br,xr=t((()=>{br=Symbol(`workflow.hostHandle`)}));function Sr(e,t){return e.kind===`agentType`?t.agentType===e.agentType:e.kind===`model`?typeof t.model==`string`&&t.model.startsWith(e.pattern):e.match(t)}var Cr,wr,Tr=t((()=>{c(),Cr=class extends Error{constructor(e){super(e),this.name=`AdapterNotFoundError`}},wr=class{constructor(){l(this,`adapters`,new Map),l(this,`rules`,[]),l(this,`defaultId`,null)}register(e){return this.adapters.set(e.id,e),this}default(e){return this.defaultId=e,this}route(e){return this.rules.push(e),this}has(e){return this.adapters.has(e)}get(e){return this.adapters.get(e)}resolve(e){for(let t of this.rules)if(Sr(t,e)){let e=this.adapters.get(t.adapter);if(e)return e}if(this.defaultId){let e=this.adapters.get(this.defaultId);if(e)return e}throw new Cr(`No adapter matched (rules=${this.rules.length}, default=${this.defaultId??`none`})`)}async initializeAll(){for(let e of this.adapters.values())await e.initialize?.()}async disposeAll(){for(let e of this.adapters.values())await e.dispose?.()}}}));function Er(){return 3}function Dr(e){return e===void 0||Number.isNaN(e)?3:Math.max(1,Math.min(Math.trunc(e),16))}var Or,kr=t((()=>{X(),c(),Or=class{constructor(e){l(this,`available`,void 0),l(this,`waiters`,[]),this.available=Math.max(1,Math.floor(e))}async acquire(e){if(e?.aborted)throw Error(`Semaphore.acquire aborted (signal already aborted)`);return this.available>0?(--this.available,()=>this.release()):new Promise((t,n)=>{let r=()=>{let e=this.waiters.indexOf(i);e>=0&&this.waiters.splice(e,1),n(Error(`Semaphore.acquire aborted`))},i={wake:()=>{e?.removeEventListener(`abort`,r),t(()=>this.release())},cleanup:()=>e?.removeEventListener(`abort`,r)};e?.addEventListener(`abort`,r,{once:!0}),this.waiters.push(i)})}release(){let e=this.waiters.shift();e?e.wake():this.available+=1}}}));function Ar(e){let t=Ir.exec(e);if(!t)return{meta:null,body:e};let n=t.index+t[0].length;for(;n<e.length&&/\s/.test(e[n]);)n++;if(e[n]!==`{`)throw new Z("meta must be an object literal `{ ... }`");let r=0,i=n,a=null;for(;n<e.length;n++){let t=e[n];if(a){if(t===`\\`){n++;continue}t===a&&(a=null);continue}if(t===`"`||t===`'`||t==="`"){a=t;continue}if(t===`{`)r++;else if(t===`}`&&(r--,r===0)){n++;break}}if(r!==0)throw new Z(`meta literal braces are not closed`);let o=e.slice(i,n),s;try{s=Function(`return (${o})`)()}catch(e){throw new Z(`meta must be a plain literal (no variable/function calls/interpolation): ${e.message}`)}return{meta:jr(s),body:e.slice(0,t.index)+e.slice(n).replace(/^[ \t]*;[ \t]*\n/,`
99
+ `)}}function jr(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new Z(`meta must be an object`);let t=e;if(typeof t.name!=`string`||typeof t.description!=`string`)throw new Z(`meta must include string name and description`);return t}function Mr(){let e=function(...e){if(e.length===0)throw new Lr(`Date.now()/new Date()`);return new Date(...e)};return e.now=()=>{throw new Lr(`Date.now()`)},e.parse=Date.parse,e.UTC=Date.UTC,e}function Nr(){return new Proxy(Math,{get(e,t,n){return t===`random`?()=>{throw new Lr(`Math.random()`)}:Reflect.get(e,t,n)}})}function Pr(e){if(/^\s*import\b/m.test(e))throw new Z(`workflow scripts are the body of new AsyncFunction (not ESM modules); import is not supported. agent / parallel / pipeline / phase / log / workflow / args / budget are injected as parameters — use them directly.`);if(/\bimport\s*\(/m.test(e))throw new Z(`dynamic import(...) is forbidden in workflow scripts: it bypasses the Date/Math sandbox and breaks resume determinism. The sandbox does not guarantee security (same trust level as the LLM), but explicit escapes are prohibited. Inject external dependencies via args.`);if(/^\s*export\b/m.test(e))throw new Z(`workflow scripts allow only one export const meta = {...} (already extracted by the engine). Remove other export / export default statements; use top-level return for the result.`)}function Fr(e){let{meta:t,body:n}=Ar(e);Pr(n);let r;try{r=new Rr(`agent`,`parallel`,`pipeline`,`phase`,`log`,`workflow`,`args`,`budget`,`Date`,`Math`,n)}catch(e){throw new Z(`Script syntax error: ${e.message}`)}let i=Mr(),a=Nr();return{meta:t,async execute(e,t,n){return r(e.agent,e.parallel,e.pipeline,e.phase,e.log,e.workflow,t,n,i,a)}}}var Z,Ir,Lr,Rr,zr=t((()=>{Z=class extends Error{constructor(e){super(e),this.name=`ScriptError`}},Ir=/export\s+const\s+meta\s*=\s*/,Lr=class extends Error{constructor(e){super(`${e} is not available in workflow scripts (would break resume determinism). Pass timestamps/random seeds via args.`),this.name=`NonDeterministicError`}},Rr=Object.getPrototypeOf(async function(){}).constructor}));function Br(e){let{label:t,phase:n,...r}=e,i=Object.keys(r).sort(),a={};for(let e of i)a[e]=r[e];return JSON.stringify(a)}function Vr(e,t){return L(`sha256`).update(e+`
100
+ `+Br(t)).digest(`hex`)}function Hr(e){let t=t=>N(e,t,`journal.jsonl`);return{async read(e){try{return(await R(t(e),`utf-8`)).split(`
101
+ `).filter(e=>e.trim().length>0).map(e=>JSON.parse(e)).sort((e,t)=>(e.seq??0)-(t.seq??0))}catch{return[]}},async append(n,r){await te(N(e,n),{recursive:!0}),await ee(t(n),JSON.stringify(r)+`
102
+ `,`utf-8`)},async truncate(t){await re(N(e,t),{recursive:!0,force:!0})}}}var Ur=t((()=>{})),Wr,Gr,Kr=t((()=>{c(),Wr=class extends Error{constructor(){super(`workflow token budget exhausted (budget.total reached the cap)`),this.name=`BudgetExhaustedError`}},Gr=class{constructor(e){l(this,`total`,void 0),l(this,`spentTokens`,0),this.total=e}spent(){return this.spentTokens}remaining(){return this.total==null?1/0:Math.max(0,this.total-this.spentTokens)}addOutputTokens(e){e>0&&(this.spentTokens+=e)}assertCanSpend(){if(this.total!=null&&this.spentTokens>=this.total)throw new Wr}}}));function qr(e,t){let n=Yr.get(t);n||(n=new Jr.Ajv({allErrors:!0,strict:!1}).compile(t),Yr.set(t,n));let r=n(e);return{valid:r,errors:r?[]:(n.errors??[]).map(e=>e.message??`validation error`)}}var Jr,Yr,Xr=t((()=>{Jr=n(Cn(),1),Yr=new WeakMap}));function Zr(e,t){let n=F(e),r=F(n,t);return r===n||r.startsWith(n+I)}function Qr(e){return typeof e!=`string`||e.length===0||e.includes(`/`)||e.includes(`\\`)||e.includes(`\0`)||e===`.`||e===`..`?null:e}var $r=t((()=>{}));function ei(e){return mr.includes(e.toLowerCase())}async function ti(e,t){for(let n of mr){let r=F(e,t+n);if(!Zr(e,r))return null;try{return{path:r,content:await R(r,`utf-8`)}}catch{}}return null}async function ni(e){let t;try{t=await ne(e)}catch{return[]}return t.filter(e=>ei(P(e).ext)).map(e=>P(e).name).sort()}var ri=t((()=>{X(),$r()})),Q,$,ii=t((()=>{Q=class extends Error{constructor(e){super(e),this.name=`WorkflowError`}},$=class extends Error{constructor(){super(`workflow has been aborted`),this.name=`WorkflowAbortedError`}}}));function ai(e,t){return{semaphore:new Or(Dr(t)),budget:new Gr(e),agentCountBox:{value:0},agentIdSeq:{value:0},depth:0}}function oi(e){let t=ai(e.budgetTotal,e.maxConcurrency);return{ports:e.ports,host:e.host,signal:e.signal,runId:e.runId,workflowName:e.workflowName,cwd:e.cwd,resources:t,journal:e.journal?[...e.journal]:[],journalIndex:0,journalInvalidated:!1,currentPhase:null}}var si=t((()=>{Kr(),kr()}));function ci(e,t){let n=t=>{e.ports.progressEmitter.emit({runId:e.runId,...t})};return{agent:async(t,r={})=>{let i=e.resources;if(i.agentCountBox.value>=1e3)throw new Q(`workflow exceeds total agent cap (${hr})`);let a=i.agentIdSeq.value++,o={prompt:t,...r},s=Vr(t,o),c=r.label,l=r.phase??e.currentPhase??void 0;if(!e.journalInvalidated&&e.journalIndex<e.journal.length){let t=e.journal[e.journalIndex];if(t.key===s)return e.journalIndex++,n({type:`agent_done`,agentId:a,label:c,phase:l,result:t.result}),li(t.result);e.journalInvalidated=!0,e.journal=e.journal.slice(0,e.journalIndex),await e.ports.journalStore.truncate(e.runId)}let u;try{u=await e.resources.semaphore.acquire(e.signal)}catch{throw new $}try{if(e.signal.aborted)throw new $;if(i.budget.assertCanSpend(),e.ports.taskRegistrar.pendingAction(e.runId)?.kind===`skip`)return n({type:`agent_done`,agentId:a,label:c,phase:l,result:{kind:`skipped`}}),null;e.resources.agentCountBox.value++,n({type:`agent_started`,agentId:a,label:c,phase:l});let t=e.ports.agentAdapterRegistry,r=t?{host:e.host,signal:e.signal,runId:e.runId,agentId:a,onProgress:e=>{n({type:`agent_progress`,agentId:a,label:c,phase:l,...e})},...e.ports.taskRegistrar.registerAgentAbort?{registerAgentAbort:(t,n)=>{e.ports.taskRegistrar.registerAgentAbort?.(e.runId,t,n)}}:{},...e.ports.taskRegistrar.unregisterAgentAbort?{unregisterAgentAbort:t=>{e.ports.taskRegistrar.unregisterAgentAbort?.(e.runId,t)}}:{}}:null,u=t?t.resolve(o):null,d=()=>u?u.run(o,r):e.ports.agentRunner.runAgentToResult(o,e.host),f;try{if(f=await d(),f.kind===`dead`){let t=typeof f.detail==`string`?f.detail:``;e.ports.logger.warn?.(`agent "${c??`#${a}`}" returned dead`+(f.reason?` (${f.reason})`:``)+(t?`: ${t.slice(0,150)}`:``)+`; retrying once`),f=await d()}}catch(t){if(t instanceof $)throw t;let n=t instanceof Error?t.message:String(t);e.ports.logger.warn?.(`agent "${c??`#${a}`}" threw (${n}); retrying once`);try{f=await d()}catch(e){if(e instanceof $)throw e;f={kind:`dead`,reason:`runagent-threw`,detail:e instanceof Error?e.message:String(e)}}}f.kind===`ok`&&e.resources.budget.addOutputTokens(f.usage.outputTokens),n({type:`agent_done`,agentId:a,label:c,phase:l,result:f});let p={key:s,seq:a,result:f};return e.journal.push(p),e.journalIndex++,await e.ports.journalStore.append(e.runId,p),li(f)}finally{u()}},parallel:async t=>{if(t.length>4096)throw new Q(`parallel exceeds the per-call items cap (${gr})`);return Promise.all(t.map(async(t,n)=>{try{return await t()}catch(t){return e.ports.logger.warn?.(`parallel thunk #${n} failed: ${t.message}`),null}}))},pipeline:async(t,...n)=>{if(t.length>4096)throw new Q(`pipeline exceeds the per-call items cap (${gr})`);return Promise.all(t.map(async(t,r)=>{try{let e=t;for(let i of n)e=await i(e,t,r);return e}catch(t){return e.ports.logger.warn?.(`pipeline item #${r} failed: ${t.message}`),null}}))},phase:t=>{e.currentPhase&&n({type:`phase_done`,phase:e.currentPhase}),e.currentPhase=t,n({type:`phase_started`,phase:t})},log:e=>{n({type:`log`,message:e})},workflow:async(n,r)=>{if(e.resources.depth>=1)throw new Q(`workflow() nesting allows only one level`);return t({...typeof n==`string`?{name:n}:{scriptPath:n.scriptPath},args:r})}}}function li(e){return e.kind===`ok`?e.output:null}var ui=t((()=>{X(),ii(),Ur()}));async function di(e){let{ports:t}=e,n;try{n=Fr(e.script)}catch(n){let r=n.message;return t.progressEmitter.emit({type:`run_done`,runId:e.runId,status:`failed`,error:r}),{status:`failed`,error:r}}let r=e.workflowName??n.meta?.name??`workflow`,i=[],a=!1;e.resume&&!e.scriptChanged?i=await t.journalStore.read(e.runId):e.scriptChanged&&(await t.journalStore.truncate(e.runId),a=!0);let o=oi({ports:t,host:e.host,signal:e.signal,runId:e.runId,workflowName:r,cwd:e.cwd,budgetTotal:e.budgetTotal,maxConcurrency:e.maxConcurrency,journal:i});a&&(o.journalInvalidated=!0),t.progressEmitter.emit({type:`run_started`,runId:e.runId,workflowName:r,meta:n.meta});let s=async t=>{let n=await fi(t,e.cwd),r;try{r=Fr(n)}catch(e){throw new Q(`Sub-workflow script error: ${e.message}`)}let i=o.resources.depth;o.resources.depth+=1;try{let e=ci(o,s);return await r.execute(e,t.args,o.resources.budget)}finally{o.resources.depth=i}},c=ci(o,s),l=()=>{o.currentPhase&&t.progressEmitter.emit({type:`phase_done`,runId:e.runId,phase:o.currentPhase})},u;try{u={status:`completed`,returnValue:await n.execute(c,e.args,o.resources.budget)}}catch(e){u=e instanceof $?{status:`killed`}:{status:`failed`,error:e.message}}return l(),t.progressEmitter.emit({type:`run_done`,runId:e.runId,...u}),u}async function fi(e,t){if(e.script)return e.script;if(e.scriptPath)return await R(e.scriptPath,`utf-8`);if(e.name){let n=await ti(N(t,Y),e.name);if(!n)throw new Q(`Sub-workflow "${e.name}" not found`);return n.content}throw new Q(`workflow() requires name or scriptPath`)}var pi=t((()=>{X(),si(),ii(),ui(),ri(),zr()}));function mi(e){return{emit:e}}function hi(){let e=[];return{emitter:{emit:t=>void e.push(t)},events:e}}var gi=t((()=>{})),_i,vi=t((()=>{h(),_i=p({script:u().optional().describe(`Self-contained workflow script source (inline)`),name:u().optional().describe(`Named workflow, resolved to .claude/workflows/<name>.ts|js|mjs`),scriptPath:u().optional().describe(`Absolute path to an existing script file`),args:f().optional().describe(`The args global variable passed through to the script. Pass a real JSON value (object/array/string), not a JSON string.`),resumeFromRunId:u().optional().describe(`Resume the specified run, replaying the journal`),description:u().optional().describe(`A short description of this invocation (3-5 words)`),title:u().optional().describe(`Progress viewer title`),maxConcurrency:d().int().min(1).max(16).optional().describe(`Concurrency cap for agent(). Defaults to 3 (max 16). When the workflow contains heavy parallel/pipeline fan-out, you may confirm the desired concurrency with the user via AskUserQuestion before launching.`)})}));async function yi(e,t,n){let r=N(n,pr,t);await te(r,{recursive:!0});let i=N(r,`script.js`);return await ie(i,e,`utf-8`),i}var bi=t((()=>{X()}));function xi(e){return{name:J,inputSchema:_i,isEnabled:()=>!0,isReadOnly:()=>!1,async description(){return`Execute a workflow script that orchestrates multiple subagents to complete a task`},async prompt(){return Ei},renderToolUseMessage(e){return e.resumeFromRunId?`Workflow resume: ${e.resumeFromRunId}`:`Workflow: ${e.name??e.scriptPath??(e.script?`inline`:`unknown`)}`},async call(t,n,r,i){let a=e.hostFactory({context:n,canUseTool:r,parentMessage:i}),o,s;try{let e=await Ti(t,a.cwd);o=e.script,s=e.workflowFile}catch(e){return{data:{output:`Error: ${e.message}`}}}try{Fr(o)}catch(e){return{data:{output:`Error: script validation failed: ${e.message}`}}}let c=t.name??t.title??`workflow`,{runId:l,signal:u}=e.taskRegistrar.register({workflowName:c,...s?{workflowFile:s}:{},...t.description?{summary:t.description}:{},...a.toolUseId?{toolUseId:a.toolUseId}:{},...t.resumeFromRunId?{runId:t.resumeFromRunId}:{}},a.handle);if(!s&&t.script)try{s=await yi(t.script,l,a.cwd)}catch(t){e.logger.warn?.(`inline script persist failed: ${t.message}`)}di({script:o,...t.args===void 0?{}:{args:wi(t.args)},runId:l,workflowName:c,ports:e,host:a.handle,signal:u,cwd:a.cwd,budgetTotal:a.budgetTotal,...t.maxConcurrency===void 0?{}:{maxConcurrency:t.maxConcurrency},...t.resumeFromRunId?{resume:!0}:{}}).then(t=>Si(e,t,l)).catch(t=>e.taskRegistrar.fail(l,t.message));let d=s??`<inline run ${l}>`;return{data:{output:[`Workflow started (running in the background).`,`run_id: ${l}`,`workflow: ${c}`,`script: ${d}`,``,`You will be notified on completion. Use /workflows to view live progress.`].join(`
103
+ `)}}},mapToolResultToToolResultBlockParam(e,t){return{tool_use_id:t,type:`tool_result`,content:[{type:`text`,text:e.output}]}}}}function Si(e,t,n){if(t.status===`completed`){let r=t.returnValue==null?`(no return value)`:Ci(t.returnValue);e.taskRegistrar.complete(n,r)}else t.status===`failed`?e.taskRegistrar.fail(n,t.error??`workflow failed`):e.taskRegistrar.kill(n)}function Ci(e){if(typeof e==`string`)return e.slice(0,500);try{return JSON.stringify(e).slice(0,500)}catch{return String(e)}}function wi(e){if(typeof e!=`string`)return e;try{let t=JSON.parse(e);return typeof t==`object`&&t?t:e}catch{return e}}async function Ti(e,t){if(e.script)return{script:e.script};if(e.scriptPath){let n=F(t,e.scriptPath);if(!Zr(t,n))throw Error(`scriptPath "${e.scriptPath}" is out of bounds (after resolve, ${n} is not within cwd ${t})`);return{script:await R(n,`utf-8`),workflowFile:n}}if(e.name){if(Qr(e.name)===null)throw Error(`Named workflow name "${e.name}" is invalid (contains path separators or is . / ..)`);let n=await ti(N(t,Y),e.name);if(!n)throw Error(`Named workflow "${e.name}" not found (looked in ${Y}/)`);return{script:n.content,workflowFile:n.path}}throw Error(`One of script, name, or scriptPath must be provided`)}var Ei,Di=t((()=>{X(),ri(),pi(),zr(),$r(),vi(),bi(),Ei='Use the Workflow tool to execute a workflow script that orchestrates multiple subagents deterministically. The script runs in the background; you receive a run_id immediately and are notified on completion.\n\nProvide the script inline via "script", or reference a named workflow via "name" (resolved from .claude/workflows/), or an existing file via "scriptPath". Pass "args" as a real JSON value (object/array/string), not a stringified string.\n\nUse "resumeFromRunId" to resume a prior run — completed agent() calls replay from the journal instantly.\n\nConcurrency: default is 3 (hard ceiling 16). OMIT maxConcurrency to use 3. To set maxConcurrency to ANY value other than 3, you MUST first ask the user via AskUserQuestion — propose 3 / 6 / 9 (or other tiers matching the fan-out width) with 3 marked "(Recommended)". The ONLY exception: the user has ALREADY specified a concurrency number in this session ("use 6", "maxConcurrency 9") — then honor it without re-asking. Never silently raise concurrency above 3 just because the workflow fans out; 3 is the recommended default.\n\nScript execution model (common pitfalls — getting these wrong is the #1 cause of script errors): the script is the body of `new AsyncFunction` — NOT an ESM module, and TypeScript is NOT transpiled. Therefore:\n- Do NOT use `import` — `agent`, `parallel`, `pipeline`, `phase`, `log`, `workflow`, `args`, and `budget` are injected as parameters; reference them directly.\n- Do NOT use TS type annotations, `interface`, `enum`, `as`, or generics — the engine does not transpile, so even a .ts file with type syntax fails to parse.\n- Keep EXACTLY ONE `export const meta = {...}` (plain literal) and remove every other `export` / `export default`.\n- Return the result with a top-level `return`.\nPrefer .js / .mjs. See /ultracode for the full playbook and quality patterns.'})),Oi=r({AdapterNotFoundError:()=>Cr,AgentAdapterRegistry:()=>wr,Budget:()=>Gr,BudgetExhaustedError:()=>Wr,DEFAULT_MAX_CONCURRENCY:()=>3,MAX_CONCURRENCY_CAP:()=>16,MAX_ITEMS_PER_CALL:()=>gr,MAX_TOTAL_AGENTS:()=>hr,ScriptError:()=>Z,Semaphore:()=>Or,WORKFLOW_DIR_NAME:()=>Y,WORKFLOW_RUNS_DIR:()=>pr,WORKFLOW_SCRIPT_EXTENSIONS:()=>mr,WORKFLOW_TOOL_NAME:()=>J,WorkflowAbortedError:()=>$,WorkflowError:()=>Q,agentCallKey:()=>Vr,clampMaxConcurrency:()=>Dr,createBufferingEmitter:()=>hi,createEngineContext:()=>oi,createFileJournalStore:()=>Hr,createHostHandle:()=>_r,createProgressEmitter:()=>mi,createSharedResources:()=>ai,createWorkflowTool:()=>xi,extractMeta:()=>Ar,isHostHandle:()=>vr,listNamedWorkflows:()=>ni,makeHooks:()=>ci,maxConcurrency:()=>Er,parseScript:()=>Fr,persistInlineScript:()=>yi,resolveNamedWorkflow:()=>ti,runWorkflow:()=>di,unwrapHostHandle:()=>yr,validateAgainstSchema:()=>qr,workflowInputSchema:()=>_i}),ki=t((()=>{fr(),X(),xr(),Tr(),kr(),zr(),Ur(),Kr(),Xr(),ri(),ii(),si(),ui(),pi(),gi(),Di(),vi(),bi()})),Ai,ji,Mi,Ni,Pi,Fi,Ii=t((()=>{Ai=`LocalMemoryRecall`,ji=100*1024,Mi=2*1024,Ni=50*1024,Pi=4*1024,Fi=8*1024})),Li,Ri,zi,Bi,Vi=t((()=>{E(),Ze(),Tn(),w(),An(),x(),Me(),Ue(),me(),ze(),Fn(),ye(),Ie(),Ve(),Ye(),Ge(),Ln(),zn(),qe(),Vn(),Xn(),er(),nr(),ar(),sr(),lr(),dr(),ki(),Ii(),Li=new Set([C,Xe,wn,...process.env.USER_TYPE===`ant`?[]:[S],En,T,J,Ai]),Ri=new Set([...Li]),zi=new Set([V,He,B,Le,...Pn,he,Fe,Be,Je,q,Bn,or,cr,ur]),Bi=new Set([...Pn,V,he,Fe,Le,B,Be,S,En,C,T,We,In,Rn,Ke,He,wn,Xe,ir,`LSP`,Je,J,Zn,Bn,or,q])}));function Hi(){return process.env.USER_TYPE===`ant`?`Deferred tools appear by name in <system-reminder> messages.`:`Deferred tools appear by name in <available-deferred-tools> messages.`}function Ui(e){return!(e.alwaysLoad===!0||Bi.has(e.name))}function Wi(e){return e.name}function Gi(){return Ki+Hi()+qi}var Ki,qi,Ji=t((()=>{Vi(),Vn(),Ki=`Search for deferred tools by name or keyword. LOW PRIORITY — only use this tool when no core tool can accomplish the task. Core tools (Read, Edit, Write, Bash, Glob, Grep, Agent, WebFetch, WebSearch, Skill) are always available and should be used directly. This tool is for discovering additional capabilities like MCP tools, worktree management, agent teams (TeamCreate, TeamDelete, SendMessage), etc.
104
+
105
+ `,qi=` Returns matching tool names.
106
+
107
+ ## Two-step workflow (MUST follow exactly)
108
+
109
+ Deferred tools CANNOT be called directly. You MUST use this two-step pattern:
110
+
111
+ Step 1 — Search: Call this tool (SearchExtraTools) to discover the target tool.
112
+ Input: {"query": "select:TeamCreate"}
113
+ Response: "Found 1 deferred tool(s): TeamCreate. Use ExecuteExtraTool with {"tool_name": "<name>", "params": {...}} to invoke."
114
+
115
+ Step 2 — Execute: Call ExecuteExtraTool to run the discovered tool.
116
+ Input: {"tool_name": "TeamCreate", "params": {"name": "researcher"}}
117
+ Response: the actual tool result.
118
+
119
+ ## Example: user asks "create a team"
120
+
121
+ 1. SearchExtraTools({"query": "select:TeamCreate"})
122
+ → Response: Found deferred tool TeamCreate
123
+ 2. ExecuteExtraTool({"tool_name": "TeamCreate", "params": {"name": "researcher"}})
124
+ → Response: Team created successfully
125
+
126
+ If you don't know the exact tool name, use keyword search first:
127
+ 1. SearchExtraTools({"query": "team create"})
128
+ → Response: Found deferred tool(s): TeamCreate
129
+ 2. ExecuteExtraTool({"tool_name": "TeamCreate", "params": {...}})
130
+
131
+ ## Query forms
132
+ - "select:TeamCreate" — exact tool name (fastest, preferred when you know the name from <available-deferred-tools>)
133
+ - "select:TeamCreate,SendMessage" — comma-separated multi-select
134
+ - "discover:create a team" — returns tool name + description + schema without loading. Use to understand a tool before calling it.
135
+ - "notebook jupyter" — keyword search, up to max_results best matches
136
+ - "+slack send" — require "slack" in the name, rank by remaining terms
137
+
138
+ ## Failure policy
139
+ If ExecuteExtraTool fails, do NOT re-search for the same tool — it will loop. Stop and tell the user what failed.`}));export{nr as $,Ae as $t,ti as A,Xe as At,Y as B,Be as Bt,_i as C,On as Ct,ii as D,Cn as Dt,$ as E,Tn as Et,wr as F,qe as Ft,cr as G,Fe as Gt,X as H,Re as Ht,Tr as I,We as It,sr as J,Oe as Jt,lr as K,Pe as Kt,_r as L,Ge as Lt,Ur as M,Je as Mt,zr as N,Ye as Nt,ri as O,U as Ot,Fr as P,Ke as Pt,tr as Q,De as Qt,xr as R,He as Rt,vi as S,oe as Sn,Dn as St,di as T,wn as Tt,ur as U,Le as Ut,J as V,Ve as Vt,dr as W,ze as Wt,rr as X,Ee as Xt,ir as Y,V as Yt,ar as Z,ke as Zt,Oi as _,ce as _n,Nn as _t,Li as a,xe as an,Jn as at,bi as b,le as bn,En as bt,Vi as c,he as cn,Hn as ct,Pi as d,ye as dn,Rn as dt,je as en,Qn as et,Ai as f,B as fn,zn as ft,ki as g,fe as gn,Fn as gt,Ii as h,z as hn,Pn as ht,Ui as i,Se as in,q as it,Hr as j,Ze as jt,ni as k,H as kt,Ni as l,ve as ln,Bn as lt,Mi as m,me as mn,Ln as mt,Gi as n,Te as nn,$n as nt,zi as o,be as on,Un as ot,ji as p,pe as pn,In as pt,or as q,Ie as qt,Ji as r,we as rn,er as rt,Ri as s,ge as sn,Xn as st,Wi as t,Me as tn,Zn as tt,Fi as u,_e as un,Vn as ut,xi as v,ae as vn,jn as vt,pi as w,An as wt,yi as x,de as xn,kn as xt,Di as y,se as yn,Mn as yt,yr as z,Ue as zt};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./prompt-B7joRiqj.js";t();export{e as isDeferredTool};
@@ -0,0 +1 @@
1
+ import{hE as e,lE as t}from"./loadAgentsDir-ByO8eJqU.js";e();export{t as clearPromptCache};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Rn as r,t as i}from"./src-CDCSSo0U2.js";import{Dy as a,Eg as o,Oy as s,Qx as c,Xx as l,eS as u,tS as d,vg as f}from"./loadAgentsDir-x3rlgED4.js";import{E as p,S as m,a as h,d as g,l as _,p as v}from"./debug-BrXObCdR.js";import{n as y,t as b}from"./execSyncWrapper-CCMQShK-.js";import{r as x,t as S}from"./which-CKQnSouy.js";import{basename as C}from"path";import{spawn as w,spawnSync as T}from"child_process";function E(e){return!!x(e)}function D(e){let t=C(e.split(` `)[0]??``);return A.find(e=>t.includes(e))}function O(e,t,n){return n?M.has(e)?[`-g`,`${t}:${n}`]:e===`subl`?[`${t}:${n}`]:[t]:[t]}function k(e,t){let n=N();if(!n)return!1;let i=n.split(` `),a=i[0]??n,o=i.slice(1),s=D(n);if(s){let r=O(s,e,t),i={detached:!0,stdio:`ignore`},c;return c=process.platform===`win32`?w(`${n} ${r.map(e=>`"${e}"`).join(` `)}`,{...i,shell:!0}):w(a,[...o,...r],i),c.on(`error`,e=>_(`editor spawn failed: ${e}`,{level:`error`})),c.unref(),!0}let c=r.get(process.stdout);if(!c)return!1;let l=t&&j.test(C(a));c.enterAlternateScreen();try{let r={stdio:`inherit`},i;return i=process.platform===`win32`?T(`${n} ${l?`+${t} `:``}"${e}"`,{...r,shell:!0}):T(a,[...o,...l?[`+${t}`,e]:[e]],r),i.error?(_(`editor spawn failed: ${i.error}`,{level:`error`}),!1):!0}finally{c.exitAlternateScreen()}}var A,j,M,N,P=e((()=>{n(),i(),h(),S(),A=[`code`,`cursor`,`windsurf`,`codium`,`subl`,`atom`,`gedit`,`notepad++`,`notepad`],j=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,M=new Set([`code`,`cursor`,`windsurf`,`codium`]),N=t(()=>process.env.VISUAL?.trim()?process.env.VISUAL.trim():process.env.EDITOR?.trim()?process.env.EDITOR.trim():process.platform===`win32`?`start /wait notepad`:[`code`,`vi`,`nano`].find(e=>E(e)))}));function F(e){return D(e)!==void 0}function I(e){let t=g(),n=r.get(process.stdout);if(!n)throw Error(`Ink instance not found - cannot pause rendering`);let i=N();if(!i)return{content:null};try{t.statSync(e)}catch{return{content:null}}let a=!F(i);a?n.enterAlternateScreen():(n.pause(),n.suspendStdin());try{return b(`${z[i]??i} "${e}"`,{stdio:`inherit`}),{content:t.readFileSync(e,{encoding:`utf-8`})}}catch(e){if(typeof e==`object`&&e&&`status`in e&&typeof e.status==`number`){let t=e.status;if(t!==0)return{content:null,error:`${o(i)} exited with code ${t}`}}return{content:null}}finally{a?n.exitAlternateScreen():(n.resumeStdin(),n.resume())}}function L(e,t,n){let r=e;for(let[e,t]of Object.entries(n))if(t.type===`text`){let n=parseInt(e,10),i=t.content,a=r.indexOf(i);if(a!==-1){let e=c(n,u(i));r=r.slice(0,a)+e+r.slice(a+i.length)}}return r}function R(e,t){let n=g(),r=a();try{p(r,t?l(e,t):e,{encoding:`utf-8`,flush:!0});let n=I(r);if(n.content===null)return n;let i=n.content;return i.endsWith(`
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{Rn as r,t as i}from"./src-CDCSSo0U2.js";import{Am as a,Dm as o,Tm as s,Xf as c,Zf as l,hS as u,km as d,sS as f}from"./loadAgentsDir-ByO8eJqU.js";import{E as p,S as m,a as h,d as g,l as _,p as v}from"./debug-RZ4NuXyS.js";import{n as y,t as b}from"./execSyncWrapper-dhRSYGFW.js";import{r as x,t as S}from"./which-CHLNJmtJ.js";import{basename as C}from"path";import{spawn as w,spawnSync as T}from"child_process";function E(e){return!!x(e)}function D(e){let t=C(e.split(` `)[0]??``);return A.find(e=>t.includes(e))}function O(e,t,n){return n?M.has(e)?[`-g`,`${t}:${n}`]:e===`subl`?[`${t}:${n}`]:[t]:[t]}function k(e,t){let n=N();if(!n)return!1;let i=n.split(` `),a=i[0]??n,o=i.slice(1),s=D(n);if(s){let r=O(s,e,t),i={detached:!0,stdio:`ignore`},c;return c=process.platform===`win32`?w(`${n} ${r.map(e=>`"${e}"`).join(` `)}`,{...i,shell:!0}):w(a,[...o,...r],i),c.on(`error`,e=>_(`editor spawn failed: ${e}`,{level:`error`})),c.unref(),!0}let c=r.get(process.stdout);if(!c)return!1;let l=t&&j.test(C(a));c.enterAlternateScreen();try{let r={stdio:`inherit`},i;return i=process.platform===`win32`?T(`${n} ${l?`+${t} `:``}"${e}"`,{...r,shell:!0}):T(a,[...o,...l?[`+${t}`,e]:[e]],r),i.error?(_(`editor spawn failed: ${i.error}`,{level:`error`}),!1):!0}finally{c.exitAlternateScreen()}}var A,j,M,N,P=e((()=>{n(),i(),h(),S(),A=[`code`,`cursor`,`windsurf`,`codium`,`subl`,`atom`,`gedit`,`notepad++`,`notepad`],j=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,M=new Set([`code`,`cursor`,`windsurf`,`codium`]),N=t(()=>process.env.VISUAL?.trim()?process.env.VISUAL.trim():process.env.EDITOR?.trim()?process.env.EDITOR.trim():process.platform===`win32`?`start /wait notepad`:[`code`,`vi`,`nano`].find(e=>E(e)))}));function F(e){return D(e)!==void 0}function I(e){let t=g(),n=r.get(process.stdout);if(!n)throw Error(`Ink instance not found - cannot pause rendering`);let i=N();if(!i)return{content:null};try{t.statSync(e)}catch{return{content:null}}let a=!F(i);a?n.enterAlternateScreen():(n.pause(),n.suspendStdin());try{return b(`${z[i]??i} "${e}"`,{stdio:`inherit`}),{content:t.readFileSync(e,{encoding:`utf-8`})}}catch(e){if(typeof e==`object`&&e&&`status`in e&&typeof e.status==`number`){let t=e.status;if(t!==0)return{content:null,error:`${u(i)} exited with code ${t}`}}return{content:null}}finally{a?n.exitAlternateScreen():(n.resumeStdin(),n.resume())}}function L(e,t,n){let r=e;for(let[e,t]of Object.entries(n))if(t.type===`text`){let n=parseInt(e,10),i=t.content,a=r.indexOf(i);if(a!==-1){let e=o(n,d(i));r=r.slice(0,a)+e+r.slice(a+i.length)}}return r}function R(e,t){let n=g(),r=c();try{p(r,t?s(e,t):e,{encoding:`utf-8`,flush:!0});let n=I(r);if(n.content===null)return n;let i=n.content;return i.endsWith(`
2
2
  `)&&!i.endsWith(`
3
3
 
4
- `)&&(i=i.slice(0,-1)),t&&(i=L(i,e,t)),{content:i}}finally{try{n.unlinkSync(r)}catch{}}}var z,B=e((()=>{d(),i(),P(),y(),v(),f(),m(),s(),z={code:`code -w`,subl:`subl --wait`}}));export{P as a,N as i,R as n,k as o,B as r,I as t};
4
+ `)&&(i=i.slice(0,-1)),t&&(i=L(i,e,t)),{content:i}}finally{try{n.unlinkSync(r)}catch{}}}var z,B=e((()=>{a(),i(),P(),y(),v(),f(),m(),l(),z={code:`code -w`,subl:`subl --wait`}}));export{P as a,N as i,R as n,k as o,B as r,I as t};
@@ -1,4 +1,4 @@
1
- import{S as e,a as t,l as n,w as r}from"./debug-BrXObCdR.js";import{c as i,g as a}from"./config-DRDuVyzE.js";import{r as o,t as s}from"./execFileNoThrow-D244NytW.js";import{n as c,t as l}from"./which-CKQnSouy.js";import{n as u,t as d}from"./githubRepoPathMapping-8D0kpsif.js";import{n as f}from"./banner-CWkrK10u.js";import{a as p,i as m,n as h}from"./registerProtocol-wZv2uiW_.js";import{homedir as g}from"os";import{basename as _}from"path";import{spawn as v}from"child_process";e(),m(),h(),a(),t(),o(),l();var y=[{name:`iTerm2`,bundleId:`com.googlecode.iterm2`,app:`iTerm`},{name:`Ghostty`,bundleId:`com.mitchellh.ghostty`,app:`Ghostty`},{name:`Kitty`,bundleId:`net.kovidgoyal.kitty`,app:`kitty`},{name:`Alacritty`,bundleId:`org.alacritty`,app:`Alacritty`},{name:`WezTerm`,bundleId:`com.github.wez.wezterm`,app:`WezTerm`},{name:`Terminal.app`,bundleId:`com.apple.Terminal`,app:`Terminal`}],b=[`ghostty`,`kitty`,`alacritty`,`wezterm`,`gnome-terminal`,`konsole`,`xfce4-terminal`,`mate-terminal`,`tilix`,`xterm`];async function x(){let e=i().deepLinkTerminal;if(e){let t=y.find(t=>t.app===e);if(t)return{name:t.name,command:t.app}}let t=process.env.TERM_PROGRAM;if(t){let e=t.replace(/\.app$/i,``).toLowerCase(),n=y.find(t=>t.app.toLowerCase()===e||t.name.toLowerCase()===e);if(n)return{name:n.name,command:n.app}}for(let e of y){let{code:t,stdout:n}=await s(`mdfind`,[`kMDItemCFBundleIdentifier == "${e.bundleId}"`],{timeout:5e3,useCwd:!1});if(t===0&&n.trim().length>0)return{name:e.name,command:e.app}}for(let e of y){let{code:t}=await s(`ls`,[`/Applications/${e.app}.app`],{timeout:1e3,useCwd:!1});if(t===0)return{name:e.name,command:e.app}}return{name:`Terminal.app`,command:`Terminal`}}async function S(){let e=process.env.TERMINAL;if(e){let t=await c(e);if(t)return{name:_(e),command:t}}let t=await c(`x-terminal-emulator`);if(t)return{name:`x-terminal-emulator`,command:t};for(let e of b){let t=await c(e);if(t)return{name:e,command:t}}return null}async function C(){let e=await c(`wt.exe`);if(e)return{name:`Windows Terminal`,command:e};let t=await c(`pwsh.exe`);if(t)return{name:`PowerShell`,command:t};let n=await c(`powershell.exe`);return n?{name:`PowerShell`,command:n}:{name:`Command Prompt`,command:`cmd.exe`}}async function w(){switch(process.platform){case`darwin`:return x();case`linux`:return S();case`win32`:return C();default:return null}}async function T(e,t){let r=await w();if(!r)return n(`No terminal emulator detected`,{level:`error`}),!1;n(`Launching in terminal: ${r.name} (${r.command})`);let i=[`--deep-link-origin`];switch(t.repo&&(i.push(`--deep-link-repo`,t.repo),t.lastFetchMs!==void 0&&i.push(`--deep-link-last-fetch`,String(t.lastFetchMs))),t.query&&i.push(`--prefill`,t.query),process.platform){case`darwin`:return E(r,e,i,t.cwd);case`linux`:return D(r,e,i,t.cwd);case`win32`:return O(r,e,i,t.cwd);default:return!1}}async function E(e,t,r,i){switch(e.command){case`iTerm`:{let{code:e}=await s(`osascript`,[`-e`,`tell application "iTerm"
1
+ import{S as e,a as t,l as n,w as r}from"./debug-RZ4NuXyS.js";import{c as i,g as a}from"./config-CE058cvr.js";import{r as o,t as s}from"./execFileNoThrow-CCX-JY8h.js";import{n as c,t as l}from"./which-CHLNJmtJ.js";import{n as u,t as d}from"./githubRepoPathMapping-DGr0kJ8D.js";import{n as f}from"./banner-Ca7rki2V.js";import{a as p,i as m,n as h}from"./registerProtocol-DoKqmqu2.js";import{homedir as g}from"os";import{basename as _}from"path";import{spawn as v}from"child_process";e(),m(),h(),a(),t(),o(),l();var y=[{name:`iTerm2`,bundleId:`com.googlecode.iterm2`,app:`iTerm`},{name:`Ghostty`,bundleId:`com.mitchellh.ghostty`,app:`Ghostty`},{name:`Kitty`,bundleId:`net.kovidgoyal.kitty`,app:`kitty`},{name:`Alacritty`,bundleId:`org.alacritty`,app:`Alacritty`},{name:`WezTerm`,bundleId:`com.github.wez.wezterm`,app:`WezTerm`},{name:`Terminal.app`,bundleId:`com.apple.Terminal`,app:`Terminal`}],b=[`ghostty`,`kitty`,`alacritty`,`wezterm`,`gnome-terminal`,`konsole`,`xfce4-terminal`,`mate-terminal`,`tilix`,`xterm`];async function x(){let e=i().deepLinkTerminal;if(e){let t=y.find(t=>t.app===e);if(t)return{name:t.name,command:t.app}}let t=process.env.TERM_PROGRAM;if(t){let e=t.replace(/\.app$/i,``).toLowerCase(),n=y.find(t=>t.app.toLowerCase()===e||t.name.toLowerCase()===e);if(n)return{name:n.name,command:n.app}}for(let e of y){let{code:t,stdout:n}=await s(`mdfind`,[`kMDItemCFBundleIdentifier == "${e.bundleId}"`],{timeout:5e3,useCwd:!1});if(t===0&&n.trim().length>0)return{name:e.name,command:e.app}}for(let e of y){let{code:t}=await s(`ls`,[`/Applications/${e.app}.app`],{timeout:1e3,useCwd:!1});if(t===0)return{name:e.name,command:e.app}}return{name:`Terminal.app`,command:`Terminal`}}async function S(){let e=process.env.TERMINAL;if(e){let t=await c(e);if(t)return{name:_(e),command:t}}let t=await c(`x-terminal-emulator`);if(t)return{name:`x-terminal-emulator`,command:t};for(let e of b){let t=await c(e);if(t)return{name:e,command:t}}return null}async function C(){let e=await c(`wt.exe`);if(e)return{name:`Windows Terminal`,command:e};let t=await c(`pwsh.exe`);if(t)return{name:`PowerShell`,command:t};let n=await c(`powershell.exe`);return n?{name:`PowerShell`,command:n}:{name:`Command Prompt`,command:`cmd.exe`}}async function w(){switch(process.platform){case`darwin`:return x();case`linux`:return S();case`win32`:return C();default:return null}}async function T(e,t){let r=await w();if(!r)return n(`No terminal emulator detected`,{level:`error`}),!1;n(`Launching in terminal: ${r.name} (${r.command})`);let i=[`--deep-link-origin`];switch(t.repo&&(i.push(`--deep-link-repo`,t.repo),t.lastFetchMs!==void 0&&i.push(`--deep-link-last-fetch`,String(t.lastFetchMs))),t.query&&i.push(`--prefill`,t.query),process.platform){case`darwin`:return E(r,e,i,t.cwd);case`linux`:return D(r,e,i,t.cwd);case`win32`:return O(r,e,i,t.cwd);default:return!1}}async function E(e,t,r,i){switch(e.command){case`iTerm`:{let{code:e}=await s(`osascript`,[`-e`,`tell application "iTerm"
2
2
  if running then
3
3
  create window with default profile
4
4
  else
@@ -1,4 +1,4 @@
1
- import{i as e,n as t,o as n,t as r}from"./rolldown-runtime-DaDcL9Zw.js";import{n as i,t as a}from"./memoize-BK3gG5ob.js";import{a as o,l as s,o as c}from"./envUtils-DSxRz_kt.js";import{i as l,n as u,r as d,t as f}from"./defineProperty-C-QyHrDq.js";import{a as p,c as m,i as h,n as g,o as _,r as v,s as y,t as b}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as x,t as S}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import{t as C}from"./src-DCUgdrYl.js";import{n as w,t as T}from"./axios-DaWTGg7G.js";import{a as E,d as D,l as O,p as k}from"./debug-BrXObCdR.js";import A from"assert";import{Agent as j}from"https";import*as M from"http";import{URL as N}from"url";import*as P from"net";import*as F from"tls";var I=t((()=>{})),L,R,z=t((()=>{I(),L=Symbol(`AgentBaseInternalState`),R=class extends M.Agent{constructor(e){super(e),this[L]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`&&t.split(`
1
+ import{i as e,n as t,o as n,t as r}from"./rolldown-runtime-DaDcL9Zw.js";import{n as i,t as a}from"./memoize-BK3gG5ob.js";import{a as o,l as s,o as c}from"./envUtils-DSxRz_kt.js";import{i as l,n as u,r as d,t as f}from"./defineProperty-C-QyHrDq.js";import{a as p,c as m,i as h,n as g,o as _,r as v,s as y,t as b}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as x,t as S}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import{t as C}from"./src-DCUgdrYl.js";import{n as w,t as T}from"./axios-DaWTGg7G.js";import{a as E,d as D,l as O,p as k}from"./debug-RZ4NuXyS.js";import A from"assert";import{Agent as j}from"https";import*as M from"http";import{URL as N}from"url";import*as P from"net";import*as F from"tls";var I=t((()=>{})),L,R,z=t((()=>{I(),L=Symbol(`AgentBaseInternalState`),R=class extends M.Agent{constructor(e){super(e),this[L]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`&&t.split(`
2
2
  `).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new P.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?j.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof M.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[L].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[L].currentSocket;if(this[L].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[L].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[L]&&(this[L].defaultPort=e)}get protocol(){return this[L].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[L]&&(this[L].protocol=e)}}}));function B(e){return new Promise((t,n)=>{let r=0,i=[];function a(){let t=e.read();t?l(t):e.once(`readable`,a)}function o(){e.removeListener(`end`,s),e.removeListener(`error`,c),e.removeListener(`readable`,a)}function s(){o(),H(`onend`),n(Error(`Proxy connection ended before receiving CONNECT response`))}function c(e){o(),H(`onerror %o`,e),n(e)}function l(s){i.push(s),r+=s.length;let c=Buffer.concat(i,r),l=c.indexOf(`\r
3
3
  \r
4
4
  `);if(l===-1){H(`have not received end of HTTP headers yet...`),a();return}let u=c.slice(0,l).toString(`ascii`).split(`\r
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{join as t}from"node:path";import{appendFileSync as n,existsSync as r,mkdirSync as i}from"node:fs";import{homedir as a}from"node:os";function o(){let e=t(a(),`.claude`);r(e)||i(e,{recursive:!0})}function s(e){try{l||(o(),n(c,`\n===== RC-DEBUG session ${new Date().toISOString()} =====\n`),l=!0);let t=new Date().toISOString().slice(11,23);n(c,`[${t}] ${e}\n`)}catch{}}var c,l,u=e((()=>{c=t(a(),`.claude`,`rc-debug.log`),l=!1}));export{s as n,u as t};