@readmagic/workmate 0.0.7 → 0.0.9

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 (623) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-qFZy3FOD.js +1 -0
  2. package/dist/chunks/App-DW4elk6E.js +1 -0
  3. package/dist/chunks/ApproveApiKey-D05WywHU.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DHAbdwkC.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-QgFwoaaC.js +2 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-BuRFF1fQ.js +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-CDrArsSX.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-DpecRCAt.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-D1MYL1dJ.js +1 -0
  10. package/dist/chunks/DiffDialog-BIcwpgSr.js +6 -0
  11. package/dist/chunks/Doctor-D160J8Ad.js +3 -0
  12. package/dist/chunks/Doctor-VhJi2cmL.js +1 -0
  13. package/dist/chunks/ExitFlow-CoWHhKHJ.js +2 -0
  14. package/dist/chunks/Grove-BmirUB6V.js +11 -0
  15. package/dist/chunks/{HybridTransport-rK83Qijz.js → HybridTransport-BVmSUHf0.js} +3 -3
  16. package/dist/chunks/InvalidConfigDialog-WRywkKeS.js +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-C4n3A72C.js +1 -0
  18. package/dist/chunks/MCPConnectionManager-DPFe4hPh.js +1 -0
  19. package/dist/chunks/MCPToolListView-BPmE0C2o.js +1 -0
  20. package/dist/chunks/McpParsingWarnings-CH4yyMAL.js +1 -0
  21. package/dist/chunks/MessageSelector-kOn2GaU-.js +3 -0
  22. package/dist/chunks/Messages-4EnHFeh1.js +11 -0
  23. package/dist/chunks/Onboarding-BboWs1pp.js +1 -0
  24. package/dist/chunks/{PermissionDialog-0ya1CU5k.js → PermissionDialog-Cb3z8OUP.js} +1 -1
  25. package/dist/chunks/{PressEnterToContinue-Dl9Hg9Mf.js → PressEnterToContinue-Dq0Imo9c.js} +1 -1
  26. package/dist/chunks/PromptInputFooterSuggestions-BpC9COmh.js +1 -0
  27. package/dist/chunks/PromptInputHelpMenu-BvcAzbSi.js +1 -0
  28. package/dist/chunks/QueryEngine-J6ElcO16.js +1 -0
  29. package/dist/chunks/REPL-DBjbAJsm.js +133 -0
  30. package/dist/chunks/REPL-oBemMXvp.js +1 -0
  31. package/dist/chunks/RemoteSessionManager-CoIyFKKa.js +2 -0
  32. package/dist/chunks/ResumeConversation-wBG8OD9P.js +1 -0
  33. package/dist/chunks/{SSETransport-5VK5okFv.js → SSETransport-1KBBUikF.js} +3 -3
  34. package/dist/chunks/{Dialog-vfLXEPed.js → SearchBox-C9vUA4IM.js} +1 -1
  35. package/dist/chunks/SearchExtraToolsTool-BugrzImr.js +1 -0
  36. package/dist/chunks/Settings-DptKuJE7.js +2 -0
  37. package/dist/chunks/TeleportProgress-BmgPAZAi.js +1 -0
  38. package/dist/chunks/TeleportRepoMismatchDialog-sgxNOeM_.js +1 -0
  39. package/dist/chunks/TeleportResumeWrapper-GptvrUdv.js +1 -0
  40. package/dist/chunks/ThemePicker-gAMqqD1P.js +1 -0
  41. package/dist/chunks/TrustDialog-CWt-4Evl.js +1 -0
  42. package/dist/chunks/{ValidationErrorsList-BYsDtAvX.js → ValidationErrorsList-De3kzHtz.js} +1 -1
  43. package/dist/chunks/{WelcomeV2-C1BfrqC5.js → WelcomeV2-BWF-cJOu.js} +1 -1
  44. package/dist/chunks/add-dir-DBVT1cEK.js +1 -0
  45. package/dist/chunks/{agentDisplay-CMmHIl86.js → agentDisplay-5gnCQwUY.js} +1 -1
  46. package/dist/chunks/{agents-DE_4mAHG.js → agents-Bz1MLp4A.js} +1 -1
  47. package/dist/chunks/agents-CnwTOlqO.js +103 -0
  48. package/dist/chunks/allErrors-DYw_q14e.js +1 -0
  49. package/dist/chunks/analytics-DJobLaWP.js +1 -0
  50. package/dist/chunks/api-DXDXTFGa.js +1 -0
  51. package/dist/chunks/api-DzccRM_z.js +1 -0
  52. package/dist/chunks/auth-Cjnyy10u.js +15 -0
  53. package/dist/chunks/auth-CnLb6RWc.js +1 -0
  54. package/dist/chunks/auth-D-SGHS0K.js +1 -0
  55. package/dist/chunks/{autoMode-ZW70mpr0.js → autoMode-CQ5nqP9c.js} +5 -5
  56. package/dist/chunks/{autonomy-CwbWsCnv.js → autonomy-CPUCe-YU.js} +1 -1
  57. package/dist/chunks/autonomy-dSJl0hN1.js +15 -0
  58. package/dist/chunks/{autonomyPanel-Mq50H7iM.js → autonomyPanel-Ccr9ilei.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping--cs5crp7.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-CcbHitKC.js +1 -0
  61. package/dist/chunks/{banner-CWkrK10u.js → banner-BJZNMppT.js} +2 -2
  62. package/dist/chunks/bg-DWloqGwk.js +1 -0
  63. package/dist/chunks/{bg-WnYN5ifx.js → bg-w3Vlsm3Y.js} +2 -2
  64. package/dist/chunks/branch-CG0AKS1J.js +3 -0
  65. package/dist/chunks/{break-cache-C_p7Kmx2.js → break-cache-DXV0brco.js} +2 -2
  66. package/dist/chunks/bridgeConfig-Dmc1ZDev.js +1 -0
  67. package/dist/chunks/{bridgeConfig-CE6dMsiJ.js → bridgeConfig-vORehbGG.js} +1 -1
  68. package/dist/chunks/bridgeMessaging-DlczTV9X.js +1 -0
  69. package/dist/chunks/bridgePointer-D4W9GpWw.js +1 -0
  70. package/dist/chunks/btw-DDUC_t0w.js +1 -0
  71. package/dist/chunks/caches-1IFb6_M_.js +1 -0
  72. package/dist/chunks/caches-CB8MHqy2.js +1 -0
  73. package/dist/chunks/capacityWake-L7b1mMft.js +3 -0
  74. package/dist/chunks/ccrClient-CG6HTv_n.js +1 -0
  75. package/dist/chunks/{claudeDesktop-Fe-QL-sN.js → claudeDesktop-CAmnheYx.js} +1 -1
  76. package/dist/chunks/{clear-D8m2utXW.js → clear-DdWexxbM.js} +1 -1
  77. package/dist/chunks/{cliLaunch-BkPAatcs.js → cliLaunch-BWWOgBFh.js} +1 -1
  78. package/dist/chunks/{client-C6MbjvOB.js → client-CoXtVRzi.js} +1 -1
  79. package/dist/chunks/client-Crrwkw7g.js +1 -0
  80. package/dist/chunks/client-D8hKghba.js +1 -0
  81. package/dist/chunks/color-Cuq0c6xy.js +1 -0
  82. package/dist/chunks/commands-D3sESsTp.js +1 -0
  83. package/dist/chunks/compact-DIpwuBDq.js +2 -0
  84. package/dist/chunks/config-CVvUNkj2.js +1 -0
  85. package/dist/chunks/config-D4G8_MqJ.js +3 -0
  86. package/dist/chunks/config-q9D4hFiK.js +1 -0
  87. package/dist/chunks/context-BWcfhhDj.js +1 -0
  88. package/dist/chunks/context-noninteractive-Bwt9A3XD.js +1 -0
  89. package/dist/chunks/context-noninteractive-c7jGVWHQ.js +29 -0
  90. package/dist/chunks/conversation-Bjo_8kia.js +1 -0
  91. package/dist/chunks/conversation-DrHZIQX2.js +1 -0
  92. package/dist/chunks/{createSSHSession-BOdTAX3N.js → createSSHSession-DP7B8yvb.js} +1 -1
  93. package/dist/chunks/createSession-CPo6GBSb.js +1 -0
  94. package/dist/chunks/createSession-DnykRoia.js +1 -0
  95. package/dist/chunks/crossProjectResume-D2A-qjgP.js +40 -0
  96. package/dist/chunks/cwd--q1ONL7P.js +1 -0
  97. package/dist/chunks/cwd-L4wygFqJ.js +1 -0
  98. package/dist/chunks/{daemon-YtZbMQtn.js → daemon-D2vFIVOz.js} +1 -1
  99. package/dist/chunks/datadog-DrmHyl3_.js +1 -0
  100. package/dist/chunks/{debug-BrXObCdR.js → debug-BdqxZ7rV.js} +4 -4
  101. package/dist/chunks/debugUtils-CezNYZ-4.js +1 -0
  102. package/dist/chunks/{detached-TYk4hMFj.js → detached-CkPpYMJj.js} +1 -1
  103. package/dist/chunks/detectRepository-DA1Q_Skc.js +1 -0
  104. package/dist/chunks/{detectRepository-BPr0VWNO.js → detectRepository-DvxoaPlk.js} +1 -1
  105. package/dist/chunks/{diff-CJEKvOA5.js → diff-DHzz9WAp.js} +1 -1
  106. package/dist/chunks/directoryCompletion-D5AvL7TF.js +1 -0
  107. package/dist/chunks/doctor-PWqB46xd.js +1 -0
  108. package/dist/chunks/entry-4JtoJONR.js +14 -0
  109. package/dist/chunks/envUtils-BDhHQY0-.js +1 -0
  110. package/dist/chunks/esm-DcIr7tVd.js +1 -0
  111. package/dist/chunks/{execFileNoThrow-D244NytW.js → execFileNoThrow-5SylUnAI.js} +1 -1
  112. package/dist/chunks/{execSyncWrapper-CCMQShK-.js → execSyncWrapper-DKuxVTaf.js} +1 -1
  113. package/dist/chunks/exit-OW9g7b9A.js +1 -0
  114. package/dist/chunks/{lazySchema-DULtBUCI.js → external-CEp-aPkt.js} +1 -1
  115. package/dist/chunks/extraUsage-Dt5mw35U.js +1 -0
  116. package/dist/chunks/extractMemories-1VlmCGwa.js +1 -0
  117. package/dist/chunks/fast-ClYQcEv5.js +1 -0
  118. package/dist/chunks/fast-CrvLdpy3.js +1 -0
  119. package/dist/chunks/fileSuggestions-fNxREjpe.js +3 -0
  120. package/dist/chunks/firstPartyEventLogger-BBXEQUf0.js +1 -0
  121. package/dist/chunks/firstPartyEventLogger-DhEPWcit.js +5 -0
  122. package/dist/chunks/flushGate-ch-Tvwjj.js +1 -0
  123. package/dist/chunks/{fpsMetrics-Cf_hdtiJ.js → fpsMetrics-DffAomdg.js} +1 -1
  124. package/dist/chunks/gemini-fZ0VPU2A.js +1 -0
  125. package/dist/chunks/generateRecap-BIBVlB__.js +1 -0
  126. package/dist/chunks/generateSessionName-nZj_VvKZ.js +1 -0
  127. package/dist/chunks/{genericProcessUtils-CdQTApYX.js → genericProcessUtils-BmDSLcMf.js} +1 -1
  128. package/dist/chunks/git-B9uvt96d.js +6 -0
  129. package/dist/chunks/git-BfS5Hk4S.js +1 -0
  130. package/dist/chunks/githubRepoPathMapping-Cqx3pSfc.js +1 -0
  131. package/dist/chunks/goal-IasZVqKh.js +3 -0
  132. package/dist/chunks/grok-Dk3LyzMa.js +1 -0
  133. package/dist/chunks/grove-BE4fQ6tG.js +7 -0
  134. package/dist/chunks/help-D2-v9Ug9.js +1 -0
  135. package/dist/chunks/{hooks-CkA9bhHl.js → hooks-BrKy5XWQ.js} +2 -2
  136. package/dist/chunks/hooks-DGd02IKF.js +1 -0
  137. package/dist/chunks/initReplBridge-RhCAlmHE.js +1 -0
  138. package/dist/chunks/{install-Dzlm4u58.js → install-CVGZ55wV.js} +1 -1
  139. package/dist/chunks/{instrumentation-Yt31gxWN.js → instrumentation-BmWotlxR.js} +4 -4
  140. package/dist/chunks/{job-BXujwZNa.js → job-DEXxW_Zo.js} +1 -1
  141. package/dist/chunks/{jwtUtils-DE2GPUcx.js → jwtUtils-C9sdGhvT.js} +1 -1
  142. package/dist/chunks/keybindings-BRdSOSUD.js +2 -0
  143. package/dist/chunks/language-C0cIpKE2.js +1 -0
  144. package/dist/chunks/{language-Ca4B018X.js → language-CxThoWRC.js} +1 -1
  145. package/dist/chunks/launchLocalMemory-CLSSVFoj.js +3 -0
  146. package/dist/chunks/launchOnboarding-BkJfKviO.js +8 -0
  147. package/dist/chunks/lazySchema-B4D4qJVE.js +1 -0
  148. package/dist/chunks/loadAgentsDir-8UprzS4w.js +1 -0
  149. package/dist/chunks/{loadAgentsDir-x3rlgED4.js → loadAgentsDir-CKSb56Gp.js} +1651 -2004
  150. package/dist/chunks/loadPluginHooks-LbaURHVH.js +1 -0
  151. package/dist/chunks/{localSearch-DtplGF-l.js → localSearch-CPOnyi8I.js} +1 -1
  152. package/dist/chunks/localSearch-DNjbr4S9.js +1 -0
  153. package/dist/chunks/log-CTFl4qpD.js +1 -0
  154. package/dist/chunks/logoV2Utils-we1sfJvf.js +1 -0
  155. package/dist/chunks/{magicDocs-qdDB_mKb.js → magicDocs-DmKlTQvK.js} +3 -3
  156. package/dist/chunks/main-BIiwW4mM.js +605 -0
  157. package/dist/chunks/{main-D862LI_d.js → main-ClXu1ilx.js} +2 -2
  158. package/dist/chunks/{managedEnv-Aq5BXfY7.js → managedEnv-Cl7YbYzf.js} +1 -1
  159. package/dist/chunks/managedEnv-CpiiQx_v.js +1 -0
  160. package/dist/chunks/{mappers-04gNXJ3w.js → mappers-xQC-Z4-h.js} +1 -1
  161. package/dist/chunks/mcp-B_m1XBDt.js +6 -0
  162. package/dist/chunks/mcp-BiyfH9Sd.js +1 -0
  163. package/dist/chunks/mcp-BjlaPUWX.js +2 -0
  164. package/dist/chunks/memoize-FJv2HV1u.js +1 -0
  165. package/dist/chunks/memory-LN8f_p2b.js +1 -0
  166. package/dist/chunks/{modalContext-DFjKLCB6.js → modalContext-CUThy6Ph.js} +1 -1
  167. package/dist/chunks/mode-lYTs0XHs.js +2 -0
  168. package/dist/chunks/model-C2e73CJD.js +1 -0
  169. package/dist/chunks/model-CvmS-Esk.js +1 -0
  170. package/dist/chunks/model-DJ8mFfuR.js +1 -0
  171. package/dist/chunks/modelOptions-efCGKnXT.js +1 -0
  172. package/dist/chunks/nativeInstaller-DQIFwdat.js +1 -0
  173. package/dist/chunks/oauth-BN2I0_jl.js +1 -0
  174. package/dist/chunks/oauth-C9VBDB0Y.js +1 -0
  175. package/dist/chunks/observationStore-BpjlK0pG.js +3 -0
  176. package/dist/chunks/omit-CLPZGevl.js +1 -0
  177. package/dist/chunks/onChangeAppState-DhBO34OK.js +1 -0
  178. package/dist/chunks/{openai-EYRnUsco.js → openai-DJLYqiRl.js} +3 -3
  179. package/dist/chunks/{panel-BSZGX6jN.js → panel-q0_iT9cg.js} +1 -1
  180. package/dist/chunks/panelCall-sum-3zvi.js +1 -0
  181. package/dist/chunks/parser-BcdhBGx0.js +1 -0
  182. package/dist/chunks/{parser-DFwaTGf7.js → parser-BdCj2GrE.js} +1 -1
  183. package/dist/chunks/partition-CpfoVrg1.js +1 -0
  184. package/dist/chunks/permissions-DTb9wkAP.js +3 -0
  185. package/dist/chunks/pidLock-BR5M6RQw.js +3 -0
  186. package/dist/chunks/{pipeTransport-CqCnc-Ys.js → pipeTransport-B3TIkTAp.js} +1 -1
  187. package/dist/chunks/plan-BeoIjNPv.js +1 -0
  188. package/dist/chunks/{platform-BrYefG_2.js → platform-D6IMiyqT.js} +1 -1
  189. package/dist/chunks/plugin-D_dHjTud.js +17 -0
  190. package/dist/chunks/pluginAutoupdate-BHKlOOXI.js +1 -0
  191. package/dist/chunks/pluginBlocklist-D93Hd1GF.js +1 -0
  192. package/dist/chunks/pluginCliCommands-vv0wNt4O.js +1 -0
  193. package/dist/chunks/pluginFlagging-CxuRF2Vc.js +1 -0
  194. package/dist/chunks/pluginOperations-BTq4AjYB.js +2 -0
  195. package/dist/chunks/pluginStartupCheck-B6leNWq9.js +1 -0
  196. package/dist/chunks/pluginStartupCheck-DBOCHUHQ.js +1 -0
  197. package/dist/chunks/plugins-pmipe7kE.js +4 -0
  198. package/dist/chunks/pollConfig-BgpfHQPJ.js +1 -0
  199. package/dist/chunks/{poorMode-CBOtooa0.js → poorMode-BxsyllUK.js} +1 -1
  200. package/dist/chunks/poorMode-iV1NwC5L.js +1 -0
  201. package/dist/chunks/print-CAUvczBM.js +23 -0
  202. package/dist/chunks/processBashCommand-CdeQg_c6.js +1 -0
  203. package/dist/chunks/processSlashCommand-CbkshIC6.js +5 -0
  204. package/dist/chunks/{projectContext-D9MDwJUF.js → projectContext-CIxul6vA.js} +1 -1
  205. package/dist/chunks/{projectContext-BaDZBAoK.js → projectContext-RUMJB798.js} +1 -1
  206. package/dist/chunks/prompt-CybUvG8G.js +139 -0
  207. package/dist/chunks/prompt-RBn4JdEg.js +1 -0
  208. package/dist/chunks/prompt-Rb8zXlDo.js +1 -0
  209. package/dist/chunks/promptEditor-0Ug93P2I.js +4 -0
  210. package/dist/chunks/{protocolHandler-JR8pASdH.js → protocolHandler-ClfbHTjI.js} +1 -1
  211. package/dist/chunks/{proxy-CRN7jYIi.js → proxy-Blq4W6Ox.js} +1 -1
  212. package/dist/chunks/rcDebugLog-CARUIORE.js +1 -0
  213. package/dist/chunks/reconciler-Drq3HSkj.js +4 -0
  214. package/dist/chunks/refresh-D8TLHO_T.js +1 -0
  215. package/dist/chunks/registerProtocol-3_ozAuDK.js +36 -0
  216. package/dist/chunks/reload-plugins-Dn1ibOiI.js +1 -0
  217. package/dist/chunks/remoteBridgeCore-Dpg6Se9C.js +1 -0
  218. package/dist/chunks/remoteManagedSettings-CCrq-qL-.js +1 -0
  219. package/dist/chunks/rename-CKsSc7Z3.js +1 -0
  220. package/dist/chunks/{renderOptions-BUJB9nAm.js → renderOptions-CLcco6fc.js} +1 -1
  221. package/dist/chunks/replBridgeHandle-DNC797_T.js +1 -0
  222. package/dist/chunks/resume-B1a5gLVR.js +2 -0
  223. package/dist/chunks/ripgrep-BisRODQ2.js +1 -0
  224. package/dist/chunks/{ripgrep-BXmXjAzA.js → ripgrep-DkL2S7-I.js} +1 -1
  225. package/dist/chunks/{runtimeObserver-CiwnPFjK.js → runtimeObserver-B0xfyLiA.js} +1 -1
  226. package/dist/chunks/runtimeObserver-DonWCJOx.js +10 -0
  227. package/dist/chunks/sandbox-adapter-BnBOSkKJ.js +1 -0
  228. package/dist/chunks/sandbox-toggle-CSdnHWp-.js +1 -0
  229. package/dist/chunks/searchExtraTools-DbgfnQkH.js +1 -0
  230. package/dist/chunks/session-BbQlh2S5.js +2 -0
  231. package/dist/chunks/sessionFileAccessHooks-Xfr1NiXG.js +1 -0
  232. package/dist/chunks/sessionIdCompat-DMayYBrf.js +1 -0
  233. package/dist/chunks/sessionMemory-7UOFdp29.js +1 -0
  234. package/dist/chunks/sessionMemory-fAzgAS7Q.js +1 -0
  235. package/dist/chunks/sessionMemoryUtils-DVjFw5Bd.js +1 -0
  236. package/dist/chunks/sessionObserver-Cl26OdaW.js +1 -0
  237. package/dist/chunks/sessionObserver-XV6N0XER.js +20 -0
  238. package/dist/chunks/sessionState-BvECKycx.js +11 -0
  239. package/dist/chunks/sessionStorage-DSj9yZkl.js +1 -0
  240. package/dist/chunks/{sessionStoragePortable-Cx6JQ5Ye.js → sessionStoragePortable-JZnGwqUM.js} +1 -1
  241. package/dist/chunks/sessionTitle-E1FvsKM9.js +14 -0
  242. package/dist/chunks/sessionTracing-ClGQ08jM.js +11 -0
  243. package/dist/chunks/settings-B-R9ZJNY.js +1 -0
  244. package/dist/chunks/settings-Xbq6AaD-.js +20 -0
  245. package/dist/chunks/settingsSync-NCN0a4sc.js +1 -0
  246. package/dist/chunks/setup-uZ0dSekt.js +3 -0
  247. package/dist/chunks/shadowedRuleDetection-B9iSx6mB.js +1 -0
  248. package/dist/chunks/{shellQuote-DkSy9MYE.js → shellQuote-Bth6IZgX.js} +1 -1
  249. package/dist/chunks/{sideQuestion-hUhxls9r.js → sideQuestion-D2dPToW8.js} +3 -3
  250. package/dist/chunks/sinks-C7q46rvE.js +2 -0
  251. package/dist/chunks/sinks-D3bXeHlQ.js +1 -0
  252. package/dist/chunks/skillChangeDetector-C1EJ7rUL.js +1 -0
  253. package/dist/chunks/skillGapStore-DylpOKJ6.js +5 -0
  254. package/dist/chunks/skillLifecycle-GK-8eyyn.js +8 -0
  255. package/dist/chunks/{skillSearchPanel-Cll9ccA5.js → skillSearchPanel-mpaC62y4.js} +4 -4
  256. package/dist/chunks/skills-t6krW8GZ.js +1 -0
  257. package/dist/chunks/{src-D06Xyj4g.js → src-BN7QRYLl.js} +1 -1
  258. package/dist/chunks/{src-CDCSSo0U2.js → src-P_wYS_NJ2.js} +1 -1
  259. package/dist/chunks/{src-CST_jFnT.js → src-r6ZFgWPx2.js} +1 -1
  260. package/dist/chunks/startupProfiler-BaiXZ9tr.js +1 -0
  261. package/dist/chunks/startupProfiler-jeId9f2i.js +3 -0
  262. package/dist/chunks/state-B4HwLt8i.js +1 -0
  263. package/dist/chunks/{state-Cn_m2NOf.js → state-BAGmpVBn.js} +1 -1
  264. package/dist/chunks/state-Bs5xweDL.js +1 -0
  265. package/dist/chunks/{staticRender-BIxpgNUq.js → staticRender-DrU6eWoq.js} +1 -1
  266. package/dist/chunks/{stats-CqfF4Axp.js → stats-BJBhl-Lc.js} +1 -1
  267. package/dist/chunks/{status-CC9Q-2Yn.js → status-BtsnKNVY.js} +1 -1
  268. package/dist/chunks/status-nZQEar7T.js +2 -0
  269. package/dist/chunks/statusNoticeHelpers-DMqRGFOh.js +1 -0
  270. package/dist/chunks/{stringUtils-DGLPkqJ4.js → stringUtils-CbS6OkmE.js} +1 -1
  271. package/dist/chunks/subprocessEnv-CZkA9Cdp.js +1 -0
  272. package/dist/chunks/{subprocessEnv-vrwzMgKn.js → subprocessEnv-Ci8VV_bi.js} +1 -1
  273. package/dist/chunks/switcher-77h2J5HC.js +1 -0
  274. package/dist/chunks/switcher-B2CYzCC_.js +1 -0
  275. package/dist/chunks/syncCache-By_-buUC.js +1 -0
  276. package/dist/chunks/tasks-BNrdmF9p.js +1 -0
  277. package/dist/chunks/teleport-mdnhIZBj.js +1 -0
  278. package/dist/chunks/{templateJobs-D1BdhZsv.js → templateJobs-Dkv4I9c1.js} +1 -1
  279. package/dist/chunks/{terminalSetup-Cn6jeYw1.js → terminalSetup-DQopnSPR.js} +1 -1
  280. package/dist/chunks/terminalSetup-DTGm1Eo2.js +33 -0
  281. package/dist/chunks/{theme-Cg4GNOoQ.js → theme-BjpBVRf5.js} +1 -1
  282. package/dist/chunks/{tmux-BY7IdQ1f.js → tmux-CMRiI6CD.js} +1 -1
  283. package/dist/chunks/{toolEventObserver-SFwURL5F.js → toolEventObserver-D-sNBvOe.js} +1 -1
  284. package/dist/chunks/toolPool-Di30gn_Y.js +1 -0
  285. package/dist/chunks/trustedDevice-CupLMpO8.js +1 -0
  286. package/dist/chunks/{trustedDevice-CKedohmT.js → trustedDevice-j1u2TG5U.js} +1 -1
  287. package/dist/chunks/{types-Dut4311z.js → types-DWRxAH0E.js} +2 -2
  288. package/dist/chunks/{udsClient-BuCtv7dN.js → udsClient-Cm3HqYUu.js} +1 -1
  289. package/dist/chunks/{updateCCB-C2G-U-qA.js → updateCCB-BlUAU2Vp.js} +8 -8
  290. package/dist/chunks/{upstreamproxy-DyR_eXO8.js → upstreamproxy-DDVMwoRi.js} +1 -1
  291. package/dist/chunks/useExitOnCtrlCDWithKeybindings-D2FvHieH.js +1 -0
  292. package/dist/chunks/useMainLoopModel-ylPQNj7Z.js +1 -0
  293. package/dist/chunks/useManagePlugins-BbWJNLe8.js +1 -0
  294. package/dist/chunks/useMergedTools-B-Z9XQ6U.js +1 -0
  295. package/dist/chunks/useSearchInput-C6d6nt9S.js +1 -0
  296. package/dist/chunks/useSettingsErrors-DKh4rkGi.js +1 -0
  297. package/dist/chunks/userAgent-Ng_TTjWr.js +1 -0
  298. package/dist/chunks/util-D-X8i5Z2.js +1 -0
  299. package/dist/chunks/validatePlugin-DSw08u76.js +1 -0
  300. package/dist/chunks/vim-3mUqsEJm.js +1 -0
  301. package/dist/chunks/{which-CKQnSouy.js → which-DznMOwny.js} +1 -1
  302. package/dist/chunks/windowsPaths-1mgenSWa.js +1 -0
  303. package/dist/chunks/{windowsPaths-DtapVxOo.js → windowsPaths-BVztIhXM.js} +1 -1
  304. package/dist/chunks/{workSecret-CNWiR2uQ.js → workSecret-DtiFreRl.js} +1 -1
  305. package/dist/chunks/workerRegistry-DdOYjLm3.js +6 -0
  306. package/dist/chunks/worktree-BX1ULzrw.js +1 -0
  307. package/dist/cli.js +1 -1
  308. package/package.json +1 -1
  309. package/dist/chunks/AddWorkspaceDirectory-CFrrXnt9.js +0 -1
  310. package/dist/chunks/App-Buad9Llp.js +0 -1
  311. package/dist/chunks/ApproveApiKey-B2HJUD7h.js +0 -1
  312. package/dist/chunks/ApproveApiKey-BQbHdvc3.js +0 -1
  313. package/dist/chunks/AssistantSessionChooser-4lm4eXQ8.js +0 -1
  314. package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +0 -2
  315. package/dist/chunks/BypassPermissionsModeDialog-DllL8dxU.js +0 -1
  316. package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +0 -1
  317. package/dist/chunks/ClaudeMdExternalIncludesDialog-BZSyRqeq.js +0 -1
  318. package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +0 -1
  319. package/dist/chunks/DesktopHandoff-DaP4Riar.js +0 -1
  320. package/dist/chunks/DiffDialog-B7hx8i_Y.js +0 -6
  321. package/dist/chunks/Doctor-89OgoAUA.js +0 -1
  322. package/dist/chunks/Doctor-CuKJ-nGt.js +0 -3
  323. package/dist/chunks/ExitFlow-DnPydE17.js +0 -2
  324. package/dist/chunks/Feedback-SmGiR3mf.js +0 -2
  325. package/dist/chunks/Grove-CjN9DO47.js +0 -11
  326. package/dist/chunks/Grove-Cq88VBmM.js +0 -1
  327. package/dist/chunks/InvalidConfigDialog-DdO0AxyF.js +0 -1
  328. package/dist/chunks/InvalidSettingsDialog-s1G0DwXF.js +0 -1
  329. package/dist/chunks/ListItem-vfLXEPed.js +0 -1
  330. package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +0 -1
  331. package/dist/chunks/McpParsingWarnings-Du5IxZos.js +0 -1
  332. package/dist/chunks/MessageSelector-iIroHvXo.js +0 -3
  333. package/dist/chunks/Messages-D4Hm4gaY.js +0 -11
  334. package/dist/chunks/Onboarding-BiZByBK-.js +0 -1
  335. package/dist/chunks/OverageCreditUpsell-BM7szLgm.js +0 -1
  336. package/dist/chunks/PluginSettings-uY5KTCtK.js +0 -17
  337. package/dist/chunks/PromptInputFooterSuggestions-BmsFdOu9.js +0 -1
  338. package/dist/chunks/PromptInputHelpMenu-DX-0wEDo.js +0 -1
  339. package/dist/chunks/QueryEngine-CGYaShXD.js +0 -1
  340. package/dist/chunks/REPL-CRJB2t2z.js +0 -142
  341. package/dist/chunks/REPL-u4Yq29Du.js +0 -1
  342. package/dist/chunks/RemoteCallout-B-tyvQOe.js +0 -1
  343. package/dist/chunks/RemoteSessionManager-DCd0O5_l.js +0 -2
  344. package/dist/chunks/ResumeConversation-DAAXlOCd.js +0 -1
  345. package/dist/chunks/SearchBox-vfLXEPed.js +0 -1
  346. package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +0 -1
  347. package/dist/chunks/Settings-CUjWlncb.js +0 -2
  348. package/dist/chunks/TeleportProgress-DxN0bQL2.js +0 -1
  349. package/dist/chunks/TeleportRepoMismatchDialog-A5Ss0kuk.js +0 -1
  350. package/dist/chunks/TeleportResumeWrapper-Bz14mUqR.js +0 -1
  351. package/dist/chunks/ThemePicker-CVSRqTzW.js +0 -1
  352. package/dist/chunks/TrustDialog-CY8an_Tg.js +0 -1
  353. package/dist/chunks/TungstenTool-Cb7gJvq4.js +0 -1
  354. package/dist/chunks/TungstenTool-CxMQVCuF.js +0 -1
  355. package/dist/chunks/add-dir-DfLYgwox.js +0 -1
  356. package/dist/chunks/agents-DJtPfvnL.js +0 -103
  357. package/dist/chunks/allErrors-CQE2k0zO.js +0 -1
  358. package/dist/chunks/analytics-BotDBGh0.js +0 -1
  359. package/dist/chunks/ant-ClQkuQjZ.js +0 -1
  360. package/dist/chunks/api-2cdIPaeq.js +0 -1
  361. package/dist/chunks/api-CG-lhKe-.js +0 -1
  362. package/dist/chunks/asciicast-BsWpcxrc.js +0 -1
  363. package/dist/chunks/asciicast-CbAjUHT_.js +0 -4
  364. package/dist/chunks/assistant-Bje16tQx.js +0 -1
  365. package/dist/chunks/assistant-C83quuNj.js +0 -1
  366. package/dist/chunks/assistant-z2o4-UJe.js +0 -1
  367. package/dist/chunks/auth-DMfEiQrC.js +0 -1
  368. package/dist/chunks/auth-D_cGl8WD.js +0 -1
  369. package/dist/chunks/auth-DqcKPbw8.js +0 -15
  370. package/dist/chunks/autonomy-Oui8yK8G.js +0 -15
  371. package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +0 -1
  372. package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +0 -17
  373. package/dist/chunks/bg-B0iMGM9C.js +0 -1
  374. package/dist/chunks/branch-DU5O9KZ0.js +0 -3
  375. package/dist/chunks/bridge-DNNxtPlz.js +0 -2
  376. package/dist/chunks/bridgeConfig-DP9dD1Cv.js +0 -1
  377. package/dist/chunks/bridgeEnabled-Cc0mGlTb.js +0 -1
  378. package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +0 -1
  379. package/dist/chunks/bridgeMain-CwxMa_pd.js +0 -1
  380. package/dist/chunks/bridgeMain-D11t1BYQ.js +0 -68
  381. package/dist/chunks/bridgeMessaging-DdvApEqW.js +0 -1
  382. package/dist/chunks/bridgePointer-DqHMHa2B.js +0 -1
  383. package/dist/chunks/browser-BmZuQom6.js +0 -1
  384. package/dist/chunks/btw-CejSEdNl.js +0 -1
  385. package/dist/chunks/caches-5HVQSevy.js +0 -3
  386. package/dist/chunks/caches-B-nJoHLM.js +0 -1
  387. package/dist/chunks/capacityWake-CV_x9H8j.js +0 -1
  388. package/dist/chunks/ccrClient-BFyfO67b.js +0 -1
  389. package/dist/chunks/client-DKXCfdde.js +0 -1
  390. package/dist/chunks/client-xxikkAoZ.js +0 -1
  391. package/dist/chunks/color-DWhgZH7A.js +0 -1
  392. package/dist/chunks/commands-CxJpmEKF.js +0 -1
  393. package/dist/chunks/commitAttribution-DM6SBMwl.js +0 -1
  394. package/dist/chunks/commitAttribution-DPnHHKSA.js +0 -2
  395. package/dist/chunks/compact-CblM7306.js +0 -2
  396. package/dist/chunks/completionCache-MN3_MqK8.js +0 -4
  397. package/dist/chunks/completionCache-c4aiyZ_f.js +0 -1
  398. package/dist/chunks/config-BLVBFi5v.js +0 -1
  399. package/dist/chunks/config-CMnqm6Se.js +0 -1
  400. package/dist/chunks/config-DRDuVyzE.js +0 -3
  401. package/dist/chunks/context-CdSMMM-0.js +0 -1
  402. package/dist/chunks/context-noninteractive-CPkf2vB9.js +0 -1
  403. package/dist/chunks/context-noninteractive-DNury4JI.js +0 -54
  404. package/dist/chunks/conversation-DCMw_rsE.js +0 -1
  405. package/dist/chunks/conversation-pUtvc-cE.js +0 -1
  406. package/dist/chunks/createSession-8Ei-Lj7V.js +0 -1
  407. package/dist/chunks/createSession-CjqxVh_Q.js +0 -1
  408. package/dist/chunks/cron-3LntnnhJ.js +0 -1
  409. package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +0 -40
  410. package/dist/chunks/cwd--nvsx73T.js +0 -1
  411. package/dist/chunks/cwd-CYmmnQVS.js +0 -1
  412. package/dist/chunks/datadog-DqHxqiwY.js +0 -1
  413. package/dist/chunks/debugUtils-NO5KtXqi.js +0 -1
  414. package/dist/chunks/desktop-Z5FAfunZ.js +0 -1
  415. package/dist/chunks/detectRepository-BTPgN89l.js +0 -1
  416. package/dist/chunks/directoryCompletion-CW2ckkQg.js +0 -1
  417. package/dist/chunks/doctor-BA2ZLDTl.js +0 -1
  418. package/dist/chunks/entry-DE0uMIf0.js +0 -14
  419. package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +0 -1
  420. package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +0 -1
  421. package/dist/chunks/envUtils-DSxRz_kt.js +0 -1
  422. package/dist/chunks/esm-5w3xFBnt.js +0 -1
  423. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +0 -1
  424. package/dist/chunks/exit-Dt9kHtJO.js +0 -1
  425. package/dist/chunks/extra-usage-C7E2Z1p1.js +0 -1
  426. package/dist/chunks/extra-usage-D0Kkjp-2.js +0 -1
  427. package/dist/chunks/extra-usage-core-DjdaD1qO.js +0 -1
  428. package/dist/chunks/extra-usage-noninteractive-BnD1RhKK.js +0 -1
  429. package/dist/chunks/extraUsage-CpgRTcMk.js +0 -1
  430. package/dist/chunks/extractMemories-DhUprYa7.js +0 -1
  431. package/dist/chunks/fast-C4ZevUNL.js +0 -1
  432. package/dist/chunks/fast-CChxlAAF.js +0 -1
  433. package/dist/chunks/feedback-BIhBhV6n.js +0 -1
  434. package/dist/chunks/file-DcZWPH2V.js +0 -12
  435. package/dist/chunks/fileStateCache-DDW5toIs.js +0 -1
  436. package/dist/chunks/files-Cz1-PK3r.js +0 -2
  437. package/dist/chunks/firstPartyEventLogger-BXY1IJ2D.js +0 -5
  438. package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +0 -1
  439. package/dist/chunks/flushGate-CgHq81Gw.js +0 -1
  440. package/dist/chunks/gemini-C1J-x1g7.js +0 -1
  441. package/dist/chunks/generateRecap-C0jjCg0Z.js +0 -1
  442. package/dist/chunks/generateSessionName-w0BMtwS7.js +0 -1
  443. package/dist/chunks/git-CbcnOf0E.js +0 -1
  444. package/dist/chunks/git-Do0wJvux.js +0 -6
  445. package/dist/chunks/githubRepoPathMapping-8D0kpsif.js +0 -1
  446. package/dist/chunks/goal-B4GsR54_.js +0 -3
  447. package/dist/chunks/grok-ffNyU3Lt.js +0 -1
  448. package/dist/chunks/grove-BQisE2JM.js +0 -7
  449. package/dist/chunks/heapdump-DiCjAPR3.js +0 -5
  450. package/dist/chunks/help-2hn8VK2-.js +0 -1
  451. package/dist/chunks/hooks-CBmrBO-J.js +0 -1
  452. package/dist/chunks/hostGuard-BHI6Q8Mt.js +0 -1
  453. package/dist/chunks/inboundAttachments-C5K3XPTC.js +0 -1
  454. package/dist/chunks/inboundAttachments-IH-g95jo.js +0 -1
  455. package/dist/chunks/index.min-D75yiGLN.js +0 -1
  456. package/dist/chunks/initReplBridge-C-P4dgAG.js +0 -1
  457. package/dist/chunks/keybindings-D8FXoO89.js +0 -2
  458. package/dist/chunks/language-Baosud0X.js +0 -1
  459. package/dist/chunks/launchAgentsPlatform-D6DmNuDt.js +0 -1
  460. package/dist/chunks/launchCommand-1qkTCKpf.js +0 -1
  461. package/dist/chunks/launchLocalMemory-C0FzUq7x.js +0 -3
  462. package/dist/chunks/launchLocalVault-DkYAre4O.js +0 -3
  463. package/dist/chunks/launchMemoryStores-D2rKWAPs.js +0 -1
  464. package/dist/chunks/launchOnboarding-gOVAFEFp.js +0 -8
  465. package/dist/chunks/launchSchedule-IZdFstT_.js +0 -1
  466. package/dist/chunks/launchSkillStore-B7LamM1d.js +0 -1
  467. package/dist/chunks/launchTeleport-C2BQMfYP.js +0 -3
  468. package/dist/chunks/launchVault-C60WUcCI.js +0 -1
  469. package/dist/chunks/lib-rQZENxQg.js +0 -8
  470. package/dist/chunks/loadAgentsDir-B9c3Emvg.js +0 -1
  471. package/dist/chunks/loadPluginHooks-BhNdAjeY.js +0 -1
  472. package/dist/chunks/localSearch-BLCGsdyM.js +0 -1
  473. package/dist/chunks/log-BMCygSzM.js +0 -1
  474. package/dist/chunks/logoV2Utils-gGK9gErT.js +0 -1
  475. package/dist/chunks/main-OWFSddRx.js +0 -859
  476. package/dist/chunks/managedEnv-BHoeDjpS.js +0 -1
  477. package/dist/chunks/mcp-BSNdwbxR.js +0 -1
  478. package/dist/chunks/mcp-CMnDNI-4.js +0 -6
  479. package/dist/chunks/mcp-D1yA9E56.js +0 -2
  480. package/dist/chunks/memoize-B0zhbT8Z.js +0 -1
  481. package/dist/chunks/memory-D1zbyjxN.js +0 -1
  482. package/dist/chunks/mode-DY087x_x.js +0 -2
  483. package/dist/chunks/model-CZViyZnE.js +0 -1
  484. package/dist/chunks/model-D0EfJBuw.js +0 -1
  485. package/dist/chunks/model-DLLkVV6S.js +0 -1
  486. package/dist/chunks/nativeInstaller-yj81F75v.js +0 -1
  487. package/dist/chunks/oauth-BqJqV-2M.js +0 -1
  488. package/dist/chunks/oauth-C8X_p8Gc.js +0 -1
  489. package/dist/chunks/observationStore-DzCdXq8U.js +0 -4
  490. package/dist/chunks/onChangeAppState-DhGKPG9g.js +0 -1
  491. package/dist/chunks/output-style-BM3qAHLA.js +0 -1
  492. package/dist/chunks/overageCreditGrant-Du3dOYVu.js +0 -1
  493. package/dist/chunks/p-map-B1EeBuI8.js +0 -1
  494. package/dist/chunks/p-map-HKDr3iDo.js +0 -1
  495. package/dist/chunks/panel-Be-OxtqL.js +0 -1
  496. package/dist/chunks/panelCall-dMvRPAGE.js +0 -1
  497. package/dist/chunks/parser-Bf6iasPV.js +0 -1
  498. package/dist/chunks/partition-C4FWzYVm.js +0 -1
  499. package/dist/chunks/passes-Daz-ARWD.js +0 -1
  500. package/dist/chunks/path-D5U-tm91.js +0 -1
  501. package/dist/chunks/permissions-CeYKbtSC.js +0 -1
  502. package/dist/chunks/permissions-Cn_6f8CB.js +0 -1
  503. package/dist/chunks/permissions-DF8tAmDF.js +0 -3
  504. package/dist/chunks/pidLock-CbC_il6r.js +0 -3
  505. package/dist/chunks/plan-rsb_83Fo.js +0 -1
  506. package/dist/chunks/plugin-Cm31-nej.js +0 -1
  507. package/dist/chunks/pluginAutoupdate-0k03PVff.js +0 -1
  508. package/dist/chunks/pluginBlocklist-wPFCUPdm.js +0 -1
  509. package/dist/chunks/pluginCliCommands-DhL9LbH0.js +0 -1
  510. package/dist/chunks/pluginFlagging-CAdaFV_D.js +0 -1
  511. package/dist/chunks/pluginOperations-Cs_Z4C6O.js +0 -2
  512. package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +0 -1
  513. package/dist/chunks/pluginStartupCheck-KeU0efTj.js +0 -1
  514. package/dist/chunks/plugins-CQNKZmjP.js +0 -4
  515. package/dist/chunks/policyLimits-D2s8M8P2.js +0 -1
  516. package/dist/chunks/pollConfig-2nFzv6Hy.js +0 -1
  517. package/dist/chunks/poor-DXumVTR4.js +0 -1
  518. package/dist/chunks/poorMode-yNZL5uYf.js +0 -1
  519. package/dist/chunks/print-uxCF5ka5.js +0 -23
  520. package/dist/chunks/privacy-settings-BncbJCV0.js +0 -1
  521. package/dist/chunks/processBashCommand-CGdwvPmD.js +0 -1
  522. package/dist/chunks/processSlashCommand-DQarepEb.js +0 -5
  523. package/dist/chunks/prompt-BgOdcHkd.js +0 -1
  524. package/dist/chunks/prompt-CE3sFmZV.js +0 -139
  525. package/dist/chunks/prompt-CLJKFebn.js +0 -1
  526. package/dist/chunks/promptEditor-CyTzyjwG.js +0 -4
  527. package/dist/chunks/rate-limit-options-C-EqWjeI.js +0 -1
  528. package/dist/chunks/rcDebugLog-DBB9r8aw.js +0 -11
  529. package/dist/chunks/reconciler-CYD_XpG4.js +0 -4
  530. package/dist/chunks/referral-CKmHHxj_.js +0 -1
  531. package/dist/chunks/refresh-ZqZdmLK5.js +0 -1
  532. package/dist/chunks/registerProtocol-wZv2uiW_.js +0 -36
  533. package/dist/chunks/release-notes-B5K7wVqZ.js +0 -4
  534. package/dist/chunks/releaseNotes-B8gbyFFJ.js +0 -2
  535. package/dist/chunks/reload-plugins-B9ApSp2m.js +0 -1
  536. package/dist/chunks/remote-env-CAt1dHIS.js +0 -1
  537. package/dist/chunks/remoteBridgeCore-Bk3UdSLJ.js +0 -1
  538. package/dist/chunks/remoteManagedSettings-bswzAB6W.js +0 -1
  539. package/dist/chunks/rename-CE_U6KE6.js +0 -1
  540. package/dist/chunks/resume-BicEjsPd.js +0 -2
  541. package/dist/chunks/ripgrep-BfIpz5uC.js +0 -1
  542. package/dist/chunks/rollback-BPWRKlIZ.js +0 -11
  543. package/dist/chunks/runtimeObserver-BrGF5QWX.js +0 -10
  544. package/dist/chunks/sandbox-adapter-BtMiHImm.js +0 -1
  545. package/dist/chunks/sandbox-toggle-D8eebdyI.js +0 -1
  546. package/dist/chunks/sanitization-DV-94a9Z.js +0 -1
  547. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +0 -1
  548. package/dist/chunks/searchExtraTools-hLLPuh7c.js +0 -1
  549. package/dist/chunks/semver-BMRJYn3q.js +0 -1
  550. package/dist/chunks/session-BZIlR9Gc.js +0 -2
  551. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +0 -1
  552. package/dist/chunks/sessionDiscovery-DfDqTrF1.js +0 -1
  553. package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +0 -1
  554. package/dist/chunks/sessionMemory-D37S0-jX.js +0 -1
  555. package/dist/chunks/sessionMemory-DmlAG3jq.js +0 -1
  556. package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +0 -1
  557. package/dist/chunks/sessionObserver-BUw2rzKl.js +0 -1
  558. package/dist/chunks/sessionObserver-KgquhGWw.js +0 -20
  559. package/dist/chunks/sessionStorage-CucBSK5Q.js +0 -1
  560. package/dist/chunks/sessionTitle-DAnM73S0.js +0 -14
  561. package/dist/chunks/sessionTracing-_Hh5VXxt.js +0 -11
  562. package/dist/chunks/settings-BeLFUeie.js +0 -19
  563. package/dist/chunks/settings-Cl16Haug.js +0 -1
  564. package/dist/chunks/settingsSync-BNvFYH3c.js +0 -1
  565. package/dist/chunks/setup-D8kXv3ts.js +0 -3
  566. package/dist/chunks/shadowedRuleDetection-C6R5zOUe.js +0 -1
  567. package/dist/chunks/sinks-BuE17DeZ.js +0 -2
  568. package/dist/chunks/sinks-FevoYQqP.js +0 -1
  569. package/dist/chunks/skill-learning-CMdxGtxr.js +0 -5
  570. package/dist/chunks/skillChangeDetector-C65ZLSYV.js +0 -1
  571. package/dist/chunks/skillGapStore-D18LRJAM.js +0 -5
  572. package/dist/chunks/skillGapStore-Ep62R-2_.js +0 -1
  573. package/dist/chunks/skillGenerator-Bc7WwNT8.js +0 -8
  574. package/dist/chunks/skillLearning-Cs9fJgkV.js +0 -1
  575. package/dist/chunks/skillLearning-duPZl69A.js +0 -1
  576. package/dist/chunks/skillPanel-Cyzby746.js +0 -28
  577. package/dist/chunks/skills-BPPeYBy7.js +0 -1
  578. package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +0 -1
  579. package/dist/chunks/startupProfiler-DIWVcO4e.js +0 -1
  580. package/dist/chunks/startupProfiler-xa3NmN7Z.js +0 -3
  581. package/dist/chunks/state-BOa-3Av3.js +0 -1
  582. package/dist/chunks/state-ix0xIunV.js +0 -1
  583. package/dist/chunks/status-D4IQpsNK.js +0 -2
  584. package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +0 -1
  585. package/dist/chunks/stickers-D5teCKMN.js +0 -1
  586. package/dist/chunks/subprocessEnv-BSQSomcK.js +0 -1
  587. package/dist/chunks/syncCache-CANQZ9mQ.js +0 -1
  588. package/dist/chunks/systemPromptSections-CR_AoPIX.js +0 -1
  589. package/dist/chunks/systemPromptSections-DN0HGVye.js +0 -1
  590. package/dist/chunks/tag-DDbNqBMu.js +0 -11
  591. package/dist/chunks/tasks-CZvWJYGr.js +0 -1
  592. package/dist/chunks/teleport-Dk5j03Ix.js +0 -1
  593. package/dist/chunks/terminalSetup-3JNy6i_J.js +0 -33
  594. package/dist/chunks/thinkback-p-vKIRW_.js +0 -1
  595. package/dist/chunks/thinkback-play-DnPTDE8B.js +0 -1
  596. package/dist/chunks/thinkback-rFA1do6F.js +0 -1
  597. package/dist/chunks/toolEventObserver-CzsCuUMc.js +0 -1
  598. package/dist/chunks/toolPool-BR27AMJO.js +0 -1
  599. package/dist/chunks/trustedDevice-BYt39fui.js +0 -1
  600. package/dist/chunks/tui-C2yuCuOU.js +0 -6
  601. package/dist/chunks/types-Bh9S_JG5.js +0 -3
  602. package/dist/chunks/types-DHkZVzJe.js +0 -1
  603. package/dist/chunks/ultrareviewCommand-C_4OSBTW.js +0 -3
  604. package/dist/chunks/undercover-D30rKimg.js +0 -31
  605. package/dist/chunks/undercover-DRSwLozU.js +0 -1
  606. package/dist/chunks/up-BHkC97_C.js +0 -12
  607. package/dist/chunks/upgrade-Bi-bIz7R.js +0 -1
  608. package/dist/chunks/upgrade-Chs-OQFd.js +0 -1
  609. package/dist/chunks/upload-D8FWMSQx.js +0 -1
  610. package/dist/chunks/usage-BxVeUt60.js +0 -1
  611. package/dist/chunks/usage-DUO7Yy1f.js +0 -1
  612. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js +0 -1
  613. package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +0 -1
  614. package/dist/chunks/useManagePlugins-B11_87VN.js +0 -1
  615. package/dist/chunks/useMergedTools-CR56my9t.js +0 -1
  616. package/dist/chunks/useSearchInput-C5OzQnX6.js +0 -1
  617. package/dist/chunks/useSettingsErrors-B9vOZL41.js +0 -1
  618. package/dist/chunks/util-8EHwfg4A.js +0 -1
  619. package/dist/chunks/validatePlugin-6q1qmnAC.js +0 -1
  620. package/dist/chunks/vim-CNDzwoTd.js +0 -1
  621. package/dist/chunks/windowsPaths-9pEkw0oV.js +0 -1
  622. package/dist/chunks/workerRegistry-CvyHvwx-.js +0 -1
  623. package/dist/chunks/worktree-ogmNCIpz.js +0 -1
@@ -1,2 +1,2 @@
1
1
  import{a as e,i as t,n,o as r,r as i,t as a}from"./rolldown-runtime-DaDcL9Zw.js";import{i as o,s,t as c}from"./satisfies-DQJHNtpQ.js";import{n as l,t as u}from"./color-convert-p91EwGT7.js";import{t as d}from"./detect-libc-CxbBtWJu.js";import"node:fs";var f=a(((e,t)=>{var n=function(e){return e!=null};t.exports={defined:n,object:function(e){return typeof e==`object`},plainObject:function(e){return Object.prototype.toString.call(e)===`[object Object]`},fn:function(e){return typeof e==`function`},bool:function(e){return typeof e==`boolean`},buffer:function(e){return e instanceof Buffer},typedArray:function(e){if(n(e))switch(e.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},arrayBuffer:function(e){return e instanceof ArrayBuffer},string:function(e){return typeof e==`string`&&e.length>0},number:function(e){return typeof e==`number`&&!Number.isNaN(e)},integer:function(e){return Number.isInteger(e)},inRange:function(e,t,n){return e>=t&&e<=n},inArray:function(e,t){return t.includes(e)},invalidParameterError:function(e,t,n){return Error(`Expected ${t} for ${e} but received ${n} of type ${typeof n}`)},nativeError:function(e,t){return t.message=e.message,t}}})),p=i({author:()=>_,binary:()=>P,cc:()=>I,config:()=>M,contributors:()=>y,default:()=>z,dependencies:()=>D,description:()=>h,devDependencies:()=>k,engines:()=>j,files:()=>w,funding:()=>N,homepage:()=>v,keywords:()=>E,license:()=>A,main:()=>S,name:()=>m,nyc:()=>L,optionalDependencies:()=>O,repository:()=>T,scripts:()=>b,semistandard:()=>F,tsd:()=>R,type:()=>x,types:()=>C,version:()=>g}),m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B=n((()=>{m=`sharp`,h=`High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images`,g=`0.33.5`,_=`Lovell Fuller <npm@lovell.info>`,v=`https://sharp.pixelplumbing.com`,y=`Pierre Inglebert <pierre.inglebert@gmail.com>,Jonathan Ong <jonathanrichardong@gmail.com>,Chanon Sajjamanochai <chanon.s@gmail.com>,Juliano Julio <julianojulio@gmail.com>,Daniel Gasienica <daniel@gasienica.ch>,Julian Walker <julian@fiftythree.com>,Amit Pitaru <pitaru.amit@gmail.com>,Brandon Aaron <hello.brandon@aaron.sh>,Andreas Lind <andreas@one.com>,Maurus Cuelenaere <mcuelenaere@gmail.com>,Linus Unnebäck <linus@folkdatorn.se>,Victor Mateevitsi <mvictoras@gmail.com>,Alaric Holloway <alaric.holloway@gmail.com>,Bernhard K. Weisshuhn <bkw@codingforce.com>,Chris Riley <criley@primedia.com>,David Carley <dacarley@gmail.com>,John Tobin <john@limelightmobileinc.com>,Kenton Gray <kentongray@gmail.com>,Felix Bünemann <Felix.Buenemann@gmail.com>,Samy Al Zahrani <samyalzahrany@gmail.com>,Chintan Thakkar <lemnisk8@gmail.com>,F. Orlando Galashan <frulo@gmx.de>,Kleis Auke Wolthuizen <info@kleisauke.nl>,Matt Hirsch <mhirsch@media.mit.edu>,Matthias Thoemmes <thoemmes@gmail.com>,Patrick Paskaris <patrick@paskaris.gr>,Jérémy Lal <kapouer@melix.org>,Rahul Nanwani <r.nanwani@gmail.com>,Alice Monday <alice0meta@gmail.com>,Kristo Jorgenson <kristo.jorgenson@gmail.com>,YvesBos <yves_bos@outlook.com>,Guy Maliar <guy@tailorbrands.com>,Nicolas Coden <nicolas@ncoden.fr>,Matt Parrish <matt.r.parrish@gmail.com>,Marcel Bretschneider <marcel.bretschneider@gmail.com>,Matthew McEachen <matthew+github@mceachen.org>,Jarda Kotěšovec <jarda.kotesovec@gmail.com>,Kenric D'Souza <kenric.dsouza@gmail.com>,Oleh Aleinyk <oleg.aleynik@gmail.com>,Marcel Bretschneider <marcel.bretschneider@gmail.com>,Andrea Bianco <andrea.bianco@unibas.ch>,Rik Heywood <rik@rik.org>,Thomas Parisot <hi@oncletom.io>,Nathan Graves <nathanrgraves+github@gmail.com>,Tom Lokhorst <tom@lokhorst.eu>,Espen Hovlandsdal <espen@hovlandsdal.com>,Sylvain Dumont <sylvain.dumont35@gmail.com>,Alun Davies <alun.owain.davies@googlemail.com>,Aidan Hoolachan <ajhoolachan21@gmail.com>,Axel Eirola <axel.eirola@iki.fi>,Freezy <freezy@xbmc.org>,Daiz <taneli.vatanen@gmail.com>,Julian Aubourg <j@ubourg.net>,Keith Belovay <keith@picthrive.com>,Michael B. Klein <mbklein@gmail.com>,Jordan Prudhomme <jordan@raboland.fr>,Ilya Ovdin <iovdin@gmail.com>,Andargor <andargor@yahoo.com>,Paul Neave <paul.neave@gmail.com>,Brendan Kennedy <brenwken@gmail.com>,Brychan Bennett-Odlum <git@brychan.io>,Edward Silverton <e.silverton@gmail.com>,Roman Malieiev <aromaleev@gmail.com>,Tomas Szabo <tomas.szabo@deftomat.com>,Robert O'Rourke <robert@o-rourke.org>,Guillermo Alfonso Varela Chouciño <guillevch@gmail.com>,Christian Flintrup <chr@gigahost.dk>,Manan Jadhav <manan@motionden.com>,Leon Radley <leon@radley.se>,alza54 <alza54@thiocod.in>,Jacob Smith <jacob@frende.me>,Michael Nutt <michael@nutt.im>,Brad Parham <baparham@gmail.com>,Taneli Vatanen <taneli.vatanen@gmail.com>,Joris Dugué <zaruike10@gmail.com>,Chris Banks <christopher.bradley.banks@gmail.com>,Ompal Singh <ompal.hitm09@gmail.com>,Brodan <christopher.hranj@gmail.com>,Ankur Parihar <ankur.github@gmail.com>,Brahim Ait elhaj <brahima@gmail.com>,Mart Jansink <m.jansink@gmail.com>,Lachlan Newman <lachnewman007@gmail.com>,Dennis Beatty <dennis@dcbeatty.com>,Ingvar Stepanyan <me@rreverser.com>,Don Denton <don@happycollision.com>`.split(`,`),b={install:`node install/check`,clean:`rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*`,test:`npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types`,"test-lint":`semistandard && cpplint`,"test-unit":`nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha`,"test-licensing":`license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"`,"test-leak":`./test/leak/leak.sh`,"test-types":`tsd`,"package-from-local-build":`node npm/from-local-build`,"package-from-github-release":`node npm/from-github-release`,"docs-build":`node docs/build && node docs/search-index/build`,"docs-serve":`cd docs && npx serve`,"docs-publish":`cd docs && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp`},x=`commonjs`,S=`lib/index.js`,C=`lib/index.d.ts`,w=[`install`,`lib`,`src/*.{cc,h,gyp}`],T={type:`git`,url:`git://github.com/lovell/sharp.git`},E=[`jpeg`,`png`,`webp`,`avif`,`tiff`,`gif`,`svg`,`jp2`,`dzi`,`image`,`resize`,`thumbnail`,`crop`,`embed`,`libvips`,`vips`],D={color:`^4.2.3`,"detect-libc":`^2.0.3`,semver:`^7.6.3`},O={"@img/sharp-darwin-arm64":`0.33.5`,"@img/sharp-darwin-x64":`0.33.5`,"@img/sharp-libvips-darwin-arm64":`1.0.4`,"@img/sharp-libvips-darwin-x64":`1.0.4`,"@img/sharp-libvips-linux-arm":`1.0.5`,"@img/sharp-libvips-linux-arm64":`1.0.4`,"@img/sharp-libvips-linux-s390x":`1.0.4`,"@img/sharp-libvips-linux-x64":`1.0.4`,"@img/sharp-libvips-linuxmusl-arm64":`1.0.4`,"@img/sharp-libvips-linuxmusl-x64":`1.0.4`,"@img/sharp-linux-arm":`0.33.5`,"@img/sharp-linux-arm64":`0.33.5`,"@img/sharp-linux-s390x":`0.33.5`,"@img/sharp-linux-x64":`0.33.5`,"@img/sharp-linuxmusl-arm64":`0.33.5`,"@img/sharp-linuxmusl-x64":`0.33.5`,"@img/sharp-wasm32":`0.33.5`,"@img/sharp-win32-ia32":`0.33.5`,"@img/sharp-win32-x64":`0.33.5`},k={"@emnapi/runtime":`^1.2.0`,"@img/sharp-libvips-dev":`1.0.4`,"@img/sharp-libvips-dev-wasm32":`1.0.5`,"@img/sharp-libvips-win32-ia32":`1.0.4`,"@img/sharp-libvips-win32-x64":`1.0.4`,"@types/node":`*`,async:`^3.2.5`,cc:`^3.0.1`,emnapi:`^1.2.0`,"exif-reader":`^2.0.1`,"extract-zip":`^2.0.1`,icc:`^3.0.0`,"jsdoc-to-markdown":`^8.0.3`,"license-checker":`^25.0.1`,mocha:`^10.7.3`,"node-addon-api":`^8.1.0`,nyc:`^17.0.0`,prebuild:`^13.0.1`,semistandard:`^17.0.0`,"tar-fs":`^3.0.6`,tsd:`^0.31.1`},A=`Apache-2.0`,j={node:`^18.17.0 || ^20.3.0 || >=21.0.0`},M={libvips:`>=8.15.3`},N={url:`https://opencollective.com/libvips`},P={napi_versions:[9]},F={env:[`mocha`]},I={linelength:`120`,filter:[`build/include`]},L={include:[`lib`]},R={directory:`test/types/`},z={name:m,description:h,version:g,author:_,homepage:v,contributors:y,scripts:b,type:x,main:S,types:C,files:w,repository:T,keywords:E,dependencies:D,optionalDependencies:O,devDependencies:k,license:A,engines:j,config:M,funding:N,binary:P,semistandard:F,cc:I,nyc:L,tsd:R}})),V=a(((n,r)=>{var{spawnSync:i}=t(`node:child_process`),{createHash:a}=t(`node:crypto`),l=o(),u=s(),f=c(),m=d(),{config:h,engines:g,optionalDependencies:_}=(B(),e(p).default),v=l(process.env.npm_package_config_libvips||h.libvips).version,y=[`darwin-arm64`,`darwin-x64`,`linux-arm`,`linux-arm64`,`linux-s390x`,`linux-x64`,`linuxmusl-arm64`,`linuxmusl-x64`,`win32-ia32`,`win32-x64`],b={encoding:`utf8`,shell:!0},x=e=>{e instanceof Error?console.error(`sharp: Installation error: ${e.message}`):console.log(`sharp: ${e}`)},S=()=>m.isNonGlibcLinuxSync()?m.familySync():``,C=()=>`${process.platform}${S()}-${process.arch}`,w=()=>{if(k())return`wasm32`;let{npm_config_arch:e,npm_config_platform:t,npm_config_libc:n}=process.env,r=typeof n==`string`?n:S();return`${t||process.platform}${r}-${e||process.arch}`},T=()=>{try{return t(`@img/sharp-libvips-dev-${w()}/include`)}catch{try{return t(`@img/sharp-libvips-dev/include`)}catch{}}return``},E=()=>{try{return t(`@img/sharp-libvips-dev/cplusplus`)}catch{}return``},D=()=>{try{return t(`@img/sharp-libvips-dev-${w()}/lib`)}catch{try{return t(`@img/sharp-libvips-${w()}/lib`)}catch{}}return``},O=()=>{if(process.release?.name===`node`&&process.versions&&!f(process.versions.node,g.node))return{found:process.versions.node,expected:g.node}},k=()=>{let{CC:e}=process.env;return!!(e&&e.endsWith(`/emcc`))},A=()=>process.platform===`darwin`&&process.arch===`x64`&&(i(`sysctl sysctl.proc_translated`,b).stdout||``).trim()===`sysctl.proc_translated: 1`,j=e=>a(`sha512`).update(e).digest(`hex`),M=()=>{try{let e=j(`imgsharp-libvips-${w()}`),t=l(_[`@img/sharp-libvips-${w()}`]).version;return j(`${e}npm:${t}`).slice(0,10)}catch{}return``},N=()=>i(`node-gyp rebuild --directory=src ${k()?`--nodedir=emscripten`:``}`,{...b,stdio:`inherit`}).status,P=()=>process.platform===`win32`?``:(i(`pkg-config --modversion vips-cpp`,{...b,env:{...process.env,PKG_CONFIG_PATH:F()}}).stdout||``).trim(),F=()=>process.platform===`win32`?``:[(i(`which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2`,b).stdout||``).trim(),process.env.PKG_CONFIG_PATH,`/usr/local/lib/pkgconfig`,`/usr/lib/pkgconfig`,`/usr/local/libdata/pkgconfig`,`/usr/libdata/pkgconfig`].filter(Boolean).join(`:`),I=(e,t,n)=>(n&&n(`Detected ${t}, skipping search for globally-installed libvips`),e);r.exports={minimumLibvipsVersion:v,prebuiltPlatforms:y,buildPlatformArch:w,buildSharpLibvipsIncludeDir:T,buildSharpLibvipsCPlusPlusDir:E,buildSharpLibvipsLibDir:D,isUnsupportedNodeRuntime:O,runtimePlatformArch:C,log:x,yarnLocator:M,spawnRebuild:N,globalLibvipsVersion:P,pkgConfigPath:F,useGlobalLibvips:e=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return I(!1,`SHARP_IGNORE_GLOBAL_LIBVIPS`,e);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return I(!0,`SHARP_FORCE_GLOBAL_LIBVIPS`,e);if(A())return I(!1,`Rosetta`,e);let t=P();return!!t&&u(t,v)}}})),H=a(((e,n)=>{var{familySync:r,versionSync:i}=d(),{runtimePlatformArch:a,isUnsupportedNodeRuntime:o,prebuiltPlatforms:s,minimumLibvipsVersion:c}=V(),l=a(),u=[`../src/build/Release/sharp-${l}.node`,`../src/build/Release/sharp-wasm32.node`,`@img/sharp-${l}/sharp.node`,`@img/sharp-wasm32/sharp.node`],f,p=[];for(let e of u)try{f=t(e);break}catch(e){p.push(e)}if(f)n.exports=f;else{let[e,n,a]=[`linux`,`darwin`,`win32`].map(e=>l.startsWith(e)),u=[`Could not load the "sharp" module using the ${l} runtime`];p.forEach(e=>{e.code!==`MODULE_NOT_FOUND`&&u.push(`${e.code}: ${e.message}`)});let d=p.map(e=>e.message).join(` `);if(u.push(`Possible solutions:`),o()){let{found:e,expected:t}=o();u.push(`- Please upgrade Node.js:`,` Found ${e}`,` Requires ${t}`)}else if(s.includes(l)){let[e,t]=l.split(`-`),n=e.endsWith(`musl`)?` --libc=musl`:``;u.push(`- Ensure optional dependencies can be installed:`,` npm install --include=optional sharp`,`- Ensure your package manager supports multi-platform installation:`,` See https://sharp.pixelplumbing.com/install#cross-platform`,`- Add platform-specific dependencies:`,` npm install --os=${e.replace(`musl`,``)}${n} --cpu=${t} sharp`)}else u.push(`- Manually install libvips >= ${c}`,`- Add experimental WebAssembly-based dependencies:`,` npm install --cpu=wasm32 sharp`,` npm install @img/sharp-wasm32`);if(e&&/(symbol not found|CXXABI_)/i.test(d))try{let{config:e}=t(`@img/sharp-libvips-${l}/package`),n=`${r()} ${i()}`,a=`${e.musl?`musl`:`glibc`} ${e.musl||e.glibc}`;u.push(`- Update your OS:`,` Found ${n}`,` Requires ${a}`)}catch{}throw e&&/\/snap\/core[0-9]{2}/.test(d)&&u.push(`- Remove the Node.js Snap, which does not support native modules`,` snap remove node`),n&&/Incompatible library version/.test(d)&&u.push(`- Update Homebrew:`,` brew update && brew upgrade vips`),p.some(e=>e.code===`ERR_DLOPEN_DISABLED`)&&u.push(`- Run Node.js without using the --no-addons flag`),a&&/The specified procedure could not be found/.test(d)&&u.push(`- Using the canvas package on Windows?`,` See https://sharp.pixelplumbing.com/install#canvas-and-windows`,`- Check for outdated versions of sharp in the dependency tree:`,` npm ls sharp`),u.push(`- Consult the installation documentation:`,` See https://sharp.pixelplumbing.com/install`),Error(u.join(`
2
- `))}})),U=a(((e,n)=>{var r=t(`node:util`),i=t(`node:stream`),a=f();H();var o=r.debuglog(`sharp`),s=function(e,t){if(arguments.length===1&&!a.defined(e))throw Error(`Invalid input`);return this instanceof s?(i.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:`crop`,position:0,resizeBackground:[0,0,0,255],useExifOrientation:!1,angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBeforePreExtract:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:`background`,withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:`lanczos3`,fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:`integer`,minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:``,joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:`srgb`,colourspacePipeline:`last`,composite:[],fileOut:``,formatOut:`input`,streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:``,withExif:{},withExifMerge:!0,resolveWithObject:!1,jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:`4:2:0`,jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:`4:4:4`,webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpPreset:`default`,webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:`jpeg`,tiffPredictor:`horizontal`,tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:`inch`,heifQuality:50,heifLossless:!1,heifCompression:`av1`,heifEffort:4,heifChromaSubsampling:`4:4:4`,heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:`uchar`,tileSize:256,tileOverlap:0,tileContainer:`fs`,tileLayout:`dz`,tileFormat:`last`,tileDepth:`last`,tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:`https://example.com/iiif`,tileBasename:``,timeoutSeconds:0,linearA:[],linearB:[],debuglog:e=>{this.emit(`warning`,e),o(e)},queueListener:function(e){s.queue.emit(`change`,e)}},this.options.input=this._createInputDescriptor(e,t,{allowStream:!0}),this):new s(e,t)};Object.setPrototypeOf(s.prototype,i.Duplex.prototype),Object.setPrototypeOf(s,i.Duplex);function c(){let e=this.constructor.call(),{debuglog:t,queueListener:n,...r}=this.options;return e.options=structuredClone(r),e.options.debuglog=t,e.options.queueListener=n,this._isStreamInput()&&this.on(`finish`,()=>{this._flattenBufferIn(),e.options.input.buffer=this.options.input.buffer,e.emit(`finish`)}),e}Object.assign(s.prototype,{clone:c}),n.exports=s})),W=a(((e,t)=>{t.exports=function(e){return!e||typeof e==`string`?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`)}})),G=a(((e,t)=>{var n=W(),r=Array.prototype.concat,i=Array.prototype.slice,a=t.exports=function(e){for(var t=[],a=0,o=e.length;a<o;a++){var s=e[a];n(s)?t=r.call(t,i.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}})),K=a(((e,t)=>{var n=l(),r=G(),i=Object.hasOwnProperty,a=Object.create(null);for(var o in n)i.call(n,o)&&(a[n[o]]=o);var s=t.exports={to:{},get:{}};s.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=s.get.hsl(e),r=`hsl`;break;case`hwb`:n=s.get.hwb(e),r=`hwb`;break;default:n=s.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},s.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,a=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,l=[0,0,0,1],u,d,f;if(u=e.match(r)){for(f=u[2],u=u[1],d=0;d<3;d++){var p=d*2;l[d]=parseInt(u.slice(p,p+2),16)}f&&(l[3]=parseInt(f,16)/255)}else if(u=e.match(t)){for(u=u[1],f=u[3],d=0;d<3;d++)l[d]=parseInt(u[d]+u[d],16);f&&(l[3]=parseInt(f+f,16)/255)}else if(u=e.match(a)){for(d=0;d<3;d++)l[d]=parseInt(u[d+1],0);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(o)){for(d=0;d<3;d++)l[d]=Math.round(parseFloat(u[d+1])*2.55);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(s))return u[1]===`transparent`?[0,0,0,0]:i.call(n,u[1])?(l=n[u[1]],l[3]=1,l):null;else return null;for(d=0;d<3;d++)l[d]=c(l[d],0,255);return l[3]=c(l[3],0,1),l},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=r(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(e[3]*255)):``)},s.to.rgb=function(){var e=r(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},s.to.rgb.percent=function(){var e=r(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+i+`%)`:`rgba(`+t+`%, `+n+`%, `+i+`%, `+e[3]+`)`},s.to.hsl=function(){var e=r(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},s.to.hwb=function(){var e=r(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},s.to.keyword=function(e){return a[e.slice(0,3)]};function c(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}})),q=a(((e,t)=>{var n=K(),r=u(),i=[`keyword`,`gray`,`hex`],a={};for(let e of Object.keys(r))a[[...r[e].labels].sort().join(``)]=e;var o={};function s(e,t){if(!(this instanceof s))return new s(e,t);if(t&&t in i&&(t=null),t&&!(t in r))throw Error(`Unknown model: `+t);let c,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof s)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=n.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=r[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0){this.model=t||`rgb`,l=r[this.model].channels;let n=Array.prototype.slice.call(e,0,l);this.color=m(n,l),this.valpha=typeof e[l]==`number`?e[l]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let n=t.sort().join(``);if(!(n in a))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=a[n];let{labels:i}=r[this.model],o=[];for(c=0;c<i.length;c++)o.push(e[i[c]]);this.color=m(o)}if(o[this.model])for(l=r[this.model].channels,c=0;c<l;c++){let e=o[this.model][c];e&&(this.color[c]=e(this.color[c]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}s.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in n.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=r[this.model],{labels:n}=r[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new s([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new s([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:d(`rgb`,0,f(255)),green:d(`rgb`,1,f(255)),blue:d(`rgb`,2,f(255)),hue:d([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:d(`hsl`,1,f(100)),lightness:d(`hsl`,2,f(100)),saturationv:d(`hsv`,1,f(100)),value:d(`hsv`,2,f(100)),chroma:d(`hcg`,1,f(100)),gray:d(`hcg`,2,f(100)),white:d(`hwb`,1,f(100)),wblack:d(`hwb`,2,f(100)),cyan:d(`cmyk`,0,f(100)),magenta:d(`cmyk`,1,f(100)),yellow:d(`cmyk`,2,f(100)),black:d(`cmyk`,3,f(100)),x:d(`xyz`,0,f(95.047)),y:d(`xyz`,1,f(100)),z:d(`xyz`,2,f(108.833)),l:d(`lab`,0,f(100)),a:d(`lab`,1),b:d(`lab`,2),keyword(e){return e===void 0?r[this.model].keyword(this.color):new s(e)},hex(e){return e===void 0?n.to.hex(this.rgb().round().color):new s(e)},hexa(e){if(e!==void 0)return new s(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r=`0`+r),n.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return s.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),c=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-c;return s.rgb(c*n.red()+l*r.red(),c*n.green()+l*r.green(),c*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(r)){if(i.includes(e))continue;let{channels:t}=r[e];s.prototype[e]=function(...t){return this.model===e?new s(this):t.length>0?new s(t,e):new s([...p(r[this.model][e].raw(this.color)),this.valpha],e)},s[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=m(n,t)),new s(r,e)}}function c(e,t){return Number(e.toFixed(t))}function l(e){return function(t){return c(t,e)}}function d(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(o[r]||(o[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function f(e){return function(t){return Math.max(0,Math.min(e,t))}}function p(e){return Array.isArray(e)?e:[e]}function m(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}t.exports=s})),J=a(((e,t)=>{var n=q(),r=f(),i=H(),a={left:`low`,center:`centre`,centre:`centre`,right:`high`};function o(e){let{raw:t,density:n,limitInputPixels:i,ignoreIcc:a,unlimited:o,sequentialRead:s,failOn:c,failOnError:l,animated:u,page:d,pages:f,subifd:p}=e;return[t,n,i,a,o,s,c,l,u,d,f,p].some(r.defined)?{raw:t,density:n,limitInputPixels:i,ignoreIcc:a,unlimited:o,sequentialRead:s,failOn:c,failOnError:l,animated:u,page:d,pages:f,subifd:p}:void 0}function s(e,t,i){let a={failOn:`warning`,limitInputPixels:16383**2,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(r.string(e))a.file=e;else if(r.buffer(e)){if(e.length===0)throw Error(`Input Buffer is empty`);a.buffer=e}else if(r.arrayBuffer(e)){if(e.byteLength===0)throw Error(`Input bit Array is empty`);a.buffer=Buffer.from(e,0,e.byteLength)}else if(r.typedArray(e)){if(e.length===0)throw Error(`Input Bit Array is empty`);a.buffer=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(r.plainObject(e)&&!r.defined(t))t=e,o(t)&&(a.buffer=[]);else if(!r.defined(e)&&!r.defined(t)&&r.object(i)&&i.allowStream)a.buffer=[];else throw Error(`Unsupported input '${e}' of type ${typeof e}${r.defined(t)?` when also providing options of type ${typeof t}`:``}`);if(r.object(t)){if(r.defined(t.failOnError))if(r.bool(t.failOnError))a.failOn=t.failOnError?`warning`:`none`;else throw r.invalidParameterError(`failOnError`,`boolean`,t.failOnError);if(r.defined(t.failOn))if(r.string(t.failOn)&&r.inArray(t.failOn,[`none`,`truncated`,`error`,`warning`]))a.failOn=t.failOn;else throw r.invalidParameterError(`failOn`,`one of: none, truncated, error, warning`,t.failOn);if(r.defined(t.density))if(r.inRange(t.density,1,1e5))a.density=t.density;else throw r.invalidParameterError(`density`,`number between 1 and 100000`,t.density);if(r.defined(t.ignoreIcc))if(r.bool(t.ignoreIcc))a.ignoreIcc=t.ignoreIcc;else throw r.invalidParameterError(`ignoreIcc`,`boolean`,t.ignoreIcc);if(r.defined(t.limitInputPixels))if(r.bool(t.limitInputPixels))a.limitInputPixels=t.limitInputPixels?16383**2:0;else if(r.integer(t.limitInputPixels)&&r.inRange(t.limitInputPixels,0,2**53-1))a.limitInputPixels=t.limitInputPixels;else throw r.invalidParameterError(`limitInputPixels`,`positive integer`,t.limitInputPixels);if(r.defined(t.unlimited))if(r.bool(t.unlimited))a.unlimited=t.unlimited;else throw r.invalidParameterError(`unlimited`,`boolean`,t.unlimited);if(r.defined(t.sequentialRead))if(r.bool(t.sequentialRead))a.sequentialRead=t.sequentialRead;else throw r.invalidParameterError(`sequentialRead`,`boolean`,t.sequentialRead);if(r.defined(t.raw))if(r.object(t.raw)&&r.integer(t.raw.width)&&t.raw.width>0&&r.integer(t.raw.height)&&t.raw.height>0&&r.integer(t.raw.channels)&&r.inRange(t.raw.channels,1,4))switch(a.rawWidth=t.raw.width,a.rawHeight=t.raw.height,a.rawChannels=t.raw.channels,a.rawPremultiplied=!!t.raw.premultiplied,e.constructor){case Uint8Array:case Uint8ClampedArray:a.rawDepth=`uchar`;break;case Int8Array:a.rawDepth=`char`;break;case Uint16Array:a.rawDepth=`ushort`;break;case Int16Array:a.rawDepth=`short`;break;case Uint32Array:a.rawDepth=`uint`;break;case Int32Array:a.rawDepth=`int`;break;case Float32Array:a.rawDepth=`float`;break;case Float64Array:a.rawDepth=`double`;break;default:a.rawDepth=`uchar`;break}else throw Error(`Expected width, height and channels for raw pixel input`);if(r.defined(t.animated))if(r.bool(t.animated))a.pages=t.animated?-1:1;else throw r.invalidParameterError(`animated`,`boolean`,t.animated);if(r.defined(t.pages))if(r.integer(t.pages)&&r.inRange(t.pages,-1,1e5))a.pages=t.pages;else throw r.invalidParameterError(`pages`,`integer between -1 and 100000`,t.pages);if(r.defined(t.page))if(r.integer(t.page)&&r.inRange(t.page,0,1e5))a.page=t.page;else throw r.invalidParameterError(`page`,`integer between 0 and 100000`,t.page);if(r.defined(t.level))if(r.integer(t.level)&&r.inRange(t.level,0,256))a.level=t.level;else throw r.invalidParameterError(`level`,`integer between 0 and 256`,t.level);if(r.defined(t.subifd))if(r.integer(t.subifd)&&r.inRange(t.subifd,-1,1e5))a.subifd=t.subifd;else throw r.invalidParameterError(`subifd`,`integer between -1 and 100000`,t.subifd);if(r.defined(t.create))if(r.object(t.create)&&r.integer(t.create.width)&&t.create.width>0&&r.integer(t.create.height)&&t.create.height>0&&r.integer(t.create.channels)){if(a.createWidth=t.create.width,a.createHeight=t.create.height,a.createChannels=t.create.channels,r.defined(t.create.noise)){if(!r.object(t.create.noise))throw Error(`Expected noise to be an object`);if(!r.inArray(t.create.noise.type,[`gaussian`]))throw Error(`Only gaussian noise is supported at the moment`);if(!r.inRange(t.create.channels,1,4))throw r.invalidParameterError(`create.channels`,`number between 1 and 4`,t.create.channels);if(a.createNoiseType=t.create.noise.type,r.number(t.create.noise.mean)&&r.inRange(t.create.noise.mean,0,1e4))a.createNoiseMean=t.create.noise.mean;else throw r.invalidParameterError(`create.noise.mean`,`number between 0 and 10000`,t.create.noise.mean);if(r.number(t.create.noise.sigma)&&r.inRange(t.create.noise.sigma,0,1e4))a.createNoiseSigma=t.create.noise.sigma;else throw r.invalidParameterError(`create.noise.sigma`,`number between 0 and 10000`,t.create.noise.sigma)}else if(r.defined(t.create.background)){if(!r.inRange(t.create.channels,3,4))throw r.invalidParameterError(`create.channels`,`number between 3 and 4`,t.create.channels);let e=n(t.create.background);a.createBackground=[e.red(),e.green(),e.blue(),Math.round(e.alpha()*255)]}else throw Error(`Expected valid noise or background to create a new input image`);delete a.buffer}else throw Error(`Expected valid width, height and channels to create a new input image`);if(r.defined(t.text))if(r.object(t.text)&&r.string(t.text.text)){if(a.textValue=t.text.text,r.defined(t.text.height)&&r.defined(t.text.dpi))throw Error(`Expected only one of dpi or height`);if(r.defined(t.text.font))if(r.string(t.text.font))a.textFont=t.text.font;else throw r.invalidParameterError(`text.font`,`string`,t.text.font);if(r.defined(t.text.fontfile))if(r.string(t.text.fontfile))a.textFontfile=t.text.fontfile;else throw r.invalidParameterError(`text.fontfile`,`string`,t.text.fontfile);if(r.defined(t.text.width))if(r.integer(t.text.width)&&t.text.width>0)a.textWidth=t.text.width;else throw r.invalidParameterError(`text.width`,`positive integer`,t.text.width);if(r.defined(t.text.height))if(r.integer(t.text.height)&&t.text.height>0)a.textHeight=t.text.height;else throw r.invalidParameterError(`text.height`,`positive integer`,t.text.height);if(r.defined(t.text.align))if(r.string(t.text.align)&&r.string(this.constructor.align[t.text.align]))a.textAlign=this.constructor.align[t.text.align];else throw r.invalidParameterError(`text.align`,`valid alignment`,t.text.align);if(r.defined(t.text.justify))if(r.bool(t.text.justify))a.textJustify=t.text.justify;else throw r.invalidParameterError(`text.justify`,`boolean`,t.text.justify);if(r.defined(t.text.dpi))if(r.integer(t.text.dpi)&&r.inRange(t.text.dpi,1,1e6))a.textDpi=t.text.dpi;else throw r.invalidParameterError(`text.dpi`,`integer between 1 and 1000000`,t.text.dpi);if(r.defined(t.text.rgba))if(r.bool(t.text.rgba))a.textRgba=t.text.rgba;else throw r.invalidParameterError(`text.rgba`,`bool`,t.text.rgba);if(r.defined(t.text.spacing))if(r.integer(t.text.spacing)&&r.inRange(t.text.spacing,-1e6,1e6))a.textSpacing=t.text.spacing;else throw r.invalidParameterError(`text.spacing`,`integer between -1000000 and 1000000`,t.text.spacing);if(r.defined(t.text.wrap))if(r.string(t.text.wrap)&&r.inArray(t.text.wrap,[`word`,`char`,`word-char`,`none`]))a.textWrap=t.text.wrap;else throw r.invalidParameterError(`text.wrap`,`one of: word, char, word-char, none`,t.text.wrap);delete a.buffer}else throw Error(`Expected a valid string to create an image with text.`)}else if(r.defined(t))throw Error(`Invalid input options `+t);return a}function c(e,t,n){Array.isArray(this.options.input.buffer)?r.buffer(e)?(this.options.input.buffer.length===0&&this.on(`finish`,()=>{this.streamInFinished=!0}),this.options.input.buffer.push(e),n()):n(Error(`Non-Buffer data on Writable Stream`)):n(Error(`Unexpected data on Writable Stream`))}function l(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function u(){return Array.isArray(this.options.input.buffer)}function d(e){let t=Error();return r.fn(e)?(this._isStreamInput()?this.on(`finish`,()=>{this._flattenBufferIn(),i.metadata(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)})}):i.metadata(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)}),this):this._isStreamInput()?new Promise((e,n)=>{let a=()=>{this._flattenBufferIn(),i.metadata(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})};this.writableFinished?a():this.once(`finish`,a)}):new Promise((e,n)=>{i.metadata(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})})}function p(e){let t=Error();return r.fn(e)?(this._isStreamInput()?this.on(`finish`,()=>{this._flattenBufferIn(),i.stats(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)})}):i.stats(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)}),this):this._isStreamInput()?new Promise((e,n)=>{this.on(`finish`,function(){this._flattenBufferIn(),i.stats(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})})}):new Promise((e,n)=>{i.stats(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})})}t.exports=function(e){Object.assign(e.prototype,{_inputOptionsFromObject:o,_createInputDescriptor:s,_write:c,_flattenBufferIn:l,_isStreamInput:u,metadata:d,stats:p}),e.align=a}})),Y=a(((e,t)=>{var n=f(),r={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},i={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},a={background:`background`,copy:`copy`,repeat:`repeat`,mirror:`mirror`},o={entropy:16,attention:17},s={nearest:`nearest`,linear:`linear`,cubic:`cubic`,mitchell:`mitchell`,lanczos2:`lanczos2`,lanczos3:`lanczos3`},c={contain:`contain`,cover:`cover`,fill:`fill`,inside:`inside`,outside:`outside`},l={contain:`embed`,cover:`crop`,fill:`ignore_aspect`,inside:`max`,outside:`min`};function u(e){return e.angle%360!=0||e.useExifOrientation===!0||e.rotationAngle!==0}function d(e){return e.width!==-1||e.height!==-1}function p(e,t,a){if(d(this.options)&&this.options.debuglog(`ignoring previous resize options`),this.options.widthPost!==-1&&this.options.debuglog(`operation order will be: extract, resize, extract`),n.defined(e))if(n.object(e)&&!n.defined(a))a=e;else if(n.integer(e)&&e>0)this.options.width=e;else throw n.invalidParameterError(`width`,`positive integer`,e);else this.options.width=-1;if(n.defined(t))if(n.integer(t)&&t>0)this.options.height=t;else throw n.invalidParameterError(`height`,`positive integer`,t);else this.options.height=-1;if(n.object(a)){if(n.defined(a.width))if(n.integer(a.width)&&a.width>0)this.options.width=a.width;else throw n.invalidParameterError(`width`,`positive integer`,a.width);if(n.defined(a.height))if(n.integer(a.height)&&a.height>0)this.options.height=a.height;else throw n.invalidParameterError(`height`,`positive integer`,a.height);if(n.defined(a.fit)){let e=l[a.fit];if(n.string(e))this.options.canvas=e;else throw n.invalidParameterError(`fit`,`valid fit`,a.fit)}if(n.defined(a.position)){let e=n.integer(a.position)?a.position:o[a.position]||i[a.position]||r[a.position];if(n.integer(e)&&(n.inRange(e,0,8)||n.inRange(e,16,17)))this.options.position=e;else throw n.invalidParameterError(`position`,`valid position/gravity/strategy`,a.position)}if(this._setBackgroundColourOption(`resizeBackground`,a.background),n.defined(a.kernel))if(n.string(s[a.kernel]))this.options.kernel=s[a.kernel];else throw n.invalidParameterError(`kernel`,`valid kernel name`,a.kernel);n.defined(a.withoutEnlargement)&&this._setBooleanOption(`withoutEnlargement`,a.withoutEnlargement),n.defined(a.withoutReduction)&&this._setBooleanOption(`withoutReduction`,a.withoutReduction),n.defined(a.fastShrinkOnLoad)&&this._setBooleanOption(`fastShrinkOnLoad`,a.fastShrinkOnLoad)}return u(this.options)&&d(this.options)&&(this.options.rotateBeforePreExtract=!0),this}function m(e){if(n.integer(e)&&e>0)this.options.extendTop=e,this.options.extendBottom=e,this.options.extendLeft=e,this.options.extendRight=e;else if(n.object(e)){if(n.defined(e.top))if(n.integer(e.top)&&e.top>=0)this.options.extendTop=e.top;else throw n.invalidParameterError(`top`,`positive integer`,e.top);if(n.defined(e.bottom))if(n.integer(e.bottom)&&e.bottom>=0)this.options.extendBottom=e.bottom;else throw n.invalidParameterError(`bottom`,`positive integer`,e.bottom);if(n.defined(e.left))if(n.integer(e.left)&&e.left>=0)this.options.extendLeft=e.left;else throw n.invalidParameterError(`left`,`positive integer`,e.left);if(n.defined(e.right))if(n.integer(e.right)&&e.right>=0)this.options.extendRight=e.right;else throw n.invalidParameterError(`right`,`positive integer`,e.right);if(this._setBackgroundColourOption(`extendBackground`,e.background),n.defined(e.extendWith))if(n.string(a[e.extendWith]))this.options.extendWith=a[e.extendWith];else throw n.invalidParameterError(`extendWith`,`one of: background, copy, repeat, mirror`,e.extendWith)}else throw n.invalidParameterError(`extend`,`integer or object`,e);return this}function h(e){let t=d(this.options)||this.options.widthPre!==-1?`Post`:`Pre`;return this.options[`width${t}`]!==-1&&this.options.debuglog(`ignoring previous extract options`),[`left`,`top`,`width`,`height`].forEach(function(r){let i=e[r];if(n.integer(i)&&i>=0)this.options[r+(r===`left`||r===`top`?`Offset`:``)+t]=i;else throw n.invalidParameterError(r,`integer`,i)},this),u(this.options)&&!d(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBeforePreExtract=!0),this}function g(e){if(this.options.trimThreshold=10,n.defined(e))if(n.object(e)){if(n.defined(e.background)&&this._setBackgroundColourOption(`trimBackground`,e.background),n.defined(e.threshold))if(n.number(e.threshold)&&e.threshold>=0)this.options.trimThreshold=e.threshold;else throw n.invalidParameterError(`threshold`,`positive number`,e.threshold);n.defined(e.lineArt)&&this._setBooleanOption(`trimLineArt`,e.lineArt)}else throw n.invalidParameterError(`trim`,`object`,e);return u(this.options)&&(this.options.rotateBeforePreExtract=!0),this}t.exports=function(e){Object.assign(e.prototype,{resize:p,extend:m,extract:h,trim:g}),e.gravity=r,e.strategy=o,e.kernel=s,e.fit=c,e.position=i}})),X=a(((e,t)=>{var n=f(),r={clear:`clear`,source:`source`,over:`over`,in:`in`,out:`out`,atop:`atop`,dest:`dest`,"dest-over":`dest-over`,"dest-in":`dest-in`,"dest-out":`dest-out`,"dest-atop":`dest-atop`,xor:`xor`,add:`add`,saturate:`saturate`,multiply:`multiply`,screen:`screen`,overlay:`overlay`,darken:`darken`,lighten:`lighten`,"colour-dodge":`colour-dodge`,"color-dodge":`colour-dodge`,"colour-burn":`colour-burn`,"color-burn":`colour-burn`,"hard-light":`hard-light`,"soft-light":`soft-light`,difference:`difference`,exclusion:`exclusion`};function i(e){if(!Array.isArray(e))throw n.invalidParameterError(`images to composite`,`array`,e);return this.options.composite=e.map(e=>{if(!n.object(e))throw n.invalidParameterError(`image to composite`,`object`,e);let t=this._inputOptionsFromObject(e),i={input:this._createInputDescriptor(e.input,t,{allowStream:!1}),blend:`over`,tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(n.defined(e.blend))if(n.string(r[e.blend]))i.blend=r[e.blend];else throw n.invalidParameterError(`blend`,`valid blend name`,e.blend);if(n.defined(e.tile))if(n.bool(e.tile))i.tile=e.tile;else throw n.invalidParameterError(`tile`,`boolean`,e.tile);if(n.defined(e.left))if(n.integer(e.left))i.left=e.left;else throw n.invalidParameterError(`left`,`integer`,e.left);if(n.defined(e.top))if(n.integer(e.top))i.top=e.top;else throw n.invalidParameterError(`top`,`integer`,e.top);if(n.defined(e.top)!==n.defined(e.left))throw Error(`Expected both left and top to be set`);if(i.hasOffset=n.integer(e.top)&&n.integer(e.left),n.defined(e.gravity))if(n.integer(e.gravity)&&n.inRange(e.gravity,0,8))i.gravity=e.gravity;else if(n.string(e.gravity)&&n.integer(this.constructor.gravity[e.gravity]))i.gravity=this.constructor.gravity[e.gravity];else throw n.invalidParameterError(`gravity`,`valid gravity`,e.gravity);if(n.defined(e.premultiplied))if(n.bool(e.premultiplied))i.premultiplied=e.premultiplied;else throw n.invalidParameterError(`premultiplied`,`boolean`,e.premultiplied);return i}),this}t.exports=function(e){e.prototype.composite=i,e.blend=r}})),Z=a(((e,t)=>{var n=q(),r=f(),i={integer:`integer`,float:`float`,approximate:`approximate`};function a(e,t){if((this.options.useExifOrientation||this.options.angle||this.options.rotationAngle)&&this.options.debuglog(`ignoring previous rotate options`),!r.defined(e))this.options.useExifOrientation=!0;else if(r.integer(e)&&!(e%90))this.options.angle=e;else if(r.number(e)){if(this.options.rotationAngle=e,r.object(t)&&t.background){let e=n(t.background);this.options.rotationBackground=[e.red(),e.green(),e.blue(),Math.round(e.alpha()*255)]}}else throw r.invalidParameterError(`angle`,`numeric`,e);return this}function o(e){return this.options.flip=!r.bool(e)||e,this}function s(e){return this.options.flop=!r.bool(e)||e,this}function c(e,t){let n=[].concat(...e);if(n.length===4&&n.every(r.number))this.options.affineMatrix=n;else throw r.invalidParameterError(`matrix`,`1x4 or 2x2 array`,e);if(r.defined(t))if(r.object(t)){if(this._setBackgroundColourOption(`affineBackground`,t.background),r.defined(t.idx))if(r.number(t.idx))this.options.affineIdx=t.idx;else throw r.invalidParameterError(`options.idx`,`number`,t.idx);if(r.defined(t.idy))if(r.number(t.idy))this.options.affineIdy=t.idy;else throw r.invalidParameterError(`options.idy`,`number`,t.idy);if(r.defined(t.odx))if(r.number(t.odx))this.options.affineOdx=t.odx;else throw r.invalidParameterError(`options.odx`,`number`,t.odx);if(r.defined(t.ody))if(r.number(t.ody))this.options.affineOdy=t.ody;else throw r.invalidParameterError(`options.ody`,`number`,t.ody);if(r.defined(t.interpolator))if(r.inArray(t.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=t.interpolator;else throw r.invalidParameterError(`options.interpolator`,`valid interpolator name`,t.interpolator)}else throw r.invalidParameterError(`options`,`object`,t);return this}function l(e,t,n){if(!r.defined(e))this.options.sharpenSigma=-1;else if(r.bool(e))this.options.sharpenSigma=e?-1:0;else if(r.number(e)&&r.inRange(e,.01,1e4)){if(this.options.sharpenSigma=e,r.defined(t))if(r.number(t)&&r.inRange(t,0,1e4))this.options.sharpenM1=t;else throw r.invalidParameterError(`flat`,`number between 0 and 10000`,t);if(r.defined(n))if(r.number(n)&&r.inRange(n,0,1e4))this.options.sharpenM2=n;else throw r.invalidParameterError(`jagged`,`number between 0 and 10000`,n)}else if(r.plainObject(e)){if(r.number(e.sigma)&&r.inRange(e.sigma,1e-6,10))this.options.sharpenSigma=e.sigma;else throw r.invalidParameterError(`options.sigma`,`number between 0.000001 and 10`,e.sigma);if(r.defined(e.m1))if(r.number(e.m1)&&r.inRange(e.m1,0,1e6))this.options.sharpenM1=e.m1;else throw r.invalidParameterError(`options.m1`,`number between 0 and 1000000`,e.m1);if(r.defined(e.m2))if(r.number(e.m2)&&r.inRange(e.m2,0,1e6))this.options.sharpenM2=e.m2;else throw r.invalidParameterError(`options.m2`,`number between 0 and 1000000`,e.m2);if(r.defined(e.x1))if(r.number(e.x1)&&r.inRange(e.x1,0,1e6))this.options.sharpenX1=e.x1;else throw r.invalidParameterError(`options.x1`,`number between 0 and 1000000`,e.x1);if(r.defined(e.y2))if(r.number(e.y2)&&r.inRange(e.y2,0,1e6))this.options.sharpenY2=e.y2;else throw r.invalidParameterError(`options.y2`,`number between 0 and 1000000`,e.y2);if(r.defined(e.y3))if(r.number(e.y3)&&r.inRange(e.y3,0,1e6))this.options.sharpenY3=e.y3;else throw r.invalidParameterError(`options.y3`,`number between 0 and 1000000`,e.y3)}else throw r.invalidParameterError(`sigma`,`number between 0.01 and 10000`,e);return this}function u(e){if(!r.defined(e))this.options.medianSize=3;else if(r.integer(e)&&r.inRange(e,1,1e3))this.options.medianSize=e;else throw r.invalidParameterError(`size`,`integer between 1 and 1000`,e);return this}function d(e){let t;if(r.number(e))t=e;else if(r.plainObject(e)){if(!r.number(e.sigma))throw r.invalidParameterError(`options.sigma`,`number between 0.3 and 1000`,t);if(t=e.sigma,`precision`in e)if(r.string(i[e.precision]))this.options.precision=i[e.precision];else throw r.invalidParameterError(`precision`,`one of: integer, float, approximate`,e.precision);if(`minAmplitude`in e)if(r.number(e.minAmplitude)&&r.inRange(e.minAmplitude,.001,1))this.options.minAmpl=e.minAmplitude;else throw r.invalidParameterError(`minAmplitude`,`number between 0.001 and 1`,e.minAmplitude)}if(!r.defined(e))this.options.blurSigma=-1;else if(r.bool(e))this.options.blurSigma=e?-1:0;else if(r.number(t)&&r.inRange(t,.3,1e3))this.options.blurSigma=t;else throw r.invalidParameterError(`sigma`,`number between 0.3 and 1000`,t);return this}function p(e){return this.options.flatten=!r.bool(e)||e,r.object(e)&&this._setBackgroundColourOption(`flattenBackground`,e.background),this}function m(){return this.options.unflatten=!0,this}function h(e,t){if(!r.defined(e))this.options.gamma=2.2;else if(r.number(e)&&r.inRange(e,1,3))this.options.gamma=e;else throw r.invalidParameterError(`gamma`,`number between 1.0 and 3.0`,e);if(!r.defined(t))this.options.gammaOut=this.options.gamma;else if(r.number(t)&&r.inRange(t,1,3))this.options.gammaOut=t;else throw r.invalidParameterError(`gammaOut`,`number between 1.0 and 3.0`,t);return this}function g(e){if(this.options.negate=!r.bool(e)||e,r.plainObject(e)&&`alpha`in e)if(r.bool(e.alpha))this.options.negateAlpha=e.alpha;else throw r.invalidParameterError(`alpha`,`should be boolean value`,e.alpha);return this}function _(e){if(r.plainObject(e)){if(r.defined(e.lower))if(r.number(e.lower)&&r.inRange(e.lower,0,99))this.options.normaliseLower=e.lower;else throw r.invalidParameterError(`lower`,`number between 0 and 99`,e.lower);if(r.defined(e.upper))if(r.number(e.upper)&&r.inRange(e.upper,1,100))this.options.normaliseUpper=e.upper;else throw r.invalidParameterError(`upper`,`number between 1 and 100`,e.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw r.invalidParameterError(`range`,`lower to be less than upper`,`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function v(e){return this.normalise(e)}function y(e){if(r.plainObject(e)){if(r.integer(e.width)&&e.width>0)this.options.claheWidth=e.width;else throw r.invalidParameterError(`width`,`integer greater than zero`,e.width);if(r.integer(e.height)&&e.height>0)this.options.claheHeight=e.height;else throw r.invalidParameterError(`height`,`integer greater than zero`,e.height);if(r.defined(e.maxSlope))if(r.integer(e.maxSlope)&&r.inRange(e.maxSlope,0,100))this.options.claheMaxSlope=e.maxSlope;else throw r.invalidParameterError(`maxSlope`,`integer between 0 and 100`,e.maxSlope)}else throw r.invalidParameterError(`options`,`plain object`,e);return this}function b(e){if(!r.object(e)||!Array.isArray(e.kernel)||!r.integer(e.width)||!r.integer(e.height)||!r.inRange(e.width,3,1001)||!r.inRange(e.height,3,1001)||e.height*e.width!==e.kernel.length)throw Error(`Invalid convolution kernel`);return r.integer(e.scale)||(e.scale=e.kernel.reduce(function(e,t){return e+t},0)),e.scale<1&&(e.scale=1),r.integer(e.offset)||(e.offset=0),this.options.convKernel=e,this}function x(e,t){if(!r.defined(e))this.options.threshold=128;else if(r.bool(e))this.options.threshold=e?128:0;else if(r.integer(e)&&r.inRange(e,0,255))this.options.threshold=e;else throw r.invalidParameterError(`threshold`,`integer between 0 and 255`,e);return!r.object(t)||t.greyscale===!0||t.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function S(e,t,n){if(this.options.boolean=this._createInputDescriptor(e,n),r.string(t)&&r.inArray(t,[`and`,`or`,`eor`]))this.options.booleanOp=t;else throw r.invalidParameterError(`operator`,`one of: and, or, eor`,t);return this}function C(e,t){if(!r.defined(e)&&r.number(t)?e=1:r.number(e)&&!r.defined(t)&&(t=0),!r.defined(e))this.options.linearA=[];else if(r.number(e))this.options.linearA=[e];else if(Array.isArray(e)&&e.length&&e.every(r.number))this.options.linearA=e;else throw r.invalidParameterError(`a`,`number or array of numbers`,e);if(!r.defined(t))this.options.linearB=[];else if(r.number(t))this.options.linearB=[t];else if(Array.isArray(t)&&t.length&&t.every(r.number))this.options.linearB=t;else throw r.invalidParameterError(`b`,`number or array of numbers`,t);if(this.options.linearA.length!==this.options.linearB.length)throw Error(`Expected a and b to be arrays of the same length`);return this}function w(e){if(!Array.isArray(e))throw r.invalidParameterError(`inputMatrix`,`array`,e);if(e.length!==3&&e.length!==4)throw r.invalidParameterError(`inputMatrix`,`3x3 or 4x4 array`,e.length);let t=e.flat().map(Number);if(t.length!==9&&t.length!==16)throw r.invalidParameterError(`inputMatrix`,`cardinality of 9 or 16`,t.length);return this.options.recombMatrix=t,this}function T(e){if(!r.plainObject(e))throw r.invalidParameterError(`options`,`plain object`,e);if(`brightness`in e)if(r.number(e.brightness)&&e.brightness>=0)this.options.brightness=e.brightness;else throw r.invalidParameterError(`brightness`,`number above zero`,e.brightness);if(`saturation`in e)if(r.number(e.saturation)&&e.saturation>=0)this.options.saturation=e.saturation;else throw r.invalidParameterError(`saturation`,`number above zero`,e.saturation);if(`hue`in e)if(r.integer(e.hue))this.options.hue=e.hue%360;else throw r.invalidParameterError(`hue`,`number`,e.hue);if(`lightness`in e)if(r.number(e.lightness))this.options.lightness=e.lightness;else throw r.invalidParameterError(`lightness`,`number`,e.lightness);return this}t.exports=function(e){Object.assign(e.prototype,{rotate:a,flip:o,flop:s,affine:c,sharpen:l,median:u,blur:d,flatten:p,unflatten:m,gamma:h,negate:g,normalise:_,normalize:v,clahe:y,convolve:b,threshold:x,boolean:S,linear:C,recomb:w,modulate:T})}})),ee=a(((e,t)=>{var n=q(),r=f(),i={multiband:`multiband`,"b-w":`b-w`,bw:`b-w`,cmyk:`cmyk`,srgb:`srgb`};function a(e){return this._setBackgroundColourOption(`tint`,e),this}function o(e){return this.options.greyscale=!r.bool(e)||e,this}function s(e){return this.greyscale(e)}function c(e){if(!r.string(e))throw r.invalidParameterError(`colourspace`,`string`,e);return this.options.colourspacePipeline=e,this}function l(e){return this.pipelineColourspace(e)}function u(e){if(!r.string(e))throw r.invalidParameterError(`colourspace`,`string`,e);return this.options.colourspace=e,this}function d(e){return this.toColourspace(e)}function p(e,t){if(r.defined(t))if(r.object(t)||r.string(t)){let r=n(t);this.options[e]=[r.red(),r.green(),r.blue(),Math.round(r.alpha()*255)]}else throw r.invalidParameterError(`background`,`object or string`,t)}t.exports=function(e){Object.assign(e.prototype,{tint:a,greyscale:o,grayscale:s,pipelineColourspace:c,pipelineColorspace:l,toColourspace:u,toColorspace:d,_setBackgroundColourOption:p}),e.colourspace=i,e.colorspace=i}})),te=a(((e,t)=>{var n=f(),r={and:`and`,or:`or`,eor:`eor`};function i(){return this.options.removeAlpha=!0,this}function a(e){if(n.defined(e))if(n.number(e)&&n.inRange(e,0,1))this.options.ensureAlpha=e;else throw n.invalidParameterError(`alpha`,`number between 0 and 1`,e);else this.options.ensureAlpha=1;return this}function o(e){let t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(e)&&(e=t[e]),n.integer(e)&&n.inRange(e,0,4))this.options.extractChannel=e;else throw n.invalidParameterError(`channel`,`integer or one of: red, green, blue, alpha`,e);return this}function s(e,t){return Array.isArray(e)?e.forEach(function(e){this.options.joinChannelIn.push(this._createInputDescriptor(e,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(e,t)),this}function c(e){if(n.string(e)&&n.inArray(e,[`and`,`or`,`eor`]))this.options.bandBoolOp=e;else throw n.invalidParameterError(`boolOp`,`one of: and, or, eor`,e);return this}t.exports=function(e){Object.assign(e.prototype,{removeAlpha:i,ensureAlpha:a,extractChannel:o,joinChannel:s,bandbool:c}),e.bool=r}})),ne=a(((e,n)=>{var r=t(`node:path`),i=f(),a=H(),o=new Map([[`heic`,`heif`],[`heif`,`heif`],[`avif`,`avif`],[`jpeg`,`jpeg`],[`jpg`,`jpeg`],[`jpe`,`jpeg`],[`tile`,`tile`],[`dz`,`tile`],[`png`,`png`],[`raw`,`raw`],[`tiff`,`tiff`],[`tif`,`tiff`],[`webp`,`webp`],[`gif`,`gif`],[`jp2`,`jp2`],[`jpx`,`jp2`],[`j2k`,`jp2`],[`j2c`,`jp2`],[`jxl`,`jxl`]]),s=/\.(jp[2x]|j2[kc])$/i,c=()=>Error(`JP2 output requires libvips with support for OpenJPEG`),l=e=>1<<31-Math.clz32(Math.ceil(Math.log2(e)));function u(e,t){let n;if(i.string(e)?i.string(this.options.input.file)&&r.resolve(this.options.input.file)===r.resolve(e)?n=Error(`Cannot use same file for input and output`):s.test(r.extname(e))&&!this.constructor.format.jp2k.output.file&&(n=c()):n=Error(`Missing output file path`),n)if(i.fn(t))t(n);else return Promise.reject(n);else{this.options.fileOut=e;let n=Error();return this._pipeline(t,n)}return this}function d(e,t){i.object(e)?this._setBooleanOption(`resolveWithObject`,e.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut=``;let n=Error();return this._pipeline(i.fn(e)?e:t,n)}function p(){return this.options.keepMetadata|=1,this}function m(e){if(i.object(e))for(let[t,n]of Object.entries(e))if(i.object(n))for(let[e,r]of Object.entries(n))if(i.string(r))this.options.withExif[`exif-${t.toLowerCase()}-${e}`]=r;else throw i.invalidParameterError(`${t}.${e}`,`string`,r);else throw i.invalidParameterError(t,`object`,n);else throw i.invalidParameterError(`exif`,`object`,e);return this.options.withExifMerge=!1,this.keepExif()}function h(e){return this.withExif(e),this.options.withExifMerge=!0,this}function g(){return this.options.keepMetadata|=8,this}function _(e,t){if(i.string(e))this.options.withIccProfile=e;else throw i.invalidParameterError(`icc`,`string`,e);if(this.keepIccProfile(),i.object(t)&&i.defined(t.attach))if(i.bool(t.attach))t.attach||(this.options.keepMetadata&=-9);else throw i.invalidParameterError(`attach`,`boolean`,t.attach);return this}function v(){return this.options.keepMetadata=31,this}function y(e){if(this.keepMetadata(),this.withIccProfile(`srgb`),i.object(e)){if(i.defined(e.orientation))if(i.integer(e.orientation)&&i.inRange(e.orientation,1,8))this.options.withMetadataOrientation=e.orientation;else throw i.invalidParameterError(`orientation`,`integer between 1 and 8`,e.orientation);if(i.defined(e.density))if(i.number(e.density)&&e.density>0)this.options.withMetadataDensity=e.density;else throw i.invalidParameterError(`density`,`positive number`,e.density);i.defined(e.icc)&&this.withIccProfile(e.icc),i.defined(e.exif)&&this.withExifMerge(e.exif)}return this}function b(e,t){let n=o.get((i.object(e)&&i.string(e.id)?e.id:e).toLowerCase());if(!n)throw i.invalidParameterError(`format`,`one of: ${[...o.keys()].join(`, `)}`,e);return this[n](t)}function x(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.jpegQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.progressive)&&this._setBooleanOption(`jpegProgressive`,e.progressive),i.defined(e.chromaSubsampling))if(i.string(e.chromaSubsampling)&&i.inArray(e.chromaSubsampling,[`4:2:0`,`4:4:4`]))this.options.jpegChromaSubsampling=e.chromaSubsampling;else throw i.invalidParameterError(`chromaSubsampling`,`one of: 4:2:0, 4:4:4`,e.chromaSubsampling);let t=i.bool(e.optimizeCoding)?e.optimizeCoding:e.optimiseCoding;if(i.defined(t)&&this._setBooleanOption(`jpegOptimiseCoding`,t),i.defined(e.mozjpeg))if(i.bool(e.mozjpeg))e.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw i.invalidParameterError(`mozjpeg`,`boolean`,e.mozjpeg);let n=i.bool(e.trellisQuantization)?e.trellisQuantization:e.trellisQuantisation;i.defined(n)&&this._setBooleanOption(`jpegTrellisQuantisation`,n),i.defined(e.overshootDeringing)&&this._setBooleanOption(`jpegOvershootDeringing`,e.overshootDeringing);let r=i.bool(e.optimizeScans)?e.optimizeScans:e.optimiseScans;i.defined(r)&&(this._setBooleanOption(`jpegOptimiseScans`,r),r&&(this.options.jpegProgressive=!0));let a=i.number(e.quantizationTable)?e.quantizationTable:e.quantisationTable;if(i.defined(a))if(i.integer(a)&&i.inRange(a,0,8))this.options.jpegQuantisationTable=a;else throw i.invalidParameterError(`quantisationTable`,`integer between 0 and 8`,a)}return this._updateFormatOut(`jpeg`,e)}function S(e){if(i.object(e)){if(i.defined(e.progressive)&&this._setBooleanOption(`pngProgressive`,e.progressive),i.defined(e.compressionLevel))if(i.integer(e.compressionLevel)&&i.inRange(e.compressionLevel,0,9))this.options.pngCompressionLevel=e.compressionLevel;else throw i.invalidParameterError(`compressionLevel`,`integer between 0 and 9`,e.compressionLevel);i.defined(e.adaptiveFiltering)&&this._setBooleanOption(`pngAdaptiveFiltering`,e.adaptiveFiltering);let t=e.colours||e.colors;if(i.defined(t))if(i.integer(t)&&i.inRange(t,2,256))this.options.pngBitdepth=l(t);else throw i.invalidParameterError(`colours`,`integer between 2 and 256`,t);if(i.defined(e.palette)?this._setBooleanOption(`pngPalette`,e.palette):[e.quality,e.effort,e.colours,e.colors,e.dither].some(i.defined)&&this._setBooleanOption(`pngPalette`,!0),this.options.pngPalette){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,0,100))this.options.pngQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 0 and 100`,e.quality);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,1,10))this.options.pngEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 1 and 10`,e.effort);if(i.defined(e.dither))if(i.number(e.dither)&&i.inRange(e.dither,0,1))this.options.pngDither=e.dither;else throw i.invalidParameterError(`dither`,`number between 0.0 and 1.0`,e.dither)}}return this._updateFormatOut(`png`,e)}function C(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.webpQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.alphaQuality))if(i.integer(e.alphaQuality)&&i.inRange(e.alphaQuality,0,100))this.options.webpAlphaQuality=e.alphaQuality;else throw i.invalidParameterError(`alphaQuality`,`integer between 0 and 100`,e.alphaQuality);if(i.defined(e.lossless)&&this._setBooleanOption(`webpLossless`,e.lossless),i.defined(e.nearLossless)&&this._setBooleanOption(`webpNearLossless`,e.nearLossless),i.defined(e.smartSubsample)&&this._setBooleanOption(`webpSmartSubsample`,e.smartSubsample),i.defined(e.preset))if(i.string(e.preset)&&i.inArray(e.preset,[`default`,`photo`,`picture`,`drawing`,`icon`,`text`]))this.options.webpPreset=e.preset;else throw i.invalidParameterError(`preset`,`one of: default, photo, picture, drawing, icon, text`,e.preset);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,0,6))this.options.webpEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 0 and 6`,e.effort);i.defined(e.minSize)&&this._setBooleanOption(`webpMinSize`,e.minSize),i.defined(e.mixed)&&this._setBooleanOption(`webpMixed`,e.mixed)}return E(e,this.options),this._updateFormatOut(`webp`,e)}function w(e){if(i.object(e)){i.defined(e.reuse)&&this._setBooleanOption(`gifReuse`,e.reuse),i.defined(e.progressive)&&this._setBooleanOption(`gifProgressive`,e.progressive);let t=e.colours||e.colors;if(i.defined(t))if(i.integer(t)&&i.inRange(t,2,256))this.options.gifBitdepth=l(t);else throw i.invalidParameterError(`colours`,`integer between 2 and 256`,t);if(i.defined(e.effort))if(i.number(e.effort)&&i.inRange(e.effort,1,10))this.options.gifEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 1 and 10`,e.effort);if(i.defined(e.dither))if(i.number(e.dither)&&i.inRange(e.dither,0,1))this.options.gifDither=e.dither;else throw i.invalidParameterError(`dither`,`number between 0.0 and 1.0`,e.dither);if(i.defined(e.interFrameMaxError))if(i.number(e.interFrameMaxError)&&i.inRange(e.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=e.interFrameMaxError;else throw i.invalidParameterError(`interFrameMaxError`,`number between 0.0 and 32.0`,e.interFrameMaxError);if(i.defined(e.interPaletteMaxError))if(i.number(e.interPaletteMaxError)&&i.inRange(e.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=e.interPaletteMaxError;else throw i.invalidParameterError(`interPaletteMaxError`,`number between 0.0 and 256.0`,e.interPaletteMaxError)}return E(e,this.options),this._updateFormatOut(`gif`,e)}function T(e){if(!this.constructor.format.jp2k.output.buffer)throw c();if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.jp2Quality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.lossless))if(i.bool(e.lossless))this.options.jp2Lossless=e.lossless;else throw i.invalidParameterError(`lossless`,`boolean`,e.lossless);if(i.defined(e.tileWidth))if(i.integer(e.tileWidth)&&i.inRange(e.tileWidth,1,32768))this.options.jp2TileWidth=e.tileWidth;else throw i.invalidParameterError(`tileWidth`,`integer between 1 and 32768`,e.tileWidth);if(i.defined(e.tileHeight))if(i.integer(e.tileHeight)&&i.inRange(e.tileHeight,1,32768))this.options.jp2TileHeight=e.tileHeight;else throw i.invalidParameterError(`tileHeight`,`integer between 1 and 32768`,e.tileHeight);if(i.defined(e.chromaSubsampling))if(i.string(e.chromaSubsampling)&&i.inArray(e.chromaSubsampling,[`4:2:0`,`4:4:4`]))this.options.jp2ChromaSubsampling=e.chromaSubsampling;else throw i.invalidParameterError(`chromaSubsampling`,`one of: 4:2:0, 4:4:4`,e.chromaSubsampling)}return this._updateFormatOut(`jp2`,e)}function E(e,t){if(i.object(e)&&i.defined(e.loop))if(i.integer(e.loop)&&i.inRange(e.loop,0,65535))t.loop=e.loop;else throw i.invalidParameterError(`loop`,`integer between 0 and 65535`,e.loop);if(i.object(e)&&i.defined(e.delay))if(i.integer(e.delay)&&i.inRange(e.delay,0,65535))t.delay=[e.delay];else if(Array.isArray(e.delay)&&e.delay.every(i.integer)&&e.delay.every(e=>i.inRange(e,0,65535)))t.delay=e.delay;else throw i.invalidParameterError(`delay`,`integer or an array of integers between 0 and 65535`,e.delay)}function D(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.tiffQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.bitdepth))if(i.integer(e.bitdepth)&&i.inArray(e.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=e.bitdepth;else throw i.invalidParameterError(`bitdepth`,`1, 2, 4 or 8`,e.bitdepth);if(i.defined(e.tile)&&this._setBooleanOption(`tiffTile`,e.tile),i.defined(e.tileWidth))if(i.integer(e.tileWidth)&&e.tileWidth>0)this.options.tiffTileWidth=e.tileWidth;else throw i.invalidParameterError(`tileWidth`,`integer greater than zero`,e.tileWidth);if(i.defined(e.tileHeight))if(i.integer(e.tileHeight)&&e.tileHeight>0)this.options.tiffTileHeight=e.tileHeight;else throw i.invalidParameterError(`tileHeight`,`integer greater than zero`,e.tileHeight);if(i.defined(e.miniswhite)&&this._setBooleanOption(`tiffMiniswhite`,e.miniswhite),i.defined(e.pyramid)&&this._setBooleanOption(`tiffPyramid`,e.pyramid),i.defined(e.xres))if(i.number(e.xres)&&e.xres>0)this.options.tiffXres=e.xres;else throw i.invalidParameterError(`xres`,`number greater than zero`,e.xres);if(i.defined(e.yres))if(i.number(e.yres)&&e.yres>0)this.options.tiffYres=e.yres;else throw i.invalidParameterError(`yres`,`number greater than zero`,e.yres);if(i.defined(e.compression))if(i.string(e.compression)&&i.inArray(e.compression,[`none`,`jpeg`,`deflate`,`packbits`,`ccittfax4`,`lzw`,`webp`,`zstd`,`jp2k`]))this.options.tiffCompression=e.compression;else throw i.invalidParameterError(`compression`,`one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k`,e.compression);if(i.defined(e.predictor))if(i.string(e.predictor)&&i.inArray(e.predictor,[`none`,`horizontal`,`float`]))this.options.tiffPredictor=e.predictor;else throw i.invalidParameterError(`predictor`,`one of: none, horizontal, float`,e.predictor);if(i.defined(e.resolutionUnit))if(i.string(e.resolutionUnit)&&i.inArray(e.resolutionUnit,[`inch`,`cm`]))this.options.tiffResolutionUnit=e.resolutionUnit;else throw i.invalidParameterError(`resolutionUnit`,`one of: inch, cm`,e.resolutionUnit)}return this._updateFormatOut(`tiff`,e)}function O(e){return this.heif({...e,compression:`av1`})}function k(e){if(i.object(e)){if(i.string(e.compression)&&i.inArray(e.compression,[`av1`,`hevc`]))this.options.heifCompression=e.compression;else throw i.invalidParameterError(`compression`,`one of: av1, hevc`,e.compression);if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.heifQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.lossless))if(i.bool(e.lossless))this.options.heifLossless=e.lossless;else throw i.invalidParameterError(`lossless`,`boolean`,e.lossless);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,0,9))this.options.heifEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 0 and 9`,e.effort);if(i.defined(e.chromaSubsampling))if(i.string(e.chromaSubsampling)&&i.inArray(e.chromaSubsampling,[`4:2:0`,`4:4:4`]))this.options.heifChromaSubsampling=e.chromaSubsampling;else throw i.invalidParameterError(`chromaSubsampling`,`one of: 4:2:0, 4:4:4`,e.chromaSubsampling);if(i.defined(e.bitdepth))if(i.integer(e.bitdepth)&&i.inArray(e.bitdepth,[8,10,12])){if(e.bitdepth!==8&&this.constructor.versions.heif)throw i.invalidParameterError(`bitdepth when using prebuilt binaries`,8,e.bitdepth);this.options.heifBitdepth=e.bitdepth}else throw i.invalidParameterError(`bitdepth`,`8, 10 or 12`,e.bitdepth)}else throw i.invalidParameterError(`options`,`Object`,e);return this._updateFormatOut(`heif`,e)}function A(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.jxlDistance=e.quality>=30?.1+(100-e.quality)*.09:53/3e3*e.quality*e.quality-23/20*e.quality+25;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);else if(i.defined(e.distance))if(i.number(e.distance)&&i.inRange(e.distance,0,15))this.options.jxlDistance=e.distance;else throw i.invalidParameterError(`distance`,`number between 0.0 and 15.0`,e.distance);if(i.defined(e.decodingTier))if(i.integer(e.decodingTier)&&i.inRange(e.decodingTier,0,4))this.options.jxlDecodingTier=e.decodingTier;else throw i.invalidParameterError(`decodingTier`,`integer between 0 and 4`,e.decodingTier);if(i.defined(e.lossless))if(i.bool(e.lossless))this.options.jxlLossless=e.lossless;else throw i.invalidParameterError(`lossless`,`boolean`,e.lossless);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,3,9))this.options.jxlEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 3 and 9`,e.effort)}return this._updateFormatOut(`jxl`,e)}function j(e){if(i.object(e)&&i.defined(e.depth))if(i.string(e.depth)&&i.inArray(e.depth,[`char`,`uchar`,`short`,`ushort`,`int`,`uint`,`float`,`complex`,`double`,`dpcomplex`]))this.options.rawDepth=e.depth;else throw i.invalidParameterError(`depth`,`one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex`,e.depth);return this._updateFormatOut(`raw`)}function M(e){if(i.object(e)){if(i.defined(e.size))if(i.integer(e.size)&&i.inRange(e.size,1,8192))this.options.tileSize=e.size;else throw i.invalidParameterError(`size`,`integer between 1 and 8192`,e.size);if(i.defined(e.overlap))if(i.integer(e.overlap)&&i.inRange(e.overlap,0,8192)){if(e.overlap>this.options.tileSize)throw i.invalidParameterError(`overlap`,`<= size (${this.options.tileSize})`,e.overlap);this.options.tileOverlap=e.overlap}else throw i.invalidParameterError(`overlap`,`integer between 0 and 8192`,e.overlap);if(i.defined(e.container))if(i.string(e.container)&&i.inArray(e.container,[`fs`,`zip`]))this.options.tileContainer=e.container;else throw i.invalidParameterError(`container`,`one of: fs, zip`,e.container);if(i.defined(e.layout))if(i.string(e.layout)&&i.inArray(e.layout,[`dz`,`google`,`iiif`,`iiif3`,`zoomify`]))this.options.tileLayout=e.layout;else throw i.invalidParameterError(`layout`,`one of: dz, google, iiif, iiif3, zoomify`,e.layout);if(i.defined(e.angle))if(i.integer(e.angle)&&!(e.angle%90))this.options.tileAngle=e.angle;else throw i.invalidParameterError(`angle`,`positive/negative multiple of 90`,e.angle);if(this._setBackgroundColourOption(`tileBackground`,e.background),i.defined(e.depth))if(i.string(e.depth)&&i.inArray(e.depth,[`onepixel`,`onetile`,`one`]))this.options.tileDepth=e.depth;else throw i.invalidParameterError(`depth`,`one of: onepixel, onetile, one`,e.depth);if(i.defined(e.skipBlanks))if(i.integer(e.skipBlanks)&&i.inRange(e.skipBlanks,-1,65535))this.options.tileSkipBlanks=e.skipBlanks;else throw i.invalidParameterError(`skipBlanks`,`integer between -1 and 255/65535`,e.skipBlanks);else i.defined(e.layout)&&e.layout===`google`&&(this.options.tileSkipBlanks=5);let t=i.bool(e.center)?e.center:e.centre;if(i.defined(t)&&this._setBooleanOption(`tileCentre`,t),i.defined(e.id))if(i.string(e.id))this.options.tileId=e.id;else throw i.invalidParameterError(`id`,`string`,e.id);if(i.defined(e.basename))if(i.string(e.basename))this.options.tileBasename=e.basename;else throw i.invalidParameterError(`basename`,`string`,e.basename)}if(i.inArray(this.options.formatOut,[`jpeg`,`png`,`webp`]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!==`input`)throw i.invalidParameterError(`format`,`one of: jpeg, png, webp`,this.options.formatOut);return this._updateFormatOut(`dz`)}function N(e){if(!i.plainObject(e))throw i.invalidParameterError(`options`,`object`,e);if(i.integer(e.seconds)&&i.inRange(e.seconds,0,3600))this.options.timeoutSeconds=e.seconds;else throw i.invalidParameterError(`seconds`,`integer between 0 and 3600`,e.seconds);return this}function P(e,t){return i.object(t)&&t.force===!1||(this.options.formatOut=e),this}function F(e,t){if(i.bool(t))this.options[e]=t;else throw i.invalidParameterError(e,`boolean`,t)}function I(){if(!this.options.streamOut){this.options.streamOut=!0;let e=Error();this._pipeline(void 0,e)}}function L(e,t){return typeof e==`function`?(this._isStreamInput()?this.on(`finish`,()=>{this._flattenBufferIn(),a.pipeline(this.options,(n,r,a)=>{n?e(i.nativeError(n,t)):e(null,r,a)})}):a.pipeline(this.options,(n,r,a)=>{n?e(i.nativeError(n,t)):e(null,r,a)}),this):this.options.streamOut?(this._isStreamInput()?(this.once(`finish`,()=>{this._flattenBufferIn(),a.pipeline(this.options,(e,n,r)=>{e?this.emit(`error`,i.nativeError(e,t)):(this.emit(`info`,r),this.push(n)),this.push(null),this.on(`end`,()=>this.emit(`close`))})}),this.streamInFinished&&this.emit(`finish`)):a.pipeline(this.options,(e,n,r)=>{e?this.emit(`error`,i.nativeError(e,t)):(this.emit(`info`,r),this.push(n)),this.push(null),this.on(`end`,()=>this.emit(`close`))}),this):this._isStreamInput()?new Promise((e,n)=>{this.once(`finish`,()=>{this._flattenBufferIn(),a.pipeline(this.options,(r,a,o)=>{r?n(i.nativeError(r,t)):this.options.resolveWithObject?e({data:a,info:o}):e(a)})})}):new Promise((e,n)=>{a.pipeline(this.options,(r,a,o)=>{r?n(i.nativeError(r,t)):this.options.resolveWithObject?e({data:a,info:o}):e(a)})})}n.exports=function(e){Object.assign(e.prototype,{toFile:u,toBuffer:d,keepExif:p,withExif:m,withExifMerge:h,keepIccProfile:g,withIccProfile:_,keepMetadata:v,withMetadata:y,toFormat:b,jpeg:x,jp2:T,png:S,webp:C,tiff:D,avif:O,heif:k,jxl:A,gif:w,raw:j,tile:M,timeout:N,_updateFormatOut:P,_setBooleanOption:F,_read:I,_pipeline:L})}})),re=a(((n,r)=>{var i=t(`node:events`),a=d(),o=f(),{runtimePlatformArch:s}=V(),c=H(),l=s(),u=c.libvipsVersion(),m=c.format();m.heif.output.alias=[`avif`,`heic`],m.jpeg.output.alias=[`jpe`,`jpg`],m.tiff.output.alias=[`tif`],m.jp2k.output.alias=[`j2c`,`j2k`,`jp2`,`jpx`];var h={nearest:`nearest`,bilinear:`bilinear`,bicubic:`bicubic`,locallyBoundedBicubic:`lbb`,nohalo:`nohalo`,vertexSplitQuadraticBasisSpline:`vsqbs`},g={vips:u.semver};if(!u.isGlobal)if(u.isWasm)try{g=t(`@img/sharp-wasm32/versions`)}catch{}else try{g=t(`@img/sharp-${l}/versions`)}catch{try{g=t(`@img/sharp-libvips-${l}/versions`)}catch{}}g.sharp=(B(),e(p).default).version,g.heif&&m.heif&&(m.heif.input.fileSuffix=[`.avif`],m.heif.output.alias=[`avif`]);function _(e){return o.bool(e)?e?c.cache(50,20,100):c.cache(0,0,0):o.object(e)?c.cache(e.memory,e.files,e.items):c.cache()}_(!0);function v(e){return c.concurrency(o.integer(e)?e:null)}a.familySync()===a.GLIBC&&!c._isUsingJemalloc()?c.concurrency(1):a.familySync()===a.MUSL&&c.concurrency()===1024&&c.concurrency(t(`node:os`).availableParallelism());var y=new i.EventEmitter;function b(){return c.counters()}function x(e){return c.simd(o.bool(e)?e:null)}function S(e){if(o.object(e))if(Array.isArray(e.operation)&&e.operation.every(o.string))c.block(e.operation,!0);else throw o.invalidParameterError(`operation`,`Array<string>`,e.operation);else throw o.invalidParameterError(`options`,`object`,e)}function C(e){if(o.object(e))if(Array.isArray(e.operation)&&e.operation.every(o.string))c.block(e.operation,!1);else throw o.invalidParameterError(`operation`,`Array<string>`,e.operation);else throw o.invalidParameterError(`options`,`object`,e)}r.exports=function(e){e.cache=_,e.concurrency=v,e.counters=b,e.simd=x,e.format=m,e.interpolators=h,e.versions=g,e.queue=y,e.block=S,e.unblock=C}})),ie=a(((e,t)=>{var n=U();J()(n),Y()(n),X()(n),Z()(n),ee()(n),te()(n),ne()(n),re()(n),t.exports=n})),Q,$;n((()=>{Q=r(ie(),1),$=Q.default}))();export{$ as default,$ as sharp};
2
+ `))}})),U=a(((e,n)=>{var r=t(`node:util`),i=t(`node:stream`),a=f();H();var o=r.debuglog(`sharp`),s=function(e,t){if(arguments.length===1&&!a.defined(e))throw Error(`Invalid input`);return this instanceof s?(i.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:`crop`,position:0,resizeBackground:[0,0,0,255],useExifOrientation:!1,angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBeforePreExtract:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:`background`,withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:`lanczos3`,fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:`integer`,minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:``,joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:`srgb`,colourspacePipeline:`last`,composite:[],fileOut:``,formatOut:`input`,streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:``,withExif:{},withExifMerge:!0,resolveWithObject:!1,jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:`4:2:0`,jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:`4:4:4`,webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpPreset:`default`,webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:`jpeg`,tiffPredictor:`horizontal`,tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:`inch`,heifQuality:50,heifLossless:!1,heifCompression:`av1`,heifEffort:4,heifChromaSubsampling:`4:4:4`,heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:`uchar`,tileSize:256,tileOverlap:0,tileContainer:`fs`,tileLayout:`dz`,tileFormat:`last`,tileDepth:`last`,tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:`https://example.com/iiif`,tileBasename:``,timeoutSeconds:0,linearA:[],linearB:[],debuglog:e=>{this.emit(`warning`,e),o(e)},queueListener:function(e){s.queue.emit(`change`,e)}},this.options.input=this._createInputDescriptor(e,t,{allowStream:!0}),this):new s(e,t)};Object.setPrototypeOf(s.prototype,i.Duplex.prototype),Object.setPrototypeOf(s,i.Duplex);function c(){let e=this.constructor.call(),{debuglog:t,queueListener:n,...r}=this.options;return e.options=structuredClone(r),e.options.debuglog=t,e.options.queueListener=n,this._isStreamInput()&&this.on(`finish`,()=>{this._flattenBufferIn(),e.options.input.buffer=this.options.input.buffer,e.emit(`finish`)}),e}Object.assign(s.prototype,{clone:c}),n.exports=s})),W=a(((e,t)=>{t.exports=function(e){return!e||typeof e==`string`?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`)}})),G=a(((e,t)=>{var n=W(),r=Array.prototype.concat,i=Array.prototype.slice,a=t.exports=function(e){for(var t=[],a=0,o=e.length;a<o;a++){var s=e[a];n(s)?t=r.call(t,i.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}})),K=a(((e,t)=>{var n=l(),r=G(),i=Object.hasOwnProperty,a=Object.create(null);for(var o in n)i.call(n,o)&&(a[n[o]]=o);var s=t.exports={to:{},get:{}};s.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=s.get.hsl(e),r=`hsl`;break;case`hwb`:n=s.get.hwb(e),r=`hwb`;break;default:n=s.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},s.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,a=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,l=[0,0,0,1],u,d,f;if(u=e.match(r)){for(f=u[2],u=u[1],d=0;d<3;d++){var p=d*2;l[d]=parseInt(u.slice(p,p+2),16)}f&&(l[3]=parseInt(f,16)/255)}else if(u=e.match(t)){for(u=u[1],f=u[3],d=0;d<3;d++)l[d]=parseInt(u[d]+u[d],16);f&&(l[3]=parseInt(f+f,16)/255)}else if(u=e.match(a)){for(d=0;d<3;d++)l[d]=parseInt(u[d+1],0);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(o)){for(d=0;d<3;d++)l[d]=Math.round(parseFloat(u[d+1])*2.55);u[4]&&(u[5]?l[3]=parseFloat(u[4])*.01:l[3]=parseFloat(u[4]))}else if(u=e.match(s))return u[1]===`transparent`?[0,0,0,0]:i.call(n,u[1])?(l=n[u[1]],l[3]=1,l):null;else return null;for(d=0;d<3;d++)l[d]=c(l[d],0,255);return l[3]=c(l[3],0,1),l},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=r(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(e[3]*255)):``)},s.to.rgb=function(){var e=r(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},s.to.rgb.percent=function(){var e=r(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+i+`%)`:`rgba(`+t+`%, `+n+`%, `+i+`%, `+e[3]+`)`},s.to.hsl=function(){var e=r(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},s.to.hwb=function(){var e=r(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},s.to.keyword=function(e){return a[e.slice(0,3)]};function c(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}})),q=a(((e,t)=>{var n=K(),r=u(),i=[`keyword`,`gray`,`hex`],a={};for(let e of Object.keys(r))a[[...r[e].labels].sort().join(``)]=e;var o={};function s(e,t){if(!(this instanceof s))return new s(e,t);if(t&&t in i&&(t=null),t&&!(t in r))throw Error(`Unknown model: `+t);let c,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof s)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=n.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=r[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0){this.model=t||`rgb`,l=r[this.model].channels;let n=Array.prototype.slice.call(e,0,l);this.color=m(n,l),this.valpha=typeof e[l]==`number`?e[l]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let n=t.sort().join(``);if(!(n in a))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=a[n];let{labels:i}=r[this.model],o=[];for(c=0;c<i.length;c++)o.push(e[i[c]]);this.color=m(o)}if(o[this.model])for(l=r[this.model].channels,c=0;c<l;c++){let e=o[this.model][c];e&&(this.color[c]=e(this.color[c]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}s.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in n.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return n.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=r[this.model],{labels:n}=r[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new s([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new s([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:d(`rgb`,0,f(255)),green:d(`rgb`,1,f(255)),blue:d(`rgb`,2,f(255)),hue:d([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:d(`hsl`,1,f(100)),lightness:d(`hsl`,2,f(100)),saturationv:d(`hsv`,1,f(100)),value:d(`hsv`,2,f(100)),chroma:d(`hcg`,1,f(100)),gray:d(`hcg`,2,f(100)),white:d(`hwb`,1,f(100)),wblack:d(`hwb`,2,f(100)),cyan:d(`cmyk`,0,f(100)),magenta:d(`cmyk`,1,f(100)),yellow:d(`cmyk`,2,f(100)),black:d(`cmyk`,3,f(100)),x:d(`xyz`,0,f(95.047)),y:d(`xyz`,1,f(100)),z:d(`xyz`,2,f(108.833)),l:d(`lab`,0,f(100)),a:d(`lab`,1),b:d(`lab`,2),keyword(e){return e===void 0?r[this.model].keyword(this.color):new s(e)},hex(e){return e===void 0?n.to.hex(this.rgb().round().color):new s(e)},hexa(e){if(e!==void 0)return new s(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r=`0`+r),n.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return s.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),c=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-c;return s.rgb(c*n.red()+l*r.red(),c*n.green()+l*r.green(),c*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(r)){if(i.includes(e))continue;let{channels:t}=r[e];s.prototype[e]=function(...t){return this.model===e?new s(this):t.length>0?new s(t,e):new s([...p(r[this.model][e].raw(this.color)),this.valpha],e)},s[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=m(n,t)),new s(r,e)}}function c(e,t){return Number(e.toFixed(t))}function l(e){return function(t){return c(t,e)}}function d(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(o[r]||(o[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function f(e){return function(t){return Math.max(0,Math.min(e,t))}}function p(e){return Array.isArray(e)?e:[e]}function m(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}t.exports=s})),J=a(((e,t)=>{var n=q(),r=f(),i=H(),a={left:`low`,center:`centre`,centre:`centre`,right:`high`};function o(e){let{raw:t,density:n,limitInputPixels:i,ignoreIcc:a,unlimited:o,sequentialRead:s,failOn:c,failOnError:l,animated:u,page:d,pages:f,subifd:p}=e;return[t,n,i,a,o,s,c,l,u,d,f,p].some(r.defined)?{raw:t,density:n,limitInputPixels:i,ignoreIcc:a,unlimited:o,sequentialRead:s,failOn:c,failOnError:l,animated:u,page:d,pages:f,subifd:p}:void 0}function s(e,t,i){let a={failOn:`warning`,limitInputPixels:16383**2,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(r.string(e))a.file=e;else if(r.buffer(e)){if(e.length===0)throw Error(`Input Buffer is empty`);a.buffer=e}else if(r.arrayBuffer(e)){if(e.byteLength===0)throw Error(`Input bit Array is empty`);a.buffer=Buffer.from(e,0,e.byteLength)}else if(r.typedArray(e)){if(e.length===0)throw Error(`Input Bit Array is empty`);a.buffer=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(r.plainObject(e)&&!r.defined(t))t=e,o(t)&&(a.buffer=[]);else if(!r.defined(e)&&!r.defined(t)&&r.object(i)&&i.allowStream)a.buffer=[];else throw Error(`Unsupported input '${e}' of type ${typeof e}${r.defined(t)?` when also providing options of type ${typeof t}`:``}`);if(r.object(t)){if(r.defined(t.failOnError))if(r.bool(t.failOnError))a.failOn=t.failOnError?`warning`:`none`;else throw r.invalidParameterError(`failOnError`,`boolean`,t.failOnError);if(r.defined(t.failOn))if(r.string(t.failOn)&&r.inArray(t.failOn,[`none`,`truncated`,`error`,`warning`]))a.failOn=t.failOn;else throw r.invalidParameterError(`failOn`,`one of: none, truncated, error, warning`,t.failOn);if(r.defined(t.density))if(r.inRange(t.density,1,1e5))a.density=t.density;else throw r.invalidParameterError(`density`,`number between 1 and 100000`,t.density);if(r.defined(t.ignoreIcc))if(r.bool(t.ignoreIcc))a.ignoreIcc=t.ignoreIcc;else throw r.invalidParameterError(`ignoreIcc`,`boolean`,t.ignoreIcc);if(r.defined(t.limitInputPixels))if(r.bool(t.limitInputPixels))a.limitInputPixels=t.limitInputPixels?16383**2:0;else if(r.integer(t.limitInputPixels)&&r.inRange(t.limitInputPixels,0,2**53-1))a.limitInputPixels=t.limitInputPixels;else throw r.invalidParameterError(`limitInputPixels`,`positive integer`,t.limitInputPixels);if(r.defined(t.unlimited))if(r.bool(t.unlimited))a.unlimited=t.unlimited;else throw r.invalidParameterError(`unlimited`,`boolean`,t.unlimited);if(r.defined(t.sequentialRead))if(r.bool(t.sequentialRead))a.sequentialRead=t.sequentialRead;else throw r.invalidParameterError(`sequentialRead`,`boolean`,t.sequentialRead);if(r.defined(t.raw))if(r.object(t.raw)&&r.integer(t.raw.width)&&t.raw.width>0&&r.integer(t.raw.height)&&t.raw.height>0&&r.integer(t.raw.channels)&&r.inRange(t.raw.channels,1,4))switch(a.rawWidth=t.raw.width,a.rawHeight=t.raw.height,a.rawChannels=t.raw.channels,a.rawPremultiplied=!!t.raw.premultiplied,e.constructor){case Uint8Array:case Uint8ClampedArray:a.rawDepth=`uchar`;break;case Int8Array:a.rawDepth=`char`;break;case Uint16Array:a.rawDepth=`ushort`;break;case Int16Array:a.rawDepth=`short`;break;case Uint32Array:a.rawDepth=`uint`;break;case Int32Array:a.rawDepth=`int`;break;case Float32Array:a.rawDepth=`float`;break;case Float64Array:a.rawDepth=`double`;break;default:a.rawDepth=`uchar`;break}else throw Error(`Expected width, height and channels for raw pixel input`);if(r.defined(t.animated))if(r.bool(t.animated))a.pages=t.animated?-1:1;else throw r.invalidParameterError(`animated`,`boolean`,t.animated);if(r.defined(t.pages))if(r.integer(t.pages)&&r.inRange(t.pages,-1,1e5))a.pages=t.pages;else throw r.invalidParameterError(`pages`,`integer between -1 and 100000`,t.pages);if(r.defined(t.page))if(r.integer(t.page)&&r.inRange(t.page,0,1e5))a.page=t.page;else throw r.invalidParameterError(`page`,`integer between 0 and 100000`,t.page);if(r.defined(t.level))if(r.integer(t.level)&&r.inRange(t.level,0,256))a.level=t.level;else throw r.invalidParameterError(`level`,`integer between 0 and 256`,t.level);if(r.defined(t.subifd))if(r.integer(t.subifd)&&r.inRange(t.subifd,-1,1e5))a.subifd=t.subifd;else throw r.invalidParameterError(`subifd`,`integer between -1 and 100000`,t.subifd);if(r.defined(t.create))if(r.object(t.create)&&r.integer(t.create.width)&&t.create.width>0&&r.integer(t.create.height)&&t.create.height>0&&r.integer(t.create.channels)){if(a.createWidth=t.create.width,a.createHeight=t.create.height,a.createChannels=t.create.channels,r.defined(t.create.noise)){if(!r.object(t.create.noise))throw Error(`Expected noise to be an object`);if(!r.inArray(t.create.noise.type,[`gaussian`]))throw Error(`Only gaussian noise is supported at the moment`);if(!r.inRange(t.create.channels,1,4))throw r.invalidParameterError(`create.channels`,`number between 1 and 4`,t.create.channels);if(a.createNoiseType=t.create.noise.type,r.number(t.create.noise.mean)&&r.inRange(t.create.noise.mean,0,1e4))a.createNoiseMean=t.create.noise.mean;else throw r.invalidParameterError(`create.noise.mean`,`number between 0 and 10000`,t.create.noise.mean);if(r.number(t.create.noise.sigma)&&r.inRange(t.create.noise.sigma,0,1e4))a.createNoiseSigma=t.create.noise.sigma;else throw r.invalidParameterError(`create.noise.sigma`,`number between 0 and 10000`,t.create.noise.sigma)}else if(r.defined(t.create.background)){if(!r.inRange(t.create.channels,3,4))throw r.invalidParameterError(`create.channels`,`number between 3 and 4`,t.create.channels);let e=n(t.create.background);a.createBackground=[e.red(),e.green(),e.blue(),Math.round(e.alpha()*255)]}else throw Error(`Expected valid noise or background to create a new input image`);delete a.buffer}else throw Error(`Expected valid width, height and channels to create a new input image`);if(r.defined(t.text))if(r.object(t.text)&&r.string(t.text.text)){if(a.textValue=t.text.text,r.defined(t.text.height)&&r.defined(t.text.dpi))throw Error(`Expected only one of dpi or height`);if(r.defined(t.text.font))if(r.string(t.text.font))a.textFont=t.text.font;else throw r.invalidParameterError(`text.font`,`string`,t.text.font);if(r.defined(t.text.fontfile))if(r.string(t.text.fontfile))a.textFontfile=t.text.fontfile;else throw r.invalidParameterError(`text.fontfile`,`string`,t.text.fontfile);if(r.defined(t.text.width))if(r.integer(t.text.width)&&t.text.width>0)a.textWidth=t.text.width;else throw r.invalidParameterError(`text.width`,`positive integer`,t.text.width);if(r.defined(t.text.height))if(r.integer(t.text.height)&&t.text.height>0)a.textHeight=t.text.height;else throw r.invalidParameterError(`text.height`,`positive integer`,t.text.height);if(r.defined(t.text.align))if(r.string(t.text.align)&&r.string(this.constructor.align[t.text.align]))a.textAlign=this.constructor.align[t.text.align];else throw r.invalidParameterError(`text.align`,`valid alignment`,t.text.align);if(r.defined(t.text.justify))if(r.bool(t.text.justify))a.textJustify=t.text.justify;else throw r.invalidParameterError(`text.justify`,`boolean`,t.text.justify);if(r.defined(t.text.dpi))if(r.integer(t.text.dpi)&&r.inRange(t.text.dpi,1,1e6))a.textDpi=t.text.dpi;else throw r.invalidParameterError(`text.dpi`,`integer between 1 and 1000000`,t.text.dpi);if(r.defined(t.text.rgba))if(r.bool(t.text.rgba))a.textRgba=t.text.rgba;else throw r.invalidParameterError(`text.rgba`,`bool`,t.text.rgba);if(r.defined(t.text.spacing))if(r.integer(t.text.spacing)&&r.inRange(t.text.spacing,-1e6,1e6))a.textSpacing=t.text.spacing;else throw r.invalidParameterError(`text.spacing`,`integer between -1000000 and 1000000`,t.text.spacing);if(r.defined(t.text.wrap))if(r.string(t.text.wrap)&&r.inArray(t.text.wrap,[`word`,`char`,`word-char`,`none`]))a.textWrap=t.text.wrap;else throw r.invalidParameterError(`text.wrap`,`one of: word, char, word-char, none`,t.text.wrap);delete a.buffer}else throw Error(`Expected a valid string to create an image with text.`)}else if(r.defined(t))throw Error(`Invalid input options `+t);return a}function c(e,t,n){Array.isArray(this.options.input.buffer)?r.buffer(e)?(this.options.input.buffer.length===0&&this.on(`finish`,()=>{this.streamInFinished=!0}),this.options.input.buffer.push(e),n()):n(Error(`Non-Buffer data on Writable Stream`)):n(Error(`Unexpected data on Writable Stream`))}function l(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function u(){return Array.isArray(this.options.input.buffer)}function d(e){let t=Error();return r.fn(e)?(this._isStreamInput()?this.on(`finish`,()=>{this._flattenBufferIn(),i.metadata(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)})}):i.metadata(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)}),this):this._isStreamInput()?new Promise((e,n)=>{let a=()=>{this._flattenBufferIn(),i.metadata(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})};this.writableFinished?a():this.once(`finish`,a)}):new Promise((e,n)=>{i.metadata(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})})}function p(e){let t=Error();return r.fn(e)?(this._isStreamInput()?this.on(`finish`,()=>{this._flattenBufferIn(),i.stats(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)})}):i.stats(this.options,(n,i)=>{n?e(r.nativeError(n,t)):e(null,i)}),this):this._isStreamInput()?new Promise((e,n)=>{this.on(`finish`,function(){this._flattenBufferIn(),i.stats(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})})}):new Promise((e,n)=>{i.stats(this.options,(i,a)=>{i?n(r.nativeError(i,t)):e(a)})})}t.exports=function(e){Object.assign(e.prototype,{_inputOptionsFromObject:o,_createInputDescriptor:s,_write:c,_flattenBufferIn:l,_isStreamInput:u,metadata:d,stats:p}),e.align=a}})),Y=a(((e,t)=>{var n=f(),r={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},i={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},a={background:`background`,copy:`copy`,repeat:`repeat`,mirror:`mirror`},o={entropy:16,attention:17},s={nearest:`nearest`,linear:`linear`,cubic:`cubic`,mitchell:`mitchell`,lanczos2:`lanczos2`,lanczos3:`lanczos3`},c={contain:`contain`,cover:`cover`,fill:`fill`,inside:`inside`,outside:`outside`},l={contain:`embed`,cover:`crop`,fill:`ignore_aspect`,inside:`max`,outside:`min`};function u(e){return e.angle%360!=0||e.useExifOrientation===!0||e.rotationAngle!==0}function d(e){return e.width!==-1||e.height!==-1}function p(e,t,a){if(d(this.options)&&this.options.debuglog(`ignoring previous resize options`),this.options.widthPost!==-1&&this.options.debuglog(`operation order will be: extract, resize, extract`),n.defined(e))if(n.object(e)&&!n.defined(a))a=e;else if(n.integer(e)&&e>0)this.options.width=e;else throw n.invalidParameterError(`width`,`positive integer`,e);else this.options.width=-1;if(n.defined(t))if(n.integer(t)&&t>0)this.options.height=t;else throw n.invalidParameterError(`height`,`positive integer`,t);else this.options.height=-1;if(n.object(a)){if(n.defined(a.width))if(n.integer(a.width)&&a.width>0)this.options.width=a.width;else throw n.invalidParameterError(`width`,`positive integer`,a.width);if(n.defined(a.height))if(n.integer(a.height)&&a.height>0)this.options.height=a.height;else throw n.invalidParameterError(`height`,`positive integer`,a.height);if(n.defined(a.fit)){let e=l[a.fit];if(n.string(e))this.options.canvas=e;else throw n.invalidParameterError(`fit`,`valid fit`,a.fit)}if(n.defined(a.position)){let e=n.integer(a.position)?a.position:o[a.position]||i[a.position]||r[a.position];if(n.integer(e)&&(n.inRange(e,0,8)||n.inRange(e,16,17)))this.options.position=e;else throw n.invalidParameterError(`position`,`valid position/gravity/strategy`,a.position)}if(this._setBackgroundColourOption(`resizeBackground`,a.background),n.defined(a.kernel))if(n.string(s[a.kernel]))this.options.kernel=s[a.kernel];else throw n.invalidParameterError(`kernel`,`valid kernel name`,a.kernel);n.defined(a.withoutEnlargement)&&this._setBooleanOption(`withoutEnlargement`,a.withoutEnlargement),n.defined(a.withoutReduction)&&this._setBooleanOption(`withoutReduction`,a.withoutReduction),n.defined(a.fastShrinkOnLoad)&&this._setBooleanOption(`fastShrinkOnLoad`,a.fastShrinkOnLoad)}return u(this.options)&&d(this.options)&&(this.options.rotateBeforePreExtract=!0),this}function m(e){if(n.integer(e)&&e>0)this.options.extendTop=e,this.options.extendBottom=e,this.options.extendLeft=e,this.options.extendRight=e;else if(n.object(e)){if(n.defined(e.top))if(n.integer(e.top)&&e.top>=0)this.options.extendTop=e.top;else throw n.invalidParameterError(`top`,`positive integer`,e.top);if(n.defined(e.bottom))if(n.integer(e.bottom)&&e.bottom>=0)this.options.extendBottom=e.bottom;else throw n.invalidParameterError(`bottom`,`positive integer`,e.bottom);if(n.defined(e.left))if(n.integer(e.left)&&e.left>=0)this.options.extendLeft=e.left;else throw n.invalidParameterError(`left`,`positive integer`,e.left);if(n.defined(e.right))if(n.integer(e.right)&&e.right>=0)this.options.extendRight=e.right;else throw n.invalidParameterError(`right`,`positive integer`,e.right);if(this._setBackgroundColourOption(`extendBackground`,e.background),n.defined(e.extendWith))if(n.string(a[e.extendWith]))this.options.extendWith=a[e.extendWith];else throw n.invalidParameterError(`extendWith`,`one of: background, copy, repeat, mirror`,e.extendWith)}else throw n.invalidParameterError(`extend`,`integer or object`,e);return this}function h(e){let t=d(this.options)||this.options.widthPre!==-1?`Post`:`Pre`;return this.options[`width${t}`]!==-1&&this.options.debuglog(`ignoring previous extract options`),[`left`,`top`,`width`,`height`].forEach(function(r){let i=e[r];if(n.integer(i)&&i>=0)this.options[r+(r===`left`||r===`top`?`Offset`:``)+t]=i;else throw n.invalidParameterError(r,`integer`,i)},this),u(this.options)&&!d(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBeforePreExtract=!0),this}function g(e){if(this.options.trimThreshold=10,n.defined(e))if(n.object(e)){if(n.defined(e.background)&&this._setBackgroundColourOption(`trimBackground`,e.background),n.defined(e.threshold))if(n.number(e.threshold)&&e.threshold>=0)this.options.trimThreshold=e.threshold;else throw n.invalidParameterError(`threshold`,`positive number`,e.threshold);n.defined(e.lineArt)&&this._setBooleanOption(`trimLineArt`,e.lineArt)}else throw n.invalidParameterError(`trim`,`object`,e);return u(this.options)&&(this.options.rotateBeforePreExtract=!0),this}t.exports=function(e){Object.assign(e.prototype,{resize:p,extend:m,extract:h,trim:g}),e.gravity=r,e.strategy=o,e.kernel=s,e.fit=c,e.position=i}})),X=a(((e,t)=>{var n=f(),r={clear:`clear`,source:`source`,over:`over`,in:`in`,out:`out`,atop:`atop`,dest:`dest`,"dest-over":`dest-over`,"dest-in":`dest-in`,"dest-out":`dest-out`,"dest-atop":`dest-atop`,xor:`xor`,add:`add`,saturate:`saturate`,multiply:`multiply`,screen:`screen`,overlay:`overlay`,darken:`darken`,lighten:`lighten`,"colour-dodge":`colour-dodge`,"color-dodge":`colour-dodge`,"colour-burn":`colour-burn`,"color-burn":`colour-burn`,"hard-light":`hard-light`,"soft-light":`soft-light`,difference:`difference`,exclusion:`exclusion`};function i(e){if(!Array.isArray(e))throw n.invalidParameterError(`images to composite`,`array`,e);return this.options.composite=e.map(e=>{if(!n.object(e))throw n.invalidParameterError(`image to composite`,`object`,e);let t=this._inputOptionsFromObject(e),i={input:this._createInputDescriptor(e.input,t,{allowStream:!1}),blend:`over`,tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(n.defined(e.blend))if(n.string(r[e.blend]))i.blend=r[e.blend];else throw n.invalidParameterError(`blend`,`valid blend name`,e.blend);if(n.defined(e.tile))if(n.bool(e.tile))i.tile=e.tile;else throw n.invalidParameterError(`tile`,`boolean`,e.tile);if(n.defined(e.left))if(n.integer(e.left))i.left=e.left;else throw n.invalidParameterError(`left`,`integer`,e.left);if(n.defined(e.top))if(n.integer(e.top))i.top=e.top;else throw n.invalidParameterError(`top`,`integer`,e.top);if(n.defined(e.top)!==n.defined(e.left))throw Error(`Expected both left and top to be set`);if(i.hasOffset=n.integer(e.top)&&n.integer(e.left),n.defined(e.gravity))if(n.integer(e.gravity)&&n.inRange(e.gravity,0,8))i.gravity=e.gravity;else if(n.string(e.gravity)&&n.integer(this.constructor.gravity[e.gravity]))i.gravity=this.constructor.gravity[e.gravity];else throw n.invalidParameterError(`gravity`,`valid gravity`,e.gravity);if(n.defined(e.premultiplied))if(n.bool(e.premultiplied))i.premultiplied=e.premultiplied;else throw n.invalidParameterError(`premultiplied`,`boolean`,e.premultiplied);return i}),this}t.exports=function(e){e.prototype.composite=i,e.blend=r}})),Z=a(((e,t)=>{var n=q(),r=f(),i={integer:`integer`,float:`float`,approximate:`approximate`};function a(e,t){if((this.options.useExifOrientation||this.options.angle||this.options.rotationAngle)&&this.options.debuglog(`ignoring previous rotate options`),!r.defined(e))this.options.useExifOrientation=!0;else if(r.integer(e)&&!(e%90))this.options.angle=e;else if(r.number(e)){if(this.options.rotationAngle=e,r.object(t)&&t.background){let e=n(t.background);this.options.rotationBackground=[e.red(),e.green(),e.blue(),Math.round(e.alpha()*255)]}}else throw r.invalidParameterError(`angle`,`numeric`,e);return this}function o(e){return this.options.flip=!r.bool(e)||e,this}function s(e){return this.options.flop=!r.bool(e)||e,this}function c(e,t){let n=[].concat(...e);if(n.length===4&&n.every(r.number))this.options.affineMatrix=n;else throw r.invalidParameterError(`matrix`,`1x4 or 2x2 array`,e);if(r.defined(t))if(r.object(t)){if(this._setBackgroundColourOption(`affineBackground`,t.background),r.defined(t.idx))if(r.number(t.idx))this.options.affineIdx=t.idx;else throw r.invalidParameterError(`options.idx`,`number`,t.idx);if(r.defined(t.idy))if(r.number(t.idy))this.options.affineIdy=t.idy;else throw r.invalidParameterError(`options.idy`,`number`,t.idy);if(r.defined(t.odx))if(r.number(t.odx))this.options.affineOdx=t.odx;else throw r.invalidParameterError(`options.odx`,`number`,t.odx);if(r.defined(t.ody))if(r.number(t.ody))this.options.affineOdy=t.ody;else throw r.invalidParameterError(`options.ody`,`number`,t.ody);if(r.defined(t.interpolator))if(r.inArray(t.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=t.interpolator;else throw r.invalidParameterError(`options.interpolator`,`valid interpolator name`,t.interpolator)}else throw r.invalidParameterError(`options`,`object`,t);return this}function l(e,t,n){if(!r.defined(e))this.options.sharpenSigma=-1;else if(r.bool(e))this.options.sharpenSigma=e?-1:0;else if(r.number(e)&&r.inRange(e,.01,1e4)){if(this.options.sharpenSigma=e,r.defined(t))if(r.number(t)&&r.inRange(t,0,1e4))this.options.sharpenM1=t;else throw r.invalidParameterError(`flat`,`number between 0 and 10000`,t);if(r.defined(n))if(r.number(n)&&r.inRange(n,0,1e4))this.options.sharpenM2=n;else throw r.invalidParameterError(`jagged`,`number between 0 and 10000`,n)}else if(r.plainObject(e)){if(r.number(e.sigma)&&r.inRange(e.sigma,1e-6,10))this.options.sharpenSigma=e.sigma;else throw r.invalidParameterError(`options.sigma`,`number between 0.000001 and 10`,e.sigma);if(r.defined(e.m1))if(r.number(e.m1)&&r.inRange(e.m1,0,1e6))this.options.sharpenM1=e.m1;else throw r.invalidParameterError(`options.m1`,`number between 0 and 1000000`,e.m1);if(r.defined(e.m2))if(r.number(e.m2)&&r.inRange(e.m2,0,1e6))this.options.sharpenM2=e.m2;else throw r.invalidParameterError(`options.m2`,`number between 0 and 1000000`,e.m2);if(r.defined(e.x1))if(r.number(e.x1)&&r.inRange(e.x1,0,1e6))this.options.sharpenX1=e.x1;else throw r.invalidParameterError(`options.x1`,`number between 0 and 1000000`,e.x1);if(r.defined(e.y2))if(r.number(e.y2)&&r.inRange(e.y2,0,1e6))this.options.sharpenY2=e.y2;else throw r.invalidParameterError(`options.y2`,`number between 0 and 1000000`,e.y2);if(r.defined(e.y3))if(r.number(e.y3)&&r.inRange(e.y3,0,1e6))this.options.sharpenY3=e.y3;else throw r.invalidParameterError(`options.y3`,`number between 0 and 1000000`,e.y3)}else throw r.invalidParameterError(`sigma`,`number between 0.01 and 10000`,e);return this}function u(e){if(!r.defined(e))this.options.medianSize=3;else if(r.integer(e)&&r.inRange(e,1,1e3))this.options.medianSize=e;else throw r.invalidParameterError(`size`,`integer between 1 and 1000`,e);return this}function d(e){let t;if(r.number(e))t=e;else if(r.plainObject(e)){if(!r.number(e.sigma))throw r.invalidParameterError(`options.sigma`,`number between 0.3 and 1000`,t);if(t=e.sigma,`precision`in e)if(r.string(i[e.precision]))this.options.precision=i[e.precision];else throw r.invalidParameterError(`precision`,`one of: integer, float, approximate`,e.precision);if(`minAmplitude`in e)if(r.number(e.minAmplitude)&&r.inRange(e.minAmplitude,.001,1))this.options.minAmpl=e.minAmplitude;else throw r.invalidParameterError(`minAmplitude`,`number between 0.001 and 1`,e.minAmplitude)}if(!r.defined(e))this.options.blurSigma=-1;else if(r.bool(e))this.options.blurSigma=e?-1:0;else if(r.number(t)&&r.inRange(t,.3,1e3))this.options.blurSigma=t;else throw r.invalidParameterError(`sigma`,`number between 0.3 and 1000`,t);return this}function p(e){return this.options.flatten=!r.bool(e)||e,r.object(e)&&this._setBackgroundColourOption(`flattenBackground`,e.background),this}function m(){return this.options.unflatten=!0,this}function h(e,t){if(!r.defined(e))this.options.gamma=2.2;else if(r.number(e)&&r.inRange(e,1,3))this.options.gamma=e;else throw r.invalidParameterError(`gamma`,`number between 1.0 and 3.0`,e);if(!r.defined(t))this.options.gammaOut=this.options.gamma;else if(r.number(t)&&r.inRange(t,1,3))this.options.gammaOut=t;else throw r.invalidParameterError(`gammaOut`,`number between 1.0 and 3.0`,t);return this}function g(e){if(this.options.negate=!r.bool(e)||e,r.plainObject(e)&&`alpha`in e)if(r.bool(e.alpha))this.options.negateAlpha=e.alpha;else throw r.invalidParameterError(`alpha`,`should be boolean value`,e.alpha);return this}function _(e){if(r.plainObject(e)){if(r.defined(e.lower))if(r.number(e.lower)&&r.inRange(e.lower,0,99))this.options.normaliseLower=e.lower;else throw r.invalidParameterError(`lower`,`number between 0 and 99`,e.lower);if(r.defined(e.upper))if(r.number(e.upper)&&r.inRange(e.upper,1,100))this.options.normaliseUpper=e.upper;else throw r.invalidParameterError(`upper`,`number between 1 and 100`,e.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw r.invalidParameterError(`range`,`lower to be less than upper`,`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function v(e){return this.normalise(e)}function y(e){if(r.plainObject(e)){if(r.integer(e.width)&&e.width>0)this.options.claheWidth=e.width;else throw r.invalidParameterError(`width`,`integer greater than zero`,e.width);if(r.integer(e.height)&&e.height>0)this.options.claheHeight=e.height;else throw r.invalidParameterError(`height`,`integer greater than zero`,e.height);if(r.defined(e.maxSlope))if(r.integer(e.maxSlope)&&r.inRange(e.maxSlope,0,100))this.options.claheMaxSlope=e.maxSlope;else throw r.invalidParameterError(`maxSlope`,`integer between 0 and 100`,e.maxSlope)}else throw r.invalidParameterError(`options`,`plain object`,e);return this}function b(e){if(!r.object(e)||!Array.isArray(e.kernel)||!r.integer(e.width)||!r.integer(e.height)||!r.inRange(e.width,3,1001)||!r.inRange(e.height,3,1001)||e.height*e.width!==e.kernel.length)throw Error(`Invalid convolution kernel`);return r.integer(e.scale)||(e.scale=e.kernel.reduce(function(e,t){return e+t},0)),e.scale<1&&(e.scale=1),r.integer(e.offset)||(e.offset=0),this.options.convKernel=e,this}function x(e,t){if(!r.defined(e))this.options.threshold=128;else if(r.bool(e))this.options.threshold=e?128:0;else if(r.integer(e)&&r.inRange(e,0,255))this.options.threshold=e;else throw r.invalidParameterError(`threshold`,`integer between 0 and 255`,e);return!r.object(t)||t.greyscale===!0||t.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function S(e,t,n){if(this.options.boolean=this._createInputDescriptor(e,n),r.string(t)&&r.inArray(t,[`and`,`or`,`eor`]))this.options.booleanOp=t;else throw r.invalidParameterError(`operator`,`one of: and, or, eor`,t);return this}function C(e,t){if(!r.defined(e)&&r.number(t)?e=1:r.number(e)&&!r.defined(t)&&(t=0),!r.defined(e))this.options.linearA=[];else if(r.number(e))this.options.linearA=[e];else if(Array.isArray(e)&&e.length&&e.every(r.number))this.options.linearA=e;else throw r.invalidParameterError(`a`,`number or array of numbers`,e);if(!r.defined(t))this.options.linearB=[];else if(r.number(t))this.options.linearB=[t];else if(Array.isArray(t)&&t.length&&t.every(r.number))this.options.linearB=t;else throw r.invalidParameterError(`b`,`number or array of numbers`,t);if(this.options.linearA.length!==this.options.linearB.length)throw Error(`Expected a and b to be arrays of the same length`);return this}function w(e){if(!Array.isArray(e))throw r.invalidParameterError(`inputMatrix`,`array`,e);if(e.length!==3&&e.length!==4)throw r.invalidParameterError(`inputMatrix`,`3x3 or 4x4 array`,e.length);let t=e.flat().map(Number);if(t.length!==9&&t.length!==16)throw r.invalidParameterError(`inputMatrix`,`cardinality of 9 or 16`,t.length);return this.options.recombMatrix=t,this}function T(e){if(!r.plainObject(e))throw r.invalidParameterError(`options`,`plain object`,e);if(`brightness`in e)if(r.number(e.brightness)&&e.brightness>=0)this.options.brightness=e.brightness;else throw r.invalidParameterError(`brightness`,`number above zero`,e.brightness);if(`saturation`in e)if(r.number(e.saturation)&&e.saturation>=0)this.options.saturation=e.saturation;else throw r.invalidParameterError(`saturation`,`number above zero`,e.saturation);if(`hue`in e)if(r.integer(e.hue))this.options.hue=e.hue%360;else throw r.invalidParameterError(`hue`,`number`,e.hue);if(`lightness`in e)if(r.number(e.lightness))this.options.lightness=e.lightness;else throw r.invalidParameterError(`lightness`,`number`,e.lightness);return this}t.exports=function(e){Object.assign(e.prototype,{rotate:a,flip:o,flop:s,affine:c,sharpen:l,median:u,blur:d,flatten:p,unflatten:m,gamma:h,negate:g,normalise:_,normalize:v,clahe:y,convolve:b,threshold:x,boolean:S,linear:C,recomb:w,modulate:T})}})),ee=a(((e,t)=>{var n=q(),r=f(),i={multiband:`multiband`,"b-w":`b-w`,bw:`b-w`,cmyk:`cmyk`,srgb:`srgb`};function a(e){return this._setBackgroundColourOption(`tint`,e),this}function o(e){return this.options.greyscale=!r.bool(e)||e,this}function s(e){return this.greyscale(e)}function c(e){if(!r.string(e))throw r.invalidParameterError(`colourspace`,`string`,e);return this.options.colourspacePipeline=e,this}function l(e){return this.pipelineColourspace(e)}function u(e){if(!r.string(e))throw r.invalidParameterError(`colourspace`,`string`,e);return this.options.colourspace=e,this}function d(e){return this.toColourspace(e)}function p(e,t){if(r.defined(t))if(r.object(t)||r.string(t)){let r=n(t);this.options[e]=[r.red(),r.green(),r.blue(),Math.round(r.alpha()*255)]}else throw r.invalidParameterError(`background`,`object or string`,t)}t.exports=function(e){Object.assign(e.prototype,{tint:a,greyscale:o,grayscale:s,pipelineColourspace:c,pipelineColorspace:l,toColourspace:u,toColorspace:d,_setBackgroundColourOption:p}),e.colourspace=i,e.colorspace=i}})),te=a(((e,t)=>{var n=f(),r={and:`and`,or:`or`,eor:`eor`};function i(){return this.options.removeAlpha=!0,this}function a(e){if(n.defined(e))if(n.number(e)&&n.inRange(e,0,1))this.options.ensureAlpha=e;else throw n.invalidParameterError(`alpha`,`number between 0 and 1`,e);else this.options.ensureAlpha=1;return this}function o(e){let t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(e)&&(e=t[e]),n.integer(e)&&n.inRange(e,0,4))this.options.extractChannel=e;else throw n.invalidParameterError(`channel`,`integer or one of: red, green, blue, alpha`,e);return this}function s(e,t){return Array.isArray(e)?e.forEach(function(e){this.options.joinChannelIn.push(this._createInputDescriptor(e,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(e,t)),this}function c(e){if(n.string(e)&&n.inArray(e,[`and`,`or`,`eor`]))this.options.bandBoolOp=e;else throw n.invalidParameterError(`boolOp`,`one of: and, or, eor`,e);return this}t.exports=function(e){Object.assign(e.prototype,{removeAlpha:i,ensureAlpha:a,extractChannel:o,joinChannel:s,bandbool:c}),e.bool=r}})),ne=a(((e,n)=>{var r=t(`node:path`),i=f(),a=H(),o=new Map([[`heic`,`heif`],[`heif`,`heif`],[`avif`,`avif`],[`jpeg`,`jpeg`],[`jpg`,`jpeg`],[`jpe`,`jpeg`],[`tile`,`tile`],[`dz`,`tile`],[`png`,`png`],[`raw`,`raw`],[`tiff`,`tiff`],[`tif`,`tiff`],[`webp`,`webp`],[`gif`,`gif`],[`jp2`,`jp2`],[`jpx`,`jp2`],[`j2k`,`jp2`],[`j2c`,`jp2`],[`jxl`,`jxl`]]),s=/\.(jp[2x]|j2[kc])$/i,c=()=>Error(`JP2 output requires libvips with support for OpenJPEG`),l=e=>1<<31-Math.clz32(Math.ceil(Math.log2(e)));function u(e,t){let n;if(i.string(e)?i.string(this.options.input.file)&&r.resolve(this.options.input.file)===r.resolve(e)?n=Error(`Cannot use same file for input and output`):s.test(r.extname(e))&&!this.constructor.format.jp2k.output.file&&(n=c()):n=Error(`Missing output file path`),n)if(i.fn(t))t(n);else return Promise.reject(n);else{this.options.fileOut=e;let n=Error();return this._pipeline(t,n)}return this}function d(e,t){i.object(e)?this._setBooleanOption(`resolveWithObject`,e.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut=``;let n=Error();return this._pipeline(i.fn(e)?e:t,n)}function p(){return this.options.keepMetadata|=1,this}function m(e){if(i.object(e))for(let[t,n]of Object.entries(e))if(i.object(n))for(let[e,r]of Object.entries(n))if(i.string(r))this.options.withExif[`exif-${t.toLowerCase()}-${e}`]=r;else throw i.invalidParameterError(`${t}.${e}`,`string`,r);else throw i.invalidParameterError(t,`object`,n);else throw i.invalidParameterError(`exif`,`object`,e);return this.options.withExifMerge=!1,this.keepExif()}function h(e){return this.withExif(e),this.options.withExifMerge=!0,this}function g(){return this.options.keepMetadata|=8,this}function _(e,t){if(i.string(e))this.options.withIccProfile=e;else throw i.invalidParameterError(`icc`,`string`,e);if(this.keepIccProfile(),i.object(t)&&i.defined(t.attach))if(i.bool(t.attach))t.attach||(this.options.keepMetadata&=-9);else throw i.invalidParameterError(`attach`,`boolean`,t.attach);return this}function v(){return this.options.keepMetadata=31,this}function y(e){if(this.keepMetadata(),this.withIccProfile(`srgb`),i.object(e)){if(i.defined(e.orientation))if(i.integer(e.orientation)&&i.inRange(e.orientation,1,8))this.options.withMetadataOrientation=e.orientation;else throw i.invalidParameterError(`orientation`,`integer between 1 and 8`,e.orientation);if(i.defined(e.density))if(i.number(e.density)&&e.density>0)this.options.withMetadataDensity=e.density;else throw i.invalidParameterError(`density`,`positive number`,e.density);i.defined(e.icc)&&this.withIccProfile(e.icc),i.defined(e.exif)&&this.withExifMerge(e.exif)}return this}function b(e,t){let n=o.get((i.object(e)&&i.string(e.id)?e.id:e).toLowerCase());if(!n)throw i.invalidParameterError(`format`,`one of: ${[...o.keys()].join(`, `)}`,e);return this[n](t)}function x(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.jpegQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.progressive)&&this._setBooleanOption(`jpegProgressive`,e.progressive),i.defined(e.chromaSubsampling))if(i.string(e.chromaSubsampling)&&i.inArray(e.chromaSubsampling,[`4:2:0`,`4:4:4`]))this.options.jpegChromaSubsampling=e.chromaSubsampling;else throw i.invalidParameterError(`chromaSubsampling`,`one of: 4:2:0, 4:4:4`,e.chromaSubsampling);let t=i.bool(e.optimizeCoding)?e.optimizeCoding:e.optimiseCoding;if(i.defined(t)&&this._setBooleanOption(`jpegOptimiseCoding`,t),i.defined(e.mozjpeg))if(i.bool(e.mozjpeg))e.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw i.invalidParameterError(`mozjpeg`,`boolean`,e.mozjpeg);let n=i.bool(e.trellisQuantization)?e.trellisQuantization:e.trellisQuantisation;i.defined(n)&&this._setBooleanOption(`jpegTrellisQuantisation`,n),i.defined(e.overshootDeringing)&&this._setBooleanOption(`jpegOvershootDeringing`,e.overshootDeringing);let r=i.bool(e.optimizeScans)?e.optimizeScans:e.optimiseScans;i.defined(r)&&(this._setBooleanOption(`jpegOptimiseScans`,r),r&&(this.options.jpegProgressive=!0));let a=i.number(e.quantizationTable)?e.quantizationTable:e.quantisationTable;if(i.defined(a))if(i.integer(a)&&i.inRange(a,0,8))this.options.jpegQuantisationTable=a;else throw i.invalidParameterError(`quantisationTable`,`integer between 0 and 8`,a)}return this._updateFormatOut(`jpeg`,e)}function S(e){if(i.object(e)){if(i.defined(e.progressive)&&this._setBooleanOption(`pngProgressive`,e.progressive),i.defined(e.compressionLevel))if(i.integer(e.compressionLevel)&&i.inRange(e.compressionLevel,0,9))this.options.pngCompressionLevel=e.compressionLevel;else throw i.invalidParameterError(`compressionLevel`,`integer between 0 and 9`,e.compressionLevel);i.defined(e.adaptiveFiltering)&&this._setBooleanOption(`pngAdaptiveFiltering`,e.adaptiveFiltering);let t=e.colours||e.colors;if(i.defined(t))if(i.integer(t)&&i.inRange(t,2,256))this.options.pngBitdepth=l(t);else throw i.invalidParameterError(`colours`,`integer between 2 and 256`,t);if(i.defined(e.palette)?this._setBooleanOption(`pngPalette`,e.palette):[e.quality,e.effort,e.colours,e.colors,e.dither].some(i.defined)&&this._setBooleanOption(`pngPalette`,!0),this.options.pngPalette){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,0,100))this.options.pngQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 0 and 100`,e.quality);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,1,10))this.options.pngEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 1 and 10`,e.effort);if(i.defined(e.dither))if(i.number(e.dither)&&i.inRange(e.dither,0,1))this.options.pngDither=e.dither;else throw i.invalidParameterError(`dither`,`number between 0.0 and 1.0`,e.dither)}}return this._updateFormatOut(`png`,e)}function C(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.webpQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.alphaQuality))if(i.integer(e.alphaQuality)&&i.inRange(e.alphaQuality,0,100))this.options.webpAlphaQuality=e.alphaQuality;else throw i.invalidParameterError(`alphaQuality`,`integer between 0 and 100`,e.alphaQuality);if(i.defined(e.lossless)&&this._setBooleanOption(`webpLossless`,e.lossless),i.defined(e.nearLossless)&&this._setBooleanOption(`webpNearLossless`,e.nearLossless),i.defined(e.smartSubsample)&&this._setBooleanOption(`webpSmartSubsample`,e.smartSubsample),i.defined(e.preset))if(i.string(e.preset)&&i.inArray(e.preset,[`default`,`photo`,`picture`,`drawing`,`icon`,`text`]))this.options.webpPreset=e.preset;else throw i.invalidParameterError(`preset`,`one of: default, photo, picture, drawing, icon, text`,e.preset);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,0,6))this.options.webpEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 0 and 6`,e.effort);i.defined(e.minSize)&&this._setBooleanOption(`webpMinSize`,e.minSize),i.defined(e.mixed)&&this._setBooleanOption(`webpMixed`,e.mixed)}return E(e,this.options),this._updateFormatOut(`webp`,e)}function w(e){if(i.object(e)){i.defined(e.reuse)&&this._setBooleanOption(`gifReuse`,e.reuse),i.defined(e.progressive)&&this._setBooleanOption(`gifProgressive`,e.progressive);let t=e.colours||e.colors;if(i.defined(t))if(i.integer(t)&&i.inRange(t,2,256))this.options.gifBitdepth=l(t);else throw i.invalidParameterError(`colours`,`integer between 2 and 256`,t);if(i.defined(e.effort))if(i.number(e.effort)&&i.inRange(e.effort,1,10))this.options.gifEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 1 and 10`,e.effort);if(i.defined(e.dither))if(i.number(e.dither)&&i.inRange(e.dither,0,1))this.options.gifDither=e.dither;else throw i.invalidParameterError(`dither`,`number between 0.0 and 1.0`,e.dither);if(i.defined(e.interFrameMaxError))if(i.number(e.interFrameMaxError)&&i.inRange(e.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=e.interFrameMaxError;else throw i.invalidParameterError(`interFrameMaxError`,`number between 0.0 and 32.0`,e.interFrameMaxError);if(i.defined(e.interPaletteMaxError))if(i.number(e.interPaletteMaxError)&&i.inRange(e.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=e.interPaletteMaxError;else throw i.invalidParameterError(`interPaletteMaxError`,`number between 0.0 and 256.0`,e.interPaletteMaxError)}return E(e,this.options),this._updateFormatOut(`gif`,e)}function T(e){if(!this.constructor.format.jp2k.output.buffer)throw c();if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.jp2Quality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.lossless))if(i.bool(e.lossless))this.options.jp2Lossless=e.lossless;else throw i.invalidParameterError(`lossless`,`boolean`,e.lossless);if(i.defined(e.tileWidth))if(i.integer(e.tileWidth)&&i.inRange(e.tileWidth,1,32768))this.options.jp2TileWidth=e.tileWidth;else throw i.invalidParameterError(`tileWidth`,`integer between 1 and 32768`,e.tileWidth);if(i.defined(e.tileHeight))if(i.integer(e.tileHeight)&&i.inRange(e.tileHeight,1,32768))this.options.jp2TileHeight=e.tileHeight;else throw i.invalidParameterError(`tileHeight`,`integer between 1 and 32768`,e.tileHeight);if(i.defined(e.chromaSubsampling))if(i.string(e.chromaSubsampling)&&i.inArray(e.chromaSubsampling,[`4:2:0`,`4:4:4`]))this.options.jp2ChromaSubsampling=e.chromaSubsampling;else throw i.invalidParameterError(`chromaSubsampling`,`one of: 4:2:0, 4:4:4`,e.chromaSubsampling)}return this._updateFormatOut(`jp2`,e)}function E(e,t){if(i.object(e)&&i.defined(e.loop))if(i.integer(e.loop)&&i.inRange(e.loop,0,65535))t.loop=e.loop;else throw i.invalidParameterError(`loop`,`integer between 0 and 65535`,e.loop);if(i.object(e)&&i.defined(e.delay))if(i.integer(e.delay)&&i.inRange(e.delay,0,65535))t.delay=[e.delay];else if(Array.isArray(e.delay)&&e.delay.every(i.integer)&&e.delay.every(e=>i.inRange(e,0,65535)))t.delay=e.delay;else throw i.invalidParameterError(`delay`,`integer or an array of integers between 0 and 65535`,e.delay)}function D(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.tiffQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.bitdepth))if(i.integer(e.bitdepth)&&i.inArray(e.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=e.bitdepth;else throw i.invalidParameterError(`bitdepth`,`1, 2, 4 or 8`,e.bitdepth);if(i.defined(e.tile)&&this._setBooleanOption(`tiffTile`,e.tile),i.defined(e.tileWidth))if(i.integer(e.tileWidth)&&e.tileWidth>0)this.options.tiffTileWidth=e.tileWidth;else throw i.invalidParameterError(`tileWidth`,`integer greater than zero`,e.tileWidth);if(i.defined(e.tileHeight))if(i.integer(e.tileHeight)&&e.tileHeight>0)this.options.tiffTileHeight=e.tileHeight;else throw i.invalidParameterError(`tileHeight`,`integer greater than zero`,e.tileHeight);if(i.defined(e.miniswhite)&&this._setBooleanOption(`tiffMiniswhite`,e.miniswhite),i.defined(e.pyramid)&&this._setBooleanOption(`tiffPyramid`,e.pyramid),i.defined(e.xres))if(i.number(e.xres)&&e.xres>0)this.options.tiffXres=e.xres;else throw i.invalidParameterError(`xres`,`number greater than zero`,e.xres);if(i.defined(e.yres))if(i.number(e.yres)&&e.yres>0)this.options.tiffYres=e.yres;else throw i.invalidParameterError(`yres`,`number greater than zero`,e.yres);if(i.defined(e.compression))if(i.string(e.compression)&&i.inArray(e.compression,[`none`,`jpeg`,`deflate`,`packbits`,`ccittfax4`,`lzw`,`webp`,`zstd`,`jp2k`]))this.options.tiffCompression=e.compression;else throw i.invalidParameterError(`compression`,`one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k`,e.compression);if(i.defined(e.predictor))if(i.string(e.predictor)&&i.inArray(e.predictor,[`none`,`horizontal`,`float`]))this.options.tiffPredictor=e.predictor;else throw i.invalidParameterError(`predictor`,`one of: none, horizontal, float`,e.predictor);if(i.defined(e.resolutionUnit))if(i.string(e.resolutionUnit)&&i.inArray(e.resolutionUnit,[`inch`,`cm`]))this.options.tiffResolutionUnit=e.resolutionUnit;else throw i.invalidParameterError(`resolutionUnit`,`one of: inch, cm`,e.resolutionUnit)}return this._updateFormatOut(`tiff`,e)}function O(e){return this.heif({...e,compression:`av1`})}function k(e){if(i.object(e)){if(i.string(e.compression)&&i.inArray(e.compression,[`av1`,`hevc`]))this.options.heifCompression=e.compression;else throw i.invalidParameterError(`compression`,`one of: av1, hevc`,e.compression);if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.heifQuality=e.quality;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);if(i.defined(e.lossless))if(i.bool(e.lossless))this.options.heifLossless=e.lossless;else throw i.invalidParameterError(`lossless`,`boolean`,e.lossless);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,0,9))this.options.heifEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 0 and 9`,e.effort);if(i.defined(e.chromaSubsampling))if(i.string(e.chromaSubsampling)&&i.inArray(e.chromaSubsampling,[`4:2:0`,`4:4:4`]))this.options.heifChromaSubsampling=e.chromaSubsampling;else throw i.invalidParameterError(`chromaSubsampling`,`one of: 4:2:0, 4:4:4`,e.chromaSubsampling);if(i.defined(e.bitdepth))if(i.integer(e.bitdepth)&&i.inArray(e.bitdepth,[8,10,12])){if(e.bitdepth!==8&&this.constructor.versions.heif)throw i.invalidParameterError(`bitdepth when using prebuilt binaries`,8,e.bitdepth);this.options.heifBitdepth=e.bitdepth}else throw i.invalidParameterError(`bitdepth`,`8, 10 or 12`,e.bitdepth)}else throw i.invalidParameterError(`options`,`Object`,e);return this._updateFormatOut(`heif`,e)}function A(e){if(i.object(e)){if(i.defined(e.quality))if(i.integer(e.quality)&&i.inRange(e.quality,1,100))this.options.jxlDistance=e.quality>=30?.1+(100-e.quality)*.09:53/3e3*e.quality*e.quality-23/20*e.quality+25;else throw i.invalidParameterError(`quality`,`integer between 1 and 100`,e.quality);else if(i.defined(e.distance))if(i.number(e.distance)&&i.inRange(e.distance,0,15))this.options.jxlDistance=e.distance;else throw i.invalidParameterError(`distance`,`number between 0.0 and 15.0`,e.distance);if(i.defined(e.decodingTier))if(i.integer(e.decodingTier)&&i.inRange(e.decodingTier,0,4))this.options.jxlDecodingTier=e.decodingTier;else throw i.invalidParameterError(`decodingTier`,`integer between 0 and 4`,e.decodingTier);if(i.defined(e.lossless))if(i.bool(e.lossless))this.options.jxlLossless=e.lossless;else throw i.invalidParameterError(`lossless`,`boolean`,e.lossless);if(i.defined(e.effort))if(i.integer(e.effort)&&i.inRange(e.effort,3,9))this.options.jxlEffort=e.effort;else throw i.invalidParameterError(`effort`,`integer between 3 and 9`,e.effort)}return this._updateFormatOut(`jxl`,e)}function j(e){if(i.object(e)&&i.defined(e.depth))if(i.string(e.depth)&&i.inArray(e.depth,[`char`,`uchar`,`short`,`ushort`,`int`,`uint`,`float`,`complex`,`double`,`dpcomplex`]))this.options.rawDepth=e.depth;else throw i.invalidParameterError(`depth`,`one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex`,e.depth);return this._updateFormatOut(`raw`)}function M(e){if(i.object(e)){if(i.defined(e.size))if(i.integer(e.size)&&i.inRange(e.size,1,8192))this.options.tileSize=e.size;else throw i.invalidParameterError(`size`,`integer between 1 and 8192`,e.size);if(i.defined(e.overlap))if(i.integer(e.overlap)&&i.inRange(e.overlap,0,8192)){if(e.overlap>this.options.tileSize)throw i.invalidParameterError(`overlap`,`<= size (${this.options.tileSize})`,e.overlap);this.options.tileOverlap=e.overlap}else throw i.invalidParameterError(`overlap`,`integer between 0 and 8192`,e.overlap);if(i.defined(e.container))if(i.string(e.container)&&i.inArray(e.container,[`fs`,`zip`]))this.options.tileContainer=e.container;else throw i.invalidParameterError(`container`,`one of: fs, zip`,e.container);if(i.defined(e.layout))if(i.string(e.layout)&&i.inArray(e.layout,[`dz`,`google`,`iiif`,`iiif3`,`zoomify`]))this.options.tileLayout=e.layout;else throw i.invalidParameterError(`layout`,`one of: dz, google, iiif, iiif3, zoomify`,e.layout);if(i.defined(e.angle))if(i.integer(e.angle)&&!(e.angle%90))this.options.tileAngle=e.angle;else throw i.invalidParameterError(`angle`,`positive/negative multiple of 90`,e.angle);if(this._setBackgroundColourOption(`tileBackground`,e.background),i.defined(e.depth))if(i.string(e.depth)&&i.inArray(e.depth,[`onepixel`,`onetile`,`one`]))this.options.tileDepth=e.depth;else throw i.invalidParameterError(`depth`,`one of: onepixel, onetile, one`,e.depth);if(i.defined(e.skipBlanks))if(i.integer(e.skipBlanks)&&i.inRange(e.skipBlanks,-1,65535))this.options.tileSkipBlanks=e.skipBlanks;else throw i.invalidParameterError(`skipBlanks`,`integer between -1 and 255/65535`,e.skipBlanks);else i.defined(e.layout)&&e.layout===`google`&&(this.options.tileSkipBlanks=5);let t=i.bool(e.center)?e.center:e.centre;if(i.defined(t)&&this._setBooleanOption(`tileCentre`,t),i.defined(e.id))if(i.string(e.id))this.options.tileId=e.id;else throw i.invalidParameterError(`id`,`string`,e.id);if(i.defined(e.basename))if(i.string(e.basename))this.options.tileBasename=e.basename;else throw i.invalidParameterError(`basename`,`string`,e.basename)}if(i.inArray(this.options.formatOut,[`jpeg`,`png`,`webp`]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!==`input`)throw i.invalidParameterError(`format`,`one of: jpeg, png, webp`,this.options.formatOut);return this._updateFormatOut(`dz`)}function N(e){if(!i.plainObject(e))throw i.invalidParameterError(`options`,`object`,e);if(i.integer(e.seconds)&&i.inRange(e.seconds,0,3600))this.options.timeoutSeconds=e.seconds;else throw i.invalidParameterError(`seconds`,`integer between 0 and 3600`,e.seconds);return this}function P(e,t){return i.object(t)&&t.force===!1||(this.options.formatOut=e),this}function F(e,t){if(i.bool(t))this.options[e]=t;else throw i.invalidParameterError(e,`boolean`,t)}function I(){if(!this.options.streamOut){this.options.streamOut=!0;let e=Error();this._pipeline(void 0,e)}}function L(e,t){return typeof e==`function`?(this._isStreamInput()?this.on(`finish`,()=>{this._flattenBufferIn(),a.pipeline(this.options,(n,r,a)=>{n?e(i.nativeError(n,t)):e(null,r,a)})}):a.pipeline(this.options,(n,r,a)=>{n?e(i.nativeError(n,t)):e(null,r,a)}),this):this.options.streamOut?(this._isStreamInput()?(this.once(`finish`,()=>{this._flattenBufferIn(),a.pipeline(this.options,(e,n,r)=>{e?this.emit(`error`,i.nativeError(e,t)):(this.emit(`info`,r),this.push(n)),this.push(null),this.on(`end`,()=>this.emit(`close`))})}),this.streamInFinished&&this.emit(`finish`)):a.pipeline(this.options,(e,n,r)=>{e?this.emit(`error`,i.nativeError(e,t)):(this.emit(`info`,r),this.push(n)),this.push(null),this.on(`end`,()=>this.emit(`close`))}),this):this._isStreamInput()?new Promise((e,n)=>{this.once(`finish`,()=>{this._flattenBufferIn(),a.pipeline(this.options,(r,a,o)=>{r?n(i.nativeError(r,t)):this.options.resolveWithObject?e({data:a,info:o}):e(a)})})}):new Promise((e,n)=>{a.pipeline(this.options,(r,a,o)=>{r?n(i.nativeError(r,t)):this.options.resolveWithObject?e({data:a,info:o}):e(a)})})}n.exports=function(e){Object.assign(e.prototype,{toFile:u,toBuffer:d,keepExif:p,withExif:m,withExifMerge:h,keepIccProfile:g,withIccProfile:_,keepMetadata:v,withMetadata:y,toFormat:b,jpeg:x,jp2:T,png:S,webp:C,tiff:D,avif:O,heif:k,jxl:A,gif:w,raw:j,tile:M,timeout:N,_updateFormatOut:P,_setBooleanOption:F,_read:I,_pipeline:L})}})),re=a(((n,r)=>{var i=t(`node:events`),a=d(),o=f(),{runtimePlatformArch:s}=V(),c=H(),l=s(),u=c.libvipsVersion(),m=c.format();m.heif.output.alias=[`avif`,`heic`],m.jpeg.output.alias=[`jpe`,`jpg`],m.tiff.output.alias=[`tif`],m.jp2k.output.alias=[`j2c`,`j2k`,`jp2`,`jpx`];var h={nearest:`nearest`,bilinear:`bilinear`,bicubic:`bicubic`,locallyBoundedBicubic:`lbb`,nohalo:`nohalo`,vertexSplitQuadraticBasisSpline:`vsqbs`},g={vips:u.semver};if(!u.isGlobal)if(u.isWasm)try{g=t(`@img/sharp-wasm32/versions`)}catch{}else try{g=t(`@img/sharp-${l}/versions`)}catch{try{g=t(`@img/sharp-libvips-${l}/versions`)}catch{}}g.sharp=(B(),e(p).default).version,g.heif&&m.heif&&(m.heif.input.fileSuffix=[`.avif`],m.heif.output.alias=[`avif`]);function _(e){return o.bool(e)?e?c.cache(50,20,100):c.cache(0,0,0):o.object(e)?c.cache(e.memory,e.files,e.items):c.cache()}_(!0);function v(e){return c.concurrency(o.integer(e)?e:null)}a.familySync()===a.GLIBC&&!c._isUsingJemalloc()?c.concurrency(1):a.familySync()===a.MUSL&&c.concurrency()===1024&&c.concurrency(t(`node:os`).availableParallelism());var y=new i.EventEmitter;function b(){return c.counters()}function x(e){return c.simd(o.bool(e)?e:null)}function S(e){if(o.object(e))if(Array.isArray(e.operation)&&e.operation.every(o.string))c.block(e.operation,!0);else throw o.invalidParameterError(`operation`,`Array<string>`,e.operation);else throw o.invalidParameterError(`options`,`object`,e)}function C(e){if(o.object(e))if(Array.isArray(e.operation)&&e.operation.every(o.string))c.block(e.operation,!1);else throw o.invalidParameterError(`operation`,`Array<string>`,e.operation);else throw o.invalidParameterError(`options`,`object`,e)}r.exports=function(e){e.cache=_,e.concurrency=v,e.counters=b,e.simd=x,e.format=m,e.interpolators=h,e.versions=g,e.queue=y,e.block=S,e.unblock=C}})),ie=a(((e,t)=>{var n=U();J()(n),Y()(n),X()(n),Z()(n),ee()(n),te()(n),ne()(n),re()(n),t.exports=n})),Q,$;n((()=>{Q=r(ie(),1),$=Q.default}))();export{$ as sharp};
@@ -25,7 +25,7 @@ No matching component was found for:
25
25
  `)i&&(r+=ws(``)),r+=Fs(a);else if(t===`
