likec4 1.56.0 → 1.58.0

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 (207) hide show
  1. package/__app__/codegen/react.mjs +7 -8
  2. package/__app__/codegen/webcomponent.mjs +77 -736
  3. package/__app__/src/aichat/index.mjs +8 -0
  4. package/__app__/src/chunks/AIChat.mjs +959 -0
  5. package/__app__/src/chunks/DiagramActorProvider.mjs +7638 -0
  6. package/__app__/src/chunks/LikeC4Styles.mjs +1866 -0
  7. package/__app__/src/chunks/Markdown.mjs +146 -0
  8. package/__app__/src/chunks/NavigationPanel.mjs +61 -0
  9. package/__app__/src/chunks/ProjectsOverview.mjs +540 -0
  10. package/__app__/src/chunks/adhoc-editor.mjs +3386 -0
  11. package/__app__/src/chunks/es.mjs +439 -0
  12. package/__app__/src/chunks/hooks.mjs +145 -0
  13. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +1894 -0
  14. package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
  15. package/__app__/src/chunks/libs/@mantine.mjs +12070 -0
  16. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +252 -0
  17. package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
  18. package/__app__/src/chunks/libs/@tanstack.mjs +2718 -0
  19. package/__app__/src/chunks/libs/@xstate/react.mjs +1982 -0
  20. package/__app__/src/chunks/libs/@xyflow/react.mjs +5256 -0
  21. package/__app__/src/chunks/libs/bezier-js.mjs +1003 -0
  22. package/__app__/src/chunks/libs/d3.mjs +2842 -0
  23. package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
  24. package/__app__/src/chunks/libs/framer.mjs +5872 -0
  25. package/__app__/src/chunks/libs/remeda.mjs +642 -0
  26. package/__app__/src/chunks/libs/zod.mjs +3170 -0
  27. package/__app__/src/chunks/rolldown-runtime.mjs +23 -0
  28. package/__app__/src/chunks/styled-system.mjs +1040 -0
  29. package/__app__/src/fonts.css +1 -1
  30. package/__app__/src/main.mjs +14847 -1
  31. package/__app__/src/style.css +1 -1
  32. package/config/schema.json +14 -41
  33. package/dist/chunks/enableServer.mjs +1 -0
  34. package/dist/chunks/filenames.mjs +2 -2
  35. package/dist/chunks/index2.d.mts +2057 -722
  36. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  37. package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
  38. package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
  39. package/dist/chunks/libs/@ts-graphviz/common.d.mts +9 -0
  40. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
  41. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  42. package/dist/chunks/libs/chevrotain.mjs +26 -26
  43. package/dist/chunks/libs/langium.d.mts +5 -5
  44. package/dist/chunks/libs/langium.mjs +10 -10
  45. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  46. package/dist/chunks/libs/pako.mjs +3 -1
  47. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  48. package/dist/chunks/libs/remeda.mjs +1 -1
  49. package/dist/chunks/libs/ufo.mjs +1 -1
  50. package/dist/chunks/libs/unstorage.mjs +1 -1
  51. package/dist/chunks/libs/which.mjs +1 -1
  52. package/dist/chunks/libs/zod.d.mts +60 -25
  53. package/dist/chunks/libs/zod.mjs +65 -0
  54. package/dist/chunks/node.mjs +84 -56
  55. package/dist/chunks/sequence-view.mjs +1 -1
  56. package/dist/chunks/vite-plugin.mjs +593 -0
  57. package/dist/cli/index.mjs +184 -141
  58. package/dist/index.d.mts +2 -131
  59. package/dist/index.mjs +1 -1
  60. package/dist/model/index.d.mts +2 -2
  61. package/dist/vite-plugin/index.d.mts +53 -2
  62. package/dist/vite-plugin/index.mjs +1 -1
  63. package/dist/vite-plugin/internal/index.d.mts +327 -4
  64. package/dist/vite-plugin/internal/index.mjs +946 -1
  65. package/package.json +85 -72
  66. package/react/index.d.mts +174 -73
  67. package/react/index.mjs +42468 -38926
  68. package/vite-plugin-modules.d.ts +4 -0
  69. package/__app__/chunks/ColorSchemeToggle.mjs +0 -1
  70. package/__app__/chunks/DiagramActorProvider.mjs +0 -10
  71. package/__app__/chunks/Fallback.mjs +0 -1
  72. package/__app__/chunks/Header.mjs +0 -13
  73. package/__app__/chunks/IconRenderer.mjs +0 -1
  74. package/__app__/chunks/LikeC4Diagram.mjs +0 -19
  75. package/__app__/chunks/LikeC4ModelContext.mjs +0 -1
  76. package/__app__/chunks/LikeC4ModelContext2.mjs +0 -1
  77. package/__app__/chunks/LikeC4Styles.mjs +0 -48
  78. package/__app__/chunks/NavigationPanel.mjs +0 -1
  79. package/__app__/chunks/StaticLikeC4Diagram.mjs +0 -1
  80. package/__app__/chunks/ViewReact.mjs +0 -1
  81. package/__app__/chunks/__root.mjs +0 -1
  82. package/__app__/chunks/adhoc-editor.mjs +0 -1
  83. package/__app__/chunks/hooks.mjs +0 -1
  84. package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
  85. package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
  86. package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
  87. package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
  88. package/__app__/chunks/libs/@mantine/core.mjs +0 -41
  89. package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
  90. package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
  91. package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
  92. package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -15
  93. package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
  94. package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
  95. package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
  96. package/__app__/chunks/libs/@xstate/react.mjs +0 -1
  97. package/__app__/chunks/libs/@xstate/store.mjs +0 -1
  98. package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
  99. package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
  100. package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
  101. package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
  102. package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
  103. package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
  104. package/__app__/chunks/libs/bezier-js.mjs +0 -1
  105. package/__app__/chunks/libs/d3-path.mjs +0 -1
  106. package/__app__/chunks/libs/d3-shape.mjs +0 -1
  107. package/__app__/chunks/libs/fast-equals.mjs +0 -1
  108. package/__app__/chunks/libs/framer-motion.mjs +0 -9
  109. package/__app__/chunks/libs/html-to-image.mjs +0 -2
  110. package/__app__/chunks/libs/motion-dom.mjs +0 -1
  111. package/__app__/chunks/libs/motion.mjs +0 -1
  112. package/__app__/chunks/libs/nanostores.mjs +0 -1
  113. package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
  114. package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
  115. package/__app__/chunks/libs/remeda.mjs +0 -1
  116. package/__app__/chunks/libs/xstate.mjs +0 -1
  117. package/__app__/chunks/libs/zod.mjs +0 -39
  118. package/__app__/chunks/rolldown-runtime.mjs +0 -1
  119. package/__app__/chunks/safeCtx.mjs +0 -1
  120. package/__app__/chunks/searchParams.mjs +0 -1
  121. package/__app__/chunks/single-index.mjs +0 -1
  122. package/__app__/chunks/styled-system.mjs +0 -1
  123. package/__app__/chunks/styles.css.mjs +0 -1
  124. package/__app__/chunks/useLikeC4Project.mjs +0 -1
  125. package/__app__/chunks/useUpdateEffect.mjs +0 -1
  126. package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
  127. package/__app__/src/pages/EmbedPage.mjs +0 -1
  128. package/__app__/src/pages/ExportPage.mjs +0 -1
  129. package/__app__/src/pages/ProjectsOverview.mjs +0 -1
  130. package/__app__/src/pages/ViewAsD2.mjs +0 -1
  131. package/__app__/src/pages/ViewAsDot.mjs +0 -1
  132. package/__app__/src/pages/ViewAsMmd.mjs +0 -1
  133. package/__app__/src/pages/ViewAsPuml.mjs +0 -1
  134. package/__app__/src/pages/ViewEditor.mjs +0 -1
  135. package/__app__/src/pages/ViewReact.mjs +0 -1
  136. package/__app__/src/routeTree.gen.mjs +0 -1
  137. package/__app__/src/routes/__root.mjs +0 -1
  138. package/__app__/src/routes/_single/adhoc.mjs +0 -1
  139. package/__app__/src/routes/_single/embed._viewId.mjs +0 -1
  140. package/__app__/src/routes/_single/export._viewId.mjs +0 -1
  141. package/__app__/src/routes/_single/route.mjs +0 -1
  142. package/__app__/src/routes/_single/single-index.mjs +0 -1
  143. package/__app__/src/routes/_single/view._viewId.d2.mjs +0 -1
  144. package/__app__/src/routes/_single/view._viewId.dot.mjs +0 -1
  145. package/__app__/src/routes/_single/view._viewId.index.mjs +0 -1
  146. package/__app__/src/routes/_single/view._viewId.mjs +0 -1
  147. package/__app__/src/routes/_single/view._viewId.mmd.mjs +0 -1
  148. package/__app__/src/routes/_single/view._viewId.puml.mjs +0 -1
  149. package/__app__/src/routes/_single/webcomponent._.mjs +0 -33
  150. package/__app__/src/routes/index.mjs +0 -1
  151. package/__app__/src/routes/project._projectId/-components.mjs +0 -1
  152. package/__app__/src/routes/project._projectId/adhoc.mjs +0 -1
  153. package/__app__/src/routes/project._projectId/embed._viewId.mjs +0 -1
  154. package/__app__/src/routes/project._projectId/export._viewId.mjs +0 -1
  155. package/__app__/src/routes/project._projectId/index.mjs +0 -1
  156. package/__app__/src/routes/project._projectId/route.mjs +0 -1
  157. package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +0 -1
  158. package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +0 -1
  159. package/__app__/src/routes/project._projectId/view._viewId.index.mjs +0 -1
  160. package/__app__/src/routes/project._projectId/view._viewId.mjs +0 -1
  161. package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +0 -1
  162. package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +0 -1
  163. package/__app__/src/routes/projects.mjs +0 -1
  164. package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
  165. package/dist/chunks/libs/@hono/mcp.mjs +0 -45
  166. package/dist/chunks/libs/@hono/node-server.mjs +0 -1
  167. package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
  168. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
  169. package/dist/chunks/libs/ajv.mjs +0 -1
  170. package/dist/chunks/libs/ansi-align.mjs +0 -2
  171. package/dist/chunks/libs/ansi-regex.mjs +0 -1
  172. package/dist/chunks/libs/ansi-styles.mjs +0 -1
  173. package/dist/chunks/libs/atomically.mjs +0 -1
  174. package/dist/chunks/libs/boxen.mjs +0 -22
  175. package/dist/chunks/libs/conf.mjs +0 -1
  176. package/dist/chunks/libs/defu.mjs +0 -1
  177. package/dist/chunks/libs/destr.mjs +0 -1
  178. package/dist/chunks/libs/find-up-simple.mjs +0 -1
  179. package/dist/chunks/libs/get-port.mjs +0 -1
  180. package/dist/chunks/libs/hono.mjs +0 -1
  181. package/dist/chunks/libs/is-docker.mjs +0 -1
  182. package/dist/chunks/libs/is-error-instance.mjs +0 -1
  183. package/dist/chunks/libs/is-inside-container.mjs +0 -1
  184. package/dist/chunks/libs/is-plain-obj.mjs +0 -1
  185. package/dist/chunks/libs/isexe.mjs +0 -1
  186. package/dist/chunks/libs/ky.mjs +0 -3
  187. package/dist/chunks/libs/p-debounce.mjs +0 -1
  188. package/dist/chunks/libs/p-limit.mjs +0 -1
  189. package/dist/chunks/libs/p-timeout.mjs +0 -1
  190. package/dist/chunks/libs/package-up.mjs +0 -1
  191. package/dist/chunks/libs/parse-ms.mjs +0 -1
  192. package/dist/chunks/libs/safe-stringify.mjs +0 -1
  193. package/dist/chunks/libs/strip-indent.mjs +0 -1
  194. package/dist/chunks/libs/tinyrainbow.mjs +0 -1
  195. package/dist/chunks/libs/ts-graphviz.d.mts +0 -12
  196. package/dist/chunks/libs/ts-graphviz.mjs +0 -4
  197. package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
  198. package/dist/chunks/libs/word-wrap.mjs +0 -12
  199. package/dist/chunks/plugin.mjs +0 -400
  200. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.d.mts +0 -269
  201. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
  202. package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
  203. package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
  204. package/dist/vite-plugin/internal/chunks/libs/nanostores.d.mts +0 -59
  205. package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
  206. package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
  207. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"../rolldown-runtime.mjs";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,b as l,g as u,h as d,k as f,v as p,w as m,x as h,y as g}from"./@modelcontextprotocol/sdk.mjs";var _=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicAnchor=void 0;let n=t(),r=a(),i=m(),s=o(),c={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>dynamicAnchor(e,e.schema)};function dynamicAnchor(e,t){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;let o=(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(t)}`,s=a.errSchemaPath===`#`?a.validateName:_getValidate(e);i.if((0,n._)`!${o}`,()=>i.assign(o,s))}e.dynamicAnchor=dynamicAnchor;function _getValidate(e){let{schemaEnv:t,schema:n,self:r}=e.it,{root:a,baseId:o,localRefs:c,meta:l}=t.root,{schemaId:u}=r.opts,d=new i.SchemaEnv({schema:n,schemaId:u,root:a,baseId:o,localRefs:c,meta:l});return i.compileSchema.call(r,d),(0,s.getValidate)(e,d)}e.default=c})),v=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicRef=void 0;let n=t(),r=a(),i=o(),s={keyword:`$dynamicRef`,schemaType:`string`,code:e=>dynamicRef(e,e.schema)};function dynamicRef(e,t){let{gen:a,keyword:o,it:s}=e;if(t[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=t.slice(1);if(s.allErrors)_dynamicRef();else{let t=a.let(`valid`,!1);_dynamicRef(t),e.ok(t)}function _dynamicRef(e){if(s.schemaEnv.root.dynamicAnchors[c]){let t=a.let(`_v`,(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(c)}`);a.if(t,_callRef(t,e),_callRef(s.validateName,e))}else _callRef(s.validateName,e)()}function _callRef(t,n){return n?()=>a.block(()=>{(0,i.callRef)(e,t),a.let(n,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=dynamicRef,e.default=s})),y=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_(),n=f();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),b=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=v();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),x=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_(),n=v(),r=y(),i=b();e.default=[t.default,n.default,r.default,i.default]})),S=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=g();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),C=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=g();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),w=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=f();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),T=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=S(),n=C(),r=w();e.default=[t.default,n.default,r.default]})),E=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=t(),r=f(),i=a();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,n._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:t,schema:a,data:o,errsCount:s,it:c}=e;if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof n.Name?t.if((0,n._)`${u} !== true`,()=>t.forIn(`key`,o,e=>t.if(unevaluatedDynamic(u,e),()=>unevaluatedPropCode(e)))):u!==!0&&t.forIn(`key`,o,e=>u===void 0?unevaluatedPropCode(e):t.if(unevaluatedStatic(u,e),()=>unevaluatedPropCode(e))),c.props=!0,e.ok((0,n._)`${s} === ${i.default.errors}`);function unevaluatedPropCode(i){if(a===!1){e.setParams({unevaluatedProperty:i}),e.error(),l||t.break();return}if(!(0,r.alwaysValidSchema)(c,a)){let a=t.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:i,dataPropType:r.Type.Str},a),l||t.if((0,n.not)(a),()=>t.break())}}function unevaluatedDynamic(e,t){return(0,n._)`!${e} || !${e}[${t}]`}function unevaluatedStatic(e,t){let r=[];for(let i in e)e[i]===!0&&r.push((0,n._)`${t} !== ${i}`);return(0,n.and)(...r)}}}})),D=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=t(),r=f();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],error:{message:({params:{len:e}})=>(0,n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,n._)`{limit: ${e}}`},code(e){let{gen:t,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=t.const(`len`,(0,n._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,n._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,r.alwaysValidSchema)(o,i)){let r=t.var(`valid`,(0,n._)`${c} <= ${s}`);t.if((0,n.not)(r),()=>validateItems(r,s)),e.ok(r)}o.items=!0;function validateItems(i,a){t.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:r.Type.Num},i),o.allErrors||t.if((0,n.not)(i),()=>t.break())})}}}})),O=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=E(),n=D();e.default=[t.default,n.default]})),k=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h(),n=l(),r=p(),i=x(),a=T(),o=O(),s=c(),d=u();e.default=[i.default,t.default,n.default,(0,r.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,a.default,o.default]})),A=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/schema`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Core and Validation specifications meta-schema`,allOf:[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],type:[`object`,`boolean`],$comment:`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,properties:{definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}}}})),j=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/applicator`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:`meta`,title:`Applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},$defs:{schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}}}})),M=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/unevaluated`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:`meta`,title:`Unevaluated applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}}}})),N=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/content`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Content vocabulary meta-schema`,type:[`object`,`boolean`],properties:{contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}}}})),P=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/core`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:`meta`,title:`Core vocabulary meta-schema`,type:[`object`,`boolean`],properties:{$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},$defs:{anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}}}})),F=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/format-annotation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:`meta`,title:`Format vocabulary meta-schema for annotation results`,type:[`object`,`boolean`],properties:{format:{type:`string`}}}})),I=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/meta-data`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:`meta`,title:`Meta-data vocabulary meta-schema`,type:[`object`,`boolean`],properties:{title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}}}})),L=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/validation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:`meta`,title:`Validation vocabulary meta-schema`,type:[`object`,`boolean`],properties:{type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},$defs:{nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}}}})),R=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=A(),n=j(),r=M(),i=N(),a=P(),o=F(),s=I(),c=L(),l=[`/properties`];function addMetaSchema2020(e){return[t,n,r,i,a,with$data(this,o),s,with$data(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function with$data(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=addMetaSchema2020})),z=e(((e,a)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let o=n(),c=k(),l=d(),u=R(),f=`https://json-schema.org/draft/2020-12/schema`;var Ajv2020=class extends o.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),c.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(l.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(u.default.call(this,e),this.refs[`http://json-schema.org/schema`]=f)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}};e.Ajv2020=Ajv2020,a.exports=e=Ajv2020,a.exports.Ajv2020=Ajv2020,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=Ajv2020;var p=r();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return p.KeywordCxt}});var m=t();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return m._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return m.CodeGen}});var h=i();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return h.default}});var g=s();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return g.default}})}));export{z as t};
@@ -1,2 +0,0 @@
1
- import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{t.exports=({onlyFirst:e=!1}={})=>{let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}})),n=e(((e,n)=>{let r=t();n.exports=e=>typeof e==`string`?e.replace(r(),``):e})),r=e(((e,t)=>{let isFullwidthCodePoint=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);t.exports=isFullwidthCodePoint,t.exports.default=isFullwidthCodePoint})),i=e(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),a=e(((e,t)=>{let a=n(),o=r(),s=i(),stringWidth=e=>{if(typeof e!=`string`||e.length===0||(e=a(e),e.length===0))return 0;e=e.replace(s(),` `);let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=o(r)?2:1)}return t};t.exports=stringWidth,t.exports.default=stringWidth})),o=e(((e,t)=>{let n=a();function ansiAlign(e,t){if(!e)return e;t||={};let r=t.align||`center`;if(r===`left`)return e;let i=t.split||`
2
- `,a=t.pad||` `,o=r===`right`?fullDiff:halfDiff,s=!1;Array.isArray(e)||(s=!0,e=String(e).split(i));let c,l=0;return e=e.map(function(e){return e=String(e),c=n(e),l=Math.max(c,l),{str:e,width:c}}).map(function(e){return Array(o(l,e.width)+1).join(a)+e.str}),s?e.join(i):e}ansiAlign.left=function left(e){return ansiAlign(e,{align:`left`})},ansiAlign.center=function center(e){return ansiAlign(e,{align:`center`})},ansiAlign.right=function right(e){return ansiAlign(e,{align:`right`})},t.exports=ansiAlign;function halfDiff(e,t){return Math.floor((e-t)/2)}function fullDiff(e,t){return e-t}}));export{o as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";function ansiRegex({onlyFirst:e=!1}={}){let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}export{ansiRegex as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";const wrapAnsi16=(e=0)=>t=>`\u001B[${t+e}m`,wrapAnsi256=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,wrapAnsi16m=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(e.modifier);const t=Object.keys(e.color),n=Object.keys(e.bgColor);[...t,...n];function assembleStyles(){let t=new Map;for(let[n,r]of Object.entries(e)){for(let[n,i]of Object.entries(r))e[n]={open:`\u001B[${i[0]}m`,close:`\u001B[${i[1]}m`},r[n]=e[n],t.set(i[0],i[1]);Object.defineProperty(e,n,{value:r,enumerable:!1})}return Object.defineProperty(e,`codes`,{value:t,enumerable:!1}),e.color.close=`\x1B[39m`,e.bgColor.close=`\x1B[49m`,e.color.ansi=wrapAnsi16(),e.color.ansi256=wrapAnsi256(),e.color.ansi16m=wrapAnsi16m(),e.bgColor.ansi=wrapAnsi16(10),e.bgColor.ansi256=wrapAnsi256(10),e.bgColor.ansi16m=wrapAnsi16m(10),Object.defineProperties(e,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),enumerable:!1}}),e}const r=assembleStyles();export{r as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import{promisify as e}from"node:util";import t from"node:path";import n from"node:os";import r from"node:fs";import i from"node:process";const attemptifyAsync=(e,t)=>function attemptified(...n){return e.apply(void 0,n).catch(t)},attemptifySync=(e,t)=>function attemptified(...n){try{return e.apply(void 0,n)}catch(e){return t(e)}},a=i.getuid?!i.getuid():!1,NOOP=()=>void 0,o={isChangeErrorOk:e=>{if(!o.isNodeError(e))return!1;let{code:t}=e;return t===`ENOSYS`||!a&&(t===`EINVAL`||t===`EPERM`)},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!o.isNodeError(e))return!1;let{code:t}=e;return t===`EMFILE`||t===`ENFILE`||t===`EAGAIN`||t===`EBUSY`||t===`EACCESS`||t===`EACCES`||t===`EACCS`||t===`EPERM`},onChangeError:e=>{if(!o.isNodeError(e)||!o.isChangeErrorOk(e))throw e}};var RetryfyQueue=class{constructor(){this.interval=25,this.intervalId=void 0,this.limit=1e4,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||=setInterval(this.tick,this.interval)},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=e=>{this.queueWaiting.add(e),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this.queueWaiting.delete(e),this.queueActive.delete(e)},this.schedule=()=>new Promise(e=>{let cleanup=()=>this.remove(resolver),resolver=()=>e(cleanup);this.add(resolver)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(let e of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(e),this.queueActive.add(e),e()}}}}},s=new RetryfyQueue;const retryifyAsync=(e,t)=>function retrified(n){return function attempt(...r){return s.schedule().then(i=>{let onResolve=e=>(i(),e),onReject=e=>{if(i(),Date.now()>=n)throw e;if(t(e)){let e=Math.round(100*Math.random());return new Promise(t=>setTimeout(t,e)).then(()=>attempt.apply(void 0,r))}throw e};return e.apply(void 0,r).then(onResolve,onReject)})}},retryifySync=(e,t)=>function retrified(n){return function attempt(...r){try{return e.apply(void 0,r)}catch(e){if(Date.now()>n)throw e;if(t(e))return attempt.apply(void 0,r);throw e}}},c={attempt:{chmod:attemptifyAsync(e(r.chmod),o.onChangeError),chown:attemptifyAsync(e(r.chown),o.onChangeError),close:attemptifyAsync(e(r.close),NOOP),fsync:attemptifyAsync(e(r.fsync),NOOP),mkdir:attemptifyAsync(e(r.mkdir),NOOP),realpath:attemptifyAsync(e(r.realpath),NOOP),stat:attemptifyAsync(e(r.stat),NOOP),unlink:attemptifyAsync(e(r.unlink),NOOP),chmodSync:attemptifySync(r.chmodSync,o.onChangeError),chownSync:attemptifySync(r.chownSync,o.onChangeError),closeSync:attemptifySync(r.closeSync,NOOP),existsSync:attemptifySync(r.existsSync,NOOP),fsyncSync:attemptifySync(r.fsync,NOOP),mkdirSync:attemptifySync(r.mkdirSync,NOOP),realpathSync:attemptifySync(r.realpathSync,NOOP),statSync:attemptifySync(r.statSync,NOOP),unlinkSync:attemptifySync(r.unlinkSync,NOOP)},retry:{close:retryifyAsync(e(r.close),o.isRetriableError),fsync:retryifyAsync(e(r.fsync),o.isRetriableError),open:retryifyAsync(e(r.open),o.isRetriableError),readFile:retryifyAsync(e(r.readFile),o.isRetriableError),rename:retryifyAsync(e(r.rename),o.isRetriableError),stat:retryifyAsync(e(r.stat),o.isRetriableError),write:retryifyAsync(e(r.write),o.isRetriableError),writeFile:retryifyAsync(e(r.writeFile),o.isRetriableError),closeSync:retryifySync(r.closeSync,o.isRetriableError),fsyncSync:retryifySync(r.fsyncSync,o.isRetriableError),openSync:retryifySync(r.openSync,o.isRetriableError),readFileSync:retryifySync(r.readFileSync,o.isRetriableError),renameSync:retryifySync(r.renameSync,o.isRetriableError),statSync:retryifySync(r.statSync,o.isRetriableError),writeSync:retryifySync(r.writeSync,o.isRetriableError),writeFileSync:retryifySync(r.writeFileSync,o.isRetriableError)}},l={},u=n.userInfo().uid,d=n.userInfo().gid,f=!!i.getuid;i.getuid&&i.getuid();const isException=e=>e instanceof Error&&`code`in e,isString=e=>typeof e==`string`,isUndefined=e=>e===void 0,p=i.platform===`linux`,m=i.platform===`win32`,h=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`];m||h.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),p&&h.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`);var Interceptor=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let e of this.callbacks)e();e&&(m&&e!==`SIGINT`&&e!==`SIGTERM`&&e!==`SIGKILL`?i.kill(i.pid,`SIGTERM`):i.kill(i.pid,e))}},this.hook=()=>{i.once(`exit`,()=>this.exit());for(let e of h)try{i.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}};const g=new Interceptor().register,_={store:{},create:e=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6);return`${e}${`.tmp-${Date.now().toString().slice(-10)}${t}`}`},get:(e,t,n=!0)=>{let r=_.truncate(t(e));if(r in _.store)return _.get(e,t,n);_.store[r]=n;let disposer=()=>delete _.store[r];return[r,disposer]},purge:e=>{_.store[e]&&(delete _.store[e],c.attempt.unlink(e))},purgeSync:e=>{_.store[e]&&(delete _.store[e],c.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(let e in _.store)_.purgeSync(e)},truncate:e=>{let n=t.basename(e);if(n.length<=128)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(n);if(!r)return e;let i=n.length-128;return`${e.slice(0,-n.length)}${r[1]}${r[2].slice(0,-i)}${r[3]}`}};g(_.purgeSyncAll);function writeFileSync(e,n,r=l){if(isString(r))return writeFileSync(e,n,{encoding:r});let i=Date.now()+((r.timeout??1e3)||-1),a=null,o=null,s=null;try{let l=c.attempt.realpathSync(e),p=!!l;e=l||e,[o,a]=_.get(e,r.tmpCreate||_.create,r.tmpPurge!==!1);let m=f&&isUndefined(r.chown),h=isUndefined(r.mode);if(p&&(m||h)){let t=c.attempt.statSync(e);t&&(r={...r},m&&(r.chown={uid:t.uid,gid:t.gid}),h&&(r.mode=t.mode))}if(!p){let n=t.dirname(e);c.attempt.mkdirSync(n,{mode:511,recursive:!0})}s=c.retry.openSync(i)(o,`w`,r.mode||438),r.tmpCreated&&r.tmpCreated(o),isString(n)?c.retry.writeSync(i)(s,n,0,r.encoding||`utf8`):isUndefined(n)||c.retry.writeSync(i)(s,n,0,n.length,0),r.fsync!==!1&&(r.fsyncWait===!1?c.attempt.fsync(s):c.retry.fsyncSync(i)(s)),c.retry.closeSync(i)(s),s=null,r.chown&&(r.chown.uid!==u||r.chown.gid!==d)&&c.attempt.chownSync(o,r.chown.uid,r.chown.gid),r.mode&&r.mode!==438&&c.attempt.chmodSync(o,r.mode);try{c.retry.renameSync(i)(o,e)}catch(t){if(!isException(t)||t.code!==`ENAMETOOLONG`)throw t;c.retry.renameSync(i)(o,_.truncate(e))}a(),o=null}finally{s&&c.attempt.closeSync(s),o&&_.purge(o)}}export{writeFileSync as t};
@@ -1,22 +0,0 @@
1
- import{c as e,i as t,t as n}from"../rolldown-runtime.mjs";import{t as r}from"./ansi-regex.mjs";import{t as i}from"./ansi-align.mjs";import{t as a}from"./ansi-styles.mjs";import o from"node:os";import s from"node:process";import c from"node:tty";const l=r();function stripAnsi(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(l,``)}function isAmbiguous(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function isFullWidth(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function isWide(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function validate(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function eastAsianWidth(e,{ambiguousAsWide:t=!1}={}){return validate(e),isFullWidth(e)||isWide(e)||t&&isAmbiguous(e)?2:1}var u=t(()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,`default`);const d=new Intl.Segmenter,f=/^\p{Default_Ignorable_Code_Point}$/u;function stringWidth(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=stripAnsi(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of d.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!f.test(t)){if(u().test(t)){i+=2;continue}i+=eastAsianWidth(e,a)}}return i}const wrapAnsi16=(e=0)=>t=>`\u001B[${t+e}m`,wrapAnsi256=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,wrapAnsi16m=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,p={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(p.modifier);const m=Object.keys(p.color),h=Object.keys(p.bgColor);[...m,...h];function assembleStyles(){let e=new Map;for(let[t,n]of Object.entries(p)){for(let[t,r]of Object.entries(n))p[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=p[t],e.set(r[0],r[1]);Object.defineProperty(p,t,{value:n,enumerable:!1})}return Object.defineProperty(p,`codes`,{value:e,enumerable:!1}),p.color.close=`\x1B[39m`,p.bgColor.close=`\x1B[49m`,p.color.ansi=wrapAnsi16(),p.color.ansi256=wrapAnsi256(),p.color.ansi16m=wrapAnsi16m(),p.bgColor.ansi=wrapAnsi16(10),p.bgColor.ansi256=wrapAnsi256(10),p.bgColor.ansi16m=wrapAnsi16m(10),Object.defineProperties(p,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>p.rgbToAnsi256(...p.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>p.ansi256ToAnsi(p.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>p.ansi256ToAnsi(p.hexToAnsi256(e)),enumerable:!1}}),p}const g=assembleStyles();function hasFlag(e,t=globalThis.Deno?globalThis.Deno.args:s.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:_}=s;let v;hasFlag(`no-color`)||hasFlag(`no-colors`)||hasFlag(`color=false`)||hasFlag(`color=never`)?v=0:(hasFlag(`color`)||hasFlag(`colors`)||hasFlag(`color=true`)||hasFlag(`color=always`))&&(v=1);function envForceColor(){if(`FORCE_COLOR`in _)return _.FORCE_COLOR===`true`?1:_.FORCE_COLOR===`false`?0:_.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(_.FORCE_COLOR,10),3)}function translateLevel(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function _supportsColor(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=envForceColor();r!==void 0&&(v=r);let i=n?v:r;if(i===0)return 0;if(n){if(hasFlag(`color=16m`)||hasFlag(`color=full`)||hasFlag(`color=truecolor`))return 3;if(hasFlag(`color=256`))return 2}if(`TF_BUILD`in _&&`AGENT_NAME`in _)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(_.TERM===`dumb`)return a;if(s.platform===`win32`){let e=o.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in _)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in _)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in _)||_.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in _)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_.TEAMCITY_VERSION);if(_.COLORTERM===`truecolor`||_.TERM===`xterm-kitty`)return 3;if(`TERM_PROGRAM`in _){let e=Number.parseInt((_.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(_.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(_.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_.TERM)||`COLORTERM`in _?1:a}function createSupportsColor(e,t={}){return translateLevel(_supportsColor(e,{streamIsTTY:e&&e.isTTY,...t}))}const y={stdout:createSupportsColor({isTTY:c.isatty(1)}),stderr:createSupportsColor({isTTY:c.isatty(2)})};function stringReplaceAll(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function stringEncaseCRLFWithFirstIndex(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
2
- `:`
3
- `)+n,i=r+1,r=e.indexOf(`
4
- `,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:b,stderr:x}=y,S=Symbol(`GENERATOR`),C=Symbol(`STYLER`),w=Symbol(`IS_EMPTY`),T=[`ansi`,`ansi`,`ansi256`,`ansi16m`],E=Object.create(null),applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=b?b.level:0;e.level=t.level===void 0?n:t.level},chalkFactory=e=>{let chalk=(...e)=>e.join(` `);return applyOptions(chalk,e),Object.setPrototypeOf(chalk,createChalk.prototype),chalk};function createChalk(e){return chalkFactory(e)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(let[e,t]of Object.entries(g))E[e]={get(){let n=createBuilder(this,createStyler(t.open,t.close,this[C]),this[w]);return Object.defineProperty(this,e,{value:n}),n}};E.visible={get(){let e=createBuilder(this,this[C],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const getModelAnsi=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?g[n].ansi16m(...r):t===`ansi256`?g[n].ansi256(g.rgbToAnsi256(...r)):g[n].ansi(g.rgbToAnsi(...r)):e===`hex`?getModelAnsi(`rgb`,t,n,...g.hexToRgb(...r)):g[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){E[e]={get(){let{level:t}=this;return function(...n){let r=createStyler(getModelAnsi(e,T[t],`color`,...n),g.color.close,this[C]);return createBuilder(this,r,this[w])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);E[t]={get(){let{level:t}=this;return function(...n){let r=createStyler(getModelAnsi(e,T[t],`bgColor`,...n),g.bgColor.close,this[C]);return createBuilder(this,r,this[w])}}}}const D=Object.defineProperties(()=>{},{...E,level:{enumerable:!0,get(){return this[S].level},set(e){this[S].level=e}}}),createStyler=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},createBuilder=(e,t,n)=>{let builder=(...e)=>applyStyle(builder,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(builder,D),builder[S]=e,builder[C]=t,builder[w]=n,builder},applyStyle=(e,t)=>{if(e.level<=0||!t)return e[w]?``:t;let n=e[C];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=stringReplaceAll(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
5
- `);return a!==-1&&(t=stringEncaseCRLFWithFirstIndex(t,i,r,a)),r+t+i};Object.defineProperties(createChalk.prototype,E);const O=createChalk();createChalk({level:x?x.level:0});function widestLine(e){let t=0;for(let n of e.split(`
6
- `))t=Math.max(t,stringWidth(n));return t}var k=n(((e,t)=>{t.exports={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}})),A=e(n(((e,t)=>{let n=k();t.exports=n,t.exports.default=n}))(),1);const j=/[\p{Lu}]/u,M=/[\p{Ll}]/u,N=/^[\p{Lu}](?![\p{Lu}])/gu,P=/([\p{Alpha}\p{N}_]|$)/u,F=/[_.\- ]+/,I=RegExp(`^`+F.source),L=new RegExp(F.source+P.source,`gu`),R=RegExp(`\\d+`+P.source,`gu`),preserveCamelCase=(e,t,n,r)=>{let i=!1,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c++){let l=e[c];s=c>2?e[c-3]===`-`:!0,i&&j.test(l)?(e=e.slice(0,c)+`-`+e.slice(c),i=!1,o=a,a=!0,c++):a&&o&&M.test(l)&&(!s||r)?(e=e.slice(0,c-1)+`-`+e.slice(c-1),o=a,a=!1,i=!0):(i=t(l)===l&&n(l)!==l,o=a,a=n(l)===l&&t(l)!==l)}return e},preserveConsecutiveUppercase=(e,t)=>(N.lastIndex=0,e.replaceAll(N,e=>t(e))),postProcess=(e,t)=>(L.lastIndex=0,R.lastIndex=0,e.replaceAll(R,(n,r,i)=>[`_`,`-`].includes(e.charAt(i+n.length))?n:t(n)).replaceAll(L,(e,n)=>t(n)));function camelCase(e,t){if(!(typeof e==`string`||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join(`-`):e.trim(),e.length===0)return``;let n=t.locale===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),r=t.locale===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);return e.length===1?F.test(e)?``:t.pascalCase?r(e):n(e):(e!==n(e)&&(e=preserveCamelCase(e,n,r,t.preserveConsecutiveUppercase)),e=e.replace(I,``),e=t.preserveConsecutiveUppercase?preserveConsecutiveUppercase(e,n):n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),postProcess(e,r))}var z=e(i(),1);const B=new Set([`\x1B`,`›`]),V=`]8;;`,wrapAnsiCode=e=>`${B.values().next().value}[${e}m`,wrapAnsiHyperlink=e=>`${B.values().next().value}${V}${e}`,wordLengths=e=>e.split(` `).map(e=>stringWidth(e)),wrapWord=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=stringWidth(stripAnsi(e.at(-1)));for(let[t,s]of r.entries()){let c=stringWidth(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),B.has(s)&&(i=!0,a=r.slice(t+1,t+1+4).join(``)===V),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},stringVisibleTrimSpacesRight=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(stringWidth(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},exec=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,o,s=wordLengths(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c.at(-1).trimStart());let e=stringWidth(c.at(-1));if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(c.push(``),e=0),(e>0||n.trim===!1)&&(c[c.length-1]+=` `,e++)),n.hard&&s[r]>t){let n=t-e,a=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<a&&c.push(``),wrapWord(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){wrapWord(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){wrapWord(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>stringVisibleTrimSpacesRight(e)));let l=c.join(`
7
- `),u=[...l],d=0;for(let[e,t]of u.entries()){if(r+=t,B.has(t)){let{groups:e}=RegExp(`(?:\\[(?<code>\\d+)m|\\${V}(?<uri>.*))`).exec(l.slice(d))||{groups:{}};if(e.code!==void 0){let t=Number.parseFloat(e.code);i=t===39?void 0:t}else e.uri!==void 0&&(o=e.uri.length===0?void 0:e.uri)}let n=a.codes.get(Number(i));u[e+1]===`
8
- `?(o&&(r+=wrapAnsiHyperlink(``)),i&&n&&(r+=wrapAnsiCode(n))):t===`
9
- `&&(i&&n&&(r+=wrapAnsiCode(i)),o&&(r+=wrapAnsiHyperlink(o))),d+=t.length}return r};function wrapAnsi(e,t,n){return String(e).normalize().replaceAll(`\r
10
- `,`
11
- `).split(`
12
- `).map(e=>exec(e,t,n)).join(`
13
- `)}const H=`none`,terminalColumns=()=>{let{env:e,stdout:t,stderr:n}=s;return t?.columns?t.columns:n?.columns?n.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},getObject=e=>typeof e==`number`?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},getBorderWidth=e=>e===H?0:2,getBorderChars=e=>{let t=[`topLeft`,`topRight`,`bottomRight`,`bottomLeft`,`left`,`right`,`top`,`bottom`],n;if(e===H){e={};for(let n of t)e[n]=``}if(typeof e==`string`){if(n=A.default[e],!n)throw TypeError(`Invalid border style: ${e}`)}else{typeof e?.vertical==`string`&&(e.left=e.vertical,e.right=e.vertical),typeof e?.horizontal==`string`&&(e.top=e.horizontal,e.bottom=e.horizontal);for(let n of t)if(e[n]===null||typeof e[n]!=`string`)throw TypeError(`Invalid border style: ${n}`);n=e}return n},makeTitle=(e,t,n)=>{let r=``,i=stringWidth(e);switch(n){case`left`:r=e+t.slice(i);break;case`right`:r=t.slice(i)+e;break;default:t=t.slice(i),t.length%2==1?(t=t.slice(Math.floor(t.length/2)),r=t.slice(1)+e+t):(t=t.slice(t.length/2),r=t+e+t);break}return r},makeContentText=(e,{padding:t,width:n,textAlignment:r,height:i})=>{e=(0,z.default)(e,{align:r});let a=e.split(`
14
- `),o=widestLine(e),s=n-t.left-t.right;if(o>s){let e=[];for(let t of a){let n=(0,z.default)(wrapAnsi(t,s,{hard:!0}),{align:r}).split(`
15
- `),i=Math.max(...n.map(e=>stringWidth(e)));for(let t of n){let n;switch(r){case`center`:n=` `.repeat((s-i)/2)+t;break;case`right`:n=` `.repeat(s-i)+t;break;default:n=t;break}e.push(n)}}a=e}r===`center`&&o<s?a=a.map(e=>` `.repeat((s-o)/2)+e):r===`right`&&o<s&&(a=a.map(e=>` `.repeat(s-o)+e));let c=` `.repeat(t.left),l=` `.repeat(t.right);return a=a.map(e=>{let t=c+e+l;return t+` `.repeat(n-stringWidth(t))}),t.top>0&&(a=[...Array.from({length:t.top}).fill(` `.repeat(n)),...a]),t.bottom>0&&(a=[...a,...Array.from({length:t.bottom}).fill(` `.repeat(n))]),i&&a.length>i?a=a.slice(0,i):i&&a.length<i&&(a=[...a,...Array.from({length:i-a.length}).fill(` `.repeat(n))]),a.join(`
16
- `)},boxContent=(e,t,n)=>{let colorizeBorder=e=>{let t=n.borderColor?getColorFunction(n.borderColor)(e):e;return n.dimBorder?O.dim(t):t},colorizeContent=e=>n.backgroundColor?getBGColorFunction(n.backgroundColor)(e):e,r=getBorderChars(n.borderStyle),i=terminalColumns(),a=` `.repeat(n.margin.left);if(n.float===`center`){let e=Math.max((i-t-getBorderWidth(n.borderStyle))/2,0);a=` `.repeat(e)}else if(n.float===`right`){let e=Math.max(i-t-n.margin.right-getBorderWidth(n.borderStyle),0);a=` `.repeat(e)}let o=``;n.margin.top&&(o+=`
17
- `.repeat(n.margin.top)),(n.borderStyle!==H||n.title)&&(o+=colorizeBorder(a+r.topLeft+(n.title?makeTitle(n.title,r.top.repeat(t),n.titleAlignment):r.top.repeat(t))+r.topRight)+`
18
- `);let s=e.split(`
19
- `);return o+=s.map(e=>a+colorizeBorder(r.left)+colorizeContent(e)+colorizeBorder(r.right)).join(`
20
- `),n.borderStyle!==H&&(o+=`
21
- `+colorizeBorder(a+r.bottomLeft+r.bottom.repeat(t)+r.bottomRight)),n.margin.bottom&&(o+=`
22
- `.repeat(n.margin.bottom)),o},sanitizeOptions=e=>{if(e.fullscreen&&s?.stdout){let t=[s.stdout.columns,s.stdout.rows];typeof e.fullscreen==`function`&&(t=e.fullscreen(...t)),e.width||=t[0],e.height||=t[1]}return e.width&&=Math.max(1,e.width-getBorderWidth(e.borderStyle)),e.height&&=Math.max(1,e.height-getBorderWidth(e.borderStyle)),e},formatTitle=(e,t)=>t===H?e:` ${e} `,determineDimensions=(e,t)=>{t=sanitizeOptions(t);let n=t.width!==void 0,r=terminalColumns(),i=getBorderWidth(t.borderStyle),a=r-t.margin.left-t.margin.right-i,o=widestLine(wrapAnsi(e,r-i,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&n?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=formatTitle(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,a-2)),t.title&&(t.title=formatTitle(t.title,t.borderStyle),stringWidth(t.title)>o&&(t.width=stringWidth(t.title)))),t.width||=o,!n){if(t.margin.left&&t.margin.right&&t.width>a){let e=(r-t.width-i)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*e)),t.margin.right=Math.max(0,Math.floor(t.margin.right*e))}t.width=Math.min(t.width,r-i-t.margin.left-t.margin.right)}return t.width-(t.padding.left+t.padding.right)<=0&&(t.padding.left=0,t.padding.right=0),t.height&&t.height-(t.padding.top+t.padding.bottom)<=0&&(t.padding.top=0,t.padding.bottom=0),t},isHex=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),isColorValid=e=>typeof e==`string`&&(O[e]??isHex(e)),getColorFunction=e=>isHex(e)?O.hex(e):O[e],getBGColorFunction=e=>isHex(e)?O.bgHex(e):O[camelCase([`bg`,e])];function boxen(e,t){if(t={padding:0,borderStyle:`single`,dimBorder:!1,textAlignment:`left`,float:`left`,titleAlignment:`left`,...t},t.align&&(t.textAlignment=t.align),t.borderColor&&!isColorValid(t.borderColor))throw Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!isColorValid(t.backgroundColor))throw Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=getObject(t.padding),t.margin=getObject(t.margin),t=determineDimensions(e,t),e=makeContentText(e,t),boxContent(e,t.width,t)}export{boxen as t};
@@ -1 +0,0 @@
1
- import{c as e,t}from"../rolldown-runtime.mjs";import{t as n}from"./atomically.mjs";import{m as r}from"./@modelcontextprotocol/sdk.mjs";import{t as i}from"./ajv.mjs";import{isDeepStrictEqual as a}from"node:util";import o from"node:path";import s from"node:os";import c from"node:fs";import l from"node:crypto";import u from"node:process";import d from"node:assert";const isObject=e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)},f=new Set([`__proto__`,`prototype`,`constructor`]),p=1e6,isDigit=e=>e>=`0`&&e<=`9`;function shouldCoerceToNumber(e){if(e===`0`)return!0;if(/^[1-9]\d*$/.test(e)){let t=Number.parseInt(e,10);return t<=2**53-1&&t<=p}return!1}function processSegment(e,t){return f.has(e)?!1:(e&&shouldCoerceToNumber(e)?t.push(Number.parseInt(e,10)):t.push(e),!0)}function parsePath(e){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);let t=[],n=``,r=`start`,i=!1,a=0;for(let o of e){if(a++,i){n+=o,i=!1;continue}if(o===`\\`){if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);i=!0,r=r===`start`?`property`:r;continue}switch(o){case`.`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`property`;break}if(!processSegment(n,t))return[];n=``,r=`property`;break;case`[`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`index`;break}if(r===`property`||r===`start`){if((n||r===`property`)&&!processSegment(n,t))return[];n=``}r=`index`;break;case`]`:if(r===`index`){if(n===``)n=(t.pop()||``)+`[]`,r=`property`;else{let e=Number.parseInt(n,10);!Number.isNaN(e)&&Number.isFinite(e)&&e>=0&&e<=2**53-1&&e<=p&&n===String(e)?t.push(e):t.push(n),n=``,r=`indexEnd`}break}if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);n+=o;break;default:if(r===`index`&&!isDigit(o))throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);r===`start`&&(r=`property`),n+=o}}switch(i&&(n+=`\\`),r){case`property`:if(!processSegment(n,t))return[];break;case`index`:throw Error(`Index was not closed`);case`start`:t.push(``);break}return t}function normalizePath(e){if(typeof e==`string`)return parsePath(e);if(Array.isArray(e)){let t=[];for(let[n,r]of e.entries()){if(typeof r!=`string`&&typeof r!=`number`)throw TypeError(`Expected a string or number for path segment at index ${n}, got ${typeof r}`);if(typeof r==`number`&&!Number.isFinite(r))throw TypeError(`Path segment at index ${n} must be a finite number, got ${r}`);if(f.has(r))return[];typeof r==`string`&&shouldCoerceToNumber(r)?t.push(Number.parseInt(r,10)):t.push(r)}return t}return[]}function getProperty(e,t,n){if(!isObject(e)||typeof t!=`string`&&!Array.isArray(t))return n===void 0?e:n;let r=normalizePath(t);if(r.length===0)return n;for(let t=0;t<r.length;t++){let i=r[t];if(e=e[i],e==null){if(t!==r.length-1)return n;break}}return e===void 0?n:e}function setProperty(e,t,n){if(!isObject(e)||typeof t!=`string`&&!Array.isArray(t))return e;let r=e,i=normalizePath(t);if(i.length===0)return e;for(let t=0;t<i.length;t++){let r=i[t];if(t===i.length-1)e[r]=n;else if(!isObject(e[r])){let n=typeof i[t+1]==`number`;e[r]=n?[]:{}}e=e[r]}return r}function deleteProperty(e,t){if(!isObject(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=normalizePath(t);if(n.length===0)return!1;for(let t=0;t<n.length;t++){let r=n[t];if(t===n.length-1)return Object.hasOwn(e,r)?(delete e[r],!0):!1;if(e=e[r],!isObject(e))return!1}}function hasProperty(e,t){if(!isObject(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=normalizePath(t);if(n.length===0)return!1;for(let t of n){if(!isObject(e)||!(t in e))return!1;e=e[t]}return!0}const m=s.homedir(),h=s.tmpdir(),{env:g}=u,macos=e=>{let t=o.join(m,`Library`);return{data:o.join(t,`Application Support`,e),config:o.join(t,`Preferences`,e),cache:o.join(t,`Caches`,e),log:o.join(t,`Logs`,e),temp:o.join(h,e)}},windows=e=>{let t=g.APPDATA||o.join(m,`AppData`,`Roaming`),n=g.LOCALAPPDATA||o.join(m,`AppData`,`Local`);return{data:o.join(n,e,`Data`),config:o.join(t,e,`Config`),cache:o.join(n,e,`Cache`),log:o.join(n,e,`Log`),temp:o.join(h,e)}},linux=e=>{let t=o.basename(m);return{data:o.join(g.XDG_DATA_HOME||o.join(m,`.local`,`share`),e),config:o.join(g.XDG_CONFIG_HOME||o.join(m,`.config`),e),cache:o.join(g.XDG_CACHE_HOME||o.join(m,`.cache`),e),log:o.join(g.XDG_STATE_HOME||o.join(m,`.local`,`state`),e),temp:o.join(h,t,e)}};function envPaths(e,{suffix:t=`nodejs`}={}){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),u.platform===`darwin`?macos(e):u.platform===`win32`?windows(e):linux(e)}var _=i(),v=e(r(),1);const copyProperty=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!canCopyProperty(i,a)&&r||Object.defineProperty(e,n,a)},canCopyProperty=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},changePrototype=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},wrappedToString=(e,t)=>`/* Wrapped ${e}*/\n${t}`,y=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),ee=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),changeToString=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=wrappedToString.bind(null,r,t.toString());Object.defineProperty(i,`name`,ee);let{writable:a,enumerable:o,configurable:s}=y;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})};function mimicFunction(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))copyProperty(e,t,r,n);return changePrototype(e,t),changeToString(e,t,r),e}const debounceFunction=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let{wait:n=0,maxWait:r=1/0,before:i=!1,after:a=!0}=t;if(n<0||r<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!a)throw Error("Both `before` and `after` are false, function wouldn't be called.");let o,s,c,debouncedFunction=function(...t){let l=this,later=()=>{o=void 0,s&&=(clearTimeout(s),void 0),a&&(c=e.apply(l,t))},maxLater=()=>{s=void 0,o&&=(clearTimeout(o),void 0),a&&(c=e.apply(l,t))},u=i&&!o;return clearTimeout(o),o=setTimeout(later,n),r>0&&r!==1/0&&!s&&(s=setTimeout(maxLater,r)),u&&(c=e.apply(l,t)),c};return mimicFunction(debouncedFunction,e),debouncedFunction.cancel=()=>{o&&=(clearTimeout(o),void 0),s&&=(clearTimeout(s),void 0)},debouncedFunction};var b=t(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),x=t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),S=t(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=b(),a=x();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],makeSafeRegex=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},createToken=(e,t,n)=>{let r=makeSafeRegex(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};createToken(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),createToken(`NUMERICIDENTIFIERLOOSE`,`\\d+`),createToken(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),createToken(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),createToken(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),createToken(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),createToken(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),createToken(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),createToken(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),createToken(`BUILDIDENTIFIER`,`${f}+`),createToken(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),createToken(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),createToken(`FULL`,`^${c[u.FULLPLAIN]}$`),createToken(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),createToken(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),createToken(`GTLT`,`((?:<|>)?=?)`),createToken(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),createToken(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),createToken(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),createToken(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),createToken(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),createToken(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),createToken(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),createToken(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),createToken(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),createToken(`COERCERTL`,c[u.COERCE],!0),createToken(`COERCERTLFULL`,c[u.COERCEFULL],!0),createToken(`LONETILDE`,`(?:~>?)`),createToken(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,createToken(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),createToken(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),createToken(`LONECARET`,`(?:\\^)`),createToken(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,createToken(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),createToken(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),createToken(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),createToken(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),createToken(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,createToken(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),createToken(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),createToken(`STAR`,`(<|>)?=?\\s*\\*`),createToken(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),createToken(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),C=t(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({}),parseOptions=e=>e?typeof e==`object`?e:n:r;t.exports=parseOptions})),w=t(((e,t)=>{let n=/^[0-9]+$/,compareIdentifiers=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers(t,e);t.exports={compareIdentifiers,rcompareIdentifiers}})),T=t(((e,t)=>{let n=x(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=b(),{safeRe:a,t:o}=S(),s=C(),{compareIdentifiers:c}=w();t.exports=class SemVer{constructor(e,t){if(t=s(t),e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let c=e.trim().match(t.loose?a[o.LOOSE]:a[o.FULL]);if(!c)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);c[4]?this.prerelease=c[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=c[5]?c[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(e){if(n(`SemVer.compare`,this.version,this.options,e),!(e instanceof SemVer)){if(typeof e==`string`&&e===this.version)return 0;e=new SemVer(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer||(e=new SemVer(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof SemVer||(e=new SemVer(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(n(`prerelease compare`,t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return c(r,i)}while(++t)}compareBuild(e){e instanceof SemVer||(e=new SemVer(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(n(`build compare`,t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return c(r,i)}while(++t)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),E=t(((e,t)=>{let n=T(),parse=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}};t.exports=parse})),D=t(((e,t)=>{let n=E(),valid=(e,t)=>{let r=n(e,t);return r?r.version:null};t.exports=valid})),O=t(((e,t)=>{let n=E(),clean=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null};t.exports=clean})),te=t(((e,t)=>{let n=T(),inc=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}};t.exports=inc})),ne=t(((e,t)=>{let n=E(),diff=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`};t.exports=diff})),k=t(((e,t)=>{let n=T(),major=(e,t)=>new n(e,t).major;t.exports=major})),re=t(((e,t)=>{let n=T(),minor=(e,t)=>new n(e,t).minor;t.exports=minor})),ie=t(((e,t)=>{let n=T(),patch=(e,t)=>new n(e,t).patch;t.exports=patch})),ae=t(((e,t)=>{let n=E(),prerelease=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};t.exports=prerelease})),A=t(((e,t)=>{let n=T(),compare=(e,t,r)=>new n(e,r).compare(new n(t,r));t.exports=compare})),oe=t(((e,t)=>{let n=A(),rcompare=(e,t,r)=>n(t,e,r);t.exports=rcompare})),se=t(((e,t)=>{let n=A(),compareLoose=(e,t)=>n(e,t,!0);t.exports=compareLoose})),j=t(((e,t)=>{let n=T(),compareBuild=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)};t.exports=compareBuild})),M=t(((e,t)=>{let n=j(),sort=(e,t)=>e.sort((e,r)=>n(e,r,t));t.exports=sort})),N=t(((e,t)=>{let n=j(),rsort=(e,t)=>e.sort((e,r)=>n(r,e,t));t.exports=rsort})),P=t(((e,t)=>{let n=A(),gt=(e,t,r)=>n(e,t,r)>0;t.exports=gt})),F=t(((e,t)=>{let n=A(),lt=(e,t,r)=>n(e,t,r)<0;t.exports=lt})),I=t(((e,t)=>{let n=A(),eq=(e,t,r)=>n(e,t,r)===0;t.exports=eq})),L=t(((e,t)=>{let n=A(),neq=(e,t,r)=>n(e,t,r)!==0;t.exports=neq})),R=t(((e,t)=>{let n=A(),gte=(e,t,r)=>n(e,t,r)>=0;t.exports=gte})),z=t(((e,t)=>{let n=A(),lte=(e,t,r)=>n(e,t,r)<=0;t.exports=lte})),B=t(((e,t)=>{let n=I(),r=L(),i=P(),a=R(),o=F(),s=z(),cmp=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}};t.exports=cmp})),V=t(((e,t)=>{let n=T(),r=E(),{safeRe:i,t:a}=S(),coerce=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)};t.exports=coerce})),H=t(((e,t)=>{var LRUCache=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};t.exports=LRUCache})),U=t(((e,t)=>{let n=/\s+/g;t.exports=class Range{constructor(e,t){if(t=i(t),e instanceof Range)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!isNullSet(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&isAny(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,hyphenReplace(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let h=e.split(` `).map(e=>parseComparator(e,this.options)).join(` `).split(/\s+/).map(e=>replaceGTE0(e,this.options));i&&(h=h.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,h);let g=new Map,_=h.map(e=>new a(e,this.options));for(let e of _){if(isNullSet(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return r.set(t,v),v}intersects(e,t){if(!(e instanceof Range))throw TypeError(`a Range is required`);return this.set.some(n=>isSatisfiable(n,t)&&e.set.some(e=>isSatisfiable(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}};let r=new(H()),i=C(),a=W(),o=x(),s=T(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=S(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=b(),isNullSet=e=>e.value===`<0.0.0-0`,isAny=e=>e.value===``,isSatisfiable=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},parseComparator=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=replaceCarets(e,t),o(`caret`,e),e=replaceTildes(e,t),o(`tildes`,e),e=replaceXRanges(e,t),o(`xrange`,e),e=replaceStars(e,t),o(`stars`,e),e),isX=e=>!e||e.toLowerCase()===`x`||e===`*`,replaceTildes=(e,t)=>e.trim().split(/\s+/).map(e=>replaceTilde(e,t)).join(` `),replaceTilde=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return isX(n)?s=``:isX(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:isX(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},replaceCarets=(e,t)=>e.trim().split(/\s+/).map(e=>replaceCaret(e,t)).join(` `),replaceCaret=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return isX(n)?c=``:isX(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:isX(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},replaceXRanges=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>replaceXRange(e,t)).join(` `)),replaceXRange=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=isX(i),u=l||isX(a),d=u||isX(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},replaceStars=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),replaceGTE0=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),hyphenReplace=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=isX(r)?``:isX(i)?`>=${r}.0.0${e?`-0`:``}`:isX(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=isX(l)?``:isX(u)?`<${+l+1}.0.0-0`:isX(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),testSet=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),W=t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class Comparator{static get ANY(){return n}constructor(e,t){if(t=r(t),e instanceof Comparator){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(` `),s(`comparator`,e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(e.value,t).test(this.value):e.operator===``?e.value===``?!0:new l(this.value,t).test(e.semver):(t=r(t),t.includePrerelease&&(this.value===`<0.0.0-0`||e.value===`<0.0.0-0`)||!t.includePrerelease&&(this.value.startsWith(`<0.0.0`)||e.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&e.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&e.operator.startsWith(`<`)||this.semver.version===e.semver.version&&this.operator.includes(`=`)&&e.operator.includes(`=`)||o(this.semver,`<`,e.semver,t)&&this.operator.startsWith(`>`)&&e.operator.startsWith(`<`)||o(this.semver,`>`,e.semver,t)&&this.operator.startsWith(`<`)&&e.operator.startsWith(`>`)))}};let r=C(),{safeRe:i,t:a}=S(),o=B(),s=x(),c=T(),l=U()})),G=t(((e,t)=>{let n=U(),satisfies=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)};t.exports=satisfies})),ce=t(((e,t)=>{let n=U(),toComparators=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `));t.exports=toComparators})),le=t(((e,t)=>{let n=T(),r=U(),maxSatisfying=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a};t.exports=maxSatisfying})),ue=t(((e,t)=>{let n=T(),r=U(),minSatisfying=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a};t.exports=minSatisfying})),de=t(((e,t)=>{let n=T(),r=U(),i=P(),minVersion=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null};t.exports=minVersion})),fe=t(((e,t)=>{let n=U(),validRange=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}};t.exports=validRange})),K=t(((e,t)=>{let n=T(),r=W(),{ANY:i}=r,a=U(),o=G(),s=P(),c=F(),l=z(),u=R(),outside=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0};t.exports=outside})),pe=t(((e,t)=>{let n=K(),gtr=(e,t,r)=>n(e,t,`>`,r);t.exports=gtr})),me=t(((e,t)=>{let n=K(),ltr=(e,t,r)=>n(e,t,`<`,r);t.exports=ltr})),he=t(((e,t)=>{let n=U(),intersects=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r));t.exports=intersects})),ge=t(((e,t)=>{let n=G(),r=A();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),_e=t(((e,t)=>{let n=U(),r=W(),{ANY:i}=r,a=G(),o=A(),subset=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=simpleSubset(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},s=[new r(`>=0.0.0-0`)],c=[new r(`>=0.0.0`)],simpleSubset=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?s:c}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=c}let r=new Set,l,u;for(let t of e)t.operator===`>`||t.operator===`>=`?l=higherGT(l,t,n):t.operator===`<`||t.operator===`<=`?u=lowerLT(u,t,n):r.add(t.semver);if(r.size>1)return null;let d;if(l&&u&&(d=o(l.semver,u.semver,n),d>0||d===0&&(l.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(l&&!a(e,String(l),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let f,p,m,h,g=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,_=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1;g&&g.prerelease.length===1&&u.operator===`<`&&g.prerelease[0]===0&&(g=!1);for(let e of t){if(h=h||e.operator===`>`||e.operator===`>=`,m=m||e.operator===`<`||e.operator===`<=`,l){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),e.operator===`>`||e.operator===`>=`){if(f=higherGT(l,e,n),f===e&&f!==l)return!1}else if(l.operator===`>=`&&!a(l.semver,String(e),n))return!1}if(u){if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),e.operator===`<`||e.operator===`<=`){if(p=lowerLT(u,e,n),p===e&&p!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||l)&&d!==0)return!1}return!(l&&m&&!u&&d!==0||u&&h&&!l&&d!==0||_||g)},higherGT=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},lowerLT=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=subset})),q=t(((e,t)=>{let n=S(),r=b(),i=T(),a=w();t.exports={parse:E(),valid:D(),clean:O(),inc:te(),diff:ne(),major:k(),minor:re(),patch:ie(),prerelease:ae(),compare:A(),rcompare:oe(),compareLoose:se(),compareBuild:j(),sort:M(),rsort:N(),gt:P(),lt:F(),eq:I(),neq:L(),gte:R(),lte:z(),cmp:B(),coerce:V(),Comparator:W(),Range:U(),satisfies:G(),toComparators:ce(),maxSatisfying:le(),minSatisfying:ue(),minVersion:de(),validRange:fe(),outside:K(),gtr:pe(),ltr:me(),intersects:he(),simplifyRange:ge(),subset:_e(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}})),J=e(q(),1);const ve=Object.prototype.toString;function isType(e,t,n){return e?e.constructor===t?!0:ve.call(e)===n:!1}function isUint8Array(e){return isType(e,Uint8Array,`[object Uint8Array]`)}function isArrayBuffer(e){return isType(e,ArrayBuffer,`[object ArrayBuffer]`)}function isUint8ArrayOrArrayBuffer(e){return isUint8Array(e)||isArrayBuffer(e)}function assertUint8Array(e){if(!isUint8Array(e))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function assertUint8ArrayOrArrayBuffer(e){if(!isUint8ArrayOrArrayBuffer(e))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function concatUint8Arrays(e,t){if(e.length===0)return new Uint8Array;t??=e.reduce((e,t)=>e+t.length,0);let n=new Uint8Array(t),r=0;for(let t of e)assertUint8Array(t),n.set(t,r),r+=t.length;return n}const Y={utf8:new globalThis.TextDecoder(`utf8`)};function uint8ArrayToString(e,t=`utf8`){return assertUint8ArrayOrArrayBuffer(e),Y[t]??=new globalThis.TextDecoder(t),Y[t].decode(e)}function assertString(e){if(typeof e!=`string`)throw TypeError(`Expected \`string\`, got \`${typeof e}\``)}const ye=new globalThis.TextEncoder;function stringToUint8Array(e){return assertString(e),ye.encode(e)}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));const X=`aes-256-cbc`,Z=new Set([`aes-256-cbc`,`aes-256-gcm`,`aes-256-ctr`]),isSupportedEncryptionAlgorithm=e=>typeof e==`string`&&Z.has(e),createPlainObject=()=>Object.create(null),isExist=e=>e!==void 0,checkValueType=(e,t)=>{let n=new Set([`undefined`,`symbol`,`function`]),r=typeof t;if(n.has(r))throw TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},Q=`__internal__`,$=`${Q}.migrations.version`;var Conf=class{path;events;#e;#t;#n;#r;#i={};#a=!1;#o;#s;#c;constructor(e={}){let t=this.#l(e);this.#r=t,this.#u(t),this.#f(t),this.#p(t),this.events=new EventTarget,this.#t=t.encryptionKey,this.#n=t.encryptionAlgorithm??X,this.path=this.#m(t),this.#h(t),t.watch&&this._watch()}get(e,t){if(this.#r.accessPropertiesByDotNotation)return this._get(e,t);let{store:n}=this;return e in n?n[e]:t}set(e,t){if(typeof e!=`string`&&typeof e!=`object`)throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!=`object`&&t===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw TypeError(`Please don't use the ${Q} key, as it's used to manage this module internal operations.`);let{store:n}=this,set=(e,t)=>{if(checkValueType(e,t),this.#r.accessPropertiesByDotNotation)setProperty(n,e,t);else{if(e===`__proto__`||e===`constructor`||e===`prototype`)return;n[e]=t}};if(typeof e==`object`){let t=e;for(let[e,n]of Object.entries(t))set(e,n)}else set(e,t);this.store=n}has(e){return this.#r.accessPropertiesByDotNotation?hasProperty(this.store,e):e in this.store}appendToArray(e,t){checkValueType(e,t);let n=this.#r.accessPropertiesByDotNotation?this._get(e,[]):e in this.store?this.store[e]:[];if(!Array.isArray(n))throw TypeError(`The key \`${e}\` is already set to a non-array value`);this.set(e,[...n,t])}reset(...e){for(let t of e)isExist(this.#i[t])&&this.set(t,this.#i[t])}delete(e){let{store:t}=this;this.#r.accessPropertiesByDotNotation?deleteProperty(t,e):delete t[e],this.store=t}clear(){let e=createPlainObject();for(let t of Object.keys(this.#i))isExist(this.#i[t])&&(checkValueType(t,this.#i[t]),this.#r.accessPropertiesByDotNotation?setProperty(e,t,this.#i[t]):e[t]=this.#i[t]);this.store=e}onDidChange(e,t){if(typeof e!=`string`)throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleValueChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleStoreChange(e)}get size(){return Object.keys(this.store).filter(e=>!this._isReservedKeyPath(e)).length}get store(){try{let e=c.readFileSync(this.path,this.#t?null:`utf8`),t=this._decryptData(e),parseStore=e=>{let t=this._deserialize(e);return this.#a||this._validate(t),Object.assign(createPlainObject(),t)};return parseStore(t)}catch(e){if(e?.code===`ENOENT`)return this._ensureDirectory(),createPlainObject();if(this.#r.clearInvalidConfig){let t=e;if(t.name===`SyntaxError`||t.message?.startsWith(`Config schema violation:`)||t.message===`Failed to decrypt config data.`)return createPlainObject()}throw e}}set store(e){if(this._ensureDirectory(),!hasProperty(e,Q))try{let t=c.readFileSync(this.path,this.#t?null:`utf8`),n=this._decryptData(t),r=this._deserialize(n);hasProperty(r,Q)&&setProperty(e,Q,getProperty(r,Q))}catch{}this.#a||this._validate(e),this._write(e),this.events.dispatchEvent(new Event(`change`))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))this._isReservedKeyPath(e)||(yield[e,t])}_closeWatcher(){this.#o&&=(this.#o.close(),void 0),this.#s&&=(c.unwatchFile(this.path),!1),this.#c=void 0}_decryptData(e){let t=this.#t;if(!t)return typeof e==`string`?e:uint8ArrayToString(e);let n=this.#n,r=n===`aes-256-gcm`?16:0,i=`:`.codePointAt(0),a=typeof e==`string`?e.codePointAt(16):e[16];if(!(i!==void 0&&a===i)){if(n===`aes-256-cbc`)return typeof e==`string`?e:uint8ArrayToString(e);throw Error(`Failed to decrypt config data.`)}let getEncryptedPayload=e=>{if(r===0)return{ciphertext:e};let t=e.length-r;if(t<0)throw Error(`Invalid authentication tag length.`);return{ciphertext:e.slice(0,t),authenticationTag:e.slice(t)}},o=e.slice(0,16),s=e.slice(17),c=typeof s==`string`?stringToUint8Array(s):s,decrypt=e=>{let{ciphertext:r,authenticationTag:i}=getEncryptedPayload(c),a=l.pbkdf2Sync(t,e,1e4,32,`sha512`),s=l.createDecipheriv(n,a,o);return i&&s.setAuthTag(i),uint8ArrayToString(concatUint8Arrays([s.update(r),s.final()]))};try{return decrypt(o)}catch{try{return decrypt(o.toString())}catch{}}if(n===`aes-256-cbc`)return typeof e==`string`?e:uint8ArrayToString(e);throw Error(`Failed to decrypt config data.`)}_handleStoreChange(e){let t=this.store,onChange=()=>{let n=t,r=this.store;a(r,n)||(t=r,e.call(this,r,n))};return this.events.addEventListener(`change`,onChange),()=>{this.events.removeEventListener(`change`,onChange)}}_handleValueChange(e,t){let n=e(),onChange=()=>{let r=n,i=e();a(i,r)||(n=i,t.call(this,i,r))};return this.events.addEventListener(`change`,onChange),()=>{this.events.removeEventListener(`change`,onChange)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0,` `);_validate(e){if(!this.#e||this.#e(e)||!this.#e.errors)return;let t=this.#e.errors.map(({instancePath:e,message:t=``})=>`\`${e.slice(1)}\` ${t}`);throw Error(`Config schema violation: `+t.join(`; `))}_ensureDirectory(){c.mkdirSync(o.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e),r=this.#t;if(r){let e=l.randomBytes(16),n=l.pbkdf2Sync(r,e,1e4,32,`sha512`),i=l.createCipheriv(this.#n,n,e),a=concatUint8Arrays([i.update(stringToUint8Array(t)),i.final()]),o=[e,stringToUint8Array(`:`),a];this.#n===`aes-256-gcm`&&o.push(i.getAuthTag()),t=concatUint8Arrays(o)}if(u.env.SNAP)c.writeFileSync(this.path,t,{mode:this.#r.configFileMode});else try{n(this.path,t,{mode:this.#r.configFileMode})}catch(e){if(e?.code===`EXDEV`){c.writeFileSync(this.path,t,{mode:this.#r.configFileMode});return}throw e}}_watch(){if(this._ensureDirectory(),c.existsSync(this.path)||this._write(createPlainObject()),u.platform===`win32`||u.platform===`darwin`){this.#c??=debounceFunction(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:100});let e=o.dirname(this.path),t=o.basename(this.path);this.#o=c.watch(e,{persistent:!1,encoding:`utf8`},(e,n)=>{n&&n!==t||typeof this.#c==`function`&&this.#c()})}else this.#c??=debounceFunction(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:1e3}),c.watchFile(this.path,{persistent:!1},(e,t)=>{typeof this.#c==`function`&&this.#c()}),this.#s=!0}_migrate(e,t,n){let r=this._get($,`0.0.0`),i=Object.keys(e).filter(e=>this._shouldPerformMigration(e,r,t)),a=structuredClone(this.store);for(let o of i)try{n&&n(this,{fromVersion:r,toVersion:o,finalVersion:t,versions:i});let s=e[o];s?.(this),this._set($,o),r=o,a=structuredClone(this.store)}catch(e){this.store=a;let t=e instanceof Error?e.message:String(e);throw Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${t}`)}(this._isVersionInRangeFormat(r)||!J.default.eq(r,t))&&this._set($,t)}_containsReservedKey(e){return typeof e==`string`?this._isReservedKeyPath(e):!e||typeof e!=`object`?!1:this._objectContainsReservedKey(e)}_objectContainsReservedKey(e){if(!e||typeof e!=`object`)return!1;for(let[t,n]of Object.entries(e))if(this._isReservedKeyPath(t)||this._objectContainsReservedKey(n))return!0;return!1}_isReservedKeyPath(e){return e===Q||e.startsWith(`${Q}.`)}_isVersionInRangeFormat(e){return J.default.clean(e)===null}_shouldPerformMigration(e,t,n){return this._isVersionInRangeFormat(e)?t!==`0.0.0`&&J.default.satisfies(t,e)?!1:J.default.satisfies(n,e):!(J.default.lte(e,t)||J.default.gt(e,n))}_get(e,t){return getProperty(this.store,e,t)}_set(e,t){let{store:n}=this;setProperty(n,e,t),this.store=n}#l(e){let t={configName:`config`,fileExtension:`json`,projectSuffix:`nodejs`,clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(t.encryptionAlgorithm??=X,!isSupportedEncryptionAlgorithm(t.encryptionAlgorithm))throw TypeError(`The \`encryptionAlgorithm\` option must be one of: ${[...Z].join(`, `)}`);if(!t.cwd){if(!t.projectName)throw Error("Please specify the `projectName` option.");t.cwd=envPaths(t.projectName,{suffix:t.projectSuffix}).config}return typeof t.fileExtension==`string`&&(t.fileExtension=t.fileExtension.replace(/^\.+/,``)),t}#u(e){if(!(e.schema??e.ajvOptions??e.rootSchema))return;if(e.schema&&typeof e.schema!=`object`)throw TypeError("The `schema` option must be an object.");let t=v.default.default,n=new _.Ajv2020({allErrors:!0,useDefaults:!0,...e.ajvOptions});t(n);let r={...e.rootSchema,type:`object`,properties:e.schema};this.#e=n.compile(r),this.#d(e.schema)}#d(e){let t=Object.entries(e??{});for(let[e,n]of t){if(!n||typeof n!=`object`||!Object.hasOwn(n,`default`))continue;let{default:t}=n;t!==void 0&&(this.#i[e]=t)}}#f(e){e.defaults&&Object.assign(this.#i,e.defaults)}#p(e){e.serialize&&(this._serialize=e.serialize),e.deserialize&&(this._deserialize=e.deserialize)}#m(e){let t=typeof e.fileExtension==`string`?e.fileExtension:void 0,n=t?`.${t}`:``;return o.resolve(e.cwd,`${e.configName??`config`}${n}`)}#h(e){if(e.migrations){this.#g(e),this._validate(this.store);return}let t=this.store,n=Object.assign(createPlainObject(),e.defaults??{},t);this._validate(n);try{d.deepEqual(t,n)}catch{this.store=n}}#g(e){let{migrations:t,projectVersion:n}=e;if(t){if(!n)throw Error("Please specify the `projectVersion` option.");this.#a=!0;try{let r=this.store,i=Object.assign(createPlainObject(),e.defaults??{},r);try{d.deepEqual(r,i)}catch{this._write(i)}this._migrate(t,n,e.beforeEachMigration)}finally{this.#a=!1}}}};export{q as n,Conf as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";function isPlainObject(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function _defu(e,t,n=`.`,r){if(!isPlainObject(t))return _defu(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:isPlainObject(a)&&isPlainObject(i[t])?i[t]=_defu(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function createDefu(e){return(...t)=>t.reduce((t,n)=>_defu(t,n,``,e),{})}const e=createDefu();export{e as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";const e=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,t=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,n=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){warnKeyDropped(e);return}return t}function warnKeyDropped(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function destr(r,i={}){if(typeof r!=`string`)return r;if(r[0]===`"`&&r[r.length-1]===`"`&&r.indexOf(`\\`)===-1)return r.slice(1,-1);let a=r.trim();if(a.length<=9)switch(a.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!n.test(r)){if(i.strict)throw SyntaxError(`[destr] Invalid JSON`);return r}try{if(e.test(r)||t.test(r)){if(i.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(r,jsonParseTransform)}return JSON.parse(r)}catch(e){if(i.strict)throw e;return r}}export{destr as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import e from"node:path";import t from"node:fs";import"node:fs/promises";import{fileURLToPath as n}from"node:url";import r from"node:process";const toPath=e=>e instanceof URL?n(e):e;function findUpSync(n,{cwd:i=r.cwd(),type:a=`file`,stopAt:o}={}){let s=e.resolve(toPath(i)??``),{root:c}=e.parse(s);for(o=e.resolve(s,toPath(o)??c);s&&s!==o&&s!==c;){let r=e.isAbsolute(n)?n:e.join(s,n);try{let e=t.statSync(r,{throwIfNoEntry:!1});if(a===`file`&&e?.isFile()||a===`directory`&&e?.isDirectory())return r}catch{}s=e.dirname(s)}}export{findUpSync as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import e from"node:os";import t from"node:net";var Locked=class extends Error{constructor(e){super(`${e} is locked`)}};const n={old:new Set,young:new Set},r=1024,i=65535;let a;const getLocalHosts=()=>{let t=e.networkInterfaces(),n=new Set([void 0,`0.0.0.0`]);for(let e of Object.values(t))for(let t of e)n.add(t.address);return n},checkAvailablePort=e=>new Promise((n,r)=>{let i=t.createServer();i.unref(),i.on(`error`,r),i.listen(e,()=>{let{port:e}=i.address();i.close(()=>{n(e)})})}),getAvailablePort=async(e,t)=>{if(e.host||e.port===0)return checkAvailablePort(e);for(let n of t)try{await checkAvailablePort({port:e.port,host:n})}catch(e){if(![`EADDRNOTAVAIL`,`EINVAL`].includes(e.code))throw e}return e.port},portCheckSequence=function*(e){e&&(yield*e),yield 0};async function getPorts(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port==`number`?[e.port]:e.port),e.exclude)){let t=e.exclude;if(typeof t[Symbol.iterator]!=`function`)throw TypeError("The `exclude` option must be an iterable.");for(let e of t){if(typeof e!=`number`)throw TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(e))throw TypeError(`Number ${e} in the exclude option is not a safe integer and can't be used`)}r=new Set(t)}a===void 0&&(a=setTimeout(()=>{a=void 0,n.old=n.young,n.young=new Set},15e3),a.unref&&a.unref());let i=getLocalHosts();for(let a of portCheckSequence(t))try{if(r.has(a))continue;let t=await getAvailablePort({...e,port:a},i);for(;n.old.has(t)||n.young.has(t);){if(a!==0)throw new Locked(a);t=await getAvailablePort({...e,port:a},i)}return n.young.add(t),t}catch(e){if(![`EADDRINUSE`,`EACCES`].includes(e.code)&&!(e instanceof Locked))throw e}throw Error(`No available ports found`)}function portNumbers(e,t){if(!Number.isInteger(e)||!Number.isInteger(t))throw TypeError("`from` and `to` must be integer numbers");if(e<r||e>i)throw RangeError(`'from' must be between ${r} and ${i}`);if(t<r||t>i)throw RangeError(`'to' must be between ${r} and ${i}`);if(e>t)throw RangeError("`to` must be greater than or equal to `from`");let generator=function*(e,t){for(let n=e;n<=t;n++)yield n};return generator(e,t)}export{portNumbers as n,getPorts as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import{a as e,i as t}from"./@hono/mcp.mjs";var compose=(e,t,n)=>(r,i)=>{let a=-1;return dispatch(0);async function dispatch(o){if(o<=a)throw Error(`next() called multiple times`);a=o;let s,c=!1,l;if(e[o]?(l=e[o][0][0],r.req.routeIndex=o):l=o===e.length&&i||void 0,l)try{s=await l(r,()=>dispatch(o+1))}catch(e){if(e instanceof Error&&t)r.error=e,s=await t(e,r),c=!0;else throw e}else r.finalized===!1&&n&&(s=await n(r));return s&&(r.finalized===!1||c)&&(r.res=s),r}},n=Symbol(),parseBody=async(e,t=Object.create(null))=>{let{all:n=!1,dot:r=!1}=t,i=(e instanceof HonoRequest?e.raw.headers:e.headers).get(`Content-Type`);return i?.startsWith(`multipart/form-data`)||i?.startsWith(`application/x-www-form-urlencoded`)?parseFormData(e,{all:n,dot:r}):{}};async function parseFormData(e,t){let n=await e.formData();return n?convertFormDataToBodyData(n,t):{}}function convertFormDataToBodyData(e,t){let n=Object.create(null);return e.forEach((e,r)=>{t.all||r.endsWith(`[]`)?handleParsingAllValues(n,r,e):n[r]=e}),t.dot&&Object.entries(n).forEach(([e,t])=>{e.includes(`.`)&&(handleParsingNestedValues(n,e,t),delete n[e])}),n}var handleParsingAllValues=(e,t,n)=>{e[t]===void 0?t.endsWith(`[]`)?e[t]=[n]:e[t]=n:Array.isArray(e[t])?e[t].push(n):e[t]=[e[t],n]},handleParsingNestedValues=(e,t,n)=>{if(/(?:^|\.)__proto__\./.test(t))return;let r=e,i=t.split(`.`);i.forEach((e,t)=>{t===i.length-1?r[e]=n:((!r[e]||typeof r[e]!=`object`||Array.isArray(r[e])||r[e]instanceof File)&&(r[e]=Object.create(null)),r=r[e])})},splitPath=e=>{let t=e.split(`/`);return t[0]===``&&t.shift(),t},splitRoutingPath=e=>{let{groups:t,path:n}=extractGroupsFromPath(e);return replaceGroupMarks(splitPath(n),t)},extractGroupsFromPath=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(e,n)=>{let r=`@${n}`;return t.push([r,e]),r}),{groups:t,path:e}},replaceGroupMarks=(e,t)=>{for(let n=t.length-1;n>=0;n--){let[r]=t[n];for(let i=e.length-1;i>=0;i--)if(e[i].includes(r)){e[i]=e[i].replace(r,t[n][1]);break}}return e},r={},getPattern=(e,t)=>{if(e===`*`)return`*`;let n=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(n){let i=`${e}#${t}`;return r[i]||(n[2]?r[i]=t&&t[0]!==`:`&&t[0]!==`*`?[i,n[1],RegExp(`^${n[2]}(?=/${t})`)]:[e,n[1],RegExp(`^${n[2]}$`)]:r[i]=[e,n[1],!0]),r[i]}return null},tryDecode=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,e=>{try{return t(e)}catch{return e}})}},tryDecodeURI=e=>tryDecode(e,decodeURI),getPath=e=>{let t=e.url,n=t.indexOf(`/`,t.indexOf(`:`)+4),r=n;for(;r<t.length;r++){let e=t.charCodeAt(r);if(e===37){let e=t.indexOf(`?`,r),i=t.indexOf(`#`,r),a=e===-1?i===-1?void 0:i:i===-1?e:Math.min(e,i),o=t.slice(n,a);return tryDecodeURI(o.includes(`%25`)?o.replace(/%25/g,`%2525`):o)}else if(e===63||e===35)break}return t.slice(n,r)},getPathNoStrict=e=>{let t=getPath(e);return t.length>1&&t.at(-1)===`/`?t.slice(0,-1):t},mergePath=(e,t,...n)=>(n.length&&(t=mergePath(t,...n)),`${e?.[0]===`/`?``:`/`}${e}${t===`/`?``:`${e?.at(-1)===`/`?``:`/`}${t?.[0]===`/`?t.slice(1):t}`}`),checkOptionalParameter=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(`:`))return null;let t=e.split(`/`),n=[],r=``;return t.forEach(e=>{if(e!==``&&!/\:/.test(e))r+=`/`+e;else if(/\:/.test(e))if(/\?/.test(e)){n.length===0&&r===``?n.push(`/`):n.push(r);let t=e.replace(`?`,``);r+=`/`+t,n.push(r)}else r+=`/`+e}),n.filter((e,t,n)=>n.indexOf(e)===t)},_decodeURI=e=>/[%+]/.test(e)?(e.indexOf(`+`)!==-1&&(e=e.replace(/\+/g,` `)),e.indexOf(`%`)===-1?e:tryDecode(e,a)):e,_getQueryParam=(e,t,n)=>{let r;if(!n&&t&&!/[%+]/.test(t)){let n=e.indexOf(`?`,8);if(n===-1)return;for(e.startsWith(t,n+1)||(n=e.indexOf(`&${t}`,n+1));n!==-1;){let r=e.charCodeAt(n+t.length+1);if(r===61){let r=n+t.length+2,i=e.indexOf(`&`,r);return _decodeURI(e.slice(r,i===-1?void 0:i))}else if(r==38||isNaN(r))return``;n=e.indexOf(`&${t}`,n+1)}if(r=/[%+]/.test(e),!r)return}let i={};r??=/[%+]/.test(e);let a=e.indexOf(`?`,8);for(;a!==-1;){let t=e.indexOf(`&`,a+1),o=e.indexOf(`=`,a);o>t&&t!==-1&&(o=-1);let s=e.slice(a+1,o===-1?t===-1?void 0:t:o);if(r&&(s=_decodeURI(s)),a=t,s===``)continue;let c;o===-1?c=``:(c=e.slice(o+1,t===-1?void 0:t),r&&(c=_decodeURI(c))),n?(i[s]&&Array.isArray(i[s])||(i[s]=[]),i[s].push(c)):i[s]??=c}return t?i[t]:i},i=_getQueryParam,getQueryParams=(e,t)=>_getQueryParam(e,t,!0),a=decodeURIComponent,tryDecodeURIComponent=e=>tryDecode(e,a),HonoRequest=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t=`/`,n=[[]]){this.raw=e,this.path=t,this.#t=n,this.#e={}}param(e){return e?this.#n(e):this.#r()}#n(e){let t=this.#t[0][this.routeIndex][1][e],n=this.#i(t);return n&&/\%/.test(n)?tryDecodeURIComponent(n):n}#r(){let e={},t=Object.keys(this.#t[0][this.routeIndex][1]);for(let n of t){let t=this.#i(this.#t[0][this.routeIndex][1][n]);t!==void 0&&(e[n]=/\%/.test(t)?tryDecodeURIComponent(t):t)}return e}#i(e){return this.#t[1]?this.#t[1][e]:e}query(e){return i(this.url,e)}queries(e){return getQueryParams(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;let t={};return this.raw.headers.forEach((e,n)=>{t[n]=e}),t}async parseBody(e){return parseBody(this,e)}#a=e=>{let{bodyCache:t,raw:n}=this,r=t[e];if(r)return r;let i=Object.keys(t)[0];return i?t[i].then(t=>(i===`json`&&(t=JSON.stringify(t)),new Response(t)[e]())):t[e]=n[e]()};json(){return this.#a(`text`).then(e=>JSON.parse(e))}text(){return this.#a(`text`)}arrayBuffer(){return this.#a(`arrayBuffer`)}blob(){return this.#a(`blob`)}formData(){return this.#a(`formData`)}addValidatedData(e,t){this.#e[e]=t}valid(e){return this.#e[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[n](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}},o=`text/plain; charset=UTF-8`,setDefaultContentType=(e,t)=>({"Content-Type":e,...t}),createResponseInstance=(e,t)=>new Response(e,t),Context=class{#e;#t;env={};#n;finalized=!1;error;#r;#i;#a;#o;#s;#c;#l;#u;#d;constructor(e,t){this.#e=e,t&&(this.#i=t.executionCtx,this.env=t.env,this.#c=t.notFoundHandler,this.#d=t.path,this.#u=t.matchResult)}get req(){return this.#t??=new HonoRequest(this.#e,this.#d,this.#u),this.#t}get event(){if(this.#i&&`respondWith`in this.#i)return this.#i;throw Error(`This context has no FetchEvent`)}get executionCtx(){if(this.#i)return this.#i;throw Error(`This context has no ExecutionContext`)}get res(){return this.#a||=createResponseInstance(null,{headers:this.#l??=new Headers})}set res(e){if(this.#a&&e){e=createResponseInstance(e.body,e);for(let[t,n]of this.#a.headers.entries())if(t!==`content-type`)if(t===`set-cookie`){let t=this.#a.headers.getSetCookie();e.headers.delete(`set-cookie`);for(let n of t)e.headers.append(`set-cookie`,n)}else e.headers.set(t,n)}this.#a=e,this.finalized=!0}render=(...e)=>(this.#s??=e=>this.html(e),this.#s(...e));setLayout=e=>this.#o=e;getLayout=()=>this.#o;setRenderer=e=>{this.#s=e};header=(e,t,n)=>{this.finalized&&(this.#a=createResponseInstance(this.#a.body,this.#a));let r=this.#a?this.#a.headers:this.#l??=new Headers;t===void 0?r.delete(e):n?.append?r.append(e,t):r.set(e,t)};status=e=>{this.#r=e};set=(e,t)=>{this.#n??=new Map,this.#n.set(e,t)};get=e=>this.#n?this.#n.get(e):void 0;get var(){return this.#n?Object.fromEntries(this.#n):{}}#f(e,t,n){let r=this.#a?new Headers(this.#a.headers):this.#l??new Headers;if(typeof t==`object`&&`headers`in t){let e=t.headers instanceof Headers?t.headers:new Headers(t.headers);for(let[t,n]of e)t.toLowerCase()===`set-cookie`?r.append(t,n):r.set(t,n)}if(n)for(let[e,t]of Object.entries(n))if(typeof t==`string`)r.set(e,t);else{r.delete(e);for(let n of t)r.append(e,n)}return createResponseInstance(e,{status:typeof t==`number`?t:t?.status??this.#r,headers:r})}newResponse=(...e)=>this.#f(...e);body=(e,t,n)=>this.#f(e,t,n);text=(e,t,n)=>!this.#l&&!this.#r&&!t&&!n&&!this.finalized?new Response(e):this.#f(e,t,setDefaultContentType(o,n));json=(e,t,n)=>this.#f(JSON.stringify(e),t,setDefaultContentType(`application/json`,n));html=(n,r,i)=>{let res=e=>this.#f(e,r,setDefaultContentType(`text/html; charset=UTF-8`,i));return typeof n==`object`?e(n,t.Stringify,!1,{}).then(res):res(n)};redirect=(e,t)=>{let n=String(e);return this.header(`Location`,/[^\x00-\xFF]/.test(n)?encodeURI(n):n),this.newResponse(null,t??302)};notFound=()=>(this.#c??=()=>createResponseInstance(),this.#c(this))},s=[`get`,`post`,`put`,`delete`,`options`,`patch`],c=`Can not add a route since the matcher is already built.`,UnsupportedPathError=class extends Error{},l=`__COMPOSED_HANDLER`,notFoundHandler=e=>e.text(`404 Not Found`,404),errorHandler=(e,t)=>{if(`getResponse`in e){let n=e.getResponse();return t.newResponse(n.body,n)}return console.error(e),t.text(`Internal Server Error`,500)},u=class _Hono{get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath=`/`;#e=`/`;routes=[];constructor(e={}){[...s,`all`].forEach(e=>{this[e]=(t,...n)=>(typeof t==`string`?this.#e=t:this.#r(e,this.#e,t),n.forEach(t=>{this.#r(e,this.#e,t)}),this)}),this.on=(e,t,...n)=>{for(let r of[t].flat()){this.#e=r;for(let t of[e].flat())n.map(e=>{this.#r(t.toUpperCase(),this.#e,e)})}return this},this.use=(e,...t)=>(typeof e==`string`?this.#e=e:(this.#e=`*`,t.unshift(e)),t.forEach(e=>{this.#r(`ALL`,this.#e,e)}),this);let{strict:t,...n}=e;Object.assign(this,n),this.getPath=t??!0?e.getPath??getPath:getPathNoStrict}#t(){let e=new _Hono({router:this.router,getPath:this.getPath});return e.errorHandler=this.errorHandler,e.#n=this.#n,e.routes=this.routes,e}#n=notFoundHandler;errorHandler=errorHandler;route(e,t){let n=this.basePath(e);return t.routes.map(e=>{let handler;t.errorHandler===errorHandler?handler=e.handler:(handler=async(n,r)=>(await compose([],t.errorHandler)(n,()=>e.handler(n,r))).res,handler[l]=e.handler),n.#r(e.method,e.path,handler)}),this}basePath(e){let t=this.#t();return t._basePath=mergePath(this._basePath,e),t}onError=e=>(this.errorHandler=e,this);notFound=e=>(this.#n=e,this);mount(e,t,n){let r,i;n&&(typeof n==`function`?i=n:(i=n.optionHandler,r=n.replaceRequest===!1?e=>e:n.replaceRequest));let a=i?e=>{let t=i(e);return Array.isArray(t)?t:[t]}:e=>{let t;try{t=e.executionCtx}catch{}return[e.env,t]};r||=(()=>{let t=mergePath(this._basePath,e),n=t===`/`?0:t.length;return e=>{let t=new URL(e.url);return t.pathname=t.pathname.slice(n)||`/`,new Request(t,e)}})();let handler=async(e,n)=>{let i=await t(r(e.req.raw),...a(e));if(i)return i;await n()};return this.#r(`ALL`,mergePath(e,`*`),handler),this}#r(e,t,n){e=e.toUpperCase(),t=mergePath(this._basePath,t);let r={basePath:this._basePath,path:t,method:e,handler:n};this.router.add(e,t,[n,r]),this.routes.push(r)}#i(e,t){if(e instanceof Error)return this.errorHandler(e,t);throw e}#a(e,t,n,r){if(r===`HEAD`)return(async()=>new Response(null,await this.#a(e,t,n,`GET`)))();let i=this.getPath(e,{env:n}),a=this.router.match(r,i),o=new Context(e,{path:i,matchResult:a,env:n,executionCtx:t,notFoundHandler:this.#n});if(a[0].length===1){let e;try{e=a[0][0][0][0](o,async()=>{o.res=await this.#n(o)})}catch(e){return this.#i(e,o)}return e instanceof Promise?e.then(e=>e||(o.finalized?o.res:this.#n(o))).catch(e=>this.#i(e,o)):e??this.#n(o)}let s=compose(a[0],this.errorHandler,this.#n);return(async()=>{try{let e=await s(o);if(!e.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return e.res}catch(e){return this.#i(e,o)}})()}fetch=(e,...t)=>this.#a(e,t[1],t[0],e.method);request=(e,t,n,r)=>e instanceof Request?this.fetch(t?new Request(e,t):e,n,r):(e=e.toString(),this.fetch(new Request(/^https?:\/\//.test(e)?e:`http://localhost${mergePath(`/`,e)}`,t),n,r));fire=()=>{addEventListener(`fetch`,e=>{e.respondWith(this.#a(e.request,e,void 0,e.request.method))})}},d=[];function match(e,t){let n=this.buildAllMatchers(),match2=((e,t)=>{let r=n[e]||n.ALL,i=r[2][t];if(i)return i;let a=t.match(r[0]);if(!a)return[[],d];let o=a.indexOf(``,1);return[r[1][o],a]});return this.match=match2,match2(e,t)}var f=`[^/]+`,p=`.*`,m=`(?:|/.*)`,h=Symbol(),g=new Set(`.\\+*[^]$()`);function compareKey(e,t){return e.length===1?t.length===1?e<t?-1:1:-1:t.length===1||e===p||e===m?1:t===p||t===m?-1:e===f?1:t===f?-1:e.length===t.length?e<t?-1:1:t.length-e.length}var _=class _Node{#e;#t;#n=Object.create(null);insert(e,t,n,r,i){if(e.length===0){if(this.#e!==void 0)throw h;if(i)return;this.#e=t;return}let[a,...o]=e,s=a===`*`?o.length===0?[``,``,p]:[``,``,f]:a===`/*`?[``,``,m]:a.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),c;if(s){let e=s[1],t=s[2]||f;if(e&&s[2]&&(t===`.*`||(t=t.replace(/^\((?!\?:)(?=[^)]+\)$)/,`(?:`),/\((?!\?:)/.test(t))))throw h;if(c=this.#n[t],!c){if(Object.keys(this.#n).some(e=>e!==p&&e!==m))throw h;if(i)return;c=this.#n[t]=new _Node,e!==``&&(c.#t=r.varIndex++)}!i&&e!==``&&n.push([e,c.#t])}else if(c=this.#n[a],!c){if(Object.keys(this.#n).some(e=>e.length>1&&e!==p&&e!==m))throw h;if(i)return;c=this.#n[a]=new _Node}c.insert(o,t,n,r,i)}buildRegExpStr(){let e=Object.keys(this.#n).sort(compareKey).map(e=>{let t=this.#n[e];return(typeof t.#t==`number`?`(${e})@${t.#t}`:g.has(e)?`\\${e}`:e)+t.buildRegExpStr()});return typeof this.#e==`number`&&e.unshift(`#${this.#e}`),e.length===0?``:e.length===1?e[0]:`(?:`+e.join(`|`)+`)`}},Trie=class{#e={varIndex:0};#t=new _;insert(e,t,n){let r=[],i=[];for(let t=0;;){let n=!1;if(e=e.replace(/\{[^}]+\}/g,e=>{let r=`@\\${t}`;return i[t]=[r,e],t++,n=!0,r}),!n)break}let a=e.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let e=i.length-1;e>=0;e--){let[t]=i[e];for(let n=a.length-1;n>=0;n--)if(a[n].indexOf(t)!==-1){a[n]=a[n].replace(t,i[e][1]);break}}return this.#t.insert(a,t,r,this.#e,n),r}buildRegExp(){let e=this.#t.buildRegExpStr();if(e===``)return[/^$/,[],[]];let t=0,n=[],r=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(e,i,a)=>i===void 0?(a===void 0||(r[Number(a)]=++t),``):(n[++t]=Number(i),`$()`)),[RegExp(`^${e}`),n,r]}},v=[/^$/,[],Object.create(null)],y=Object.create(null);function buildWildcardRegExp(e){return y[e]??=RegExp(e===`*`?``:`^${e.replace(/\/\*$|([.\\+*[^\]$()])/g,(e,t)=>t?`\\${t}`:`(?:|/.*)`)}$`)}function clearWildcardRegExpCache(){y=Object.create(null)}function buildMatcherFromPreprocessedRoutes(e){let t=new Trie,n=[];if(e.length===0)return v;let r=e.map(e=>[!/\*|\/:/.test(e[0]),...e]).sort(([e,t],[n,r])=>e?1:n?-1:t.length-r.length),i=Object.create(null);for(let e=0,a=-1,o=r.length;e<o;e++){let[o,s,c]=r[e];o?i[s]=[c.map(([e])=>[e,Object.create(null)]),d]:a++;let l;try{l=t.insert(s,a,o)}catch(e){throw e===h?new UnsupportedPathError(s):e}o||(n[a]=c.map(([e,t])=>{let n=Object.create(null);for(--t;t>=0;t--){let[e,r]=l[t];n[e]=r}return[e,n]}))}let[a,o,s]=t.buildRegExp();for(let e=0,t=n.length;e<t;e++)for(let t=0,r=n[e].length;t<r;t++){let r=n[e][t]?.[1];if(!r)continue;let i=Object.keys(r);for(let e=0,t=i.length;e<t;e++)r[i[e]]=s[r[i[e]]]}let c=[];for(let e in o)c[e]=n[o[e]];return[a,c,i]}function findMiddleware(e,t){if(e){for(let n of Object.keys(e).sort((e,t)=>t.length-e.length))if(buildWildcardRegExp(n).test(t))return[...e[n]]}}var RegExpRouter=class{name=`RegExpRouter`;#e;#t;constructor(){this.#e={ALL:Object.create(null)},this.#t={ALL:Object.create(null)}}add(e,t,n){let r=this.#e,i=this.#t;if(!r||!i)throw Error(c);r[e]||[r,i].forEach(t=>{t[e]=Object.create(null),Object.keys(t.ALL).forEach(n=>{t[e][n]=[...t.ALL[n]]})}),t===`/*`&&(t=`*`);let a=(t.match(/\/:/g)||[]).length;if(/\*$/.test(t)){let o=buildWildcardRegExp(t);e===`ALL`?Object.keys(r).forEach(e=>{r[e][t]||=findMiddleware(r[e],t)||findMiddleware(r.ALL,t)||[]}):r[e][t]||=findMiddleware(r[e],t)||findMiddleware(r.ALL,t)||[],Object.keys(r).forEach(t=>{(e===`ALL`||e===t)&&Object.keys(r[t]).forEach(e=>{o.test(e)&&r[t][e].push([n,a])})}),Object.keys(i).forEach(t=>{(e===`ALL`||e===t)&&Object.keys(i[t]).forEach(e=>o.test(e)&&i[t][e].push([n,a]))});return}let o=checkOptionalParameter(t)||[t];for(let t=0,s=o.length;t<s;t++){let c=o[t];Object.keys(i).forEach(o=>{(e===`ALL`||e===o)&&(i[o][c]||=[...findMiddleware(r[o],c)||findMiddleware(r.ALL,c)||[]],i[o][c].push([n,a-s+t+1]))})}}match=match;buildAllMatchers(){let e=Object.create(null);return Object.keys(this.#t).concat(Object.keys(this.#e)).forEach(t=>{e[t]||=this.#n(t)}),this.#e=this.#t=void 0,clearWildcardRegExpCache(),e}#n(e){let t=[],n=e===`ALL`;return[this.#e,this.#t].forEach(r=>{let i=r[e]?Object.keys(r[e]).map(t=>[t,r[e][t]]):[];i.length===0?e!==`ALL`&&t.push(...Object.keys(r.ALL).map(e=>[e,r.ALL[e]])):(n||=!0,t.push(...i))}),n?buildMatcherFromPreprocessedRoutes(t):null}},SmartRouter=class{name=`SmartRouter`;#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,n){if(!this.#t)throw Error(c);this.#t.push([e,t,n])}match(e,t){if(!this.#t)throw Error(`Fatal error`);let n=this.#e,r=this.#t,i=n.length,a=0,o;for(;a<i;a++){let i=n[a];try{for(let e=0,t=r.length;e<t;e++)i.add(...r[e]);o=i.match(e,t)}catch(e){if(e instanceof UnsupportedPathError)continue;throw e}this.match=i.match.bind(i),this.#e=[i],this.#t=void 0;break}if(a===i)throw Error(`Fatal error`);return this.name=`SmartRouter + ${this.activeRouter.name}`,o}get activeRouter(){if(this.#t||this.#e.length!==1)throw Error(`No active router has been determined yet.`);return this.#e[0]}},b=Object.create(null),hasChildren=e=>{for(let t in e)return!0;return!1},x=class _Node{#e;#t;#n;#r=0;#i=b;constructor(e,t,n){if(this.#t=n||Object.create(null),this.#e=[],e&&t){let n=Object.create(null);n[e]={handler:t,possibleKeys:[],score:0},this.#e=[n]}this.#n=[]}insert(e,t,n){this.#r=++this.#r;let r=this,i=splitRoutingPath(t),a=[];for(let e=0,t=i.length;e<t;e++){let t=i[e],n=i[e+1],o=getPattern(t,n),s=Array.isArray(o)?o[0]:t;if(s in r.#t){r=r.#t[s],o&&a.push(o[1]);continue}r.#t[s]=new _Node,o&&(r.#n.push(o),a.push(o[1])),r=r.#t[s]}return r.#e.push({[e]:{handler:n,possibleKeys:a.filter((e,t,n)=>n.indexOf(e)===t),score:this.#r}}),r}#a(e,t,n,r,i){for(let a=0,o=t.#e.length;a<o;a++){let o=t.#e[a],s=o[n]||o.ALL,c={};if(s!==void 0&&(s.params=Object.create(null),e.push(s),r!==b||i&&i!==b))for(let e=0,t=s.possibleKeys.length;e<t;e++){let t=s.possibleKeys[e],n=c[s.score];s.params[t]=i?.[t]&&!n?i[t]:r[t]??i?.[t],c[s.score]=!0}}}search(e,t){let n=[];this.#i=b;let r=[this],i=splitPath(t),a=[],o=i.length,s=null;for(let c=0;c<o;c++){let l=i[c],u=c===o-1,d=[];for(let f=0,p=r.length;f<p;f++){let p=r[f],m=p.#t[l];m&&(m.#i=p.#i,u?(m.#t[`*`]&&this.#a(n,m.#t[`*`],e,p.#i),this.#a(n,m,e,p.#i)):d.push(m));for(let r=0,f=p.#n.length;r<f;r++){let f=p.#n[r],m=p.#i===b?{}:{...p.#i};if(f===`*`){let t=p.#t[`*`];t&&(this.#a(n,t,e,p.#i),t.#i=m,d.push(t));continue}let[h,g,_]=f;if(!l&&!(_ instanceof RegExp))continue;let v=p.#t[h];if(_ instanceof RegExp){if(s===null){s=Array(o);let e=+(t[0]===`/`);for(let t=0;t<o;t++)s[t]=e,e+=i[t].length+1}let r=t.substring(s[c]),l=_.exec(r);if(l){if(m[g]=l[0],this.#a(n,v,e,p.#i,m),hasChildren(v.#t)){v.#i=m;let e=l[0].match(/\//)?.length??0;(a[e]||=[]).push(v)}continue}}(_===!0||_.test(l))&&(m[g]=l,u?(this.#a(n,v,e,m,p.#i),v.#t[`*`]&&this.#a(n,v.#t[`*`],e,m,p.#i)):(v.#i=m,d.push(v)))}}let f=a.shift();r=f?d.concat(f):d}return n.length>1&&n.sort((e,t)=>e.score-t.score),[n.map(({handler:e,params:t})=>[e,t])]}},TrieRouter=class{name=`TrieRouter`;#e;constructor(){this.#e=new x}add(e,t,n){let r=checkOptionalParameter(t);if(r){for(let t=0,i=r.length;t<i;t++)this.#e.insert(e,r[t],n);return}this.#e.insert(e,t,n)}match(e,t){return this.#e.search(e,t)}},Hono=class extends u{constructor(e={}){super(e),this.router=e.router??new SmartRouter({routers:[new RegExpRouter,new TrieRouter]})}};export{Hono as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import e from"node:fs";let t;function hasDockerEnv(){try{return e.statSync(`/.dockerenv`),!0}catch{return!1}}function hasDockerCGroup(){try{return e.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}function isDocker(){return t===void 0&&(t=hasDockerEnv()||hasDockerCGroup()),t}export{isDocker as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";const isErrorInstance=e=>isInstanceOfError(e)||hasErrorTag(e),isInstanceOfError=e=>{try{return e instanceof Error}catch{return!1}},hasErrorTag=t=>{try{return e.has(Object.prototype.toString.call(t))}catch{return!1}},e=new Set([`[object Error]`,`[object DOMException]`,`[object DOMError]`,`[object Exception]`]);export{isErrorInstance as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import{t as e}from"./is-docker.mjs";import t from"node:fs";let n;const hasContainerEnv=()=>{try{return t.statSync(`/run/.containerenv`),!0}catch{return!1}};function isInsideContainer(){return n===void 0&&(n=hasContainerEnv()||e()),n}export{isInsideContainer as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";function isPlainObject(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}export{isPlainObject as t};
@@ -1 +0,0 @@
1
- import{i as e,n as t,r as n}from"../rolldown-runtime.mjs";import{statSync as r}from"node:fs";import{stat as i}from"node:fs/promises";var a=n({isexe:()=>o,sync:()=>s}),o,s,c,checkMode,l=t((()=>{o=e(async(e,t={})=>{let{ignoreErrors:n=!1}=t;try{return c(await i(e),t)}catch(e){let t=e;if(n||t.code===`EACCES`)return!1;throw t}},`isexe`),s=e((e,t={})=>{let{ignoreErrors:n=!1}=t;try{return c(r(e),t)}catch(e){let t=e;if(n||t.code===`EACCES`)return!1;throw t}},`sync`),c=e((e,t)=>e.isFile()&&checkMode(e,t),`checkStat`),checkMode=(e,t)=>{let n=t.uid??process.getuid?.(),r=t.groups??process.getgroups?.()??[],i=t.gid??process.getgid?.()??r[0];if(n===void 0||i===void 0)throw Error(`cannot get uid or gid`);let a=new Set([i,...r]),o=e.mode,s=e.uid,c=e.gid;return!!(o&1||o&8&&a.has(c)||o&64&&s===n||o&72&&n===0)}})),u=n({isexe:()=>d,sync:()=>f}),d,f,checkPathExt,checkStat,p=t((()=>{d=e(async(e,t={})=>{let{ignoreErrors:n=!1}=t;try{return checkStat(await i(e),e,t)}catch(e){let t=e;if(n||t.code===`EACCES`)return!1;throw t}},`isexe`),f=e((e,t={})=>{let{ignoreErrors:n=!1}=t;try{return checkStat(r(e),e,t)}catch(e){let t=e;if(n||t.code===`EACCES`)return!1;throw t}},`sync`),checkPathExt=(e,t)=>{let{pathExt:n=process.env.PATHEXT||``}=t,r=n.split(`;`);if(r.indexOf(``)!==-1)return!0;for(let t=0;t<r.length;t++){let n=r[t].toLowerCase(),i=e.substring(e.length-n.length).toLowerCase();if(n&&i===n)return!0}return!1},checkStat=(e,t,n)=>e.isFile()&&checkPathExt(t,n)})),m=t((()=>{})),h=n({isexe:()=>_,posix:()=>a,sync:()=>v,win32:()=>u}),g,_,v,y=t((()=>{l(),p(),m(),g=(process.env._ISEXE_TEST_PLATFORM_||process.platform)===`win32`?u:a,_=g.isexe,v=g.sync}));export{h as n,y as t};
@@ -1,3 +0,0 @@
1
- import"../rolldown-runtime.mjs";var HTTPError=class extends Error{response;request;options;constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),this.name=`HTTPError`,this.response=e,this.request=t,this.options=n}},NonError=class extends Error{name=`NonError`;value;constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),this.value=e}},ForceRetryError=class extends Error{name=`ForceRetryError`;customDelay;code;customRequest;constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new NonError(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}};const e=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),t=typeof globalThis.AbortController==`function`,n=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,r=typeof globalThis.ReadableStream==`function`,i=typeof globalThis.FormData==`function`,a=[`get`,`post`,`put`,`patch`,`head`,`delete`],o={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},s=2147483647,c=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,l=Symbol(`stop`);var RetryMarker=class{options;constructor(e){this.options=e}};const retry=e=>new RetryMarker(e),u={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},d={next:!0},f={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},getBodySize=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=c,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r==`string`?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e==`string`)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if(`byteLength`in e)return e.byteLength;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},withProgress=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},streamResponse=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let n=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response(withProgress(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},streamRequest=(e,t,n)=>{if(!e.body)return e;let r=getBodySize(n??e.body);return new Request(e,{duplex:`half`,body:withProgress(e.body,r,t)})},isObject=e=>typeof e==`object`&&!!e,validateAndMerge=(...e)=>{for(let t of e)if((!isObject(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return deepMerge({},...e)},mergeHeaders=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n};function newHookValue(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:deepMerge(e[n]??[],t[n]??[])}const mergeHooks=(e={},t={})=>({beforeRequest:newHookValue(e,t,`beforeRequest`),beforeRetry:newHookValue(e,t,`beforeRetry`),afterResponse:newHookValue(e,t,`afterResponse`),beforeError:newHookValue(e,t,`beforeError`)}),appendSearchParameters=(e,t)=>{let n=new URLSearchParams;for(let r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(let[e,t]of r.entries())n.append(e,t);else if(Array.isArray(r))for(let e of r){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1]))}else if(isObject(r))for(let[e,t]of Object.entries(r))t!==void 0&&n.append(e,String(t));else{let e=new URLSearchParams(r);for(let[t,r]of e.entries())n.append(t,r)}return n},deepMerge=(...e)=>{let t={},r={},i={},a,o=[];for(let n of e)if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(isObject(n)){for(let[e,r]of Object.entries(n)){if(e===`signal`&&r instanceof globalThis.AbortSignal){o.push(r);continue}if(e===`context`){if(r!=null&&(!isObject(r)||Array.isArray(r)))throw TypeError("The `context` option must be an object");t={...t,context:r==null?{}:{...t.context,...r}};continue}if(e===`searchParams`){a=r==null?void 0:a===void 0?r:appendSearchParameters(a,r);continue}isObject(r)&&e in t&&(r=deepMerge(t[e],r)),t={...t,[e]:r}}isObject(n.hooks)&&(i=mergeHooks(i,n.hooks),t.hooks=i),isObject(n.headers)&&(r=mergeHeaders(r,n.headers),t.headers=r)}return a!==void 0&&(t.searchParams=a),o.length>0&&(o.length===1?t.signal=o[0]:n?t.signal=AbortSignal.any(o):t.signal=o.at(-1)),t},normalizeRequestMethod=e=>a.includes(e)?e.toUpperCase():e,p={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},normalizeRetryOptions=(e={})=>{if(typeof e==`number`)return{...p,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...p,...t}};var TimeoutError=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name=`TimeoutError`,this.request=e}};async function timeout(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new TimeoutError(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function delay(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,abortHandler,{once:!0}));function abortHandler(){clearTimeout(i),r(t.reason)}let i=setTimeout(()=>{t?.removeEventListener(`abort`,abortHandler),n()},e)})}const findUnknownOptions=(e,t)=>{let n={};for(let r in t)Object.hasOwn(t,r)&&!(r in f)&&!(r in u)&&(!(r in e)||r in d)&&(n[r]=t[r]);return n},hasSearchParameters=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e;function isHTTPError(e){return e instanceof HTTPError||e?.name===HTTPError.name}function isTimeoutError(e){return e instanceof TimeoutError||e?.name===TimeoutError.name}var m=class Ky{static create(e,t){let n=new Ky(e,t),function_=async()=>{if(typeof n.#i.timeout==`number`&&n.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${s}`);await Promise.resolve();let e=await n.#m();for(let t of n.#i.hooks.afterResponse){let r=n.#u(e.clone()),i;try{i=await t(n.request,n.#h(),r,{retryCount:n.#n})}catch(t){throw n.#f(r),n.#f(e),t}if(i instanceof RetryMarker)throw n.#f(r),n.#f(e),new ForceRetryError(i.options);let a=i instanceof globalThis.Response?i:e;r!==a&&n.#f(r),e!==a&&n.#f(e),e=a}if(n.#u(e),!e.ok&&(typeof n.#i.throwHttpErrors==`function`?n.#i.throwHttpErrors(e.status):n.#i.throwHttpErrors)){let t=new HTTPError(e,n.request,n.#h());for(let e of n.#i.hooks.beforeError)t=await e(t,{retryCount:n.#n});throw t}if(n.#i.onDownloadProgress){if(typeof n.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!r)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let t=e.clone();return n.#f(e),streamResponse(t,n.#i.onDownloadProgress)}return e},i=n.#p(function_).finally(()=>{let e=n.#a;n.#d(e?.body??void 0),n.#d(n.request.body??void 0)});for(let[e,r]of Object.entries(o))e===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(i[e]=async()=>{n.request.headers.set(`accept`,n.request.headers.get(`accept`)||r);let a=await i;if(e===`json`){if(a.status===204)return``;let e=await a.text();return e===``?``:t.parseJson?t.parseJson(e):JSON.parse(e)}return a[e]()});return i}static#e(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}request;#t;#n=0;#r;#i;#a;#o;#s;constructor(r,a={}){if(this.#r=r,this.#i={...a,headers:mergeHeaders(this.#r.headers,a.headers),hooks:mergeHooks({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},a.hooks),method:normalizeRequestMethod(a.method??this.#r.method??`GET`),prefixUrl:String(a.prefixUrl||``),retry:normalizeRetryOptions(a.retry),throwHttpErrors:a.throwHttpErrors??!0,timeout:a.timeout??1e4,fetch:a.fetch??globalThis.fetch.bind(globalThis),context:a.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this.#i.prefixUrl&&typeof this.#r==`string`){if(this.#r.startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#i.prefixUrl.endsWith(`/`)||(this.#i.prefixUrl+=`/`),this.#r=this.#i.prefixUrl+this.#r}t&&n&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal),e&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let o=a.headers&&new globalThis.Headers(a.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(i&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!o&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),hasSearchParameters(this.#i.searchParams)){let e=`?`+(typeof this.#i.searchParams==`string`?this.#i.searchParams.replace(/^\?/,``):new URLSearchParams(Ky.#e(this.#i.searchParams)).toString()),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,e);this.request=new globalThis.Request(t,this.#i)}if(this.#i.onUploadProgress){if(typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!e)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#_(this.request,this.#i.body??void 0)}}#c(){let e=this.#i.retry.delay(this.#n),t=e;this.#i.retry.jitter===!0?t=Math.random()*e:typeof this.#i.retry.jitter==`function`&&(t=this.#i.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));let n=this.#i.retry.backoffLimit??1/0;return Math.min(n,t)}async#l(e){if(this.#n++,this.#n>this.#i.retry.limit)throw e;let t=e instanceof Error?e:new NonError(e);if(t instanceof ForceRetryError)return t.customDelay??this.#c();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#i.retry.shouldRetry!==void 0){let n=await this.#i.retry.shouldRetry({error:t,retryCount:this.#n});if(n===!1)throw e;if(n===!0)return this.#c()}if(isTimeoutError(e)&&!this.#i.retry.retryOnTimeout)throw e;if(isHTTPError(e)){if(!this.#i.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&this.#i.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now());let n=this.#i.retry.maxRetryAfter??e;return e<n?e:n}if(e.response.status===413)throw e}return this.#c()}#u(e){return this.#i.parseJson&&(e.json=async()=>this.#i.parseJson(await e.text())),e}#d(e){e&&e.cancel().catch(()=>void 0)}#f(e){this.#d(e.body??void 0)}async#p(e){try{return await e()}catch(t){let n=Math.min(await this.#l(t),s);if(this.#n<1)throw t;if(await delay(n,this.#o?{signal:this.#o}:{}),t instanceof ForceRetryError&&t.customRequest){let e=this.#i.signal?new globalThis.Request(t.customRequest,{signal:this.#i.signal}):new globalThis.Request(t.customRequest);this.#g(e)}for(let e of this.#i.hooks.beforeRetry){let n=await e({request:this.request,options:this.#h(),error:t,retryCount:this.#n});if(n instanceof globalThis.Request){this.#g(n);break}if(n instanceof globalThis.Response)return n;if(n===l)return}return this.#p(e)}}async#m(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal,this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));for(let e of this.#i.hooks.beforeRequest){let t=await e(this.request,this.#h(),{retryCount:this.#n});if(t instanceof Response)return t;if(t instanceof globalThis.Request){this.#g(t);break}}let e=findUnknownOptions(this.request,this.#i);return this.#a=this.request,this.request=this.#a.clone(),this.#i.timeout===!1?this.#i.fetch(this.#a,e):timeout(this.#a,e,this.#t,this.#i)}#h(){if(!this.#s){let{hooks:e,...t}=this.#i;this.#s=Object.freeze(t)}return this.#s}#g(e){this.#s=void 0,this.request=this.#_(e)}#_(e,t){return!this.#i.onUploadProgress||!e.body?e:streamRequest(e,this.#i.onUploadProgress,t??this.#i.body??void 0)}};
2
- /*! MIT License © Sindre Sorhus */
3
- const createInstance=e=>{let ky=(t,n)=>m.create(t,validateAndMerge(e,n));for(let t of a)ky[t]=(n,r)=>m.create(n,validateAndMerge(e,r,{method:t}));return ky.create=e=>createInstance(validateAndMerge(e)),ky.extend=t=>(typeof t==`function`&&(t=t(e??{})),createInstance(validateAndMerge(e,t))),ky.stop=l,ky.retry=retry,ky},h=createInstance();export{h as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";const pDebounce=(e,t,n={})=>{if(!Number.isFinite(t))throw TypeError("Expected `wait` to be a finite number");let r,i,a=[],onAbort=()=>{clearTimeout(i),i=void 0;try{n.signal?.throwIfAborted()}catch(e){for(let{reject:t}of a)t(e);a=[]}};return function(...o){return new Promise((s,c)=>{try{n.signal?.throwIfAborted()}catch(e){c(e);return}let l=n.before&&!i;clearTimeout(i),i=setTimeout(async()=>{i=void 0;let t=a;a=[];try{let i=n.before?r:await e.apply(this,o);for(let{resolve:e}of t)e(i)}catch(e){for(let{reject:n}of t)n(e)}r=void 0,n.signal?.removeEventListener(`abort`,onAbort)},t),l?(async()=>{try{r=await e.apply(this,o),s(r)}catch(e){c(e)}})():(a.push({resolve:s,reject:c}),n.signal&&a.length===1&&n.signal.addEventListener(`abort`,onAbort,{once:!0}))})}};pDebounce.promise=(e,t={})=>{let n,r;return async function(...i){if(n)return t.after?(r??={resolvers:[]},r.arguments=i,r.context=this,new Promise((e,t)=>{r.resolvers.push({resolve:e,reject:t})})):n;n=(async()=>{let t,n;try{t=await e.apply(this,i)}catch(e){n=e}for(;r;){let t=r;r=void 0;try{let n=await e.apply(t.context,t.arguments);for(let{resolve:e}of t.resolvers)e(n)}catch(e){for(let{reject:n}of t.resolvers)n(e)}}if(n)throw n;return t})();try{return await n}finally{n=void 0}}};export{pDebounce as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";var Node=class{value;next;constructor(e){this.value=e}},Queue=class{#e;#t;#n;constructor(){this.clear()}enqueue(e){let t=new Node(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#n++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#n--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function pLimit(e){let t=!1;if(typeof e==`object`&&({concurrency:e,rejectOnClear:t=!1}=e),validateConcurrency(e),typeof t!=`boolean`)throw TypeError("Expected `rejectOnClear` to be a boolean");let n=new Queue,r=0,resumeNext=()=>{r<e&&n.size>0&&(r++,n.dequeue().run())},next=()=>{r--,resumeNext()},run=async(e,t,n)=>{let r=(async()=>e(...n))();t(r);try{await r}catch{}next()},enqueue=(t,i,a,o)=>{let s={reject:a};new Promise(e=>{s.run=e,n.enqueue(s)}).then(run.bind(void 0,t,i,o)),r<e&&resumeNext()},generator=(e,...t)=>new Promise((n,r)=>{enqueue(e,n,r,t)});return Object.defineProperties(generator,{activeCount:{get:()=>r},pendingCount:{get:()=>n.size},clearQueue:{value(){if(!t){n.clear();return}let e=AbortSignal.abort().reason;for(;n.size>0;)n.dequeue().reject(e)}},concurrency:{get:()=>e,set(t){validateConcurrency(t),e=t,queueMicrotask(()=>{for(;r<e&&n.size>0;)resumeNext()})}},map:{async value(e,t){let n=Array.from(e,(e,n)=>this(t,e,n));return Promise.all(n)}}}),generator}function validateConcurrency(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")}export{pLimit as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";var e=class TimeoutError extends Error{name=`TimeoutError`;constructor(e,t){super(e,t),Error.captureStackTrace?.(this,TimeoutError)}};const getAbortedReason=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function pTimeout(t,n){let{milliseconds:r,fallback:i,message:a,customTimers:o={setTimeout,clearTimeout},signal:s}=n,c,abortHandler,l=new Promise((n,l)=>{if(typeof r!=`number`||Math.sign(r)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(s?.aborted){l(getAbortedReason(s));return}if(s&&(abortHandler=()=>{l(getAbortedReason(s))},s.addEventListener(`abort`,abortHandler,{once:!0})),t.then(n,l),r===1/0)return;let u=new e;c=o.setTimeout.call(void 0,()=>{if(i){try{n(i())}catch(e){l(e)}return}typeof t.cancel==`function`&&t.cancel(),a===!1?n():a instanceof Error?l(a):(u.message=a??`Promise timed out after ${r} milliseconds`,l(u))},r)}).finally(()=>{l.clear(),abortHandler&&s&&s.removeEventListener(`abort`,abortHandler)});return l.clear=()=>{o.clearTimeout.call(void 0,c),c=void 0},l}export{pTimeout as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";import{t as e}from"./find-up-simple.mjs";import t from"node:process";function packageUpSync({cwd:n=t.cwd()}={}){return e(`package.json`,{cwd:n})}export{packageUpSync as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";const toZeroIfInfinity=e=>Number.isFinite(e)?e:0;function parseNumber(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(toZeroIfInfinity(e*1e3)%1e3),nanoseconds:Math.trunc(toZeroIfInfinity(e*1e6)%1e3)}}function parseBigint(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function parseMilliseconds(e){switch(typeof e){case`number`:if(Number.isFinite(e))return parseNumber(e);break;case`bigint`:return parseBigint(e)}throw TypeError(`Expected a finite number or bigint`)}export{parseMilliseconds as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";function serializeValue(e,t,n,r){if(typeof e?.toJSON==`function`&&(e=e.toJSON()),!(typeof e==`object`&&e))return e;if(t.has(e)){if(!n)return`[Circular]`;let r=t.get(e);return`[Circular ${r===``?`*`:`*${r}`}]`}t.set(e,r);let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))i[a]=serializeValue(o,t,n,r===``?a:`${r}.${a}`);return t.delete(e),i}function safeStringify(e,{indentation:t,trace:n}={}){let r=serializeValue(e,new WeakMap,n,``);return JSON.stringify(r,void 0,t)}export{safeStringify as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";function stripIndent(e){let t=e.match(/^[ \t]*(?=\S)/gm);if(!t)return e;let n=1/0;for(let e of t)n=Math.min(n,e.length);return n===0||n===1/0?e:e.replace(RegExp(`^[ \\t]{${n}}`,`gm`),``)}function dedent(e){return stripIndent(e.replace(/^(?:[ \t]*\r?\n)+|(?:\r?\n[ \t]*)+$/g,``))}export{stripIndent as n,dedent as t};
@@ -1 +0,0 @@
1
- import"../rolldown-runtime.mjs";var e={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function i(e){return String(e)}i.open=``,i.close=``;function B(){let e=typeof process<`u`?process:void 0,t=e?.env||{},r=t.FORCE_TTY!==`false`,o=e?.argv||[];return!(`NO_COLOR`in t||o.includes(`--no-color`))&&(`FORCE_COLOR`in t||o.includes(`--color`)||e?.platform===`win32`||r&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function C({force:t}={}){let r=t||B(),a=(e,t,r,o)=>{let s=``,c=0;do s+=e.substring(c,o)+r,c=o+t.length,o=e.indexOf(t,c);while(~o);return s+e.substring(c)},l=(e,t,r=e)=>{let n=o=>{let s=String(o),c=s.indexOf(t,e.length);return~c?e+a(s,t,r,c)+t:e+s+t};return n.open=e,n.close=t,n},o={isColorSupported:r},f=e=>`\x1B[${e}m`;for(let t in e){let s=e[t];o[t]=r?l(f(s[0]),f(s[1]),s[2]):i}return o}var t=C();export{t};
@@ -1,12 +0,0 @@
1
- import { i as __name } from "../rolldown-runtime.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/ts-graphviz@1.8.2/node_modules/ts-graphviz/lib/utils/index.d.ts
4
- /**
5
- * @hidden
6
- */
7
- type $keywords<T extends string> = { [key in T]: key };
8
- /**
9
- * @hidden
10
- */
11
- //#endregion
12
- export { $keywords as t };
@@ -1,4 +0,0 @@
1
- import"../rolldown-runtime.mjs";function isForwardRefNode(e){return typeof e==`object`&&!!e&&typeof e.id==`string`}function isNodeModel(e){return typeof e==`object`&&!!e&&e.$$type===`Node`&&typeof e.id==`string`}function isNodeRef(e){return isNodeModel(e)||isForwardRefNode(e)}function isNodeRefLike(e){return typeof e==`string`||isNodeRef(e)}function isNodeRefGroupLike(e){return Array.isArray(e)&&e.every(isNodeRefLike)}function isCompass(e){return[`n`,`ne`,`e`,`se`,`s`,`sw`,`w`,`nw`,`c`].includes(e)}function toNodeRef(e){if(isNodeRef(e))return e;let[t,n,r]=e.split(`:`);return isCompass(r)?{id:t,port:n,compass:r}:{id:t,port:n}}function toNodeRefGroup(e){if(e.length<2&&(isNodeRefLike(e[0])&&isNodeRefLike(e[1]))===!1)throw Error(`EdgeTargets must have at least 2 elements.`);return e.map(e=>toNodeRef(e))}const e=Object.seal({Graph:null,Digraph:null,Subgraph:null,Node:null,Edge:null});function createModelsContext(t){return Object.assign(Object.seal(Object.assign({},e)),t)}function _pipe(...e){let[t,...n]=e;return(...e)=>n.reduce((e,t)=>t(e),t(...e))}function pipe(e,...t){return _pipe(e,...t)}const defer=e=>(...t)=>n=>e(n,...t),toIterable=e=>({[Symbol.iterator]:e}),t=defer((e,t)=>Array.from(toIterable(function*(){for(let n of e)yield t(n)})));var Builder=class{options;getLocation(){return this.options?.locationFunction?.()??null}constructor(e){this.options=e}createElement(e,t,n=[]){return{location:this.getLocation(),...t,type:e,children:n}}};const n=Builder.prototype.createElement.bind(new Builder),r=/\r?\n/;function joinBy(e){return t=>t.join(e)}function wrapWith(e){return t=>e+t+e}function wrapByPair(e,t){return n=>e+n+t}function leftPadWith(e){return t=>e+t}const escape=e=>e.replace(/\r/g,`\\r`).replace(/\n/g,`\\n`).replace(/"/g,`\\"`),splitByLine=e=>e.split(r),indent=(e,n,r)=>pipe(splitByLine,t(leftPadWith(e===`space`?` `.repeat(n):`
2
- `)),joinBy(r)),endOfLine=e=>{switch(e){case`crlf`:return`\r
3
- `;case`lf`:return`
4
- `}},i={match(e){return e.type===`AttributeList`},print(e,n){if(n.children.length===0)return`${n.kind.toLocaleLowerCase()} [];`;let r=endOfLine(e.endOfLine);return pipe(t(e.print),joinBy(r),indent(e.indentStyle,e.indentSize,r),wrapByPair(`${n.kind.toLocaleLowerCase()} [${r}`,`${r}];`))(n.children)}},a={match(e){return e.type===`Attribute`},print(e,t){return`${e.print(t.key)} = ${e.print(t.value)};`}},o={match(e){return e.type===`Comment`},print(e,n){let r=endOfLine(e.endOfLine);switch(n.kind){case`Block`:return pipe(splitByLine,t(leftPadWith(` * `)),joinBy(r),wrapByPair(`/**${r}`,`${r} */`))(n.value);case`Macro`:return pipe(splitByLine,t(leftPadWith(`# `)),joinBy(r))(n.value);default:return pipe(splitByLine,t(leftPadWith(`// `)),joinBy(r))(n.value)}}},s={match(e){return e.type===`Dot`},print(e,t){return t.children.map(e.print).join(endOfLine(e.endOfLine))}},c={match(e){return e.type===`Edge`},print(e,n){let r=pipe(t(e.print),joinBy(e.directed?` -> `:` -- `))(n.targets);if(n.children.length===0)return`${r};`;let i=endOfLine(e.endOfLine);return`${r} ${pipe(t(e.print),joinBy(i),indent(e.indentStyle,e.indentSize,i),wrapByPair(`[${i}`,`${i}];`))(n.children)}`}},l={match(e){return e.type===`Graph`},print(e,n){e.directed=n.directed;let r=[];if(n.strict&&r.push(`strict`),r.push(n.directed?`digraph`:`graph`),n.id&&r.push(e.print(n.id)),n.children.length===0)return`${r.join(` `)} {}`;let i=endOfLine(e.endOfLine),a=pipe(t(e.print),joinBy(i),indent(e.indentStyle,e.indentSize,i),wrapByPair(`{${i}`,`${i}}`))(n.children);return`${r.join(` `)} ${a}`}},u=pipe(escape,wrapWith(`"`)),d=wrapByPair(`<`,`>`),f=[i,a,o,s,c,l,{match(e){return e.type===`Literal`},print(e,t){switch(t.quoted){case`html`:return d(t.value);case!0:return u(t.value);default:return escape(t.value)}}},{match(e){return e.type===`Node`},print(e,n){let r=e.print(n.id);if(n.children.length===0)return`${r};`;let i=endOfLine(e.endOfLine);return`${r} ${pipe(t(e.print),joinBy(i),indent(e.indentStyle,e.indentSize,i),wrapByPair(`[${i}`,`${i}];`))(n.children)}`}},{match(e){return e.type===`NodeRefGroup`},print(e,n){return pipe(t(e.print),joinBy(` `),wrapByPair(`{`,`}`))(n.children)}},{match(e){return e.type===`NodeRef`},print(e,t){let n=[e.print(t.id)];return t.port&&n.push(e.print(t.port)),t.compass&&n.push(e.print(t.compass)),n.join(`:`)}},{match(e){return e.type===`Subgraph`},print(e,n){let r=[`subgraph`];if(n.id&&r.push(e.print(n.id)),n.children.length===0)return`${r.join(` `)} {}`;let i=endOfLine(e.endOfLine),a=pipe(t(e.print),joinBy(i),indent(e.indentStyle,e.indentSize,i),wrapByPair(`{${i}`,`${i}}`))(n.children);return`${r.join(` `)} ${a}`}}];var Printer=class{options;#e=[...f];constructor(e={}){this.options=e}print(e){let t=[...this.#e],{indentSize:n=2,indentStyle:r=`space`,endOfLine:i=`lf`}=this.options,a={directed:!0,indentSize:n,indentStyle:r,endOfLine:i,print(e){for(let n of t)if(n.match(e))return n.print(a,e);throw Error()}};return a.print(e)}};function stringify(e,t){let n=new Printer(t).print(e);if(!n)throw Error();return n}function convertAttribute(e,t){if(typeof t==`string`){let r=t.trim();return/^<.+>$/ms.test(r)?n(`Attribute`,{key:n(`Literal`,{value:e,quoted:!1},[]),value:n(`Literal`,{value:r.slice(1,r.length-1),quoted:`html`},[])},[]):n(`Attribute`,{key:n(`Literal`,{value:e,quoted:!1},[]),value:n(`Literal`,{value:t,quoted:!0},[])},[])}return n(`Attribute`,{key:n(`Literal`,{value:e,quoted:!1},[]),value:n(`Literal`,{value:String(t),quoted:!1},[])},[])}function convertComment(e,t){return n(`Comment`,{kind:t,value:e},[])}function convertClusterChildren(e,t){return Array.from((function*(){for(let[e,n]of t.values)yield convertAttribute(e,n);for(let n of Object.values(t.attributes))n.size>0&&(n.comment&&(yield convertComment(n.comment,e.commentKind)),yield e.convert(n));for(let n of t.nodes)n.comment&&(yield convertComment(n.comment,e.commentKind)),yield e.convert(n);for(let n of t.subgraphs)n.comment&&(yield convertComment(n.comment,e.commentKind)),yield e.convert(n);for(let n of t.edges)n.comment&&(yield convertComment(n.comment,e.commentKind)),yield e.convert(n)})())}const p=[{match(e){return e.$$type===`AttributeList`},convert(e,t){return n(`AttributeList`,{kind:t.$$kind},t.values.map(([e,t])=>convertAttribute(e,t)))}},{match(e){return e.$$type===`Edge`},convert(e,t){return n(`Edge`,{targets:t.targets.map(e=>isNodeModel(e)?n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[])},[]):isForwardRefNode(e)?n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[]),port:e.port?n(`Literal`,{value:e.port,quoted:!0},[]):void 0,compass:e.compass?n(`Literal`,{value:e.compass,quoted:!0},[]):void 0},[]):n(`NodeRefGroup`,{},e.map(e=>isNodeModel(e)?n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[])},[]):n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[]),port:e.port?n(`Literal`,{value:e.port,quoted:!0},[]):void 0,compass:e.compass?n(`Literal`,{value:e.compass,quoted:!0},[]):void 0},[]))))},[...t.attributes.comment?[convertComment(t.attributes.comment,e.commentKind)]:[],...t.attributes.values.map(([e,t])=>convertAttribute(e,t))])}},{match(e){return e.$$type===`Node`},convert(e,t){return n(`Node`,{id:n(`Literal`,{value:t.id,quoted:!0},[])},[...t.attributes.comment?[convertComment(t.attributes.comment,e.commentKind)]:[],...t.attributes.values.map(([e,t])=>convertAttribute(e,t))])}},{match(e){return e.$$type===`Graph`},convert(e,t){return n(`Dot`,{},[...t.comment?[convertComment(t.comment,e.commentKind)]:[],n(`Graph`,{directed:t.directed,strict:t.strict,id:t.id?n(`Literal`,{value:t.id,quoted:!0},[]):void 0},convertClusterChildren(e,t))])}},{match(e){return e.$$type===`Subgraph`},convert(e,t){return n(`Subgraph`,{id:t.id?n(`Literal`,{value:t.id,quoted:!0},[]):void 0},convertClusterChildren(e,t))}}];var FromModelConverter=class{options;#e=[...p];constructor(e={}){this.options=e}convert(e){let t=[...this.#e],{commentKind:n=`Slash`}=this.options,r={commentKind:n,convert(e){for(let n of t)if(n.match(e))return n.convert(r,e);throw Error()}};return r.convert(e)}};function fromModel(e,t){return new FromModelConverter(t).convert(e)}const m=new Proxy(Object.freeze({}),{get:(e,t)=>t});var DotObject=class{},AttributesBase=class extends DotObject{#e=new Map;constructor(e){super(),e!==void 0&&this.apply(e)}get values(){return Array.from(this.#e.entries())}get size(){return this.#e.size}get(e){return this.#e.get(e)}set(e,t){t!=null&&this.#e.set(e,t)}delete(e){this.#e.delete(e)}apply(e){let t=Array.isArray(e)?e:Object.entries(e);for(let[e,n]of t)this.set(e,n)}clear(){this.#e.clear()}},AttributeList=class extends AttributesBase{$$kind;get $$type(){return`AttributeList`}comment;constructor(e,t){super(t),this.$$kind=e}},GraphBase=class extends AttributesBase{#e=e;id;comment;attributes=Object.freeze({graph:new AttributeList(`Graph`),edge:new AttributeList(`Edge`),node:new AttributeList(`Node`)});get nodes(){return Array.from(this.#t.nodes.values())}get edges(){return Array.from(this.#t.edges.values())}get subgraphs(){return Array.from(this.#t.subgraphs.values())}#t={nodes:new Map,edges:new Set,subgraphs:new Set};with(e){this.#e=createModelsContext(e)}addNode(e){this.#t.nodes.set(e.id,e)}addEdge(e){this.#t.edges.add(e)}addSubgraph(e){this.#t.subgraphs.add(e)}existNode(e){return this.#t.nodes.has(e)}existEdge(e){return this.#t.edges.has(e)}existSubgraph(e){return this.#t.subgraphs.has(e)}createSubgraph(...e){let t=new this.#e.Subgraph(...e);return t.with(this.#e),this.addSubgraph(t),t}removeNode(e){this.#t.nodes.delete(typeof e==`string`?e:e.id)}removeEdge(e){this.#t.edges.delete(e)}removeSubgraph(e){this.#t.subgraphs.delete(e)}createNode(e,t){let n=new this.#e.Node(e,t);return this.addNode(n),n}getSubgraph(e){return Array.from(this.#t.subgraphs.values()).find(t=>t.id===e)}getNode(e){return this.#t.nodes.get(e)}createEdge(e,t){let n=e.map(e=>isNodeRefGroupLike(e)?toNodeRefGroup(e):toNodeRef(e)),r=new this.#e.Edge(n,t);return this.addEdge(r),r}subgraph(...e){let t=e.find(e=>typeof e==`string`),n=e.find(e=>typeof e==`object`&&!!e),r=e.find(e=>typeof e==`function`),i=t?this.getSubgraph(t)??this.createSubgraph(t):this.createSubgraph();return n!==void 0&&i.apply(n),r!==void 0&&r(i),i}node(e,...t){if(typeof e==`string`){let n=e,r=t.find(e=>typeof e==`object`&&!!e),i=t.find(e=>typeof e==`function`),a=this.getNode(n)??this.createNode(n);return r!==void 0&&a.attributes.apply(r),i!==void 0&&i(a),a}typeof e==`object`&&e&&this.attributes.node.apply(e)}edge(e,...t){if(Array.isArray(e)){let n=e,r=t.find(e=>typeof e==`object`),i=t.find(e=>typeof e==`function`),a=this.createEdge(n,r);return i!==void 0&&i(a),a}typeof e==`object`&&e&&this.attributes.edge.apply(e)}graph(e){this.attributes.graph.apply(e)}},RootGraph=class extends GraphBase{get $$type(){return`Graph`}id;strict;constructor(...e){super(),this.id=e.find(e=>typeof e==`string`),this.strict=e.find(e=>typeof e==`boolean`)??!1;let t=e.find(e=>typeof e==`object`&&!!e);t!==void 0&&this.apply(t)}},Digraph=class extends RootGraph{get directed(){return!0}},Graph=class extends RootGraph{get directed(){return!1}},Subgraph=class extends GraphBase{get $$type(){return`Subgraph`}id;constructor(...e){super(),this.id=e.find(e=>typeof e==`string`);let t=e.find(e=>typeof e==`object`&&!!e);t!==void 0&&this.apply(t)}isSubgraphCluster(){return typeof this.id==`string`?this.id.startsWith(`cluster`):!1}},AttributesGroup=class extends AttributesBase{comment},Node=class extends DotObject{id;get $$type(){return`Node`}comment;attributes;constructor(e,t){super(),this.id=e,this.attributes=new AttributesGroup(t)}port(e){return typeof e==`string`?{id:this.id,port:e}:{id:this.id,...e}}},Edge=class extends DotObject{targets;get $$type(){return`Edge`}comment;attributes;constructor(e,t){if(super(),this.targets=e,e.length<2&&(isNodeRefLike(e[0])&&isNodeRefLike(e[1]))===!1)throw Error(`The element of Edge target is missing or not satisfied as Edge target.`);this.attributes=new AttributesGroup(t)}};Object.assign(e,{Graph,Digraph,Subgraph,Node,Edge});function ModelFactoryBuilder(e,t){return(...n)=>{let r=e?this.Digraph:this.Graph,i=n.find(e=>typeof e==`string`),a=n.find(e=>typeof e==`object`),o=n.find(e=>typeof e==`function`),s=new r(i,t,a);return s.with(this),typeof o==`function`&&o(s),s}}function createModelFactories(t,n=e){return Object.freeze({digraph:ModelFactoryBuilder.call(n,!0,t),graph:ModelFactoryBuilder.call(n,!1,t)})}const h=createModelFactories(!1),g=h.digraph;h.graph,createModelFactories(!0);function toDot(e,t){return stringify(fromModel(e,t?.convert),t?.print)}export{g as n,toDot as r,m as t};
@@ -1 +0,0 @@
1
- import{t as e}from"../rolldown-runtime.mjs";import{_ as t}from"./langium.mjs";var n=e(((e,n)=>{n.exports=t()}));export{n as t};
@@ -1,12 +0,0 @@
1
- import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{
2
- /*!
3
- * word-wrap <https://github.com/jonschlinkert/word-wrap>
4
- *
5
- * Copyright (c) 2014-2023, Jon Schlinkert.
6
- * Released under the MIT License.
7
- */
8
- function trimEnd(e){let t=e.length-1,n=e[t];for(;n===` `||n===` `;)n=e[--t];return e.substring(0,t+1)}function trimTabAndSpaces(e){return e.split(`
9
- `).map(e=>trimEnd(e)).join(`
10
- `)}t.exports=function(e,t){if(t||={},e==null)return e;var n=t.width||50,r=typeof t.indent==`string`?t.indent:` `,i=t.newline||`
11
- `+r,a=typeof t.escape==`function`?t.escape:identity,o=`.{1,`+n+`}`;t.cut!==!0&&(o+=`([\\s​]+|$)|[^\\s​]+?([\\s​]+|$)`);var s=new RegExp(o,`g`),c=r+(e.match(s)||[]).map(function(e){return e.slice(-1)===`
12
- `&&(e=e.slice(0,e.length-1)),a(e)}).join(i);return t.trim===!0&&(c=trimTabAndSpaces(c)),c};function identity(e){return e}}));export{t};