26
26
  `){let e=[...a];Ps(c.slice(u+1),e),r+=Is(e),i&&(r+=ws(i))}u+=t.length}return r}})),Us,Ws=t((()=>{Hs(),Us=(typeof Bun<`u`&&typeof Bun.wrapAnsi==`function`?Bun.wrapAnsi:null)??$o}));function Gs(e,t,n){let r=No(e,t,n);return la(r)>n-t?No(e,t,n-1):r}function Ks(e,t,n){if(t<1)return``;if(t===1)return Js;let r=la(e);if(r<=t)return e;if(n===`start`)return Js+Gs(e,r-t+1,r);if(n===`middle`){let n=Math.floor(t/2);return Gs(e,0,n)+Js+Gs(e,r-(t-n)+1,r)}return Gs(e,0,t-1)+Js}function qs(e,t,n){if(n===`wrap`)return Us(e,t,{trim:!1,hard:!0});if(n===`wrap-trim`)return Us(e,t,{trim:!0,hard:!0});if(n.startsWith(`truncate`)){let r=`end`;return n===`truncate-middle`&&(r=`middle`),n===`truncate-start`&&(r=`start`),Ks(e,t,r)}return e}var Js,Ys=t((()=>{Po(),ua(),Ws(),Js=`…`}));function Xs(e,t,n=!1){if(t.nodeName===`#text`)return;let r=t,i=n||r.style.position===`absolute`,a=ya.get(r);a&&(_a(e,a,i),ya.delete(r));for(let t of r.childNodes)Xs(e,t,i)}function Zs(e,t){return Qs(e,t)}function Qs(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function $s(e){return e.nodeName!==`#text`}function ec(e,t){let n=[];return r(e,0),n;function r(e,i){let a=e.yogaNode;if(!a||a.getDisplay()===mi.None)return;let o=i+a.getComputedTop(),s=a.getComputedHeight();if(!(t<o||t>=o+s)){e.debugOwnerChain&&(n=e.debugOwnerChain);for(let t of e.childNodes)$s(t)&&r(t,o)}}}var tc,nc,rc,ic,ac,oc,sc,cc,lc,uc,dc,fc,pc,mc,hc=t((()=>{ki(),Si(),ga(),Sa(),Ta(),Da(),Ys(),tc=e=>{let t={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:e!==`ink-virtual-text`&&e!==`ink-link`&&e!==`ink-progress`?Oi():void 0,dirty:!1};return e===`ink-text`?t.yogaNode?.setMeasureFunc(lc.bind(null,t)):e===`ink-raw-ansi`&&t.yogaNode?.setMeasureFunc(uc.bind(null,t)),t},nc=(e,t)=>{t.parentNode&&ic(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),dc(e)},rc=(e,t,n)=>{t.parentNode&&ic(t.parentNode,t),t.parentNode=e;let r=e.childNodes.indexOf(n);if(r>=0){let n=0;if(t.yogaNode&&e.yogaNode)for(let t=0;t<r;t++)e.childNodes[t]?.yogaNode&&n++;e.childNodes.splice(r,0,t),t.yogaNode&&e.yogaNode&&e.yogaNode.insertChild(t.yogaNode,n),dc(e);return}e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),dc(e)},ic=(e,t)=>{t.yogaNode&&t.parentNode?.yogaNode?.removeChild(t.yogaNode),Xs(e,t),t.parentNode=void 0;let n=e.childNodes.indexOf(t);n>=0&&e.childNodes.splice(n,1),dc(e)},ac=(e,t,n)=>{t!==`children`&&e.attributes[t]!==n&&(e.attributes[t]=n,dc(e))},oc=(e,t)=>{Zs(e.style,t)||(e.style=t,dc(e))},sc=(e,t)=>{Qs(e.textStyles,t)||(e.textStyles=t,dc(e))},cc=e=>{let t={nodeName:`#text`,nodeValue:e,yogaNode:void 0,parentNode:void 0,style:{}};return pc(t,e),t},lc=function(e,t,n){let r=Ea(e.nodeName===`#text`?e.nodeValue:wa(e)),i=ha(r,t);return i.width<=t||i.width>=1&&t>0&&t<1?i:r.includes(`
27
27
  `)&&n===xi.Undefined?ha(r,Math.max(t,i.width)):ha(qs(r,t,e.style?.textWrap??`wrap`),t)},uc=function(e){return{width:e.attributes.rawWidth,height:e.attributes.rawHeight}},dc=e=>{let t=e,n=!1;for(;t;)t.nodeName!==`#text`&&(t.dirty=!0,!n&&(t.nodeName===`ink-text`||t.nodeName===`ink-raw-ansi`)&&t.yogaNode&&(t.yogaNode.markDirty(),n=!0)),t=t.parentNode},fc=e=>{let t=e;for(;t?.parentNode;)t=t.parentNode;t&&t.nodeName!==`#text`&&t.onRender?.()},pc=(e,t)=>{typeof t!=`string`&&(t=String(t)),e.nodeValue!==t&&(e.nodeValue=t,dc(e))},mc=e=>{if(`childNodes`in e)for(let t of e.childNodes)mc(t);e.yogaNode=void 0}})),gc,_c,vc=t((()=>{gc={keydown:{bubble:`onKeyDown`,capture:`onKeyDownCapture`},focus:{bubble:`onFocus`,capture:`onFocusCapture`},blur:{bubble:`onBlur`,capture:`onBlurCapture`},paste:{bubble:`onPaste`,capture:`onPasteCapture`},resize:{bubble:`onResize`},click:{bubble:`onClick`},mousedown:{bubble:`onMouseDown`},mouseup:{bubble:`onMouseUp`},mousedrag:{bubble:`onMouseDrag`}},_c=new Set([`onKeyDown`,`onKeyDownCapture`,`onFocus`,`onFocusCapture`,`onBlur`,`onBlurCapture`,`onPaste`,`onPasteCapture`,`onResize`,`onClick`,`onMouseDown`,`onMouseUp`,`onMouseDrag`,`onMouseEnter`,`onMouseLeave`])}));function yc(e,t,n){let r=e._eventHandlers;if(!r)return;let i=gc[t];if(!i)return;let a=n?i.capture:i.bubble;if(a)return r[a]}function bc(e,t){let n=[],r=e;for(;r;){let i=r===e,a=yc(r,t.type,!0),o=yc(r,t.type,!1);a&&n.unshift({node:r,handler:a,phase:i?`at_target`:`capturing`}),o&&(t.bubbles||i)&&n.push({node:r,handler:o,phase:i?`at_target`:`bubbling`}),r=r.parentNode}return n}function xc(e,t){let n;for(let{node:r,handler:i,phase:a}of e){if(t._isImmediatePropagationStopped()||t._isPropagationStopped()&&r!==n)break;t._setEventPhase(a),t._setCurrentTarget(r),t._prepareForTarget(r);try{i(t)}catch(e){wc(e)}n=r}}function Sc(e){switch(e){case`keydown`:case`keyup`:case`click`:case`focus`:case`blur`:case`paste`:return Cc.DiscreteEventPriority;case`resize`:case`scroll`:case`mousemove`:return Cc.ContinuousEventPriority;default:return Cc.DefaultEventPriority}}var Cc,wc,Tc,Ec=t((()=>{Cc=Me(),vc(),c(),wc=e=>{console.error(e)},Tc=class{constructor(){l(this,`currentEvent`,null),l(this,`currentUpdatePriority`,Cc.DefaultEventPriority),l(this,`discreteUpdates`,null)}resolveEventPriority(){return this.currentUpdatePriority===0?this.currentEvent?Sc(this.currentEvent.type):Cc.DefaultEventPriority:this.currentUpdatePriority}dispatch(e,t){let n=this.currentEvent;this.currentEvent=t;try{return t._setTarget(e),xc(bc(e,t),t),t._setEventPhase(`none`),t._setCurrentTarget(null),!t.defaultPrevented}finally{this.currentEvent=n}}dispatchDiscrete(e,t){return this.discreteUpdates?this.discreteUpdates((e,t)=>this.dispatch(e,t),e,t,void 0,void 0):this.dispatch(e,t)}dispatchContinuous(e,t){let n=this.currentUpdatePriority;try{return this.currentUpdatePriority=Cc.ContinuousEventPriority,this.dispatch(e,t)}finally{this.currentUpdatePriority=n}}}})),Dc,Oc=t((()=>{zn(),c(),Dc=class extends Rn{constructor(e,t){super(),l(this,`type`,void 0),l(this,`timeStamp`,void 0),l(this,`bubbles`,void 0),l(this,`cancelable`,void 0),l(this,`_target`,null),l(this,`_currentTarget`,null),l(this,`_eventPhase`,`none`),l(this,`_propagationStopped`,!1),l(this,`_defaultPrevented`,!1),this.type=e,this.timeStamp=performance.now(),this.bubbles=t?.bubbles??!0,this.cancelable=t?.cancelable??!0}get target(){return this._target}get currentTarget(){return this._currentTarget}get eventPhase(){return this._eventPhase}get defaultPrevented(){return this._defaultPrevented}stopPropagation(){this._propagationStopped=!0}stopImmediatePropagation(){super.stopImmediatePropagation(),this._propagationStopped=!0}preventDefault(){this.cancelable&&(this._defaultPrevented=!0)}_setTarget(e){this._target=e}_setCurrentTarget(e){this._currentTarget=e}_setEventPhase(e){this._eventPhase=e}_isPropagationStopped(){return this._propagationStopped}_isImmediatePropagationStopped(){return this.didStopImmediatePropagation()}_prepareForTarget(e){}}})),kc,Ac=t((()=>{Oc(),c(),kc=class extends Dc{constructor(e,t=null){super(e,{bubbles:!0,cancelable:!1}),l(this,`relatedTarget`,void 0),this.relatedTarget=t}}}));function jc(e){let t=[];return Mc(e,t),t}function Mc(e,t){let n=e.attributes.tabIndex;typeof n==`number`&&n>=0&&t.push(e);for(let n of e.childNodes)n.nodeName!==`#text`&&Mc(n,t)}function Nc(e,t){let n=e;for(;n;){if(n===t)return!0;n=n.parentNode}return!1}function Pc(e){let t=e;for(;t;){if(t.focusManager)return t;t=t.parentNode}throw Error(`Node is not in a tree with a FocusManager`)}function Fc(e){return Pc(e).focusManager}var Ic,Lc,Rc=t((()=>{Ac(),c(),Ic=32,Lc=class{constructor(e){l(this,`activeElement`,null),l(this,`dispatchFocusEvent`,void 0),l(this,`enabled`,!0),l(this,`focusStack`,[]),this.dispatchFocusEvent=e}focus(e){if(e===this.activeElement||!this.enabled)return;let t=this.activeElement;if(t){let n=this.focusStack.indexOf(t);n!==-1&&this.focusStack.splice(n,1),this.focusStack.push(t),this.focusStack.length>Ic&&this.focusStack.shift(),this.dispatchFocusEvent(t,new kc(`blur`,e))}this.activeElement=e,this.dispatchFocusEvent(e,new kc(`focus`,t))}blur(){if(!this.activeElement)return;let e=this.activeElement;this.activeElement=null,this.dispatchFocusEvent(e,new kc(`blur`,null))}handleNodeRemoved(e,t){if(this.focusStack=this.focusStack.filter(n=>n!==e&&Nc(n,t)),!this.activeElement||this.activeElement!==e&&Nc(this.activeElement,t))return;let n=this.activeElement;for(this.activeElement=null,this.dispatchFocusEvent(n,new kc(`blur`,null));this.focusStack.length>0;){let e=this.focusStack.pop();if(Nc(e,t)){this.activeElement=e,this.dispatchFocusEvent(e,new kc(`focus`,n));return}}}handleAutoFocus(e){this.focus(e)}handleClickFocus(e){typeof e.attributes.tabIndex==`number`&&this.focus(e)}enable(){this.enabled=!0}disable(){this.enabled=!1}focusNext(e){this.moveFocus(1,e)}focusPrevious(e){this.moveFocus(-1,e)}moveFocus(e,t){if(!this.enabled)return;let n=jc(t);if(n.length===0)return;let r=this.activeElement?n.indexOf(this.activeElement):-1,i=n[r===-1?e===1?0:n.length-1:(r+e+n.length)%n.length];i&&this.focus(i)}}}));function zc(e,t,n){typeof n==`string`?e.setPositionPercent(t,Number.parseInt(n,10)):typeof n==`number`?e.setPosition(t,n):e.setPosition(t,NaN)}var Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc=t((()=>{Si(),Bc=(e,t)=>{`position`in t&&e.setPositionType(t.position===`absolute`?yi.Absolute:yi.Relative),`top`in t&&zc(e,`top`,t.top),`bottom`in t&&zc(e,`bottom`,t.bottom),`left`in t&&zc(e,`left`,t.left),`right`in t&&zc(e,`right`,t.right)},Vc=(e,t)=>{let n=t.overflowY??t.overflow,r=t.overflowX??t.overflow;n===`scroll`||r===`scroll`?e.setOverflow(bi.Scroll):n===`hidden`||r===`hidden`?e.setOverflow(bi.Hidden):(`overflow`in t||`overflowX`in t||`overflowY`in t)&&e.setOverflow(bi.Visible)},Hc=(e,t)=>{`margin`in t&&e.setMargin(U.All,t.margin??0),`marginX`in t&&e.setMargin(U.Horizontal,t.marginX??0),`marginY`in t&&e.setMargin(U.Vertical,t.marginY??0),`marginLeft`in t&&e.setMargin(U.Start,t.marginLeft||0),`marginRight`in t&&e.setMargin(U.End,t.marginRight||0),`marginTop`in t&&e.setMargin(U.Top,t.marginTop||0),`marginBottom`in t&&e.setMargin(U.Bottom,t.marginBottom||0)},Uc=(e,t)=>{`padding`in t&&e.setPadding(U.All,t.padding??0),`paddingX`in t&&e.setPadding(U.Horizontal,t.paddingX??0),`paddingY`in t&&e.setPadding(U.Vertical,t.paddingY??0),`paddingLeft`in t&&e.setPadding(U.Left,t.paddingLeft||0),`paddingRight`in t&&e.setPadding(U.Right,t.paddingRight||0),`paddingTop`in t&&e.setPadding(U.Top,t.paddingTop||0),`paddingBottom`in t&&e.setPadding(U.Bottom,t.paddingBottom||0)},Wc=(e,t)=>{`flexGrow`in t&&e.setFlexGrow(t.flexGrow??0),`flexShrink`in t&&e.setFlexShrink(typeof t.flexShrink==`number`?t.flexShrink:1),`flexWrap`in t&&(t.flexWrap===`nowrap`&&e.setFlexWrap(vi.NoWrap),t.flexWrap===`wrap`&&e.setFlexWrap(vi.Wrap),t.flexWrap===`wrap-reverse`&&e.setFlexWrap(vi.WrapReverse)),`flexDirection`in t&&(t.flexDirection===`row`&&e.setFlexDirection(hi.Row),t.flexDirection===`row-reverse`&&e.setFlexDirection(hi.RowReverse),t.flexDirection===`column`&&e.setFlexDirection(hi.Column),t.flexDirection===`column-reverse`&&e.setFlexDirection(hi.ColumnReverse)),`flexBasis`in t&&(typeof t.flexBasis==`number`?e.setFlexBasis(t.flexBasis):typeof t.flexBasis==`string`?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),`alignItems`in t&&((t.alignItems===`stretch`||!t.alignItems)&&e.setAlignItems(gi.Stretch),t.alignItems===`flex-start`&&e.setAlignItems(gi.FlexStart),t.alignItems===`center`&&e.setAlignItems(gi.Center),t.alignItems===`flex-end`&&e.setAlignItems(gi.FlexEnd)),`alignSelf`in t&&((t.alignSelf===`auto`||!t.alignSelf)&&e.setAlignSelf(gi.Auto),t.alignSelf===`flex-start`&&e.setAlignSelf(gi.FlexStart),t.alignSelf===`center`&&e.setAlignSelf(gi.Center),t.alignSelf===`flex-end`&&e.setAlignSelf(gi.FlexEnd)),`justifyContent`in t&&((t.justifyContent===`flex-start`||!t.justifyContent)&&e.setJustifyContent(_i.FlexStart),t.justifyContent===`center`&&e.setJustifyContent(_i.Center),t.justifyContent===`flex-end`&&e.setJustifyContent(_i.FlexEnd),t.justifyContent===`space-between`&&e.setJustifyContent(_i.SpaceBetween),t.justifyContent===`space-around`&&e.setJustifyContent(_i.SpaceAround),t.justifyContent===`space-evenly`&&e.setJustifyContent(_i.SpaceEvenly))},Gc=(e,t)=>{`width`in t&&(typeof t.width==`number`?e.setWidth(t.width):typeof t.width==`string`?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),`height`in t&&(typeof t.height==`number`?e.setHeight(t.height):typeof t.height==`string`?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),`minWidth`in t&&(typeof t.minWidth==`string`?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth(t.minWidth??0)),`minHeight`in t&&(typeof t.minHeight==`string`?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight(t.minHeight??0)),`maxWidth`in t&&(typeof t.maxWidth==`string`?e.setMaxWidthPercent(Number.parseInt(t.maxWidth,10)):e.setMaxWidth(t.maxWidth??0)),`maxHeight`in t&&(typeof t.maxHeight==`string`?e.setMaxHeightPercent(Number.parseInt(t.maxHeight,10)):e.setMaxHeight(t.maxHeight??0))},Kc=(e,t)=>{`display`in t&&e.setDisplay(t.display===`flex`?mi.Flex:mi.None)},qc=(e,t,n)=>{let r=n??t;if(`borderStyle`in t){let n=+!!t.borderStyle;e.setBorder(U.Top,r.borderTop===!1?0:n),e.setBorder(U.Bottom,r.borderBottom===!1?0:n),e.setBorder(U.Left,r.borderLeft===!1?0:n),e.setBorder(U.Right,r.borderRight===!1?0:n)}else`borderTop`in t&&t.borderTop!==void 0&&e.setBorder(U.Top,t.borderTop===!1?0:1),`borderBottom`in t&&t.borderBottom!==void 0&&e.setBorder(U.Bottom,t.borderBottom===!1?0:1),`borderLeft`in t&&t.borderLeft!==void 0&&e.setBorder(U.Left,t.borderLeft===!1?0:1),`borderRight`in t&&t.borderRight!==void 0&&e.setBorder(U.Right,t.borderRight===!1?0:1)},Jc=(e,t)=>{`gap`in t&&e.setGap(pi.All,t.gap??0),`columnGap`in t&&e.setGap(pi.Column,t.columnGap??0),`rowGap`in t&&e.setGap(pi.Row,t.rowGap??0)},Yc=(e,t={},n)=>{Bc(e,t),Vc(e,t),Hc(e,t),Uc(e,t),Wc(e,t),Gc(e,t),Kc(e,t),qc(e,t,n),Jc(e,t)}}));function Zc(e,t,n){e._eventHandlers||(e._eventHandlers={}),e._eventHandlers[t]=n}function Qc(e,t,n){if(t!==`children`){if(t===`style`){oc(e,n),e.yogaNode&&Yc(e.yogaNode,n);return}if(t===`textStyles`){e.textStyles=n;return}if(_c.has(t)){Zc(e,t,n);return}ac(e,t,n)}}function $c(e){let t=[],n=new Set,r=e;for(let e=0;r&&e<50&&!n.has(r);e++){n.add(r);let e=r.elementType,i=typeof e==`function`?e.displayName||e.name:typeof e==`string`?void 0:e?.displayName||e?.name;i&&i!==t[t.length-1]&&t.push(i),r=r._debugOwner??r.return}return t}function el(){return ll===void 0&&(ll=process.env.CLAUDE_CODE_DEBUG_REPAINTS===`1`),ll}function tl(e){console.warn(`[ink-commit] ${e}`)}function q(e){vl=e}function nl(){return vl}function rl(){bl=performance.now()}function il(){return yl}function al(){vl=0,yl=0,bl=0}var ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl=t((()=>{ol=n(fi(),1),Ut(),hc(),Ec(),vc(),Rc(),Si(),Xc(),sl=(e,t)=>{if(e===t)return;if(!e)return t;let n={},r=!1;for(let i of Object.keys(e))(!t||!Object.hasOwn(t,i))&&(n[i]=void 0,r=!0);if(t)for(let i of Object.keys(t))t[i]!==e[i]&&(n[i]=t[i],r=!0);return r?n:void 0},cl=e=>{let t=e.yogaNode;t&&(t.unsetMeasureFunc(),mc(e),t.freeRecursive())},ul=new Tc,dl=process.env.CLAUDE_CODE_COMMIT_LOG,fl=0,pl=0,ml=0,hl=0,gl=0,_l=0,vl=0,yl=0,bl=0,xl=(0,ol.default)({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>(dl&&(_l=performance.now()),null),preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(e){if(yl=bl>0?performance.now()-bl:0,bl=0,dl){let e=performance.now();fl++;let t=ml>0?e-ml:0;t>hl&&(hl=t),ml=e;let n=_l>0?e-_l:0;(t>30||n>20||gl>50)&&tl(`${e.toFixed(1)} gap=${t.toFixed(1)}ms reconcile=${n.toFixed(1)}ms creates=${gl}`),gl=0,e-pl>1e3&&(tl(`${e.toFixed(1)} commits=${fl}/s maxGap=${hl.toFixed(1)}ms`),fl=0,hl=0,pl=e)}let t=dl?performance.now():0;if(typeof e.onComputeLayout==`function`&&e.onComputeLayout(),dl){let e=performance.now()-t;if(e>20){let n=ct();tl(`${t.toFixed(1)} SLOW_YOGA ${e.toFixed(1)}ms visited=${n.visited} measured=${n.measured} hits=${n.cacheHits} live=${n.live}`)}}let n=dl?performance.now():0;if(e.onRender?.(),dl){let e=performance.now()-n;e>10&&tl(`${n.toFixed(1)} SLOW_PAINT ${e.toFixed(1)}ms`)}},getChildHostContext(e,t){let n=e.isInsideText,r=t===`ink-text`||t===`ink-virtual-text`||t===`ink-link`;return n===r?e:{isInsideText:r}},shouldSetTextContent:()=>!1,createInstance(e,t,n,r,i){if(r.isInsideText&&e===`ink-box`)throw Error(`<Box> can't be nested inside <Text> component`);let a=tc(e===`ink-text`&&r.isInsideText?`ink-virtual-text`:e);dl&&gl++;for(let[e,n]of Object.entries(t))Qc(a,e,n);return el()&&(a.debugOwnerChain=$c(i)),a},createTextInstance(e,t,n){if(!n.isInsideText)throw Error(`Text string "${e}" must be rendered inside <Text> component`);return cc(e)},resetTextContent(){},hideTextInstance(e){pc(e,``)},unhideTextInstance(e,t){pc(e,t)},getPublicInstance:e=>e,hideInstance(e){e.isHidden=!0,e.yogaNode?.setDisplay(mi.None),dc(e)},unhideInstance(e){e.isHidden=!1,e.yogaNode?.setDisplay(mi.Flex),dc(e)},appendInitialChild:nc,appendChild:nc,insertBefore:rc,finalizeInitialChildren(e,t,n){return n.autoFocus===!0},commitMount(e){Fc(e).handleAutoFocus(e)},isPrimaryRenderer:!0,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,getCurrentUpdatePriority:()=>ul.currentUpdatePriority,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},getInstanceFromNode:()=>null,prepareScopeUpdate(){},getInstanceFromScope:()=>null,appendChildToContainer:nc,insertInContainerBefore:rc,removeChildFromContainer(e,t){ic(e,t),cl(t),Fc(e).handleNodeRemoved(t,e)},commitUpdate(e,t,n,r){let i=sl(n,r),a=sl(n.style,r.style);if(i)for(let[t,n]of Object.entries(i)){if(t===`style`){oc(e,n);continue}if(t===`textStyles`){sc(e,n);continue}if(_c.has(t)){Zc(e,t,n);continue}ac(e,t,n)}a&&e.yogaNode&&Yc(e.yogaNode,a,r.style)},commitTextUpdate(e,t,n){pc(e,n)},removeChild(e,t){if(ic(e,t),cl(t),t.nodeName!==`#text`){let n=Pc(e);n.focusManager.handleNodeRemoved(t,n)}},maySuspendCommit(){return!1},preloadInstance(){return!0},startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady(){return null},NotPendingTransition:null,HostTransitionContext:{$$typeof:Symbol.for(`react.context`),_currentValue:null},setCurrentUpdatePriority(e){ul.currentUpdatePriority=e},resolveUpdatePriority(){return ul.resolveEventPriority()},resetFormInstance(){},requestPostPaintCallback(){},shouldAttemptEagerTransition(){return!1},trackSchedulerEvent(){},resolveEventType(){return ul.currentEvent?.type??null},resolveEventTimeStamp(){return ul.currentEvent?.timeStamp??-1.1}}),ul.discreteUpdates=xl.discreteUpdates.bind(xl)}));function Cl(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return{x:n,y:r,width:i-n,height:a-r}}function wl(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}var Tl=t((()=>{})),El=t((()=>{}));function Dl(e,t){e!==void 0&&(Number.isInteger(e)||`${t}${e}`)}var Ol=t((()=>{El()}));function kl(e){for(let t of e)if(uu.has(t.endCode))return!0;return!1}function Al(){let e=new Int32Array(128);return e.fill(-1),e[32]=du,e}function jl(e,t,n){return e<<pu|t<<mu|n}function Ml(e,t){let n=t<<1;return e.cells[n]===0&&e.cells[n|1]===0}function Nl(e,t,n){return t<0||n<0||t>=e.width||n>=e.height||Ml(e,n*e.width+t)}function Pl(e,t){return e.hyperlinkPool.intern(t)}function Fl(e,t,n,r,i){Dl(e,`createScreen width`),Dl(t,`createScreen height`),(!Number.isInteger(e)||e<0)&&(e=Math.max(0,Math.floor(e)||0)),(!Number.isInteger(t)||t<0)&&(t=Math.max(0,Math.floor(t)||0));let a=e*t,o=new ArrayBuffer(a<<3),s=new Int32Array(o),c=new BigInt64Array(o);return{width:e,height:t,cells:s,cells64:c,charPool:r,hyperlinkPool:i,emptyStyleId:n.none,damage:void 0,noSelect:new Uint8Array(a),softWrap:new Int32Array(t)}}function Il(e,t,n){Dl(t,`resetScreen width`),Dl(n,`resetScreen height`),(!Number.isInteger(t)||t<0)&&(t=Math.max(0,Math.floor(t)||0)),(!Number.isInteger(n)||n<0)&&(n=Math.max(0,Math.floor(n)||0));let r=t*n;if(e.cells64.length<r){let t=new ArrayBuffer(r<<3);e.cells=new Int32Array(t),e.cells64=new BigInt64Array(t),e.noSelect=new Uint8Array(r)}e.softWrap.length<n&&(e.softWrap=new Int32Array(n)),e.cells64.fill(_u,0,r),e.noSelect.fill(0,0,r),e.softWrap.fill(0,0,n),e.width=t,e.height=n,e.damage=void 0}function Ll(e,t,n){let r=e.charPool,i=e.hyperlinkPool;if(r===t&&i===n)return;let a=e.width*e.height,o=e.cells;for(let e=0;e<a<<1;e+=2){let a=o[e];o[e]=t.intern(r.get(a));let s=o[e+1],c=s>>>mu&hu;if(c!==0){let t=i.get(c),r=n.intern(t),a=s>>>pu,l=s&gu;o[e+1]=jl(a,r,l)}}e.charPool=t,e.hyperlinkPool=n}function Rl(e,t,n){if(!(t<0||n<0||t>=e.width||n>=e.height))return zl(e,n*e.width+t)}function zl(e,t){let n=t<<1,r=e.cells[n+1],i=r>>>mu&hu;return{char:e.charPool.get(e.cells[n]),styleId:r>>>pu,width:r&gu,hyperlink:i===0?void 0:e.hyperlinkPool.get(i)}}function Bl(e,t,n,r,i){let a=r<<1,o=e[a];if(o===1)return;let s=e[a+1];if(o===0&&!(s&262140)){let e=s>>>pu;if(e===0||e===i)return}let c=s>>>mu&hu;return{char:t.get(o),styleId:s>>>pu,width:s&gu,hyperlink:c===0?void 0:n.get(c)}}function Vl(e,t,n){let r=t|1,i=e.cells[r];n.char=e.charPool.get(e.cells[t]),n.styleId=i>>>pu,n.width=i&gu;let a=i>>>mu&hu;n.hyperlink=a===0?void 0:e.hyperlinkPool.get(a)}function Hl(e,t,n){if(t<0||n<0||t>=e.width||n>=e.height)return;let r=n*e.width+t<<1;return e.charPool.get(e.cells[r])}function Ul(e,t,n,r){if(t<0||n<0||t>=e.width||n>=e.height)return;let i=n*e.width+t<<1,a=e.cells,o=a[i+1]&gu;if(o===1&&r.width!==1&&t+1<e.width){let t=i+2;(a[t+1]&gu)===2&&(a[t]=du,a[t+1]=jl(e.emptyStyleId,0,0))}let s=-1;if(o===2&&r.width!==2&&t>0){let n=i-2;(a[n+1]&gu)===1&&(a[n]=du,a[n+1]=jl(e.emptyStyleId,0,0),s=t-1)}a[i]=Wl(e,r.char),a[i+1]=jl(r.styleId,Pl(e,r.hyperlink),r.width);let c=s>=0?Math.min(t,s):t,l=e.damage;if(l){let e=l.x+l.width,r=l.y+l.height;c<l.x?(l.width+=l.x-c,l.x=c):t>=e&&(l.width=t-l.x+1),n<l.y?(l.height+=l.y-n,l.y=n):n>=r&&(l.height=n-l.y+1)}else e.damage={x:c,y:n,width:t-c+1,height:1};if(r.width===1){let n=t+1;if(n<e.width){let t=i+2;if((a[t+1]&gu)===1){let r=t+2;n+1<e.width&&(a[r+1]&gu)===2&&(a[r]=du,a[r+1]=jl(e.emptyStyleId,0,0))}a[t]=fu,a[t+1]=jl(e.emptyStyleId,0,2);let r=e.damage;r&&n>=r.x+r.width&&(r.width=n-r.x+1)}}}function J(e,t,n,r){if(t<0||n<0||t>=e.width||n>=e.height)return;let i=n*e.width+t<<1,a=e.cells,o=a[i+1],s=o&gu;if(s===2||s===3)return;let c=o>>>mu&hu;a[i+1]=jl(r,c,s);let l=e.damage;l?e.damage=Cl(l,{x:t,y:n,width:1,height:1}):e.damage={x:t,y:n,width:1,height:1}}function Wl(e,t){return e.charPool.intern(t)}function Gl(e,t,n,r,i,a){if(n=Math.max(0,n),r=Math.max(0,r),n>=i||r>=a)return;let o=i-n,s=t.width<<1,c=e.width<<1,l=o<<1,u=t.cells,d=e.cells,f=t.noSelect,p=e.noSelect;if(e.softWrap.set(t.softWrap.subarray(r,a),r),n===0&&i===t.width&&t.width===e.width){let e=r*s,n=(a-r)*s;d.set(u.subarray(e,e+n),e);let i=r*t.width,o=(a-r)*t.width;p.set(f.subarray(i,i+o),i)}else{let i=r*s+(n<<1),m=r*c+(n<<1),h=r*t.width+n,g=r*e.width+n;for(let n=r;n<a;n++)d.set(u.subarray(i,i+l),m),p.set(f.subarray(h,h+o),g),i+=s,m+=c,h+=t.width,g+=e.width}let m={x:n,y:r,width:o,height:a-r};if(e.damage?e.damage=Cl(e.damage,m):e.damage=m,i<e.width){let n=r*t.width+(i-1)<<1,o=r*e.width+i<<1,l=!1;for(let t=r;t<a;t++)(u[n+1]&gu)===1&&(d[o]=fu,d[o+1]=jl(e.emptyStyleId,0,2),l=!0),n+=s,o+=c;l&&e.damage&&e.damage.x+e.damage.width===i&&(e.damage={...e.damage,width:e.damage.width+1})}}function Kl(e,t,n,r){if(r===0||t<0||n>=e.height||t>n)return;let i=e.width,a=e.cells64,o=e.noSelect,s=e.softWrap;if(Math.abs(r)>n-t){a.fill(_u,t*i,(n+1)*i),o.fill(0,t*i,(n+1)*i),s.fill(0,t,n+1);return}r>0?(a.copyWithin(t*i,(t+r)*i,(n+1)*i),o.copyWithin(t*i,(t+r)*i,(n+1)*i),s.copyWithin(t,t+r,n+1),a.fill(_u,(n-r+1)*i,(n+1)*i),o.fill(0,(n-r+1)*i,(n+1)*i),s.fill(0,n-r+1,n+1)):(a.copyWithin((t-r)*i,t*i,(n+r+1)*i),o.copyWithin((t-r)*i,t*i,(n+r+1)*i),s.copyWithin(t-r,t,n+r+1),a.fill(_u,t*i,(t-r)*i),o.fill(0,t*i,(t-r)*i),s.fill(0,t,t-r))}function ql(e){for(let t of e){let e=t.code;if(e.length<5||!e.startsWith(yu))continue;let n=e.match(vu);if(n)return n[1]||null}return null}function Jl(e){return e.filter(e=>!e.code.startsWith(yu)||!vu.test(e.code))}function Yl(e,t,n){let r=e.width,i=t.width,a=e.height,o=t.height,s;r===0&&a===0?s={x:0,y:0,width:i,height:o}:t.damage?(s=t.damage,e.damage&&(s=Cl(s,e.damage))):s=e.damage?e.damage:{x:0,y:0,width:0,height:0},a>o&&(s=Cl(s,{x:0,y:o,width:r,height:a-o})),r>i&&(s=Cl(s,{x:i,y:0,width:r-i,height:a}));let c=Math.max(a,o),l=Math.max(r,i),u=Math.min(s.y+s.height,c),d=Math.min(s.x+s.width,l);return r===i?eu(e,t,s.x,d,s.y,u,n):tu(e,t,s.x,d,s.y,u,n)}function Xl(e,t,n,r){for(let i=0;i<r;i++,n+=2){let r=n|1;if(e[n]!==t[n]||e[r]!==t[r])return i}return r}function Zl(e,t,n,r,i,a,o,s,c,l,u){let d=o;for(;d<s;){let o=Xl(e,t,i,s-d);if(d+=o,i+=o<<1,d>=s)break;if(Vl(n,i,c),Vl(r,i,l),u(d,a,c,l))return!0;d++,i+=2}return!1}function Ql(e,t,n,r,i,a,o){for(let s=r;s<i;s++,t+=2)if(Vl(e,t,a),o(s,n,a,void 0))return!0;return!1}function $l(e,t,n,r,i,a,o,s){for(let c=i;c<a;c++,n+=2)if(!(e[n]===0&&e[n|1]===0)&&(Vl(t,n,o),s(c,r,void 0,o)))return!0;return!1}function eu(e,t,n,r,i,a,o){let s=e.cells,c=t.cells,l=e.width,u=e.height,d=t.height,f=l<<1,p={char:` `,styleId:0,width:0,hyperlink:void 0},m={char:` `,styleId:0,width:0,hyperlink:void 0},h=Math.min(r,l),g=i*l+n<<1;for(let r=i;r<a;r++){let i=r<u,a=r<d;if(i&&a){if(Zl(s,c,e,t,g,r,n,h,p,m,o))return!0}else if(i){if(Ql(e,g,r,n,h,p,o))return!0}else if(a&&$l(c,t,g,r,n,h,m,o))return!0;g+=f}return!1}function tu(e,t,n,r,i,a,o){let s=e.width,c=t.width,l=e.cells,u=t.cells,d={char:` `,styleId:0,width:0,hyperlink:void 0},f={char:` `,styleId:0,width:0,hyperlink:void 0},p=s<<1,m=c<<1,h=i*s+n<<1,g=i*c+n<<1;for(let _=i;_<a;_++){let i=_<e.height,a=_<t.height,v=i?Math.min(r,s):n,y=a?Math.min(r,c):n,b=Math.min(v,y),x=h,S=g;for(let r=n;r<b;r++){if(l[x]===u[S]&&l[x+1]===u[S+1]){x+=2,S+=2;continue}if(Vl(e,x,d),Vl(t,S,f),x+=2,S+=2,o(r,_,d,f))return!0}if(v>b){x=h+(b-n<<1);for(let t=b;t<v;t++)if(Vl(e,x,d),x+=2,o(t,_,d,void 0))return!0}if(y>b){S=g+(b-n<<1);for(let e=b;e<y;e++){if(u[S]===0&&u[S|1]===0){S+=2;continue}if(Vl(t,S,f),S+=2,o(e,_,void 0,f))return!0}}h+=p,g+=m}return!1}function nu(e,t,n,r,i){let a=Math.min(t+r,e.width),o=Math.min(n+i,e.height),s=e.noSelect,c=e.width;for(let e=Math.max(0,n);e<o;e++){let n=e*c;s.fill(1,n+Math.max(0,t),n+a)}}var ru,iu,au,ou,su,cu,lu,uu,Y,du,fu,pu,mu,hu,gu,_u,vu,yu,bu=t((()=>{Ao(),Tl(),Gn(),Ol(),c(),ru=class{constructor(){l(this,`strings`,[` `,``]),l(this,`stringMap`,new Map([[` `,0],[``,1]])),l(this,`ascii`,Al())}intern(e){if(e.length===1){let t=e.charCodeAt(0);if(t<128){let n=this.ascii[t];if(n!==-1)return n;let r=this.strings.length;return this.strings.push(e),this.ascii[t]=r,r}}let t=this.stringMap.get(e);if(t!==void 0)return t;let n=this.strings.length;return this.strings.push(e),this.stringMap.set(e,n),n}get(e){return this.strings[e]??` `}},iu=class{constructor(){l(this,`strings`,[``]),l(this,`stringMap`,new Map)}intern(e){if(!e)return 0;let t=this.stringMap.get(e);return t===void 0&&(t=this.strings.length,this.strings.push(e),this.stringMap.set(e,t)),t}get(e){return e===0?void 0:this.strings[e]}},au={type:`ansi`,code:`\x1B[7m`,endCode:`\x1B[27m`},ou={type:`ansi`,code:`\x1B[1m`,endCode:`\x1B[22m`},su={type:`ansi`,code:`\x1B[4m`,endCode:`\x1B[24m`},cu={type:`ansi`,code:`\x1B[33m`,endCode:`\x1B[39m`},lu=class e{constructor(){l(this,`ids`,new Map),l(this,`styles`,[]),l(this,`transitionCache`,new Map),l(this,`none`,void 0),l(this,`inverseCache`,new Map),l(this,`currentMatchCache`,new Map),l(this,`selectionBgCode`,null),l(this,`selectionBgCache`,new Map),this.none=this.intern([])}evictCacheIfNeeded(){if(this.transitionCache.size>e.CACHE_MAX){let t=this.transitionCache.keys();for(let n=0;n<this.transitionCache.size-e.CACHE_MAX;n++){let e=t.next().value;e!==void 0&&this.transitionCache.delete(e)}}if(this.inverseCache.size>e.CACHE_MAX){let t=this.inverseCache.keys();for(let n=0;n<this.inverseCache.size-e.CACHE_MAX;n++){let e=t.next().value;e!==void 0&&this.inverseCache.delete(e)}}if(this.currentMatchCache.size>e.CACHE_MAX){let t=this.currentMatchCache.keys();for(let n=0;n<this.currentMatchCache.size-e.CACHE_MAX;n++){let e=t.next().value;e!==void 0&&this.currentMatchCache.delete(e)}}}intern(e){let t=e.length===0?``:e.map(e=>e.code).join(`\0`),n=this.ids.get(t);if(n===void 0){let r=this.styles.length;this.styles.push(e.length===0?[]:e),n=r<<1|(e.length>0&&kl(e)?1:0),this.ids.set(t,n),this.evictCacheIfNeeded()}return n}get(e){return this.styles[e>>>1]??[]}transition(e,t){if(e===t)return``;let n=e*1048576+t,r=this.transitionCache.get(n);return r===void 0&&(r=ro(mo(this.get(e),this.get(t))),this.transitionCache.set(n,r)),r}withInverse(e){let t=this.inverseCache.get(e);if(t===void 0){let n=this.get(e);t=n.some(e=>e.endCode===`\x1B[27m`)?e:this.intern([...n,au]),this.inverseCache.set(e,t)}return t}withCurrentMatch(e){let t=this.currentMatchCache.get(e);if(t===void 0){let n=this.get(e),r=n.filter(e=>e.endCode!==`\x1B[39m`&&e.endCode!==`\x1B[49m`);r.push(cu),n.some(e=>e.endCode===`\x1B[27m`)||r.push(au),n.some(e=>e.endCode===`\x1B[22m`)||r.push(ou),n.some(e=>e.endCode===`\x1B[24m`)||r.push(su),t=this.intern(r),this.currentMatchCache.set(e,t)}return t}setSelectionBg(e){this.selectionBgCode?.code!==e?.code&&(this.selectionBgCode=e,this.selectionBgCache.clear())}withSelectionBg(e){let t=this.selectionBgCode;if(t===null)return this.withInverse(e);let n=this.selectionBgCache.get(e);if(n===void 0){let r=this.get(e).filter(e=>e.endCode!==`\x1B[49m`&&e.endCode!==`\x1B[27m`);r.push(t),n=this.intern(r),this.selectionBgCache.set(e,n)}return n}},l(lu,`CACHE_MAX`,1e3),uu=new Set([`\x1B[49m`,`\x1B[27m`,`\x1B[24m`,`\x1B[29m`,`\x1B[55m`]),Y=function(e){return e[e.Narrow=0]=`Narrow`,e[e.Wide=1]=`Wide`,e[e.SpacerTail=2]=`SpacerTail`,e[e.SpacerHead=3]=`SpacerHead`,e}({}),du=0,fu=1,pu=17,mu=2,hu=32767,gu=3,_u=0n,vu=RegExp(`^\x1B\\]8;;([^\x07]*)\x07$`),yu=`\x1B]8;`}));function xu(){return{anchor:null,focus:null,isDragging:!1,anchorSpan:null,scrolledOffAbove:[],scrolledOffBelow:[],scrolledOffAboveSW:[],scrolledOffBelowSW:[],lastPressHadAlt:!1}}function Su(e,t,n){e.anchor={col:t,row:n},e.focus=null,e.isDragging=!0,e.anchorSpan=null,e.scrolledOffAbove=[],e.scrolledOffBelow=[],e.scrolledOffAboveSW=[],e.scrolledOffBelowSW=[],e.virtualAnchorRow=void 0,e.virtualFocusRow=void 0,e.lastPressHadAlt=!1}function X(e,t,n){e.isDragging&&(!e.focus&&e.anchor&&e.anchor.col===t&&e.anchor.row===n||(e.focus={col:t,row:n}))}function Cu(e){e.isDragging=!1}function Z(e){e.anchor=null,e.focus=null,e.isDragging=!1,e.anchorSpan=null,e.scrolledOffAbove=[],e.scrolledOffBelow=[],e.scrolledOffAboveSW=[],e.scrolledOffBelowSW=[],e.virtualAnchorRow=void 0,e.virtualFocusRow=void 0,e.lastPressHadAlt=!1}function Q(e){return e===` `||e===``?0:Hu.test(e)?1:2}function wu(e,t,n){if(n<0||n>=e.height)return null;let r=e.width,i=e.noSelect,a=n*r,o=t;if(o>0){let t=Rl(e,o,n);t&&t.width===Y.SpacerTail&&--o}if(o<0||o>=r||i[a+o]===1)return null;let s=Rl(e,o,n);if(!s)return null;let c=Q(s.char),l=o;for(;l>0;){let t=l-1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r)break;if(r.width===Y.SpacerTail){if(t===0||i[a+t-1]===1)break;let r=Rl(e,t-1,n);if(!r||Q(r.char)!==c)break;l=t-1;continue}if(Q(r.char)!==c)break;l=t}let u=o;for(;u<r-1;){let t=u+1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r)break;if(r.width===Y.SpacerTail){u=t;continue}if(Q(r.char)!==c)break;u=t}return{lo:l,hi:u}}function Tu(e,t){return e.row===t.row?e.col===t.col?0:e.col<t.col?-1:1:e.row<t.row?-1:1}function Eu(e,t,n,r){let i=wu(t,n,r);if(!i)return;let a={col:i.lo,row:r},o={col:i.hi,row:r};e.anchor=a,e.focus=o,e.isDragging=!0,e.anchorSpan={lo:a,hi:o,kind:`word`}}function Du(e){if(e.length!==1)return!1;let t=e.charCodeAt(0);return t>=33&&t<=126&&!Uu.has(e)}function Ou(e,t,n){if(n<0||n>=e.height)return;let r=e.width,i=e.noSelect,a=n*r,o=t;if(o>0){let t=Rl(e,o,n);t&&t.width===Y.SpacerTail&&--o}if(o<0||o>=r||i[a+o]===1)return;let s=Rl(e,o,n);if(!s||!Du(s.char))return;let c=o;for(;c>0;){let t=c-1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r||r.width!==Y.Narrow||!Du(r.char))break;c=t}let l=o;for(;l<r-1;){let t=l+1;if(i[a+t]===1)break;let r=Rl(e,t,n);if(!r||r.width!==Y.Narrow||!Du(r.char))break;l=t}let u=``;for(let t=c;t<=l;t++)u+=Rl(e,t,n).char;let d=o-c,f=/(?:https?|file):\/\//g,p=-1,m=u.length;for(let e;e=f.exec(u);){if(e.index>d){m=e.index;break}p=e.index}if(p<0)return;let h=u.slice(p,m),g={")":`(`,"]":`[`,"}":`{`};for(;h.length>0;){let e=h.at(-1);if(`.,;:!?`.includes(e)){h=h.slice(0,-1);continue}let t=g[e];if(!t)break;let n=0,r=0;for(let i=0;i<h.length;i++){let a=h.charAt(i);a===t?n++:a===e&&r++}if(r>n)h=h.slice(0,-1);else break}if(!(d>=p+h.length))return h}function ku(e,t,n){if(n<0||n>=t.height)return;let r={col:0,row:n},i={col:t.width-1,row:n};e.anchor=r,e.focus=i,e.isDragging=!0,e.anchorSpan={lo:r,hi:i,kind:`line`}}function Au(e,t,n,r){if(!e.isDragging||!e.anchorSpan)return;let i=e.anchorSpan,a,o;if(i.kind===`word`){let e=wu(t,n,r);a={col:e?e.lo:n,row:r},o={col:e?e.hi:n,row:r}}else{let e=wl(r,0,t.height-1);a={col:0,row:e},o={col:t.width-1,row:e}}Tu(o,i.lo)<0?(e.anchor=i.hi,e.focus=a):Tu(a,i.hi)>0?(e.anchor=i.lo,e.focus=o):(e.anchor=i.lo,e.focus=i.hi)}function ju(e,t,n){e.focus&&(e.anchorSpan=null,e.focus={col:t,row:n},e.virtualFocusRow=void 0)}function Mu(e,t,n,r,i){if(!e.anchor||!e.focus)return;let a=(e.virtualAnchorRow??e.anchor.row)+t,o=(e.virtualFocusRow??e.focus.row)+t;if(a<n&&o<n||a>r&&o>r){Z(e);return}let s=Math.min(e.virtualAnchorRow??e.anchor.row,e.virtualFocusRow??e.focus.row),c=Math.max(e.virtualAnchorRow??e.anchor.row,e.virtualFocusRow??e.focus.row),l=Math.max(0,n-s),u=Math.max(0,c-r),d=Math.max(0,n-Math.min(a,o)),f=Math.max(0,Math.max(a,o)-r);if(d<l){let t=l-d;e.scrolledOffAbove.length-=t,e.scrolledOffAboveSW.length=e.scrolledOffAbove.length}if(f<u){let t=u-f;e.scrolledOffBelow.splice(0,t),e.scrolledOffBelowSW.splice(0,t)}e.scrolledOffAbove.length>d&&(e.scrolledOffAbove=d>0?e.scrolledOffAbove.slice(-d):[],e.scrolledOffAboveSW=d>0?e.scrolledOffAboveSW.slice(-d):[]),e.scrolledOffBelow.length>f&&(e.scrolledOffBelow=e.scrolledOffBelow.slice(0,f),e.scrolledOffBelowSW=e.scrolledOffBelowSW.slice(0,f));let p=(e,t)=>t<n?{col:0,row:n}:t>r?{col:i-1,row:r}:{col:e.col,row:t};if(e.anchor=p(e.anchor,a),e.focus=p(e.focus,o),e.virtualAnchorRow=a<n||a>r?a:void 0,e.virtualFocusRow=o<n||o>r?o:void 0,e.anchorSpan){let a=e=>{let a=e.row+t;return a<n?{col:0,row:n}:a>r?{col:i-1,row:r}:{col:e.col,row:a}};e.anchorSpan={lo:a(e.anchorSpan.lo),hi:a(e.anchorSpan.hi),kind:e.anchorSpan.kind}}}function Nu(e,t,n,r){if(!e.anchor)return;let i=(e.virtualAnchorRow??e.anchor.row)+t;if(e.anchor={col:e.anchor.col,row:wl(i,n,r)},e.virtualAnchorRow=i<n||i>r?i:void 0,e.anchorSpan){let i=e=>({col:e.col,row:wl(e.row+t,n,r)});e.anchorSpan={lo:i(e.anchorSpan.lo),hi:i(e.anchorSpan.hi),kind:e.anchorSpan.kind}}}function Pu(e,t,n,r){if(!e.anchor)return!1;let i=(e.virtualAnchorRow??e.anchor.row)+t,a=e.focus?(e.virtualFocusRow??e.focus.row)+t:void 0;if(i<n&&a!==void 0&&a<n)return Z(e),!0;if(e.anchor={col:e.anchor.col,row:wl(i,n,r)},e.focus&&a!==void 0&&(e.focus={col:e.focus.col,row:wl(a,n,r)}),e.virtualAnchorRow=i<n||i>r?i:void 0,e.virtualFocusRow=a!==void 0&&(a<n||a>r)?a:void 0,e.anchorSpan){let i=e=>({col:e.col,row:wl(e.row+t,n,r)});e.anchorSpan={lo:i(e.anchorSpan.lo),hi:i(e.anchorSpan.hi),kind:e.anchorSpan.kind}}return!1}function Fu(e){return e.anchor!==null&&e.focus!==null}function Iu(e){return!e.anchor||!e.focus?null:Tu(e.anchor,e.focus)<=0?{start:e.anchor,end:e.focus}:{start:e.focus,end:e.anchor}}function Lu(e,t,n,r){let i=e.noSelect,a=t*e.width,o=t+1<e.height?e.softWrap[t+1]:0,s=o>0?Math.min(r,o-1):r,c=``;for(let r=n;r<=s;r++){if(i[a+r]===1)continue;let n=Rl(e,r,t);n&&(n.width===Y.SpacerTail||n.width===Y.SpacerHead||(c+=n.char))}return o>0?c:c.replace(/\s+$/,``)}function Ru(e,t,n){n&&e.length>0?e[e.length-1]+=t:e.push(t)}function zu(e,t){let n=Iu(e);if(!n)return``;let{start:r,end:i}=n,a=t.softWrap,o=[];for(let t=0;t<e.scrolledOffAbove.length;t++)Ru(o,e.scrolledOffAbove[t],e.scrolledOffAboveSW[t]);for(let e=r.row;e<=i.row;e++){let n=e===r.row?r.col:0,s=e===i.row?i.col:t.width-1;Ru(o,Lu(t,e,n,s),a[e]>0)}for(let t=0;t<e.scrolledOffBelow.length;t++)Ru(o,e.scrolledOffBelow[t],e.scrolledOffBelowSW[t]);return o.join(`
28
- `)}function Bu(e,t,n,r,i){let a=Iu(e);if(!a||n>r)return;let{start:o,end:s}=a,c=Math.max(n,o.row),l=Math.min(r,s.row);if(c>l)return;let u=t.width,d=t.softWrap,f=[],p=[];for(let e=c;e<=l;e++){let n=e===o.row?o.col:0,r=e===s.row?s.col:u-1;f.push(Lu(t,e,n,r)),p.push(d[e]>0)}i===`above`?(e.scrolledOffAbove.push(...f),e.scrolledOffAboveSW.push(...p),e.anchor&&e.anchor.row===o.row&&c===o.row&&(e.anchor={col:0,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}}))):(e.scrolledOffBelow.unshift(...f),e.scrolledOffBelowSW.unshift(...p),e.anchor&&e.anchor.row===s.row&&l===s.row&&(e.anchor={col:u-1,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}})))}function Vu(e,t,n){let r=Iu(t);if(!r)return;let{start:i,end:a}=r,o=e.width,s=e.noSelect;for(let t=i.row;t<=a.row&&t<e.height;t++){let r=t===i.row?i.col:0,c=t===a.row?Math.min(a.col,o-1):o-1,l=t*o;for(let i=r;i<=c;i++){let r=l+i;if(s[r]===1)continue;let a=zl(e,r);J(e,i,t,n.withSelectionBg(a.styleId))}}}var Hu,Uu,Wu=t((()=>{Tl(),bu(),Hu=/[\p{L}\p{N}_/.\-+~\\]/u,Uu=new Set([...`<>"'\` `])}));function Gu(){return process.platform===`win32`&&!!process.env.WT_SESSION}function Ku(){return!!(process.env.TERM_PROGRAM===`mintty`||process.platform===`win32`&&process.env.MSYSTEM)}function qu(){return!!(Gu()||process.platform===`win32`&&process.env.TERM_PROGRAM===`vscode`&&process.env.TERM_PROGRAM_VERSION||Ku())}function Ju(){return process.platform===`win32`?qu()?hr+gr+pr:hr+Yu:hr+gr+pr}var Yu,Xu=t((()=>{Er(),Yu=H(0,`f`),Ju()}));function Zu(e){return H(`?${e}h`)}function Qu(e){return H(`?${e}l`)}var $u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd=t((()=>{Er(),$u={CURSOR_VISIBLE:25,ALT_SCREEN:47,ALT_SCREEN_CLEAR:1049,MOUSE_NORMAL:1e3,MOUSE_BUTTON:1002,MOUSE_ANY:1003,MOUSE_SGR:1006,FOCUS_EVENTS:1004,BRACKETED_PASTE:2004,SYNCHRONIZED_UPDATE:2026},ed=Zu($u.SYNCHRONIZED_UPDATE),td=Qu($u.SYNCHRONIZED_UPDATE),nd=Zu($u.BRACKETED_PASTE),rd=Qu($u.BRACKETED_PASTE),id=Zu($u.FOCUS_EVENTS),ad=Qu($u.FOCUS_EVENTS),od=Zu($u.CURSOR_VISIBLE),sd=Qu($u.CURSOR_VISIBLE),cd=Zu($u.ALT_SCREEN_CLEAR),ld=Qu($u.ALT_SCREEN_CLEAR),ud=Zu($u.MOUSE_NORMAL)+Zu($u.MOUSE_BUTTON)+Zu($u.MOUSE_ANY)+Zu($u.MOUSE_SGR),dd=Qu($u.MOUSE_SGR)+Qu($u.MOUSE_ANY)+Qu($u.MOUSE_BUTTON)+Qu($u.MOUSE_NORMAL)}));function pd(e,t,n={}){return new Promise(r=>{let{input:i,timeout:a}=n,o=ne(e,t,{timeout:a},(e,t,n)=>{r({code:+!!e,stdout:t??``,stderr:n??``})});i&&o.stdin&&(o.stdin.write(i),o.stdin.end())})}function md(...e){let t=process.env.TERM_PROGRAM===`kitty`?Ad:`\x07`;return`${kd}${e.join(`;`)}${t}`}function hd(e){return process.env.TMUX?`\x1bPtmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}\x1b\\`:process.env.STY?`\x1bP${e}\x1b\\`:e}function gd(){return process.platform===`darwin`&&!process.env.SSH_CONNECTION?`native`:process.env.TMUX?`tmux-buffer`:`osc52`}function _d(e){return`Ptmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}${Ad}`}async function vd(e){if(!process.env.TMUX)return!1;let{code:t}=await pd(`tmux`,process.env.LC_TERMINAL===`iTerm2`?[`load-buffer`,`-`]:[`load-buffer`,`-w`,`-`],{input:e,useCwd:!1,timeout:2e3});return t===0}async function yd(e){let t=ee.from(e,`utf8`).toString(`base64`),n=md(Md.CLIPBOARD,`c`,t);return process.env.SSH_CONNECTION||bd(e),await vd(e)?_d(`]52;c;${t}`):n}function bd(e){let t={input:e,useCwd:!1,timeout:2e3};switch(process.platform){case`darwin`:pd(`pbcopy`,[],t);return;case`linux`:if(jd===null)return;if(jd===`wl-copy`){pd(`wl-copy`,[],t);return}if(jd===`xclip`){pd(`xclip`,[`-selection`,`clipboard`],t);return}if(jd===`xsel`){pd(`xsel`,[`--clipboard`,`--input`],t);return}pd(`wl-copy`,[],t).then(e=>{if(e.code===0){jd=`wl-copy`;return}pd(`xclip`,[`-selection`,`clipboard`],t).then(e=>{if(e.code===0){jd=`xclip`;return}pd(`xsel`,[`--clipboard`,`--input`],t).then(e=>{jd=e.code===0?`xsel`:null})})});return;case`win32`:pd(`clip`,[],t);return}}function xd(e){let t=e.indexOf(`;`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):``,i=parseInt(n,10);if(i===Md.SET_TITLE_AND_ICON)return{type:`title`,action:{type:`both`,title:r}};if(i===Md.SET_ICON)return{type:`title`,action:{type:`iconName`,name:r}};if(i===Md.SET_TITLE)return{type:`title`,action:{type:`windowTitle`,title:r}};if(i===Md.HYPERLINK){let e=r.split(`;`),t=e[0]??``,n=e.slice(1).join(`;`);if(n===``)return{type:`link`,action:{type:`end`}};let i={};if(t)for(let e of t.split(`:`)){let t=e.indexOf(`=`);t>=0&&(i[e.slice(0,t)]=e.slice(t+1))}return{type:`link`,action:{type:`start`,url:n,params:Object.keys(i).length>0?i:void 0}}}return i===Md.TAB_STATUS?{type:`tabStatus`,action:Cd(r)}:{type:`unknown`,sequence:`\x1b]${e}`}}function Sd(e){let t=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);if(t)return{type:`rgb`,r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};let n=e.match(/^rgb:([0-9a-f]{1,4})\/([0-9a-f]{1,4})\/([0-9a-f]{1,4})$/i);if(n){let e=e=>Math.round(parseInt(e,16)/(16**e.length-1)*255);return{type:`rgb`,r:e(n[1]),g:e(n[2]),b:e(n[3])}}return null}function Cd(e){let t={};for(let[n,r]of wd(e))switch(n){case`indicator`:t.indicator=r===``?null:Sd(r);break;case`status`:t.status=r===``?null:r;break;case`status-color`:t.statusColor=r===``?null:Sd(r);break}return t}function*wd(e){let t=``,n=``,r=!1,i=!1;for(let a of e)i?(r?n+=a:t+=a,i=!1):a===`\\`?i=!0:a===`;`?(yield[t,n],t=``,n=``,r=!1):a===`=`&&!r?r=!0:r?n+=a:t+=a;(t||r)&&(yield[t,n])}function Td(e,t){if(!e)return Nd;let n={id:Ed(e),...t},r=Object.entries(n).map(([e,t])=>`${e}=${t}`).join(`:`);return md(Md.HYPERLINK,r,e)}function Ed(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function Dd(){return process.env.USER_TYPE===`ant`}function Od(e){let t=[],n=e=>e.type===`rgb`?`#${[e.r,e.g,e.b].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`:``;return`indicator`in e&&t.push(`indicator=${e.indicator?n(e.indicator):``}`),`status`in e&&t.push(`status=${e.status?.replaceAll(`\\`,`\\\\`).replaceAll(`;`,`\\;`)??``}`),`statusColor`in e&&t.push(`status-color=${e.statusColor?n(e.statusColor):``}`),md(Md.TAB_STATUS,t.join(`;`))}var kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd=t((()=>{Gn(),kd=`\x1B`+String.fromCharCode(Wn.OSC),Ad=`\x1B\\`,Md={SET_TITLE_AND_ICON:0,SET_ICON:1,SET_TITLE:2,SET_COLOR:4,SET_CWD:7,HYPERLINK:8,ITERM2:9,SET_FG_COLOR:10,SET_BG_COLOR:11,SET_CURSOR_COLOR:12,CLIPBOARD:52,KITTY:99,RESET_COLOR:104,RESET_FG_COLOR:110,RESET_BG_COLOR:111,RESET_CURSOR_COLOR:112,SEMANTIC_PROMPT:133,GHOSTTY:777,TAB_STATUS:21337},Nd=md(Md.HYPERLINK,``,``),Pd={NOTIFY:0,BADGE:2,PROGRESS:4},Fd={CLEAR:0,SET:1,ERROR:2,INDETERMINATE:3},Id=`${kd}${Md.ITERM2};${Pd.PROGRESS};${Fd.CLEAR};`,Ld=`${kd}${Md.SET_TITLE_AND_ICON};`,Rd=md(Md.TAB_STATUS,`indicator=;status=;status-color=`)}));function Bd(){if(!process.stdout.isTTY||process.env.WT_SESSION)return!1;if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return!0;let e=(0,qd.coerce)(process.env.TERM_PROGRAM_VERSION);return e?process.env.TERM_PROGRAM===`ghostty`?(0,qd.gte)(e.version,`1.2.0`):process.env.TERM_PROGRAM===`iTerm.app`&&(0,qd.gte)(e.version,`3.6.6`):!1}function Vd(){if(process.env.TMUX)return!1;let e=process.env.TERM_PROGRAM,t=process.env.TERM;if(e===`iTerm.app`||e===`WezTerm`||e===`WarpTerminal`||e===`ghostty`||e===`contour`||e===`vscode`||e===`alacritty`||t?.includes(`kitty`)||process.env.KITTY_WINDOW_ID||t===`xterm-ghostty`||t?.startsWith(`foot`)||t?.includes(`alacritty`)||process.env.ZED_TERM||process.env.WT_SESSION)return!0;let n=process.env.VTE_VERSION;return!!(n&&parseInt(n,10)>=6800)}function Hd(e){Jd===void 0&&(Jd=e)}function Ud(){return process.env.TERM_PROGRAM===`vscode`?!0:Jd?.startsWith(`xterm.js`)??!1}function Wd(){return Yd.includes(process.env.TERM_PROGRAM??``)}function Gd(){return process.platform===`win32`||!!process.env.WT_SESSION}function Kd(e,t,n=!1){if(t.length===0)return;let r=!n,i=r?ed:``;for(let e of t)switch(e.type){case`stdout`:i+=e.content;break;case`clear`:e.count>0&&(i+=nr(e.count));break;case`clearTerminal`:i+=Ju();break;case`cursorHide`:i+=sd;break;case`cursorShow`:i+=od;break;case`cursorMove`:i+=tr(e.x,e.y);break;case`cursorTo`:i+=$n(e.col);break;case`carriageReturn`:i+=`\r`;break;case`hyperlink`:i+=Td(e.uri);break;case`styleStr`:i+=e.str;break}r&&(i+=td),e.stdout.write(i)}var qd,Jd,Yd,Xd,Zd=t((()=>{qd=g(),Xu(),Er(),fd(),zd(),Yd=[`iTerm.app`,`kitty`,`WezTerm`,`ghostty`,`tmux`,`windows-terminal`],Xd=Vd()}));function Qd(e){nf=e?`focused`:`blurred`;for(let e of af)e();if(!e){for(let e of rf)e();rf.clear()}}function $d(){return nf!==`blurred`}function ef(){return nf}function tf(e){return af.add(e),()=>{af.delete(e)}}var nf,rf,af,of=t((()=>{nf=`unknown`,rf=new Set,af=new Set}));function sf(){return{request:H(`>0q`),match:e=>e.type===`xtversion`}}var cf,lf,uf=t((()=>{Er(),zd(),c(),cf=H(`c`),lf=class{constructor(e){l(this,`stdout`,void 0),l(this,`queue`,[]),this.stdout=e}send(e){return new Promise(t=>{this.queue.push({kind:`query`,match:e.match,resolve:e=>t(e)}),this.stdout.write(e.request)})}flush(){return new Promise(e=>{this.queue.push({kind:`sentinel`,resolve:e}),this.stdout.write(cf)})}onResponse(e){let t=this.queue.findIndex(t=>t.kind===`query`&&t.match(e));if(t!==-1){let[n]=this.queue.splice(t,1);n?.kind===`query`&&n.resolve(e);return}if(e.type===`da1`){let e=this.queue.findIndex(e=>e.kind===`sentinel`);if(e===-1)return;for(let t of this.queue.splice(0,e+1))t.kind===`query`?t.resolve(void 0):t.resolve()}}}})),df,ff,pf=t((()=>{df=n(N(),1),ff=(0,df.createContext)({exit(){}}),ff.displayName=`InternalAppContext`})),mf=t((()=>{}));function hf({children:e}){let t=(0,gf.useSyncExternalStore)(tf,$d),n=(0,gf.useSyncExternalStore)(tf,ef),r=(0,gf.useMemo)(()=>({isTerminalFocused:t,terminalFocusState:n}),[t,n]);return(0,_f.jsx)(vf.Provider,{value:r,children:e})}var gf,_f,vf,yf=t((()=>{gf=n(N(),1),of(),_f=y(),vf=(0,gf.createContext)({isTerminalFocused:!0,terminalFocusState:`unknown`}),vf.displayName=`TerminalFocusContext`}));function bf(){let{isTerminalFocused:e}=(0,xf.useContext)(vf);return e}var xf,Sf=t((()=>{xf=n(N(),1),yf()}));function Cf(e){let t=new Map,n=null,r=e,i=0,a=0;function o(){a=Date.now()-i;for(let e of t.keys())e()}function s(){[...t.values()].some(Boolean)?(n&&(clearInterval(n),n=null),i===0&&(i=Date.now()),n=setInterval(o,r)):n&&(clearInterval(n),n=null)}return{subscribe(e,n){return t.set(e,n),s(),()=>{t.delete(e),s()}},now(){return i===0&&(i=Date.now()),n&&a?a:Date.now()-i},setTickInterval(e){e!==r&&(r=e,s())}}}function wf({children:e}){let[t]=(0,Tf.useState)(()=>Cf(16)),n=bf();return(0,Tf.useEffect)(()=>{t.setTickInterval(n?16:Of)},[t,n]),(0,Ef.jsx)(Df.Provider,{value:t,children:e})}var Tf,Ef,Df,Of,kf=t((()=>{Tf=n(N(),1),mf(),Sf(),Ef=y(),Df=(0,Tf.createContext)(null),Of=32})),Af,jf,Mf=t((()=>{Af=n(N(),1),jf=(0,Af.createContext)(()=>{})})),Nf,Pf=t((()=>{Nf=(e,t=2)=>e.replace(/^\t+/gm,e=>` `.repeat(e.length*t))})),Ff,If,Lf=t((()=>{Pf(),Ff=(e,t)=>{let n=[],r=e-t,i=e+t;for(let e=r;e<=i;e++)n.push(e);return n},If=(e,t,n={})=>{if(typeof e!=`string`)throw TypeError(`Source code is missing.`);if(!t||t<1)throw TypeError("Line number must start from `1`.");let r=Nf(e).split(/\r?\n/);if(!(t>r.length))return Ff(t,n.around??3).filter(e=>r[e-1]!==void 0).map(e=>({line:e,value:r[e-1]}))}})),Rf=r(((e,t)=>{var n=/[|\\{}()[\]^$+*?.-]/g;t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),zf=r(((t,n)=>{var r=Rf(),i=typeof process==`object`&&process&&typeof process.cwd==`function`?process.cwd():`.`,a=[].concat(e(`module`).builtinModules,`bootstrap_node`,`node`).map(e=>RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));a.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var o=class e{constructor(t){t={ignoredPackages:[],...t},`internals`in t||(t.internals=e.nodeInternals()),`cwd`in t||(t.cwd=i),this._cwd=t.cwd.replace(/\\/g,`/`),this._internals=[].concat(t.internals,c(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...a]}clean(e,t=0){t=` `.repeat(t),Array.isArray(e)||(e=e.split(`
28
+ `)}function Bu(e,t,n,r,i){let a=Iu(e);if(!a||n>r)return;let{start:o,end:s}=a,c=Math.max(n,o.row),l=Math.min(r,s.row);if(c>l)return;let u=t.width,d=t.softWrap,f=[],p=[];for(let e=c;e<=l;e++){let n=e===o.row?o.col:0,r=e===s.row?s.col:u-1;f.push(Lu(t,e,n,r)),p.push(d[e]>0)}i===`above`?(e.scrolledOffAbove.push(...f),e.scrolledOffAboveSW.push(...p),e.anchor&&e.anchor.row===o.row&&c===o.row&&(e.anchor={col:0,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}}))):(e.scrolledOffBelow.unshift(...f),e.scrolledOffBelowSW.unshift(...p),e.anchor&&e.anchor.row===s.row&&l===s.row&&(e.anchor={col:u-1,row:e.anchor.row},e.anchorSpan&&(e.anchorSpan={kind:e.anchorSpan.kind,lo:{col:0,row:e.anchorSpan.lo.row},hi:{col:u-1,row:e.anchorSpan.hi.row}})))}function Vu(e,t,n){let r=Iu(t);if(!r)return;let{start:i,end:a}=r,o=e.width,s=e.noSelect;for(let t=i.row;t<=a.row&&t<e.height;t++){let r=t===i.row?i.col:0,c=t===a.row?Math.min(a.col,o-1):o-1,l=t*o;for(let i=r;i<=c;i++){let r=l+i;if(s[r]===1)continue;let a=zl(e,r);J(e,i,t,n.withSelectionBg(a.styleId))}}}var Hu,Uu,Wu=t((()=>{Tl(),bu(),Hu=/[\p{L}\p{N}_/.\-+~\\]/u,Uu=new Set([...`<>"'\` `])}));function Gu(){return process.platform===`win32`&&!!process.env.WT_SESSION}function Ku(){return!!(process.env.TERM_PROGRAM===`mintty`||process.platform===`win32`&&process.env.MSYSTEM)}function qu(){return!!(Gu()||process.platform===`win32`&&process.env.TERM_PROGRAM===`vscode`&&process.env.TERM_PROGRAM_VERSION||Ku())}function Ju(){return process.platform===`win32`?qu()?hr+gr+pr:hr+Yu:hr+gr+pr}var Yu,Xu=t((()=>{Er(),Yu=H(0,`f`),Ju()}));function Zu(e){return H(`?${e}h`)}function Qu(e){return H(`?${e}l`)}var $u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd=t((()=>{Er(),$u={CURSOR_VISIBLE:25,ALT_SCREEN:47,ALT_SCREEN_CLEAR:1049,MOUSE_NORMAL:1e3,MOUSE_BUTTON:1002,MOUSE_ANY:1003,MOUSE_SGR:1006,FOCUS_EVENTS:1004,BRACKETED_PASTE:2004,SYNCHRONIZED_UPDATE:2026},ed=Zu($u.SYNCHRONIZED_UPDATE),td=Qu($u.SYNCHRONIZED_UPDATE),nd=Zu($u.BRACKETED_PASTE),rd=Qu($u.BRACKETED_PASTE),id=Zu($u.FOCUS_EVENTS),ad=Qu($u.FOCUS_EVENTS),od=Zu($u.CURSOR_VISIBLE),sd=Qu($u.CURSOR_VISIBLE),cd=Zu($u.ALT_SCREEN_CLEAR),ld=Qu($u.ALT_SCREEN_CLEAR),ud=Zu($u.MOUSE_NORMAL)+Zu($u.MOUSE_BUTTON)+Zu($u.MOUSE_ANY)+Zu($u.MOUSE_SGR),dd=Qu($u.MOUSE_SGR)+Qu($u.MOUSE_ANY)+Qu($u.MOUSE_BUTTON)+Qu($u.MOUSE_NORMAL)}));function pd(e,t,n={}){return new Promise(r=>{let{input:i,timeout:a}=n,o=ne(e,t,{timeout:a},(e,t,n)=>{r({code:+!!e,stdout:t??``,stderr:n??``})});i&&o.stdin&&(o.stdin.write(i),o.stdin.end())})}function md(...e){let t=process.env.TERM_PROGRAM===`kitty`?Ad:`\x07`;return`${kd}${e.join(`;`)}${t}`}function hd(e){return process.env.TMUX?`\x1bPtmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}\x1b\\`:process.env.STY?`\x1bP${e}\x1b\\`:e}function gd(){return process.platform===`darwin`&&!process.env.SSH_CONNECTION?`native`:process.env.TMUX?`tmux-buffer`:`osc52`}function _d(e){return`Ptmux;${e.replaceAll(`\x1B`,`\x1B\x1B`)}${Ad}`}async function vd(e){if(!process.env.TMUX)return!1;let{code:t}=await pd(`tmux`,process.env.LC_TERMINAL===`iTerm2`?[`load-buffer`,`-`]:[`load-buffer`,`-w`,`-`],{input:e,useCwd:!1,timeout:2e3});return t===0}async function yd(e){let t=ee.from(e,`utf8`).toString(`base64`),n=md(Md.CLIPBOARD,`c`,t);return process.env.SSH_CONNECTION||bd(e),await vd(e)?_d(`]52;c;${t}`):n}function bd(e){let t={input:e,useCwd:!1,timeout:2e3};switch(process.platform){case`darwin`:pd(`pbcopy`,[],t);return;case`linux`:if(jd===null)return;if(jd===`wl-copy`){pd(`wl-copy`,[],t);return}if(jd===`xclip`){pd(`xclip`,[`-selection`,`clipboard`],t);return}if(jd===`xsel`){pd(`xsel`,[`--clipboard`,`--input`],t);return}pd(`wl-copy`,[],t).then(e=>{if(e.code===0){jd=`wl-copy`;return}pd(`xclip`,[`-selection`,`clipboard`],t).then(e=>{if(e.code===0){jd=`xclip`;return}pd(`xsel`,[`--clipboard`,`--input`],t).then(e=>{jd=e.code===0?`xsel`:null})})});return;case`win32`:pd(`clip`,[],t);return}}function xd(e){let t=e.indexOf(`;`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):``,i=parseInt(n,10);if(i===Md.SET_TITLE_AND_ICON)return{type:`title`,action:{type:`both`,title:r}};if(i===Md.SET_ICON)return{type:`title`,action:{type:`iconName`,name:r}};if(i===Md.SET_TITLE)return{type:`title`,action:{type:`windowTitle`,title:r}};if(i===Md.HYPERLINK){let e=r.split(`;`),t=e[0]??``,n=e.slice(1).join(`;`);if(n===``)return{type:`link`,action:{type:`end`}};let i={};if(t)for(let e of t.split(`:`)){let t=e.indexOf(`=`);t>=0&&(i[e.slice(0,t)]=e.slice(t+1))}return{type:`link`,action:{type:`start`,url:n,params:Object.keys(i).length>0?i:void 0}}}return i===Md.TAB_STATUS?{type:`tabStatus`,action:Cd(r)}:{type:`unknown`,sequence:`\x1b]${e}`}}function Sd(e){let t=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);if(t)return{type:`rgb`,r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};let n=e.match(/^rgb:([0-9a-f]{1,4})\/([0-9a-f]{1,4})\/([0-9a-f]{1,4})$/i);if(n){let e=e=>Math.round(parseInt(e,16)/(16**e.length-1)*255);return{type:`rgb`,r:e(n[1]),g:e(n[2]),b:e(n[3])}}return null}function Cd(e){let t={};for(let[n,r]of wd(e))switch(n){case`indicator`:t.indicator=r===``?null:Sd(r);break;case`status`:t.status=r===``?null:r;break;case`status-color`:t.statusColor=r===``?null:Sd(r);break}return t}function*wd(e){let t=``,n=``,r=!1,i=!1;for(let a of e)i?(r?n+=a:t+=a,i=!1):a===`\\`?i=!0:a===`;`?(yield[t,n],t=``,n=``,r=!1):a===`=`&&!r?r=!0:r?n+=a:t+=a;(t||r)&&(yield[t,n])}function Td(e,t){if(!e)return Nd;let n={id:Ed(e),...t},r=Object.entries(n).map(([e,t])=>`${e}=${t}`).join(`:`);return md(Md.HYPERLINK,r,e)}function Ed(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function Dd(){return!1}function Od(e){let t=[],n=e=>e.type===`rgb`?`#${[e.r,e.g,e.b].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`:``;return`indicator`in e&&t.push(`indicator=${e.indicator?n(e.indicator):``}`),`status`in e&&t.push(`status=${e.status?.replaceAll(`\\`,`\\\\`).replaceAll(`;`,`\\;`)??``}`),`statusColor`in e&&t.push(`status-color=${e.statusColor?n(e.statusColor):``}`),md(Md.TAB_STATUS,t.join(`;`))}var kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd=t((()=>{Gn(),kd=`\x1B`+String.fromCharCode(Wn.OSC),Ad=`\x1B\\`,Md={SET_TITLE_AND_ICON:0,SET_ICON:1,SET_TITLE:2,SET_COLOR:4,SET_CWD:7,HYPERLINK:8,ITERM2:9,SET_FG_COLOR:10,SET_BG_COLOR:11,SET_CURSOR_COLOR:12,CLIPBOARD:52,KITTY:99,RESET_COLOR:104,RESET_FG_COLOR:110,RESET_BG_COLOR:111,RESET_CURSOR_COLOR:112,SEMANTIC_PROMPT:133,GHOSTTY:777,TAB_STATUS:21337},Nd=md(Md.HYPERLINK,``,``),Pd={NOTIFY:0,BADGE:2,PROGRESS:4},Fd={CLEAR:0,SET:1,ERROR:2,INDETERMINATE:3},Id=`${kd}${Md.ITERM2};${Pd.PROGRESS};${Fd.CLEAR};`,Ld=`${kd}${Md.SET_TITLE_AND_ICON};`,Rd=md(Md.TAB_STATUS,`indicator=;status=;status-color=`)}));function Bd(){if(!process.stdout.isTTY||process.env.WT_SESSION)return!1;if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return!0;let e=(0,qd.coerce)(process.env.TERM_PROGRAM_VERSION);return e?process.env.TERM_PROGRAM===`ghostty`?(0,qd.gte)(e.version,`1.2.0`):process.env.TERM_PROGRAM===`iTerm.app`&&(0,qd.gte)(e.version,`3.6.6`):!1}function Vd(){if(process.env.TMUX)return!1;let e=process.env.TERM_PROGRAM,t=process.env.TERM;if(e===`iTerm.app`||e===`WezTerm`||e===`WarpTerminal`||e===`ghostty`||e===`contour`||e===`vscode`||e===`alacritty`||t?.includes(`kitty`)||process.env.KITTY_WINDOW_ID||t===`xterm-ghostty`||t?.startsWith(`foot`)||t?.includes(`alacritty`)||process.env.ZED_TERM||process.env.WT_SESSION)return!0;let n=process.env.VTE_VERSION;return!!(n&&parseInt(n,10)>=6800)}function Hd(e){Jd===void 0&&(Jd=e)}function Ud(){return process.env.TERM_PROGRAM===`vscode`?!0:Jd?.startsWith(`xterm.js`)??!1}function Wd(){return Yd.includes(process.env.TERM_PROGRAM??``)}function Gd(){return process.platform===`win32`||!!process.env.WT_SESSION}function Kd(e,t,n=!1){if(t.length===0)return;let r=!n,i=r?ed:``;for(let e of t)switch(e.type){case`stdout`:i+=e.content;break;case`clear`:e.count>0&&(i+=nr(e.count));break;case`clearTerminal`:i+=Ju();break;case`cursorHide`:i+=sd;break;case`cursorShow`:i+=od;break;case`cursorMove`:i+=tr(e.x,e.y);break;case`cursorTo`:i+=$n(e.col);break;case`carriageReturn`:i+=`\r`;break;case`hyperlink`:i+=Td(e.uri);break;case`styleStr`:i+=e.str;break}r&&(i+=td),e.stdout.write(i)}var qd,Jd,Yd,Xd,Zd=t((()=>{qd=g(),Xu(),Er(),fd(),zd(),Yd=[`iTerm.app`,`kitty`,`WezTerm`,`ghostty`,`tmux`,`windows-terminal`],Xd=Vd()}));function Qd(e){nf=e?`focused`:`blurred`;for(let e of af)e();if(!e){for(let e of rf)e();rf.clear()}}function $d(){return nf!==`blurred`}function ef(){return nf}function tf(e){return af.add(e),()=>{af.delete(e)}}var nf,rf,af,of=t((()=>{nf=`unknown`,rf=new Set,af=new Set}));function sf(){return{request:H(`>0q`),match:e=>e.type===`xtversion`}}var cf,lf,uf=t((()=>{Er(),zd(),c(),cf=H(`c`),lf=class{constructor(e){l(this,`stdout`,void 0),l(this,`queue`,[]),this.stdout=e}send(e){return new Promise(t=>{this.queue.push({kind:`query`,match:e.match,resolve:e=>t(e)}),this.stdout.write(e.request)})}flush(){return new Promise(e=>{this.queue.push({kind:`sentinel`,resolve:e}),this.stdout.write(cf)})}onResponse(e){let t=this.queue.findIndex(t=>t.kind===`query`&&t.match(e));if(t!==-1){let[n]=this.queue.splice(t,1);n?.kind===`query`&&n.resolve(e);return}if(e.type===`da1`){let e=this.queue.findIndex(e=>e.kind===`sentinel`);if(e===-1)return;for(let t of this.queue.splice(0,e+1))t.kind===`query`?t.resolve(void 0):t.resolve()}}}})),df,ff,pf=t((()=>{df=n(N(),1),ff=(0,df.createContext)({exit(){}}),ff.displayName=`InternalAppContext`})),mf=t((()=>{}));function hf({children:e}){let t=(0,gf.useSyncExternalStore)(tf,$d),n=(0,gf.useSyncExternalStore)(tf,ef),r=(0,gf.useMemo)(()=>({isTerminalFocused:t,terminalFocusState:n}),[t,n]);return(0,_f.jsx)(vf.Provider,{value:r,children:e})}var gf,_f,vf,yf=t((()=>{gf=n(N(),1),of(),_f=y(),vf=(0,gf.createContext)({isTerminalFocused:!0,terminalFocusState:`unknown`}),vf.displayName=`TerminalFocusContext`}));function bf(){let{isTerminalFocused:e}=(0,xf.useContext)(vf);return e}var xf,Sf=t((()=>{xf=n(N(),1),yf()}));function Cf(e){let t=new Map,n=null,r=e,i=0,a=0;function o(){a=Date.now()-i;for(let e of t.keys())e()}function s(){[...t.values()].some(Boolean)?(n&&(clearInterval(n),n=null),i===0&&(i=Date.now()),n=setInterval(o,r)):n&&(clearInterval(n),n=null)}return{subscribe(e,n){return t.set(e,n),s(),()=>{t.delete(e),s()}},now(){return i===0&&(i=Date.now()),n&&a?a:Date.now()-i},setTickInterval(e){e!==r&&(r=e,s())}}}function wf({children:e}){let[t]=(0,Tf.useState)(()=>Cf(16)),n=bf();return(0,Tf.useEffect)(()=>{t.setTickInterval(n?16:Of)},[t,n]),(0,Ef.jsx)(Df.Provider,{value:t,children:e})}var Tf,Ef,Df,Of,kf=t((()=>{Tf=n(N(),1),mf(),Sf(),Ef=y(),Df=(0,Tf.createContext)(null),Of=32})),Af,jf,Mf=t((()=>{Af=n(N(),1),jf=(0,Af.createContext)(()=>{})})),Nf,Pf=t((()=>{Nf=(e,t=2)=>e.replace(/^\t+/gm,e=>` `.repeat(e.length*t))})),Ff,If,Lf=t((()=>{Pf(),Ff=(e,t)=>{let n=[],r=e-t,i=e+t;for(let e=r;e<=i;e++)n.push(e);return n},If=(e,t,n={})=>{if(typeof e!=`string`)throw TypeError(`Source code is missing.`);if(!t||t<1)throw TypeError("Line number must start from `1`.");let r=Nf(e).split(/\r?\n/);if(!(t>r.length))return Ff(t,n.around??3).filter(e=>r[e-1]!==void 0).map(e=>({line:e,value:r[e-1]}))}})),Rf=r(((e,t)=>{var n=/[|\\{}()[\]^$+*?.-]/g;t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),zf=r(((t,n)=>{var r=Rf(),i=typeof process==`object`&&process&&typeof process.cwd==`function`?process.cwd():`.`,a=[].concat(e(`module`).builtinModules,`bootstrap_node`,`node`).map(e=>RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));a.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var o=class e{constructor(t){t={ignoredPackages:[],...t},`internals`in t||(t.internals=e.nodeInternals()),`cwd`in t||(t.cwd=i),this._cwd=t.cwd.replace(/\\/g,`/`),this._internals=[].concat(t.internals,c(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...a]}clean(e,t=0){t=` `.repeat(t),Array.isArray(e)||(e=e.split(`
29
29
  `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,r=null,i=[];return e.forEach(e=>{if(e=e.replace(/\\/g,`/`),this._internals.some(t=>t.test(e)))return;let t=/^\s*at /.test(e);n?e=e.trimEnd().replace(/^(\s+)at /,`$1`):(e=e.trim(),t&&(e=e.slice(3))),e=e.replace(`${this._cwd}/`,``),e&&(t?(r&&(i.push(r),r=null),i.push(e)):(n=!0,r=e))}),i.map(e=>`${t}${e}\n`).join(``)}captureString(e,t=this.captureString){typeof e==`function`&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:i}=r;return Error.stackTraceLimit=n,this.clean(i)}capture(e,t=this.capture){typeof e==`function`&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:r}=Error;Error.prepareStackTrace=(e,t)=>this._wrapCallSite?t.map(this._wrapCallSite):t,e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:a}=i;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:r}),a}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};s(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!==`Object`&&r!==`[object Object]`&&(n.type=r);let i=t.getFunctionName();i&&(n.function=i);let a=t.getMethodName();return a&&i!==a&&(n.method=a),n}parseLine(e){let t=e&&e.match(l);if(!t)return null;let n=t[1]===`new`,r=t[2],i=t[3],a=t[4],o=Number(t[5]),c=Number(t[6]),d=t[7],f=t[8],p=t[9],m=t[10]===`native`,h=t[11]===`)`,g,_={};if(f&&(_.line=Number(f)),p&&(_.column=Number(p)),h&&d){let e=0;for(let t=d.length-1;t>0;t--)if(d.charAt(t)===`)`)e++;else if(d.charAt(t)===`(`&&d.charAt(t-1)===` `&&(e--,e===-1&&d.charAt(t-1)===` `)){let e=d.slice(0,t-1);d=d.slice(t+1),r+=` (${e}`;break}}if(r){let e=r.match(u);e&&(r=e[1],g=e[2])}return s(_,d,this._cwd),n&&Object.defineProperty(_,"constructor",{value:!0,configurable:!0}),i&&(_.evalOrigin=i,_.evalLine=o,_.evalColumn=c,_.evalFile=a&&a.replace(/\\/g,`/`)),m&&(_.native=!0),r&&(_.function=r),g&&r!==g&&(_.method=g),_}};function s(e,t,n){t&&(t=t.replace(/\\/g,`/`),t.startsWith(`${n}/`)&&(t=t.slice(n.length+1)),e.file=t)}function c(e){if(e.length===0)return[];let t=e.map(e=>r(e));return RegExp(`[\/\\\\]node_modules[\/\\\\](?:${t.join(`|`)})[\/\\\\][^:]+:\\d+:\\d+`)}var l=RegExp(`^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$`),u=/^(.*?) \[as (.*?)\]$/;n.exports=o}));function Bf({children:e,flexWrap:t=`nowrap`,flexDirection:n=`row`,flexGrow:r=0,flexShrink:i=1,ref:a,tabIndex:o,autoFocus:s,onClick:c,onFocus:l,onFocusCapture:u,onBlur:d,onBlurCapture:f,onMouseEnter:p,onMouseLeave:m,onKeyDown:h,onKeyDownCapture:g,..._}){return Dl(_.margin,`margin`),Dl(_.marginX,`marginX`),Dl(_.marginY,`marginY`),Dl(_.marginTop,`marginTop`),Dl(_.marginBottom,`marginBottom`),Dl(_.marginLeft,`marginLeft`),Dl(_.marginRight,`marginRight`),Dl(_.padding,`padding`),Dl(_.paddingX,`paddingX`),Dl(_.paddingY,`paddingY`),Dl(_.paddingTop,`paddingTop`),Dl(_.paddingBottom,`paddingBottom`),Dl(_.paddingLeft,`paddingLeft`),Dl(_.paddingRight,`paddingRight`),Dl(_.gap,`gap`),Dl(_.columnGap,`columnGap`),Dl(_.rowGap,`rowGap`),(0,Vf.jsx)(`ink-box`,{ref:a,tabIndex:o,autoFocus:s,onClick:c,onFocus:l,onFocusCapture:u,onBlur:d,onBlurCapture:f,onMouseEnter:p,onMouseLeave:m,onKeyDown:h,onKeyDownCapture:g,style:{flexWrap:t,flexDirection:n,flexGrow:r,flexShrink:i,..._,overflowX:_.overflowX??_.overflow??`visible`,overflowY:_.overflowY??_.overflow??`visible`},children:e})}var Vf,Hf=t((()=>{N(),Ol(),Vf=y()}));function Uf({color:e,backgroundColor:t,bold:n,dim:r,italic:i=!1,underline:a=!1,strikethrough:o=!1,inverse:s=!1,wrap:c=`wrap`,children:l}){if(l==null)return null;let u={...e&&{color:e},...t&&{backgroundColor:t},...r&&{dim:r},...n&&{bold:n},...i&&{italic:i},...a&&{underline:a},...o&&{strikethrough:o},...s&&{inverse:s}};return(0,Wf.jsx)(`ink-text`,{style:Gf[c],textStyles:u,children:l})}var Wf,Gf,Kf=t((()=>{N(),Wf=y(),Gf={wrap:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`wrap`},"wrap-trim":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`wrap-trim`},end:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`end`},middle:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`middle`},"truncate-end":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate-end`},truncate:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate`},"truncate-middle":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate-middle`},"truncate-start":{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:`truncate-start`}}}));function qf(){return Qf??(Qf=new Yf.default({cwd:process.cwd(),internals:Yf.default.nodeInternals()}))}function Jf({error:e}){let t=e.stack?e.stack.split(`
30
30
  `).slice(1):void 0,n=t?qf().parseLine(t[0]):void 0,r=Zf(n?.file),i,a=0;if(r&&n?.line)try{if(i=If(T(r,`utf8`),n.line),i)for(let{line:e}of i)a=Math.max(a,String(e).length)}catch{}return(0,Xf.jsxs)(Bf,{flexDirection:`column`,padding:1,children:[(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsxs)(Uf,{backgroundColor:`ansi:red`,color:`ansi:white`,children:[` `,`ERROR`,` `]}),(0,Xf.jsxs)(Uf,{children:[` `,e.message]})]}),n&&r&&(0,Xf.jsx)(Bf,{marginTop:1,children:(0,Xf.jsxs)(Uf,{dim:!0,children:[r,`:`,n.line,`:`,n.column]})}),n&&i&&(0,Xf.jsx)(Bf,{marginTop:1,flexDirection:`column`,children:i.map(({line:e,value:t})=>(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsx)(Bf,{width:a+1,children:(0,Xf.jsxs)(Uf,{dim:e!==n.line,backgroundColor:e===n.line?`ansi:red`:void 0,color:e===n.line?`ansi:white`:void 0,children:[String(e).padStart(a,` `),`:`]})}),(0,Xf.jsx)(Uf,{backgroundColor:e===n.line?`ansi:red`:void 0,color:e===n.line?`ansi:white`:void 0,children:` `+t},e)]},e))}),e.stack&&(0,Xf.jsx)(Bf,{marginTop:1,flexDirection:`column`,children:e.stack.split(`
31
31
  `).slice(1).map(e=>{let t=qf().parseLine(e);return t?(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsx)(Uf,{dim:!0,children:`- `}),(0,Xf.jsx)(Uf,{bold:!0,children:t.function}),(0,Xf.jsxs)(Uf,{dim:!0,children:[` `,`(`,Zf(t.file)??``,`:`,t.line,`:`,t.column,`)`]})]},e):(0,Xf.jsxs)(Bf,{children:[(0,Xf.jsx)(Uf,{dim:!0,children:`- `}),(0,Xf.jsx)(Uf,{bold:!0,children:e})]},e)})})]})}var Yf,Xf,Zf,Qf,$f=t((()=>{Lf(),N(),Yf=n(zf(),1),Hf(),Kf(),Xf=y(),Zf=e=>e?.replace(`file://${process.cwd()}/`,``)})),ep,tp,np=t((()=>{ep=n(N(),1),Vn(),tp=(0,ep.createContext)({stdin:process.stdin,internal_eventEmitter:new Bn,setRawMode(){},isRawModeSupported:!1,internal_exitOnCtrlC:!0,internal_querier:null}),tp.displayName=`InternalStdinContext`})),rp,ip,ap=t((()=>{rp=n(N(),1),ip=(0,rp.createContext)(null)}));function op(e){return e===`1`||e===`true`}function sp(e,t,n,r){t.some(e=>e.kind===`key`||e.kind===`mouse`&&!(e.button&32&&(e.button&3)==3))&&dp.updateLastInteractionTime();for(let n of t){if(n.kind===`response`){e.querier.onResponse(n.response);continue}if(n.kind===`mouse`){cp(e,n);continue}let t=n.sequence;if(t===br){e.handleTerminalFocus(!0);let t=new si(`terminalfocus`);e.internal_eventEmitter.emit(`terminalfocus`,t);continue}if(t===xr){e.handleTerminalFocus(!1),e.props.selection.isDragging&&(Cu(e.props.selection),e.props.onSelectionChange());let t=new si(`terminalblur`);e.internal_eventEmitter.emit(`terminalblur`,t);continue}if($d()||Qd(!0),n.name===`z`&&n.ctrl&&fp){e.handleSuspend();continue}e.handleInput(t);let r=new ai(n);e.internal_eventEmitter.emit(`input`,r),e.props.dispatchKeyboardEvent(n)}}function cp(e,t){if(dp.isMouseClicksDisabled())return;let n=e.props.selection,r=t.col-1,i=t.row-1,a=t.button&3;if(t.action===`press`){if(t.button&32&&a===3){if(n.isDragging&&(Cu(n),e.props.onSelectionChange()),r===e.lastHoverCol&&i===e.lastHoverRow)return;e.lastHoverCol=r,e.lastHoverRow=i,e.props.onHoverAt(r,i);return}if(a!==0){e.clickCount=0;return}if(t.button&32){e.props.onSelectionDrag(r,i);return}n.isDragging&&(Cu(n),e.props.onSelectionChange());let o=Date.now();if(e.clickCount=o-e.lastClickTime<mp&&Math.abs(r-e.lastClickCol)<=hp&&Math.abs(i-e.lastClickRow)<=hp?e.clickCount+1:1,e.lastClickTime=o,e.lastClickCol=r,e.lastClickRow=i,e.clickCount>=2){e.pendingHyperlinkTimer&&(clearTimeout(e.pendingHyperlinkTimer),e.pendingHyperlinkTimer=null);let t=e.clickCount===2?2:3;e.props.onMultiClick(r,i,t);return}Su(n,r,i),n.lastPressHadAlt=(t.button&8)!=0,e.props.onSelectionChange();return}if(a!==0){if(!n.isDragging)return;Cu(n),e.props.onSelectionChange();return}if(Cu(n),!Fu(n)&&n.anchor&&!e.props.onClickAt(r,i)){let t=e.props.getHyperlinkAt(r,i);t&&process.env.TERM_PROGRAM!==`vscode`&&!Ud()&&(e.pendingHyperlinkTimer&&clearTimeout(e.pendingHyperlinkTimer),e.pendingHyperlinkTimer=setTimeout((e,t)=>{e.pendingHyperlinkTimer=null,e.props.onOpenHyperlink(t)},mp,e,t))}e.props.onSelectionChange()}var lp,up,dp,fp,pp,mp,hp,gp,_p=t((()=>{lp=n(N(),1),up=y(),c(),Vn(),oi(),ci(),ri(),Sl(),Wu(),Zd(),of(),uf(),Er(),fd(),pf(),kf(),Mf(),$f(),np(),yf(),ap(),dp={updateLastInteractionTime:()=>{},stopCapturingEarlyInput:()=>{},isMouseClicksDisabled:()=>!1,logError:e=>console.error(e),logForDebugging:(e,t)=>{}},fp=process.platform!==`win32`,pp=5e3,mp=500,hp=1,gp=class extends lp.PureComponent{constructor(...e){super(...e),l(this,`state`,{error:void 0}),l(this,`rawModeEnabledCount`,0),l(this,`internal_eventEmitter`,new Bn),l(this,`keyParseState`,Qr),l(this,`incompleteEscapeTimer`,null),l(this,`NORMAL_TIMEOUT`,50),l(this,`PASTE_TIMEOUT`,500),l(this,`querier`,new lf(this.props.stdout)),l(this,`lastClickTime`,0),l(this,`lastClickCol`,-1),l(this,`lastClickRow`,-1),l(this,`clickCount`,0),l(this,`pendingHyperlinkTimer`,null),l(this,`lastHoverCol`,-1),l(this,`lastHoverRow`,-1),l(this,`lastStdinTime`,Date.now()),l(this,`handleSetRawMode`,e=>{let{stdin:t}=this.props;if(!this.isRawModeSupported())throw t===process.stdin?Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
@@ -1 +1 @@
1
- import{$r as e,$t as t,An as n,B as r,Bt as i,C as a,Cn as o,Cr as s,Ct as c,D as l,Dr as u,Dt as d,En as f,Er as p,Ft as m,G as h,Gn as g,Gr as _,Gt as v,H as y,I as b,In as x,Jr as S,Jt as C,Kt as w,Lt as T,Mn as E,Mr as D,N as O,On as k,P as A,Pn as j,Pr as M,Pt as N,Q as P,Qn as F,Qr as I,R as L,Rn as R,Sn as z,T as B,Tn as V,Tt as H,U,Un as W,V as G,Vn as K,Vt as q,Wt as J,Xn as Y,Xr as X,Xt as Z,Y as Q,Yt as $,Z as ee,Zn as te,Zt as ne,_ as re,_n as ie,_r as ae,a as oe,ai as se,an as ce,ar as le,br as ue,cn as de,cr as fe,ct as pe,d as me,dr as he,dt as ge,en as _e,er as ve,et as ye,fn as be,fr as xe,ft as Se,gr as Ce,gt as we,h as Te,hn as Ee,hr as De,ir as Oe,it as ke,j as Ae,jt as je,k as Me,kn as Ne,kr as Pe,kt as Fe,l as Ie,ln as Le,lr as Re,lt as ze,mr as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,oi as Ke,on as qe,or as Je,ot as Ye,p as Xe,pn as Ze,pr as Qe,q as $e,qn as et,r as tt,ri as nt,rn as rt,rr as it,s as at,si as ot,sn as st,sr as ct,t as lt,ti as ut,tn as dt,tr as ft,un as pt,vr as mt,vt as ht,x as gt,xn as _t,xr as vt,xt as yt,y as bt,yr as xt,yt as St,zn as Ct}from"./src-CDCSSo0U2.js";lt();export{St as AlternateScreen,m as Ansi,et as BaseBox,g as BaseText,b as Box,je as Button,B as Byline,Je as CLEAR_ITERM2_PROGRESS,ct as CLEAR_TAB_STATUS,fe as CLEAR_TERMINAL_TITLE,Ct as ClickEvent,Be as DBP,De as DFE,I as DISABLE_KITTY_KEYBOARD,e as DISABLE_MODIFY_OTHER_KEYS,Ce as DISABLE_MOUSE_TRACKING,P as DOUBLE_PRESS_TIMEOUT_MS,bt as Dialog,a as Divider,ae as ENABLE_MOUSE_TRACKING,mt as ENTER_ALT_SCREEN,xt as EXIT_ALT_SCREEN,nt as Event,ut as EventEmitter,Pe as FocusEvent,u as FocusManager,Te as FuzzyPicker,ue as HIDE_CURSOR,n as Ink,X as InputEvent,w as KeybindingProvider,q as KeybindingSetup,K as KeyboardEvent,l as KeyboardShortcutHint,T as Link,re as ListItem,Xe as LoadingState,Fe as Newline,H as NoSelect,gt as Pane,me as ProgressBar,Ie as Ratchet,c as RawAnsi,vt as SHOW_CURSOR,yt as ScrollBox,Me as SearchBox,d as Spacer,at as StatusIcon,_t as THEME_NAMES,z as THEME_SETTINGS,He as Tab,tt as Tabs,S as TerminalFocusEvent,W as TerminalSizeContext,E as TerminalWriteProvider,A as Text,O as TextHoverColorContext,L as ThemeProvider,se as applyColor,Ke as applyTextStyles,Ue as chordToDisplayString,rt as chordToString,s as clamp,Ae as color,ot as colorize,f as createRoot,ne as getBindingDisplayText,Re as getClipboardPath,pt as getKeyName,te as getTerminalFocusState,F as getTerminalFocused,o as getTheme,ft as hasCursorUpViewportYankBug,R as instances,it as isSynchronizedOutputSupported,Oe as isXtermJs,ce as keystrokeToDisplayString,qe as keystrokeToString,t as keystrokesEqual,be as matchesBinding,Ze as matchesKeystroke,N as measureElement,st as parseBindings,de as parseChord,Le as parseKeystroke,x as renderBorder,k as renderSync,_e as resolveKey,dt as resolveKeyWithChordState,he as setClipboard,r as setThemeConfigCallbacks,_ as stringWidth,p as styles,ve as subscribeTerminalFocus,i as supportsHyperlinks,xe as supportsTabStatus,V as themeColorToAnsi,Ve as useAnimationFrame,ge as useAnimationTimer,ht as useApp,h as useDeclaredCursor,ye as useDoublePress,pe as useHasSelection,Ee as useInput,Se as useInterval,J as useKeybinding,C as useKeybindingContext,v as useKeybindings,We as useMinDisplayTime,$ as useOptionalKeybindingContext,G as usePreviewTheme,Z as useRegisterKeybindingContext,$e as useSearchHighlight,ze as useSelection,ie as useStdin,oe as useTabHeaderFocus,ee as useTabStatus,Ge as useTabsWidth,Y as useTerminalFocus,j as useTerminalNotification,Ye as useTerminalSize,Q as useTerminalTitle,we as useTerminalViewport,y as useTheme,U as useThemeSetting,ke as useTimeout,M as wrapAnsi,Qe as wrapForMultiplexer,D as wrapText,Ne as wrappedRender,le as writeDiffToTerminal};
1
+ import{$r as e,$t as t,An as n,B as r,Bt as i,C as a,Cn as o,Cr as s,Ct as c,D as l,Dr as u,Dt as d,En as f,Er as p,Ft as m,G as h,Gn as g,Gr as _,Gt as v,H as y,I as b,In as x,Jr as S,Jt as C,Kt as w,Lt as T,Mn as E,Mr as D,N as O,On as k,P as A,Pn as j,Pr as M,Pt as N,Q as P,Qn as F,Qr as I,R as L,Rn as R,Sn as z,T as B,Tn as V,Tt as H,U,Un as W,V as G,Vn as K,Vt as q,Wt as J,Xn as Y,Xr as X,Xt as Z,Y as Q,Yt as $,Z as ee,Zn as te,Zt as ne,_ as re,_n as ie,_r as ae,a as oe,ai as se,an as ce,ar as le,br as ue,cn as de,cr as fe,ct as pe,d as me,dr as he,dt as ge,en as _e,er as ve,et as ye,fn as be,fr as xe,ft as Se,gr as Ce,gt as we,h as Te,hn as Ee,hr as De,ir as Oe,it as ke,j as Ae,jt as je,k as Me,kn as Ne,kr as Pe,kt as Fe,l as Ie,ln as Le,lr as Re,lt as ze,mr as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,oi as Ke,on as qe,or as Je,ot as Ye,p as Xe,pn as Ze,pr as Qe,q as $e,qn as et,r as tt,ri as nt,rn as rt,rr as it,s as at,si as ot,sn as st,sr as ct,t as lt,ti as ut,tn as dt,tr as ft,un as pt,vr as mt,vt as ht,x as gt,xn as _t,xr as vt,xt as yt,y as bt,yr as xt,yt as St,zn as Ct}from"./src-P_wYS_NJ2.js";lt();export{St as AlternateScreen,m as Ansi,et as BaseBox,g as BaseText,b as Box,je as Button,B as Byline,Je as CLEAR_ITERM2_PROGRESS,ct as CLEAR_TAB_STATUS,fe as CLEAR_TERMINAL_TITLE,Ct as ClickEvent,Be as DBP,De as DFE,I as DISABLE_KITTY_KEYBOARD,e as DISABLE_MODIFY_OTHER_KEYS,Ce as DISABLE_MOUSE_TRACKING,P as DOUBLE_PRESS_TIMEOUT_MS,bt as Dialog,a as Divider,ae as ENABLE_MOUSE_TRACKING,mt as ENTER_ALT_SCREEN,xt as EXIT_ALT_SCREEN,nt as Event,ut as EventEmitter,Pe as FocusEvent,u as FocusManager,Te as FuzzyPicker,ue as HIDE_CURSOR,n as Ink,X as InputEvent,w as KeybindingProvider,q as KeybindingSetup,K as KeyboardEvent,l as KeyboardShortcutHint,T as Link,re as ListItem,Xe as LoadingState,Fe as Newline,H as NoSelect,gt as Pane,me as ProgressBar,Ie as Ratchet,c as RawAnsi,vt as SHOW_CURSOR,yt as ScrollBox,Me as SearchBox,d as Spacer,at as StatusIcon,_t as THEME_NAMES,z as THEME_SETTINGS,He as Tab,tt as Tabs,S as TerminalFocusEvent,W as TerminalSizeContext,E as TerminalWriteProvider,A as Text,O as TextHoverColorContext,L as ThemeProvider,se as applyColor,Ke as applyTextStyles,Ue as chordToDisplayString,rt as chordToString,s as clamp,Ae as color,ot as colorize,f as createRoot,ne as getBindingDisplayText,Re as getClipboardPath,pt as getKeyName,te as getTerminalFocusState,F as getTerminalFocused,o as getTheme,ft as hasCursorUpViewportYankBug,R as instances,it as isSynchronizedOutputSupported,Oe as isXtermJs,ce as keystrokeToDisplayString,qe as keystrokeToString,t as keystrokesEqual,be as matchesBinding,Ze as matchesKeystroke,N as measureElement,st as parseBindings,de as parseChord,Le as parseKeystroke,x as renderBorder,k as renderSync,_e as resolveKey,dt as resolveKeyWithChordState,he as setClipboard,r as setThemeConfigCallbacks,_ as stringWidth,p as styles,ve as subscribeTerminalFocus,i as supportsHyperlinks,xe as supportsTabStatus,V as themeColorToAnsi,Ve as useAnimationFrame,ge as useAnimationTimer,ht as useApp,h as useDeclaredCursor,ye as useDoublePress,pe as useHasSelection,Ee as useInput,Se as useInterval,J as useKeybinding,C as useKeybindingContext,v as useKeybindings,We as useMinDisplayTime,$ as useOptionalKeybindingContext,G as usePreviewTheme,Z as useRegisterKeybindingContext,$e as useSearchHighlight,ze as useSelection,ie as useStdin,oe as useTabHeaderFocus,ee as useTabStatus,Ge as useTabsWidth,Y as useTerminalFocus,j as useTerminalNotification,Ye as useTerminalSize,Q as useTerminalTitle,we as useTerminalViewport,y as useTheme,U as useThemeSetting,ke as useTimeout,M as wrapAnsi,Qe as wrapForMultiplexer,D as wrapText,Ne as wrappedRender,le as writeDiffToTerminal};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./startupProfiler-jeId9f2i.js";e();export{t as profileCheckpoint};
@@ -0,0 +1,3 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,n,o as r}from"./envUtils-BDhHQY0-.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Gr as o,t as s}from"./src-P_wYS_NJ2.js";import{Kt as ee,mt as c}from"./state-Bs5xweDL.js";import{E as te,S as ne,a as l,d as u,l as d,p as f}from"./debug-BdqxZ7rV.js";import{n as p,r as m}from"./analytics-DJobLaWP.js";import{a as h,n as g,r as _,s as v}from"./intl-cKc-V6Mq.js";import{dirname as re,join as ie}from"path";function y(e,t){if(o(e)<=t)return e;if(t<=0)return`…`;if(t<5)return b(e,t);let n=e.lastIndexOf(`/`),r=n>=0?e.slice(n):e,i=n>=0?e.slice(0,n):``,a=o(r);if(a>=t-1)return x(e,t);let s=t-1-a;return s<=0?x(r,t):S(i,s)+`…`+r}function b(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t-1)break;r+=i,n+=e}return r+`…`}function x(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=[...g().segment(e)],r=0,i=n.length;for(let e=n.length-1;e>=0;e--){let a=o(n[e].segment);if(r+a>t-1)break;r+=a,i=e}return`…`+n.slice(i).map(e=>e.segment).join(``)}function S(e,t){if(o(e)<=t)return e;if(t<=0)return``;let n=0,r=``;for(let{segment:i}of g().segment(e)){let e=o(i);if(n+e>t)break;r+=i,n+=e}return r}function C(e,t,n=!1){if(e==null)return``;let r=e;if(n){let n=e.indexOf(`
2
+ `);if(n!==-1)return r=e.substring(0,n),o(r)+1>t?b(r,t):`${r}…`}return o(r)<=t?r:b(r,t)}var w=e((()=>{s(),v()}));function T(e){let t=e/1024;if(t<1)return`${e} bytes`;if(t<1024)return`${t.toFixed(1).replace(/\.0$/,``)}KB`;let n=t/1024;return n<1024?`${n.toFixed(1).replace(/\.0$/,``)}MB`:`${(n/1024).toFixed(1).replace(/\.0$/,``)}GB`}function E(e){return`${(e/1e3).toFixed(1)}s`}function D(e,t){if(e<6e4)return e===0?`0s`:e<1?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/1e3).toString()}s`;let n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4),a=Math.round(e%6e4/1e3);a===60&&(a=0,i++),i===60&&(i=0,r++),r===24&&(r=0,n++);let o=t?.hideTrailingZeros;return t?.mostSignificantOnly?n>0?`${n}d`:r>0?`${r}h`:i>0?`${i}m`:`${a}s`:n>0?o&&r===0&&i===0?`${n}d`:o&&i===0?`${n}d ${r}h`:`${n}d ${r}h ${i}m`:r>0?o&&i===0&&a===0?`${r}h`:o&&a===0?`${r}h ${i}m`:`${r}h ${i}m ${a}s`:i>0?o&&a===0?`${i}m`:`${i}m ${a}s`:`${a}s`}function O(e){return F(e>=1e3).format(e).toLowerCase()}function k(e){return O(e).replace(`.0`,``)}function A(e,t={}){let{style:n=`narrow`,numeric:r=`always`,now:i=new Date}=t,a=e.getTime()-i.getTime(),o=Math.trunc(a/1e3);for(let{unit:e,seconds:t,shortUnit:i}of[{unit:`year`,seconds:31536e3,shortUnit:`y`},{unit:`month`,seconds:2592e3,shortUnit:`mo`},{unit:`week`,seconds:604800,shortUnit:`w`},{unit:`day`,seconds:86400,shortUnit:`d`},{unit:`hour`,seconds:3600,shortUnit:`h`},{unit:`minute`,seconds:60,shortUnit:`m`},{unit:`second`,seconds:1,shortUnit:`s`}])if(Math.abs(o)>=t){let a=Math.trunc(o/t);return n===`narrow`?o<0?`${Math.abs(a)}${i} ago`:`in ${a}${i}`:_(`long`,r).format(a,e)}return n===`narrow`?o<=0?`0s ago`:`in 0s`:_(n,r).format(0,`second`)}function j(e,t={}){let{now:n=new Date,...r}=t;return e>n?A(e,{...r,now:n}):A(e,{...r,numeric:`always`,now:n})}function M(e){let t=e.fileSize===void 0?`${e.messageCount} messages`:T(e.fileSize),n=[j(e.modified,{style:`short`}),...e.gitBranch?[e.gitBranch]:[],t];return e.tag&&n.push(`#${e.tag}`),e.agentSetting&&n.push(`@${e.agentSetting}`),e.prNumber&&n.push(e.prRepository?`${e.prRepository}#${e.prNumber}`:`#${e.prNumber}`),n.join(` · `)}function ae(e,t=!1,n=!0){if(!e)return;let r=new Date(e*1e3),i=new Date,a=r.getMinutes();if((r.getTime()-i.getTime())/(1e3*60*60)>24){let e={month:`short`,day:`numeric`,hour:n?`numeric`:void 0,minute:!n||a===0?void 0:`2-digit`,hour12:n?!0:void 0};return r.getFullYear()!==i.getFullYear()&&(e.year=`numeric`),r.toLocaleString(`en-US`,e).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}return r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:a===0?void 0:`2-digit`,hour12:!0}).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${h()})`:``)}var N,P,F,I=e((()=>{v(),w(),N=null,P=null,F=e=>e?(N||(N=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:1})),N):(P||(P=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:0})),P)}));function L(){return V}function R(e){return e.toFixed(3)}function z(e,t,n,r,i,a,o=``){let s=r?` | RSS: ${T(r.rss)}, Heap: ${T(r.heapUsed)}`:``;return`[+${R(e).padStart(i)}ms] (+${R(t).padStart(a)}ms) ${n}${o}${s}`}var B,V,H=e((()=>{I(),i(),B=class{constructor(){a(this,`marks`,new Map),a(this,`_origin`,void 0),this._origin=Number(process.hrtime.bigint()/1000n)/1e3}mark(e){this.marks.set(e,this.now())}getEntriesByType(e){if(e!==`mark`)return[];let t=[];for(let[e,n]of this.marks)t.push({name:e,startTime:n,entryType:`mark`});return t}clearMarks(e){e===void 0?this.marks.clear():this.marks.delete(e)}now(){return Number(process.hrtime.bigint()/1000n)/1e3-this._origin}},V=new B}));function U(e){X&&(L().mark(e),J&&Z.push(process.memoryUsage()))}function W(){if(!J)return`Startup profiling not enabled`;let e=L().getEntriesByType(`mark`);if(e.length===0)return`No profiling checkpoints recorded`;let t=[];t.push(`=`.repeat(80)),t.push(`STARTUP PROFILING REPORT`),t.push(`=`.repeat(80)),t.push(``);let n=0;for(let[r,i]of e.entries())t.push(z(i.startTime,i.startTime-n,i.name,Z[r],8,7)),n=i.startTime;let r=e[e.length-1];return t.push(``),t.push(`Total startup time: ${R(r?.startTime??0)}ms`),t.push(`=`.repeat(80)),t.join(`
3
+ `)}function G(){if(!$){if($=!0,q(),J){let e=K(),t=re(e);u().mkdirSync(t),te(e,W(),{encoding:`utf8`,flush:!0}),d(`Startup profiling report:`),d(W())}L().clearMarks(),Z.length=0}}function K(){return ie(n(),`startup-perf`,`${c()}.txt`)}function q(){if(!Y)return;let e=L().getEntriesByType(`mark`);if(e.length===0)return;let t=new Map;for(let n of e)t.set(n.name,n.startTime);let n={};for(let[e,[r,i]]of Object.entries(Q)){let a=t.get(r),o=t.get(i);a!==void 0&&o!==void 0&&(n[`${e}_ms`]=Math.round(o-a))}n.checkpoint_count=e.length,m(`tengu_startup_perf`,n)}var J,Y,X,Z,Q,$,oe=e((()=>{ee(),p(),l(),r(),f(),H(),ne(),J=t(process.env.CLAUDE_CODE_PROFILE_STARTUP),Y=Math.random()<.005,X=J||Y,Z=[],Q={import_time:[`cli_entry`,`main_tsx_imports_loaded`],init_time:[`init_function_start`,`init_function_end`],settings_time:[`eagerLoadSettings_start`,`eagerLoadSettings_end`],total_time:[`cli_entry`,`main_after_run`]},X&&U(`profiler_initialized`),$=!1}));export{b as C,x as S,k as _,R as a,C as b,H as c,M as d,O as f,E as g,ae as h,G as i,D as l,j as m,oe as n,z as o,A as p,U as r,L as s,K as t,T as u,I as v,S as w,y as x,w as y};
@@ -0,0 +1 @@
1
+ import{Hn as e,Kt as t,mt as n,pn as r,t as i}from"./state-Bs5xweDL.js";t();export{i as addInvokedSkill,n as getSessionId,r as setCwdState,e as setOriginalCwd};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{dirname as r,join as i}from"path";import{mkdirSync as a,readFileSync as o,unlinkSync as s,writeFileSync as c}from"fs";function l(e=`remote-control`){return i(t(),`daemon`,`${e}.json`)}function u(e,t=`remote-control`){let n=l(t);a(r(n),{recursive:!0}),c(n,JSON.stringify(e,null,2),`utf-8`)}function d(e=`remote-control`){let t=l(e);try{let e=o(t,`utf-8`);return JSON.parse(e)}catch{return null}}function f(e=`remote-control`){let t=l(e);try{s(t)}catch{}}function p(e){try{return process.kill(e,0),!0}catch{return!1}}function m(e=`remote-control`){let t=d(e);return t?p(t.pid)?{status:`running`,state:t}:(f(e),{status:`stale`}):{status:`stopped`}}async function h(e=`remote-control`,t=1e4){let n=d(e);if(!n)return!1;let{pid:r}=n;if(!p(r))return f(e),!1;try{process.kill(r,`SIGTERM`)}catch{return f(e),!1}let i=Date.now()+t;for(;Date.now()<i;){if(!p(r))return f(e),!0;await new Promise(e=>setTimeout(e,200))}try{process.kill(r,`SIGKILL`)}catch{}return await new Promise(e=>setTimeout(e,500)),f(e),!0}var g=e((()=>{n()}));export{u as a,h as i,m as n,f as r,g as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-BDhHQY0-.js";import{dirname as r,join as i}from"path";import{mkdirSync as a,readFileSync as o,unlinkSync as s,writeFileSync as c}from"fs";function l(e=`remote-control`){return i(t(),`daemon`,`${e}.json`)}function u(e,t=`remote-control`){let n=l(t);a(r(n),{recursive:!0}),c(n,JSON.stringify(e,null,2),`utf-8`)}function d(e=`remote-control`){let t=l(e);try{let e=o(t,`utf-8`);return JSON.parse(e)}catch{return null}}function f(e=`remote-control`){let t=l(e);try{s(t)}catch{}}function p(e){try{return process.kill(e,0),!0}catch{return!1}}function m(e=`remote-control`){let t=d(e);return t?p(t.pid)?{status:`running`,state:t}:(f(e),{status:`stale`}):{status:`stopped`}}async function h(e=`remote-control`,t=1e4){let n=d(e);if(!n)return!1;let{pid:r}=n;if(!p(r))return f(e),!1;try{process.kill(r,`SIGTERM`)}catch{return f(e),!1}let i=Date.now()+t;for(;Date.now()<i;){if(!p(r))return f(e),!0;await new Promise(e=>setTimeout(e,200))}try{process.kill(r,`SIGKILL`)}catch{}return await new Promise(e=>setTimeout(e,500)),f(e),!0}var g=e((()=>{n()}));export{u as a,h as i,m as n,f as r,g as t};