@shopify/cli 3.94.3 → 4.1.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 (297) hide show
  1. package/README.md +2 -2
  2. package/bin/run.js +5 -1
  3. package/dist/analytics-5TEIW43T.js +1 -0
  4. package/dist/analytics-GG7CYCGL.js +1 -0
  5. package/dist/bootstrap.d.ts +5 -0
  6. package/dist/bootstrap.js +3 -0
  7. package/dist/chunk-2AJ5FI2K.js +7 -0
  8. package/dist/chunk-2GK56X53.js +1 -0
  9. package/dist/chunk-3D4JXJPS.js +2 -0
  10. package/dist/chunk-3NBK56IK.js +1 -0
  11. package/dist/chunk-3TNEIDOD.js +1 -0
  12. package/dist/chunk-3VZEETAV.js +1 -0
  13. package/dist/chunk-4DCQNGUV.js +19 -0
  14. package/dist/chunk-4IC626OL.js +1 -0
  15. package/dist/chunk-4LNCYIS3.js +1 -0
  16. package/dist/chunk-4ZGSSQC6.js +1 -0
  17. package/dist/chunk-54CAKCYR.js +144 -0
  18. package/dist/chunk-5CH3B62S.js +2 -0
  19. package/dist/chunk-5UHQVR2Z.js +1 -0
  20. package/dist/chunk-5WVAHE5E.js +1 -0
  21. package/dist/chunk-5Y7GIF2W.js +1 -0
  22. package/dist/chunk-67MH4AXG.js +1 -0
  23. package/dist/chunk-6CYMJ76C.js +9 -0
  24. package/dist/chunk-6G6TMKXF.js +28 -0
  25. package/dist/chunk-6HBRBQAN.js +6 -0
  26. package/dist/chunk-6ITDI2SD.js +1 -0
  27. package/dist/chunk-6M3ZYNGO.js +451 -0
  28. package/dist/chunk-6RE2SNCU.js +6 -0
  29. package/dist/chunk-6SF3ZETE.js +1 -0
  30. package/dist/chunk-6WL4GA2M.js +15 -0
  31. package/dist/chunk-75VPUOC5.js +1 -0
  32. package/dist/chunk-76R52ODR.js +1 -0
  33. package/dist/chunk-7ESSIN27.js +567 -0
  34. package/dist/chunk-7NH7CHVI.js +6 -0
  35. package/dist/chunk-7QIOUDCX.js +8 -0
  36. package/dist/chunk-7UYZQN4V.js +18 -0
  37. package/dist/chunk-7ZT57XT7.js +2 -0
  38. package/dist/chunk-AGNMOFJS.js +1 -0
  39. package/dist/chunk-BS3BKORT.js +16 -0
  40. package/dist/chunk-C2IK2HY3.js +4 -0
  41. package/dist/chunk-C7BTJ32Z.js +1 -0
  42. package/dist/chunk-CBXSPL4W.js +1 -0
  43. package/dist/chunk-CEIQFLCN.js +1 -0
  44. package/dist/chunk-CERXUPGC.js +14 -0
  45. package/dist/chunk-DCPBRWVC.js +1 -0
  46. package/dist/chunk-DN2IE3VY.js +1 -0
  47. package/dist/chunk-DRFGABEB.js +1 -0
  48. package/dist/chunk-E3EMHAJB.js +1 -0
  49. package/dist/chunk-EKXY5COY.js +1 -0
  50. package/dist/chunk-EQU4MUQJ.js +1 -0
  51. package/dist/chunk-F2QU6WWX.js +1 -0
  52. package/dist/chunk-FFQ5EWII.js +294 -0
  53. package/dist/chunk-FKMC5OFF.js +1 -0
  54. package/dist/chunk-FQWB2F75.js +3 -0
  55. package/dist/chunk-FUOIGXI4.js +1 -0
  56. package/dist/chunk-FYFNUDOC.js +19 -0
  57. package/dist/chunk-G4BPGWJC.js +1 -0
  58. package/dist/chunk-GVQIPEZT.js +1 -0
  59. package/dist/chunk-GZS44BUW.js +102 -0
  60. package/dist/chunk-HIBX234C.js +6 -0
  61. package/dist/chunk-HRUGYZZ4.js +2 -0
  62. package/dist/chunk-HUIJMGVJ.js +586 -0
  63. package/dist/chunk-HZA6IAA4.js +1 -0
  64. package/dist/chunk-IU2ZQ6TE.js +2 -0
  65. package/dist/chunk-IX5ICOBV.js +7 -0
  66. package/dist/chunk-IZ3C5J7G.js +5 -0
  67. package/dist/chunk-JAO53IH2.js +1 -0
  68. package/dist/chunk-JCL2RRU6.js +1 -0
  69. package/dist/chunk-JQJBBXMX.js +17 -0
  70. package/dist/chunk-JUVAGMIH.js +1 -0
  71. package/dist/chunk-JXW374CL.js +359 -0
  72. package/dist/chunk-K2WUCOQJ.js +32 -0
  73. package/dist/chunk-K6CTUBFC.js +12 -0
  74. package/dist/chunk-KHSYW7I4.js +1 -0
  75. package/dist/chunk-KHTV6PBV.js +12 -0
  76. package/dist/chunk-KKTW6ZCA.js +5 -0
  77. package/dist/chunk-KLMDWDT2.js +1 -0
  78. package/dist/chunk-KN3WTTHZ.js +1 -0
  79. package/dist/chunk-KR6QDE7D.js +2 -0
  80. package/dist/chunk-KZOBF55B.js +1 -0
  81. package/dist/chunk-L2MGAEV3.js +6 -0
  82. package/dist/chunk-LDGAHMS7.js +159 -0
  83. package/dist/chunk-M2D7USAX.js +1 -0
  84. package/dist/chunk-M2ZHFKPN.js +6 -0
  85. package/dist/chunk-M3RYUB22.js +1 -0
  86. package/dist/chunk-M56NDIMD.js +1 -0
  87. package/dist/chunk-MCVRONUY.js +1 -0
  88. package/dist/chunk-MHWV5RQV.js +10 -0
  89. package/dist/chunk-MOA33ZFO.js +1 -0
  90. package/dist/chunk-MWGBTOO3.js +1 -0
  91. package/dist/chunk-MWY3A7O3.js +4 -0
  92. package/dist/chunk-N5PQPIBF.js +374 -0
  93. package/dist/chunk-NF2ABOOU.js +1 -0
  94. package/dist/chunk-NMBBTTIH.js +2 -0
  95. package/dist/chunk-NPEVESCV.js +3 -0
  96. package/dist/chunk-OBEWZXOQ.js +2 -0
  97. package/dist/chunk-OCOY5MV2.js +1 -0
  98. package/dist/chunk-OLZHWPZP.js +1 -0
  99. package/dist/chunk-OTY24J2W.js +1 -0
  100. package/dist/chunk-OY3PNHPZ.js +103 -0
  101. package/dist/chunk-P6XE4MH5.js +1 -0
  102. package/dist/chunk-PAP22IQO.js +264 -0
  103. package/dist/chunk-PD5ZHJWI.js +1 -0
  104. package/dist/chunk-PIBY5DDZ.js +1 -0
  105. package/dist/chunk-PYVAWAUO.js +5 -0
  106. package/dist/chunk-Q33IBIVJ.js +1 -0
  107. package/dist/chunk-Q4T2T2QE.js +15 -0
  108. package/dist/chunk-QA23HIH4.js +1 -0
  109. package/dist/chunk-QBSKKQBN.js +1 -0
  110. package/dist/chunk-QFWIDATO.js +1 -0
  111. package/dist/chunk-QSTEVZFQ.js +1 -0
  112. package/dist/chunk-S6EJHWJL.js +1 -0
  113. package/dist/chunk-SIMFNECG.js +1 -0
  114. package/dist/chunk-SXTMSGUE.js +1 -0
  115. package/dist/chunk-T542UQBY.js +1 -0
  116. package/dist/chunk-TQ6HYDVC.js +1 -0
  117. package/dist/chunk-TYZXGSHO.js +3 -0
  118. package/dist/chunk-UHJYPEY2.js +1 -0
  119. package/dist/chunk-UJVH7FZS.js +1 -0
  120. package/dist/chunk-UJXUSRQK.js +1 -0
  121. package/dist/chunk-ULFWK45W.js +64 -0
  122. package/dist/chunk-ULQG3XQS.js +1 -0
  123. package/dist/chunk-URZPVSJZ.js +559 -0
  124. package/dist/chunk-UWJ73J4B.js +1 -0
  125. package/dist/chunk-UXVZ2P63.js +1411 -0
  126. package/dist/chunk-UYXEA3Y6.js +1 -0
  127. package/dist/chunk-VBUZWRUL.js +1 -0
  128. package/dist/chunk-VICYNG2W.js +1 -0
  129. package/dist/chunk-WDC3KIZT.js +2 -0
  130. package/dist/chunk-WFXRSKRK.js +1 -0
  131. package/dist/chunk-WSDN25F5.js +1 -0
  132. package/dist/chunk-XEFQQPL4.js +1 -0
  133. package/dist/chunk-XITQULK4.js +3 -0
  134. package/dist/chunk-XONFGLJQ.js +847 -0
  135. package/dist/chunk-XOTA6JTZ.js +11 -0
  136. package/dist/chunk-XR6GMMEU.js +1 -0
  137. package/dist/chunk-XULPJ6UG.js +1 -0
  138. package/dist/chunk-XXVEHDVO.js +1 -0
  139. package/dist/chunk-Y7JGYGV7.js +1 -0
  140. package/dist/chunk-YOZNRLFC.js +1 -0
  141. package/dist/chunk-YTNDFQJT.js +3 -0
  142. package/dist/chunk-Z35BTAM6.js +2 -0
  143. package/dist/chunk-ZBRRJDGW.js +1 -0
  144. package/dist/chunk-ZGK3LGCH.js +4 -0
  145. package/dist/chunk-ZR76GGZ6.js +5 -0
  146. package/dist/chunk-ZSBA6VIC.js +1 -0
  147. package/dist/chunk-ZTMSBSYD.js +1 -0
  148. package/dist/cli/commands/app/app-logs/sources.js +2 -0
  149. package/dist/cli/commands/app/build.js +1 -0
  150. package/dist/cli/commands/app/bulk/cancel.js +1 -0
  151. package/dist/cli/commands/app/bulk/execute.js +9 -0
  152. package/dist/cli/commands/app/bulk/status.js +5 -0
  153. package/dist/cli/commands/app/config/link.js +4 -0
  154. package/dist/cli/commands/app/config/pull.js +1 -0
  155. package/dist/cli/commands/app/config/use.js +1 -0
  156. package/dist/cli/commands/app/config/validate.js +3 -0
  157. package/dist/cli/commands/app/demo/watcher.js +1 -0
  158. package/dist/cli/commands/app/deploy.js +22 -0
  159. package/dist/cli/commands/app/dev/clean.js +5 -0
  160. package/dist/cli/commands/app/dev.js +320 -0
  161. package/dist/cli/commands/app/env/pull.js +11 -0
  162. package/dist/cli/commands/app/env/show.js +1 -0
  163. package/dist/cli/commands/app/execute.js +1 -0
  164. package/dist/cli/commands/app/function/build.js +1 -0
  165. package/dist/cli/commands/app/function/info.js +16 -0
  166. package/dist/cli/commands/app/function/replay.js +5 -0
  167. package/dist/cli/commands/app/function/run.js +1 -0
  168. package/dist/cli/commands/app/function/schema.js +1 -0
  169. package/dist/cli/commands/app/function/typegen.js +1 -0
  170. package/dist/cli/commands/app/generate/extension.js +5 -0
  171. package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
  172. package/dist/cli/commands/app/import-extensions.js +1 -0
  173. package/dist/cli/commands/app/info.js +11 -0
  174. package/dist/cli/commands/app/init.js +10 -0
  175. package/dist/cli/commands/app/logs.js +2 -0
  176. package/dist/cli/commands/app/release.js +4 -0
  177. package/dist/cli/commands/app/versions/list.js +1 -0
  178. package/dist/cli/commands/app/webhook/trigger.js +25 -0
  179. package/dist/cli/commands/auth/login.js +1 -20
  180. package/dist/cli/commands/auth/logout.js +1 -12
  181. package/dist/cli/commands/cache/clear.js +1 -11
  182. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
  183. package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
  184. package/dist/cli/commands/config/autoupgrade/off.js +1 -22
  185. package/dist/cli/commands/config/autoupgrade/on.js +1 -22
  186. package/dist/cli/commands/config/autoupgrade/status.js +1 -30
  187. package/dist/cli/commands/debug/command-flags.js +1 -79
  188. package/dist/cli/commands/docs/generate.d.ts +0 -8
  189. package/dist/cli/commands/docs/generate.js +1 -157
  190. package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
  191. package/dist/cli/commands/doctor-release/theme/index.js +1 -56
  192. package/dist/cli/commands/help.js +1 -26
  193. package/dist/cli/commands/kitchen-sink/async.js +1 -16
  194. package/dist/cli/commands/kitchen-sink/index.js +1 -21
  195. package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
  196. package/dist/cli/commands/kitchen-sink/static.js +1 -16
  197. package/dist/cli/commands/notifications/generate.js +1 -11
  198. package/dist/cli/commands/notifications/list.js +1 -33
  199. package/dist/cli/commands/organization/list.js +1 -0
  200. package/dist/cli/commands/search.js +1 -27
  201. package/dist/cli/commands/theme/check.js +1 -0
  202. package/dist/cli/commands/theme/console.js +15 -0
  203. package/dist/cli/commands/theme/delete.js +7 -0
  204. package/dist/cli/commands/theme/dev.js +26 -0
  205. package/dist/cli/commands/theme/duplicate.js +32 -0
  206. package/dist/cli/commands/theme/info.js +1 -0
  207. package/dist/cli/commands/theme/init.js +8 -0
  208. package/dist/cli/commands/theme/language-server.js +1 -0
  209. package/dist/cli/commands/theme/list.js +1 -0
  210. package/dist/cli/commands/theme/metafields/pull.js +3 -0
  211. package/dist/cli/commands/theme/open.js +8 -0
  212. package/dist/cli/commands/theme/package.js +7 -0
  213. package/dist/cli/commands/theme/preview.js +1 -0
  214. package/dist/cli/commands/theme/profile.js +3 -0
  215. package/dist/cli/commands/theme/publish.js +7 -0
  216. package/dist/cli/commands/theme/pull.js +3 -0
  217. package/dist/cli/commands/theme/push.js +28 -0
  218. package/dist/cli/commands/theme/rename.js +6 -0
  219. package/dist/cli/commands/theme/share.js +3 -0
  220. package/dist/cli/commands/upgrade.js +1 -17
  221. package/dist/cli/commands/version.js +1 -10
  222. package/dist/command-registry.d.ts +8 -0
  223. package/dist/command-registry.js +1 -0
  224. package/dist/conf-store-BMZFATRQ.js +1 -0
  225. package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
  226. package/dist/deprecations-7LHRXPXU.js +1 -0
  227. package/dist/dist-LDXPBYSZ.js +1 -0
  228. package/dist/dist-V63ILV6L.js +1 -0
  229. package/dist/environments-5X7S2O5U.js +1 -0
  230. package/dist/error-ZRLNNGIQ.js +1 -0
  231. package/dist/error-handler-PRZFHPRG.js +1 -0
  232. package/dist/fs-H7V6IRSH.js +1 -0
  233. package/dist/hooks/app-init.d.ts +9 -0
  234. package/dist/hooks/app-init.js +1 -0
  235. package/dist/hooks/did-you-mean.d.ts +1 -0
  236. package/dist/hooks/did-you-mean.js +1 -0
  237. package/dist/hooks/hydrogen-init.d.ts +7 -0
  238. package/dist/hooks/hydrogen-init.js +1 -0
  239. package/dist/hooks/plugin-plugins.d.ts +1 -0
  240. package/dist/hooks/plugin-plugins.js +1 -0
  241. package/dist/hooks/postrun.js +1 -1
  242. package/dist/hooks/prerun.js +1 -1
  243. package/dist/hooks/public-metadata.d.ts +1 -0
  244. package/dist/hooks/public-metadata.js +1 -0
  245. package/dist/hooks/sensitive-metadata.d.ts +1 -0
  246. package/dist/hooks/sensitive-metadata.js +1 -0
  247. package/dist/hooks/tunnel-provider.d.ts +1 -0
  248. package/dist/hooks/tunnel-provider.js +1 -0
  249. package/dist/hooks/tunnel-start.d.ts +1 -0
  250. package/dist/hooks/tunnel-start.js +1 -0
  251. package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
  252. package/dist/index.js +254 -3668
  253. package/dist/is-global-IOWPCT2U.js +1 -0
  254. package/dist/latest-version-EFWBOTWM.js +49 -0
  255. package/dist/lib-5L7UKDEK.js +1 -0
  256. package/dist/lib-C3VO2BQW.js +1 -0
  257. package/dist/lib-QB6I6CTC.js +1 -0
  258. package/dist/local-MTKXSZ3I.js +1 -0
  259. package/dist/local-storage-CYEL4MXF.js +1 -0
  260. package/dist/metadata-NOVBMKLM.js +1 -0
  261. package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
  262. package/dist/node-package-manager-N5CVNHA3.js +1 -0
  263. package/dist/notifications-system-YX2GPLDW.js +1 -0
  264. package/dist/npa-ICFSA3NL.js +1 -0
  265. package/dist/output-Q46DT46U.js +1 -0
  266. package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
  267. package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
  268. package/dist/system-E6Q3OBX3.js +1 -0
  269. package/dist/tsconfig.tsbuildinfo +1 -1
  270. package/dist/typescript-K5CWIA4V.js +1 -0
  271. package/dist/ui-WRS2IDPP.js +1 -0
  272. package/dist/upgrade-TKUN2M5P.js +1 -0
  273. package/dist/version-5W5RVAPA.js +1 -0
  274. package/dist/version-BQJ3FPXD.js +1 -0
  275. package/dist/workerd-GOK6GWEX.js +18 -0
  276. package/oclif.manifest.json +5136 -5945
  277. package/package.json +17 -41
  278. package/dist/chunk-45T5XUIM.js +0 -1
  279. package/dist/chunk-52KHWFYF.js +0 -1
  280. package/dist/chunk-66TIGB4U.js +0 -415
  281. package/dist/chunk-675GKVCB.js +0 -3
  282. package/dist/chunk-7ES6PV7M.js +0 -847
  283. package/dist/chunk-BF7JM4FH.js +0 -396
  284. package/dist/chunk-FU2Y2M3M.js +0 -5
  285. package/dist/chunk-IDQ4X47Z.js +0 -3
  286. package/dist/chunk-JBSYWYIP.js +0 -2
  287. package/dist/chunk-PBKIXB7L.js +0 -63
  288. package/dist/chunk-SVA22NZQ.js +0 -607
  289. package/dist/error-handler-LC7FITE7.js +0 -1
  290. package/dist/http-proxy-node16-TTURN6MD.js +0 -38
  291. package/dist/lib-3WHF5XD3.js +0 -1
  292. package/dist/local-TWIGLQ7X.js +0 -1
  293. package/dist/node-package-manager-3UCLJPGW.js +0 -1
  294. package/dist/npa-OKDXXRCU.js +0 -1
  295. package/dist/ui-UYE67X4Y.js +0 -1
  296. package/dist/workerd-37BZZEVW.js +0 -18
  297. /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
@@ -0,0 +1 @@
1
+ import{c as p,g as o}from"./chunk-VPRTJUIN.js";var P=p((Ji,he)=>{"use strict";o();var tt="2.0.0",st=Number.MAX_SAFE_INTEGER||9007199254740991,it=16,nt=250,ot=["major","premajor","minor","preminor","patch","prepatch","prerelease"];he.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:it,MAX_SAFE_BUILD_LENGTH:nt,MAX_SAFE_INTEGER:st,RELEASE_TYPES:ot,SEMVER_SPEC_VERSION:tt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=p((en,pe)=>{"use strict";o();var ct=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};pe.exports=ct});var g=p((q,Re)=>{"use strict";o();var{MAX_SAFE_COMPONENT_LENGTH:W,MAX_SAFE_BUILD_LENGTH:lt,MAX_LENGTH:at}=P(),ut=v();q=Re.exports={};var Et=q.re=[],ft=q.safeRe=[],l=q.src=[],ht=q.safeSrc=[],a=q.t={},pt=0,z="[a-zA-Z0-9-]",Rt=[["\\s",1],["\\d",at],[z,lt]],$t=t=>{for(let[e,r]of Rt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let s=$t(e),i=pt++;ut(t,i,e),a[t]=i,l[i]=e,ht[i]=s,Et[i]=new RegExp(e,r?"g":void 0),ft[i]=new RegExp(s,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${z}*`);R("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${z}+`);R("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);R("FULL",`^${l[a.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);R("LOOSE",`^${l[a.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);R("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${W}})(?:\\.(\\d{1,${W}}))?(?:\\.(\\d{1,${W}}))?`);R("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",l[a.COERCE],!0);R("COERCERTLFULL",l[a.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);q.tildeTrimReplace="$1~";R("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);q.caretTrimReplace="$1^";R("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var F=p((sn,$e)=>{"use strict";o();var mt=Object.freeze({loose:!0}),It=Object.freeze({}),Lt=t=>t?typeof t!="object"?mt:t:It;$e.exports=Lt});var K=p((on,Le)=>{"use strict";o();var me=/^[0-9]+$/,Ie=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=me.test(t),s=me.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Nt=(t,e)=>Ie(e,t);Le.exports={compareIdentifiers:Ie,rcompareIdentifiers:Nt}});var N=p((ln,Oe)=>{"use strict";o();var j=v(),{MAX_LENGTH:Ne,MAX_SAFE_INTEGER:X}=P(),{safeRe:U,t:V}=g(),Ot=F(),{compareIdentifiers:Z}=K(),J=class t{constructor(e,r){if(r=Ot(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ne)throw new TypeError(`version is longer than ${Ne} characters`);j("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?U[V.LOOSE]:U[V.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<X)return n}return i}):this.prerelease=[],this.build=s[5]?s[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(j("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(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?1:0}comparePre(e){if(e instanceof t||(e=new t(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 r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(j("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Z(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(j("build compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Z(s,i)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?U[V.PRERELEASELOOSE]:U[V.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new 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 i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let n=[r,i];s===!1&&(n=[r]),Z(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=J});var w=p((un,de)=>{"use strict";o();var Se=N(),St=(t,e,r=!1)=>{if(t instanceof Se)return t;try{return new Se(t,e)}catch(s){if(!r)return null;throw s}};de.exports=St});var Te=p((fn,Ae)=>{"use strict";o();var dt=w(),At=(t,e)=>{let r=dt(t,e);return r?r.version:null};Ae.exports=At});var we=p((pn,qe)=>{"use strict";o();var Tt=w(),qt=(t,e)=>{let r=Tt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=qt});var ve=p(($n,Pe)=>{"use strict";o();var ge=N(),wt=(t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,i).version}catch{return null}};Pe.exports=wt});var De=p((In,Ce)=>{"use strict";o();var xe=w(),gt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,c=n?r:s,u=n?s:r,E=!!c.prerelease.length;if(!!u.prerelease.length&&!E){if(!u.patch&&!u.minor)return"major";if(u.compareMain(c)===0)return u.minor&&!u.patch?"minor":"patch"}let m=E?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Ce.exports=gt});var ye=p((Nn,Ge)=>{"use strict";o();var Pt=N(),vt=(t,e)=>new Pt(t,e).major;Ge.exports=vt});var je=p((Sn,Fe)=>{"use strict";o();var xt=N(),Ct=(t,e)=>new xt(t,e).minor;Fe.exports=Ct});var Ue=p((An,Xe)=>{"use strict";o();var Dt=N(),Gt=(t,e)=>new Dt(t,e).patch;Xe.exports=Gt});var _e=p((qn,Ve)=>{"use strict";o();var yt=w(),Ft=(t,e)=>{let r=yt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Ft});var A=p((gn,be)=>{"use strict";o();var He=N(),jt=(t,e,r)=>new He(t,r).compare(new He(e,r));be.exports=jt});var Me=p((vn,ke)=>{"use strict";o();var Xt=A(),Ut=(t,e,r)=>Xt(e,t,r);ke.exports=Ut});var Be=p((Cn,Ye)=>{"use strict";o();var Vt=A(),_t=(t,e)=>Vt(t,e,!0);Ye.exports=_t});var _=p((Gn,ze)=>{"use strict";o();var We=N(),Ht=(t,e,r)=>{let s=new We(t,r),i=new We(e,r);return s.compare(i)||s.compareBuild(i)};ze.exports=Ht});var Ze=p((Fn,Ke)=>{"use strict";o();var bt=_(),kt=(t,e)=>t.sort((r,s)=>bt(r,s,e));Ke.exports=kt});var Qe=p((Xn,Je)=>{"use strict";o();var Mt=_(),Yt=(t,e)=>t.sort((r,s)=>Mt(s,r,e));Je.exports=Yt});var x=p((Vn,er)=>{"use strict";o();var Bt=A(),Wt=(t,e,r)=>Bt(t,e,r)>0;er.exports=Wt});var H=p((Hn,rr)=>{"use strict";o();var zt=A(),Kt=(t,e,r)=>zt(t,e,r)<0;rr.exports=Kt});var Q=p((kn,tr)=>{"use strict";o();var Zt=A(),Jt=(t,e,r)=>Zt(t,e,r)===0;tr.exports=Jt});var ee=p((Yn,sr)=>{"use strict";o();var Qt=A(),es=(t,e,r)=>Qt(t,e,r)!==0;sr.exports=es});var b=p((Wn,ir)=>{"use strict";o();var rs=A(),ts=(t,e,r)=>rs(t,e,r)>=0;ir.exports=ts});var k=p((Kn,nr)=>{"use strict";o();var ss=A(),is=(t,e,r)=>ss(t,e,r)<=0;nr.exports=is});var re=p((Jn,or)=>{"use strict";o();var ns=Q(),os=ee(),cs=x(),ls=b(),as=H(),us=k(),Es=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ns(t,r,s);case"!=":return os(t,r,s);case">":return cs(t,r,s);case">=":return ls(t,r,s);case"<":return as(t,r,s);case"<=":return us(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=Es});var lr=p((eo,cr)=>{"use strict";o();var fs=N(),hs=w(),{safeRe:M,t:Y}=g(),ps=(t,e)=>{if(t instanceof fs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?M[Y.COERCEFULL]:M[Y.COERCE]);else{let E=e.includePrerelease?M[Y.COERCERTLFULL]:M[Y.COERCERTL],$;for(;($=E.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||$.index+$[0].length!==r.index+r[0].length)&&(r=$),E.lastIndex=$.index+$[1].length+$[2].length;E.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hs(`${s}.${i}.${n}${c}${u}`,e)};cr.exports=ps});var ur=p((to,ar)=>{"use strict";o();var te=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};ar.exports=te});var T=p((io,pr)=>{"use strict";o();var Rs=/\s+/g,se=class t{constructor(e,r){if(r=ms(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ie)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Rs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!fr(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&As(i[0])){this.set=[i];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 r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Ss)|(this.options.loose&&ds))+":"+e,i=Er.get(s);if(i)return i;let n=this.options.loose,c=n?S[O.HYPHENRANGELOOSE]:S[O.HYPHENRANGE];e=e.replace(c,Gs(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace(S[O.COMPARATORTRIM],Ls),I("comparator trim",e),e=e.replace(S[O.TILDETRIM],Ns),I("tilde trim",e),e=e.replace(S[O.CARETTRIM],Os),I("caret trim",e);let u=e.split(" ").map(f=>Ts(f,this.options)).join(" ").split(/\s+/).map(f=>Ds(f,this.options));n&&(u=u.filter(f=>(I("loose invalid filter",f,this.options),!!f.match(S[O.COMPARATORLOOSE])))),I("range list",u);let E=new Map,$=u.map(f=>new ie(f,this.options));for(let f of $){if(fr(f))return[f];E.set(f.value,f)}E.size>1&&E.has("")&&E.delete("");let m=[...E.values()];return Er.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>hr(s,r)&&e.set.some(i=>hr(i,r)&&s.every(n=>i.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Is(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(ys(this.set[r],e,this.options))return!0;return!1}};pr.exports=se;var $s=ur(),Er=new $s,ms=F(),ie=C(),I=v(),Is=N(),{safeRe:S,t:O,comparatorTrimReplace:Ls,tildeTrimReplace:Ns,caretTrimReplace:Os}=g(),{FLAG_INCLUDE_PRERELEASE:Ss,FLAG_LOOSE:ds}=P(),fr=t=>t.value==="<0.0.0-0",As=t=>t.value==="",hr=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},Ts=(t,e)=>(t=t.replace(S[O.BUILD],""),I("comp",t,e),t=gs(t,e),I("caret",t),t=qs(t,e),I("tildes",t),t=vs(t,e),I("xrange",t),t=Cs(t,e),I("stars",t),t),d=t=>!t||t.toLowerCase()==="x"||t==="*",qs=(t,e)=>t.trim().split(/\s+/).map(r=>ws(r,e)).join(" "),ws=(t,e)=>{let r=e.loose?S[O.TILDELOOSE]:S[O.TILDE];return t.replace(r,(s,i,n,c,u)=>{I("tilde",t,s,i,n,c,u);let E;return d(i)?E="":d(n)?E=`>=${i}.0.0 <${+i+1}.0.0-0`:d(c)?E=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:u?(I("replaceTilde pr",u),E=`>=${i}.${n}.${c}-${u} <${i}.${+n+1}.0-0`):E=`>=${i}.${n}.${c} <${i}.${+n+1}.0-0`,I("tilde return",E),E})},gs=(t,e)=>t.trim().split(/\s+/).map(r=>Ps(r,e)).join(" "),Ps=(t,e)=>{I("caret",t,e);let r=e.loose?S[O.CARETLOOSE]:S[O.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,c,u,E)=>{I("caret",t,i,n,c,u,E);let $;return d(n)?$="":d(c)?$=`>=${n}.0.0${s} <${+n+1}.0.0-0`:d(u)?n==="0"?$=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:$=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:E?(I("replaceCaret pr",E),n==="0"?c==="0"?$=`>=${n}.${c}.${u}-${E} <${n}.${c}.${+u+1}-0`:$=`>=${n}.${c}.${u}-${E} <${n}.${+c+1}.0-0`:$=`>=${n}.${c}.${u}-${E} <${+n+1}.0.0-0`):(I("no pr"),n==="0"?c==="0"?$=`>=${n}.${c}.${u}${s} <${n}.${c}.${+u+1}-0`:$=`>=${n}.${c}.${u}${s} <${n}.${+c+1}.0-0`:$=`>=${n}.${c}.${u} <${+n+1}.0.0-0`),I("caret return",$),$})},vs=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>xs(r,e)).join(" ")),xs=(t,e)=>{t=t.trim();let r=e.loose?S[O.XRANGELOOSE]:S[O.XRANGE];return t.replace(r,(s,i,n,c,u,E)=>{I("xRange",t,s,i,n,c,u,E);let $=d(n),m=$||d(c),f=m||d(u),L=f;return i==="="&&L&&(i=""),E=e.includePrerelease?"-0":"",$?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&L?(m&&(c=0),u=0,i===">"?(i=">=",m?(n=+n+1,c=0,u=0):(c=+c+1,u=0)):i==="<="&&(i="<",m?n=+n+1:c=+c+1),i==="<"&&(E="-0"),s=`${i+n}.${c}.${u}${E}`):m?s=`>=${n}.0.0${E} <${+n+1}.0.0-0`:f&&(s=`>=${n}.${c}.0${E} <${n}.${+c+1}.0-0`),I("xRange return",s),s})},Cs=(t,e)=>(I("replaceStars",t,e),t.trim().replace(S[O.STAR],"")),Ds=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?O.GTE0PRE:O.GTE0],"")),Gs=t=>(e,r,s,i,n,c,u,E,$,m,f,L)=>(d(s)?r="":d(i)?r=`>=${s}.0.0${t?"-0":""}`:d(n)?r=`>=${s}.${i}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,d($)?E="":d(m)?E=`<${+$+1}.0.0-0`:d(f)?E=`<${$}.${+m+1}.0-0`:L?E=`<=${$}.${m}.${f}-${L}`:t?E=`<${$}.${m}.${+f+1}-0`:E=`<=${E}`,`${r} ${E}`.trim()),ys=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==ie.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var C=p((oo,Nr)=>{"use strict";o();var D=Symbol("SemVer ANY"),ce=class t{static get ANY(){return D}constructor(e,r){if(r=Rr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),oe("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,oe("comp",this)}parse(e){let r=this.options.loose?$r[mr.COMPARATORLOOSE]:$r[mr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ir(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(oe("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Ir(e,this.options)}catch{return!1}return ne(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Lr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Lr(this.value,r).test(e.semver):(r=Rr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.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("=")||ne(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ne(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nr.exports=ce;var Rr=F(),{safeRe:$r,t:mr}=g(),ne=re(),oe=v(),Ir=N(),Lr=T()});var G=p((lo,Or)=>{"use strict";o();var Fs=T(),js=(t,e,r)=>{try{e=new Fs(e,r)}catch{return!1}return e.test(t)};Or.exports=js});var dr=p((uo,Sr)=>{"use strict";o();var Xs=T(),Us=(t,e)=>new Xs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Sr.exports=Us});var Tr=p((fo,Ar)=>{"use strict";o();var Vs=N(),_s=T(),Hs=(t,e,r)=>{let s=null,i=null,n=null;try{n=new _s(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||i.compare(c)===-1)&&(s=c,i=new Vs(s,r))}),s};Ar.exports=Hs});var wr=p((po,qr)=>{"use strict";o();var bs=N(),ks=T(),Ms=(t,e,r)=>{let s=null,i=null,n=null;try{n=new ks(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||i.compare(c)===1)&&(s=c,i=new bs(s,r))}),s};qr.exports=Ms});var vr=p(($o,Pr)=>{"use strict";o();var le=N(),Ys=T(),gr=x(),Bs=(t,e)=>{t=new Ys(t,e);let r=new le("0.0.0");if(t.test(r)||(r=new le("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(c=>{let u=new le(c.semver.version);switch(c.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!n||gr(u,n))&&(n=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||gr(r,n))&&(r=n)}return r&&t.test(r)?r:null};Pr.exports=Bs});var Cr=p((Io,xr)=>{"use strict";o();var Ws=T(),zs=(t,e)=>{try{return new Ws(t,e).range||"*"}catch{return null}};xr.exports=zs});var B=p((No,Fr)=>{"use strict";o();var Ks=N(),yr=C(),{ANY:Zs}=yr,Js=T(),Qs=G(),Dr=x(),Gr=H(),ei=k(),ri=b(),ti=(t,e,r,s)=>{t=new Ks(t,s),e=new Js(e,s);let i,n,c,u,E;switch(r){case">":i=Dr,n=ei,c=Gr,u=">",E=">=";break;case"<":i=Gr,n=ri,c=Dr,u="<",E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qs(t,e,s))return!1;for(let $=0;$<e.set.length;++$){let m=e.set[$],f=null,L=null;if(m.forEach(h=>{h.semver===Zs&&(h=new yr(">=0.0.0")),f=f||h,L=L||h,i(h.semver,f.semver,s)?f=h:c(h.semver,L.semver,s)&&(L=h)}),f.operator===u||f.operator===E||(!L.operator||L.operator===u)&&n(t,L.semver))return!1;if(L.operator===E&&c(t,L.semver))return!1}return!0};Fr.exports=ti});var Xr=p((So,jr)=>{"use strict";o();var si=B(),ii=(t,e,r)=>si(t,e,">",r);jr.exports=ii});var Vr=p((To,Ur)=>{"use strict";o();var ni=B(),oi=(t,e,r)=>ni(t,e,"<",r);Ur.exports=oi});var br=p((wo,Hr)=>{"use strict";o();var _r=T(),ci=(t,e,r)=>(t=new _r(t,r),e=new _r(e,r),t.intersects(e,r));Hr.exports=ci});var Mr=p((Po,kr)=>{"use strict";o();var li=G(),ai=A();kr.exports=(t,e,r)=>{let s=[],i=null,n=null,c=t.sort((m,f)=>ai(m,f,r));for(let m of c)li(m,e,r)?(n=m,i||(i=m)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let u=[];for(let[m,f]of s)m===f?u.push(m):!f&&m===c[0]?u.push("*"):f?m===c[0]?u.push(`<=${f}`):u.push(`${m} - ${f}`):u.push(`>=${m}`);let E=u.join(" || "),$=typeof e.raw=="string"?e.raw:String(e);return E.length<$.length?E:e}});var Zr=p((xo,Kr)=>{"use strict";o();var Yr=T(),ue=C(),{ANY:ae}=ue,y=G(),Ee=A(),ui=(t,e,r={})=>{if(t===e)return!0;t=new Yr(t,r),e=new Yr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let c=fi(i,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},Ei=[new ue(">=0.0.0-0")],Br=[new ue(">=0.0.0")],fi=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ae){if(e.length===1&&e[0].semver===ae)return!0;r.includePrerelease?t=Ei:t=Br}if(e.length===1&&e[0].semver===ae){if(r.includePrerelease)return!0;e=Br}let s=new Set,i,n;for(let h of t)h.operator===">"||h.operator===">="?i=Wr(i,h,r):h.operator==="<"||h.operator==="<="?n=zr(n,h,r):s.add(h.semver);if(s.size>1)return null;let c;if(i&&n){if(c=Ee(i.semver,n.semver,r),c>0)return null;if(c===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let h of s){if(i&&!y(h,String(i),r)||n&&!y(h,String(n),r))return null;for(let rt of e)if(!y(h,String(rt),r))return!1;return!0}let u,E,$,m,f=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,L=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",$=$||h.operator==="<"||h.operator==="<=",i){if(L&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===L.major&&h.semver.minor===L.minor&&h.semver.patch===L.patch&&(L=!1),h.operator===">"||h.operator===">="){if(u=Wr(i,h,r),u===h&&u!==i)return!1}else if(i.operator===">="&&!y(i.semver,String(h),r))return!1}if(n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator==="<"||h.operator==="<="){if(E=zr(n,h,r),E===h&&E!==n)return!1}else if(n.operator==="<="&&!y(n.semver,String(h),r))return!1}if(!h.operator&&(n||i)&&c!==0)return!1}return!(i&&$&&!n&&c!==0||n&&m&&!i&&c!==0||L||f)},Wr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},zr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Kr.exports=ui});var Zi=p((Do,et)=>{"use strict";o();var fe=g(),Jr=P(),hi=N(),Qr=K(),pi=w(),Ri=Te(),$i=we(),mi=ve(),Ii=De(),Li=ye(),Ni=je(),Oi=Ue(),Si=_e(),di=A(),Ai=Me(),Ti=Be(),qi=_(),wi=Ze(),gi=Qe(),Pi=x(),vi=H(),xi=Q(),Ci=ee(),Di=b(),Gi=k(),yi=re(),Fi=lr(),ji=C(),Xi=T(),Ui=G(),Vi=dr(),_i=Tr(),Hi=wr(),bi=vr(),ki=Cr(),Mi=B(),Yi=Xr(),Bi=Vr(),Wi=br(),zi=Mr(),Ki=Zr();et.exports={parse:pi,valid:Ri,clean:$i,inc:mi,diff:Ii,major:Li,minor:Ni,patch:Oi,prerelease:Si,compare:di,rcompare:Ai,compareLoose:Ti,compareBuild:qi,sort:wi,rsort:gi,gt:Pi,lt:vi,eq:xi,neq:Ci,gte:Di,lte:Gi,cmp:yi,coerce:Fi,Comparator:ji,Range:Xi,satisfies:Ui,toComparators:Vi,maxSatisfying:_i,minSatisfying:Hi,minVersion:bi,validRange:ki,outside:Mi,gtr:Yi,ltr:Bi,intersects:Wi,simplifyRange:zi,subset:Ki,SemVer:hi,re:fe.re,src:fe.src,tokens:fe.t,SEMVER_SPEC_VERSION:Jr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Jr.RELEASE_TYPES,compareIdentifiers:Qr.compareIdentifiers,rcompareIdentifiers:Qr.rcompareIdentifiers}});export{Zi as a};
@@ -0,0 +1,2 @@
1
+ import{g as c}from"./chunk-VPRTJUIN.js";c();c();c();var j=/^[A-Za-z]:\//;function f(e=""){return e&&e.replace(/\\/g,"/").replace(j,n=>n.toUpperCase())}var z=/^[/\\]{2}/,A=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,E=/^[A-Za-z]:$/,v=/^\/([A-Za-z]:)?$/,$="/",R=":",m=function(e){if(e.length===0)return".";e=f(e);let n=e.match(z),t=l(e),s=e[e.length-1]==="/";return e=P(e,!t),e.length===0?t?"/":s?"./":".":(s&&(e+="/"),E.test(e)&&(e+="/"),n?t?`//${e}`:`//./${e}`:t&&!l(e)?`/${e}`:e)},x=function(...e){if(e.length===0)return".";let n;for(let t of e)t&&t.length>0&&(n===void 0?n=t:n+=`/${t}`);return n===void 0?".":m(n.replace(/\/\/+/g,"/"))};function S(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var u=function(...e){e=e.map(s=>f(s));let n="",t=!1;for(let s=e.length-1;s>=-1&&!t;s--){let r=s>=0?e[s]:S();!r||r.length===0||(n=`${r}/${n}`,t=l(r))}return n=P(n,!t),t&&!l(n)?`/${n}`:n.length>0?n:"."};function P(e,n){let t="",s=0,r=-1,o=0,a=null;for(let i=0;i<=e.length;++i){if(i<e.length)a=e[i];else{if(a==="/")break;a="/"}if(a==="/"){if(!(r===i-1||o===1))if(o===2){if(t.length<2||s!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let b=t.lastIndexOf("/");b===-1?(t="",s=0):(t=t.slice(0,b),s=t.length-1-t.lastIndexOf("/")),r=i,o=0;continue}else if(t.length>0){t="",s=0,r=i,o=0;continue}}n&&(t+=t.length>0?"/..":"..",s=2)}else t.length>0?t+=`/${e.slice(r+1,i)}`:t=e.slice(r+1,i),s=i-r-1;r=i,o=0}else a==="."&&o!==-1?++o:o=-1}return t}var l=function(e){return A.test(e)};var T=/.(\.[^./]+)$/,h=function(e){let n=T.exec(f(e));return n&&n[1]||""},p=function(e,n){let t=u(e).replace(v,"$1").split("/"),s=u(n).replace(v,"$1").split("/");if(s[0][1]===":"&&t[0][1]===":"&&t[0]!==s[0])return s.join("/");let r=[...t];for(let o of r){if(s[0]!==o)break;t.shift(),s.shift()}return[...t.map(()=>".."),...s].join("/")},d=function(e){let n=f(e).replace(/\/$/,"").split("/").slice(0,-1);return n.length===1&&E.test(n[0])&&(n[0]+="/"),n.join("/")||(l(e)?"/":".")};var g=function(e,n){let t=f(e).split("/").pop();return n&&t.endsWith(n)?t.slice(0,-n.length):t},_=function(e){let n=f(e).split("/").shift()||"/",t=g(e),s=h(t);return{root:n,dir:d(e),base:t,ext:s,name:t.slice(0,t.length-s.length)}};import{fileURLToPath as I}from"url";function X(...e){return x(...e)}function G(e){return m(e)}function J(...e){return u(...e)}function M(e,n){return p(e,n)}function w(e){return l(e)}function D(e){return d(e)}function q(e,n){return g(e,n)}function H(e){return h(e)}function K(e){return _(e)}function N(e,n){let t=e.split(/\/+|\\+/),s=n.split(/\/+|\\+/),r=0;for(;r<t.length&&r<s.length&&t[r]===s[r];)r++;return r>1?t.slice(0,r).join("/"):"/"}function Q(e,n=O()){let t=N(e,n),s=p(n,e),r=s.split("/").filter(o=>o==="..").length;return t==="/"||s===""||r>2?e:s}function Y(e,n){let t=p(e,n);return!t.startsWith("..")&&!w(t)}function ee(e){return D(I(e))}function O(){return m(process.env.INIT_CWD||process.cwd())}function te(e=process.argv){let n=e.indexOf("--path");if(n===-1)return e.find(r=>r.startsWith("--path="))?.split("=")[1];let t=e[n+1];if(!(!t||t.startsWith("-")))return t}function ne(e=process.argv){return e.includes("--json")||e.includes("-j")}function se(e,n){let t=e.replace(/\\/g,"/").split("/"),s=[],r=!1;for(let a of t)a===".."?(r=!0,s.pop()):a!=="."&&s.push(a);let o=s.join("/");return r&&n(`Warning: path '${e}' contains '..' traversal \u2014 sanitized to '${o||"."}'
2
+ `),o}export{$ as a,R as b,x as c,X as d,G as e,J as f,M as g,w as h,D as i,q as j,H as k,K as l,N as m,Q as n,Y as o,ee as p,O as q,te as r,ne as s,se as t};
@@ -0,0 +1,7 @@
1
+ import{g as h}from"./chunk-VPRTJUIN.js";h();h();var Lt=String.fromCharCode;var Y=/\+/g;var Ce=/%2f/gi;function b(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function L(e){return b(e.replace(Ce,"%252F"))}function Ae(e){return b(e.replace(Y," "))}function Se(e){return b(e.replace(Y," "))}function xe(e=""){let t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(let r of e.split("&")){let n=r.match(/([^=]+)=?(.*)/)||[];if(n.length<2)continue;let o=Ae(n[1]);if(o==="__proto__"||o==="constructor")continue;let s=Se(n[2]||"");t[o]===void 0?t[o]=s:Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]}return t}var He=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Pe=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ne=/^([/\\]\s*){2,}[^/\\]/;var Oe=/\/$|\/\?|\/#/,Te=/^\.?\//;function Me(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?He.test(e):Pe.test(e)||(t.acceptRelative?Ne.test(e):!1)}function q(e="",t){return t?Oe.test(e):e.endsWith("/")}function k(e="",t){if(!t)return(q(e)?e.slice(0,-1):e)||"/";if(!q(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");o!==-1&&(r=e.slice(0,o),n=e.slice(o));let[s,...a]=r.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(a.length>0?`?${a.join("?")}`:"")+n}function qe(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(q(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");if(o!==-1&&(r=e.slice(0,o),n=e.slice(o),!r))return n;let[s,...a]=r.split("?");return s+"/"+(a.length>0?`?${a.join("?")}`:"")+n}function Le(e=""){return e.startsWith("/")}function I(e=""){return Le(e)?e:"/"+e}function X(e){return xe(C(e).search)}function ke(e){return e&&e!=="/"}function Z(e,...t){let r=e||"";for(let n of t.filter(o=>ke(o)))if(r){let o=n.replace(Te,"");r=qe(r)+o}else r=n;return r}var Ie=Symbol.for("ufo:protocolRelative");function C(e="",t){let r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){let[,d,l=""]=r;return{protocol:d.toLowerCase(),pathname:l,href:d+l,auth:"",host:"",search:"",hash:""}}if(!Me(e,{acceptRelative:!0}))return t?C(t+e):K(e);let[,n="",o,s=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",u=""]=s.match(/([^#/?]*)(.*)?/)||[];n==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:i,hash:f}=K(u);return{protocol:n.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:a,pathname:c,search:i,hash:f,[Ie]:!n}}function K(e=""){let[t="",r="",n=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:n}}h();function v(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");let r={},n=t||{},o=n.decode||je,s=0;for(;s<e.length;){let a=e.indexOf("=",s);if(a===-1)break;let u=e.indexOf(";",s);if(u===-1)u=e.length;else if(u<a){s=e.lastIndexOf(";",a-1)+1;continue}let c=e.slice(s,a).trim();if(n?.filter&&!n?.filter(c)){s=u+1;continue}if(r[c]===void 0){let i=e.slice(a+1,u).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),r[c]=De(i,o)}s=u+1}return r}function je(e){return e.includes("%")?decodeURIComponent(e):e}function De(e,t){try{return t(e)}catch{return e}}h();var y={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function re(e={}){let t={options:e,rootNode:ne(),staticRoutesMap:{}},r=n=>e.strictTrailingSlash?n:n.replace(/\/$/,"")||"/";if(e.routes)for(let n in e.routes)ee(t,r(n),e.routes[n]);return{ctx:t,lookup:n=>Be(t,r(n)),insert:(n,o)=>ee(t,r(n),o),remove:n=>Fe(t,r(n))}}function Be(e,t){let r=e.staticRoutesMap[t];if(r)return r.data;let n=t.split("/"),o={},s=!1,a=null,u=e.rootNode,c=null;for(let i=0;i<n.length;i++){let f=n[i];u.wildcardChildNode!==null&&(a=u.wildcardChildNode,c=n.slice(i).join("/"));let d=u.children.get(f);if(d===void 0){if(u&&u.placeholderChildren.length>1){let l=n.length-i;u=u.placeholderChildren.find(M=>M.maxDepth===l)||null}else u=u.placeholderChildren[0]||null;if(!u)break;u.paramName&&(o[u.paramName]=f),s=!0}else u=d}return(u===null||u.data===null)&&a!==null&&(u=a,o[u.paramName||"_"]=c,s=!0),u?s?{...u.data,params:s?o:void 0}:u.data:null}function ee(e,t,r){let n=!0,o=t.split("/"),s=e.rootNode,a=0,u=[s];for(let c of o){let i;if(i=s.children.get(c))s=i;else{let f=Ue(c);i=ne({type:f,parent:s}),s.children.set(c,i),f===y.PLACEHOLDER?(i.paramName=c==="*"?`_${a++}`:c.slice(1),s.placeholderChildren.push(i),n=!1):f===y.WILDCARD&&(s.wildcardChildNode=i,i.paramName=c.slice(3)||"_",n=!1),u.push(i),s=i}}for(let[c,i]of u.entries())i.maxDepth=Math.max(u.length-c,i.maxDepth||0);return s.data=r,n===!0&&(e.staticRoutesMap[t]=s),s}function Fe(e,t){let r=!1,n=t.split("/"),o=e.rootNode;for(let s of n)if(o=o.children.get(s),!o)return r;if(o.data){let s=n.at(-1)||"";o.data=null,Object.keys(o.children).length===0&&o.parent&&(o.parent.children.delete(s),o.parent.wildcardChildNode=null,o.parent.placeholderChildren=[]),r=!0}return r}function ne(e={}){return{type:e.type||y.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function Ue(e){return e.startsWith("**")?y.WILDCARD:e[0]===":"||e==="*"?y.PLACEHOLDER:y.NORMAL}function oe(e){let t=ae("",e.ctx.rootNode);return $e(t,e.ctx.options.strictTrailingSlash)}function $e(e,t){return{ctx:{table:e},matchAll:r=>se(r,e,t)}}function We(){return{static:new Map,wildcard:new Map,dynamic:new Map}}function se(e,t,r){r!==!0&&e.endsWith("/")&&(e=e.slice(0,-1)||"/");let n=[];for(let[s,a]of te(t.wildcard))(e===s||e.startsWith(s+"/"))&&n.push(a);for(let[s,a]of te(t.dynamic))if(e.startsWith(s+"/")){let u="/"+e.slice(s.length).split("/").splice(2).join("/");n.push(...se(u,a))}let o=t.static.get(e);return o&&n.push(o),n.filter(Boolean)}function te(e){return[...e.entries()].sort((t,r)=>t[0].length-r[0].length)}function ae(e,t){let r=We();function n(o,s){if(o){if(s.type===y.NORMAL&&!(o.includes("*")||o.includes(":")))s.data&&r.static.set(o,s.data);else if(s.type===y.WILDCARD)r.wildcard.set(o.replace("/**",""),s.data);else if(s.type===y.PLACEHOLDER){let a=ae("",s);s.data&&a.static.set("/",s.data),r.dynamic.set(o.replace(/\/\*|\/:\w+/,""),a);return}}for(let[a,u]of s.children.entries())n(`${o}/${a}`.replace("//","/"),u)}return n(e,t),r}h();function j(e){if(e===null||typeof e!="object")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 D(e,t,r=".",n){if(!j(t))return D(e,{},r,n);let o=Object.assign({},t);for(let s in e){if(s==="__proto__"||s==="constructor")continue;let a=e[s];a!=null&&(n&&n(o,s,a,r)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:j(a)&&j(o[s])?o[s]=D(a,o[s],(r?`${r}.`:"")+s.toString(),n):o[s]=a))}return o}function B(e){return(...t)=>t.reduce((r,n)=>D(r,n,"",e),{})}var ie=B(),Ut=B((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),$t=B((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});h();var ze=/"(?:_|\\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*:/,Je=/"(?: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*:/,Qe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Ve(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Ge(e);return}return t}function Ge(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ce(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);let r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Qe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(ze.test(e)||Je.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Ve)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function E(e,t){try{return t in e}catch{return!1}}var N=class extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(t,r={}){super(t,r),r.cause&&!this.cause&&(this.cause=r.cause)}toJSON(){let t={message:this.message,statusCode:_(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=O(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}};function p(e){if(typeof e=="string")return new N(e);if(Q(e))return e;let t=new N(e.message??e.statusMessage??"",{cause:e.cause||e});if(E(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=_(e.statusCode,t.statusCode):e.status&&(t.statusCode=_(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){let r=t.statusMessage;O(t.statusMessage)!==r&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function Ke(e,t,r){if(e.handled)return;let n=Q(t)?t:p(t),o={statusCode:n.statusCode,statusMessage:n.statusMessage,stack:[],data:n.data};if(r&&(o.stack=(n.stack||"").split(`
2
+ `).map(a=>a.trim())),e.handled)return;let s=Number.parseInt(n.statusCode);x(e,s,n.statusMessage),e.node.res.setHeader("content-type",S.json),e.node.res.end(JSON.stringify(o,void 0,2))}function Q(e){return e?.constructor?.__h3_error__===!0}function tr(e){return X(e.path||"")}function rr(e,t={}){let r=e.context.params||{};if(t.decode){r={...r};for(let n in r)r[n]=b(r[n])}return r}function Ye(e,t,r){if(r&&e.method==="HEAD")return!0;if(typeof t=="string"){if(e.method===t)return!0}else if(t.includes(e.method))return!0;return!1}function Xe(e,t,r){if(!Ye(e,t,r))throw p({statusCode:405,statusMessage:"HTTP method is not allowed."})}function he(e){let t={};for(let r in e.node.req.headers){let n=e.node.req.headers[r];t[r]=Array.isArray(n)?n.filter(Boolean).join(", "):n}return t}function g(e,t){return he(e)[t.toLowerCase()]}var ue=g;function nr(e,t={}){if(e.context.clientAddress)return e.context.clientAddress;if(t.xForwardedFor){let r=g(e,"x-forwarded-for")?.split(",").shift()?.trim();if(r)return r}if(e.node.req.socket.remoteAddress)return e.node.req.socket.remoteAddress}var $=Symbol.for("h3RawBody"),F=Symbol.for("h3ParsedBody"),pe=["PATCH","POST","PUT","DELETE"];function me(e,t="utf8"){Xe(e,pe);let r=e._requestBody||e.web?.request?.body||e.node.req[$]||e.node.req.rawBody||e.node.req.body;if(r){let s=Promise.resolve(r).then(a=>Buffer.isBuffer(a)?a:typeof a.pipeTo=="function"?new Promise((u,c)=>{let i=[];a.pipeTo(new WritableStream({write(f){i.push(f)},close(){u(Buffer.concat(i))},abort(f){c(f)}})).catch(c)}):typeof a.pipe=="function"?new Promise((u,c)=>{let i=[];a.on("data",f=>{i.push(f)}).on("end",()=>{u(Buffer.concat(i))}).on("error",c)}):a.constructor===Object?Buffer.from(JSON.stringify(a)):a instanceof URLSearchParams?Buffer.from(a.toString()):a instanceof FormData?new Response(a).bytes().then(u=>Buffer.from(u)):Buffer.from(a));return t?s.then(a=>a.toString(t)):s}if(!Number.parseInt(e.node.req.headers["content-length"]||"")&&!/\bchunked\b/i.test(String(e.node.req.headers["transfer-encoding"]??"")))return Promise.resolve(void 0);let n=e.node.req[$]=new Promise((s,a)=>{let u=[];e.node.req.on("error",c=>{a(c)}).on("data",c=>{u.push(c)}).on("end",()=>{s(Buffer.concat(u))})});return t?n.then(s=>s.toString(t)):n}async function or(e,t={}){let r=e.node.req;if(E(r,F))return r[F];let n=r.headers["content-type"]||"",o=await me(e),s;return n==="application/json"?s=fe(o,t.strict??!0):n.startsWith("application/x-www-form-urlencoded")?s=Ze(o):n.startsWith("text/")?s=o:s=fe(o,t.strict??!1),r[F]=s,s}function sr(e){if(!pe.includes(e.method))return;let t=e.web?.request?.body||e._requestBody;return t||($ in e.node.req||"rawBody"in e.node.req||"body"in e.node.req||"__unenv__"in e.node.req?new ReadableStream({async start(n){let o=await me(e,!1);o&&n.enqueue(o),n.close()}}):new ReadableStream({start:n=>{e.node.req.on("data",o=>{n.enqueue(o)}),e.node.req.on("end",()=>{n.close()}),e.node.req.on("error",o=>{n.error(o)})}}))}function fe(e="",t){if(e)try{return ce(e,{strict:t})}catch{throw p({statusCode:400,statusMessage:"Bad Request",message:"Invalid JSON body"})}}function Ze(e){let t=new URLSearchParams(e),r=Object.create(null);for(let[n,o]of t.entries())E(r,n)?(Array.isArray(r[n])||(r[n]=[r[n]]),r[n].push(o)):r[n]=o;return r}var S={html:"text/html",json:"application/json"},ve=/[^\u0009\u0020-\u007E]/g;function O(e=""){return e.replace(ve,"")}function _(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}function et(e){return v(e.node.req.headers.cookie||"")}function ar(e,t){return et(e)[t]}function ye(e){if(Array.isArray(e))return e.flatMap(f=>ye(f));if(typeof e!="string")return[];let t=[],r=0,n,o,s,a,u,c=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},i=()=>(o=e.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<e.length;){for(n=r,u=!1;c();)if(o=e.charAt(r),o===","){for(s=r,r+=1,c(),a=r;r<e.length&&i();)r+=1;r<e.length&&e.charAt(r)==="="?(u=!0,r=a,t.push(e.slice(n,s)),n=r):r=s+1}else r+=1;(!u||r>=e.length)&&t.push(e.slice(n))}return t}var tt=typeof setImmediate>"u"?e=>e():setImmediate;function m(e,t,r){return r&&rt(e,r),new Promise(n=>{tt(()=>{e.handled||e.node.res.end(t),n()})})}function ge(e,t){if(e.handled)return;!t&&e.node.res.statusCode!==200&&(t=e.node.res.statusCode);let r=_(t,204);r===204&&e.node.res.removeHeader("content-length"),e.node.res.writeHead(r),e.node.res.end()}function x(e,t,r){t&&(e.node.res.statusCode=_(t,e.node.res.statusCode)),r&&(e.node.res.statusMessage=O(r))}function rt(e,t){t&&e.node.res.statusCode!==304&&!e.node.res.getHeader("content-type")&&e.node.res.setHeader("content-type",t)}function ir(e,t,r=302){e.node.res.statusCode=_(r,e.node.res.statusCode),e.node.res.setHeader("location",t);let o=`<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${t.replace(/"/g,"%22")}"></head></html>`;return m(e,o,S.html)}function A(e,t){return e.node.res.getHeader(t)}function nt(e,t){for(let[r,n]of Object.entries(t))e.node.res.setHeader(r,n)}function R(e,t,r){e.node.res.setHeader(t,r)}function ot(e,t){for(let[r,n]of Object.entries(t))st(e,r,n)}var w=ot;function st(e,t,r){let n=e.node.res.getHeader(t);if(!n){e.node.res.setHeader(t,r);return}Array.isArray(n)||(n=[n.toString()]),e.node.res.setHeader(t,[...n,r])}function we(e){return!e||typeof e!="object"?!1:typeof e.pipe=="function"&&(typeof e._read=="function"||typeof e.abort=="function")||typeof e.pipeTo=="function"}function at(e){return typeof Response<"u"&&e instanceof Response}function T(e,t){if(!t||typeof t!="object")throw new Error("[h3] Invalid stream provided.");if(e.node.res._data=t,!e.node.res.socket)return e._handled=!0,Promise.resolve();if(E(t,"pipeTo")&&typeof t.pipeTo=="function")return t.pipeTo(new WritableStream({write(r){e.node.res.write(r)}})).then(()=>{e.node.res.end()});if(E(t,"pipe")&&typeof t.pipe=="function")return new Promise((r,n)=>{t.pipe(e.node.res),t.on&&(t.on("end",()=>{e.node.res.end(),r()}),t.on("error",o=>{n(o)})),e.node.res.on("close",()=>{t.abort&&t.abort()})});throw new Error("[h3] Invalid or incompatible stream provided.")}function _e(e,t){for(let[r,n]of t.headers)r==="set-cookie"?e.node.res.appendHeader(r,ye(n)):e.node.res.setHeader(r,n);if(t.status&&(e.node.res.statusCode=_(t.status,e.node.res.statusCode)),t.statusText&&(e.node.res.statusMessage=O(t.statusText)),t.redirected&&e.node.res.setHeader("location",t.url),!t.body){e.node.res.end();return}return T(e,t.body)}function it(e={}){return ie(e,{origin:"*",methods:"*",allowHeaders:"*",exposeHeaders:"*",credentials:!1,maxAge:!1,preflight:{statusCode:204}})}function ct(e){let t=g(e,"origin"),r=g(e,"access-control-request-method");return e.method==="OPTIONS"&&!!t&&!!r}function ut(e,t){let{origin:r}=t;return!e||!r||r==="*"||r==="null"?!0:Array.isArray(r)?r.some(n=>n instanceof RegExp?n.test(e):e===n):r(e)}function Re(e,t){let{origin:r}=t,n=g(e,"origin");return!n||!r||r==="*"?{"access-control-allow-origin":"*"}:typeof r=="string"?{"access-control-allow-origin":r,vary:"origin"}:ut(n,t)?{"access-control-allow-origin":n,vary:"origin"}:{}}function ft(e){let{methods:t}=e;return t?t==="*"?{"access-control-allow-methods":"*"}:t.length>0?{"access-control-allow-methods":t.join(",")}:{}:{}}function Ee(e){let{credentials:t}=e;return t?{"access-control-allow-credentials":"true"}:{}}function dt(e,t){let{allowHeaders:r}=t;if(!r||r==="*"||r.length===0){let n=g(e,"access-control-request-headers");return n?{"access-control-allow-headers":n,vary:"access-control-request-headers"}:{}}return{"access-control-allow-headers":r.join(","),vary:"access-control-request-headers"}}function be(e){let{exposeHeaders:t}=e;return t?t==="*"?{"access-control-expose-headers":t}:{"access-control-expose-headers":t.join(",")}:{}}function lt(e,t){w(e,Re(e,t)),w(e,Ee(t)),w(e,be(t)),w(e,ft(t)),w(e,dt(e,t))}function ht(e,t){w(e,Re(e,t)),w(e,Ee(t)),w(e,be(t))}function cr(e,t){let r=it(t);return ct(e)?(lt(e,t),ge(e,r.preflight.statusCode),!0):(ht(e,t),!1)}var pt=new Set(["transfer-encoding","accept-encoding","connection","keep-alive","upgrade","expect","host","accept"]);function ur(e,t){let r=Object.create(null),n=he(e);for(let o in n)(!pt.has(o)||o==="host"&&t?.host)&&(r[o]=n[o]);return r}function P(e){let t="";e.id&&(t+=`id: ${de(e.id)}
3
+ `),e.event&&(t+=`event: ${de(e.event)}
4
+ `),typeof e.retry=="number"&&Number.isInteger(e.retry)&&(t+=`retry: ${e.retry}
5
+ `);let r=typeof e.data=="string"?e.data:"";for(let n of r.split(/\r\n|\r|\n/))t+=`data: ${n}
6
+ `;return t+=`
7
+ `,t}function de(e){return e.replace(/[\n\r]/g,"")}function mt(e){let t="";for(let r of e)t+=P(r);return t}function yt(e){let t={"Content-Type":"text/event-stream","Cache-Control":"private, no-cache, no-store, no-transform, must-revalidate, max-age=0","X-Accel-Buffering":"no"};gt(e)||(t.Connection="keep-alive"),nt(e,t)}function gt(e){return ue(e,":path")!==void 0&&ue(e,":method")!==void 0}var W=class{_h3Event;_transformStream=new TransformStream;_writer;_encoder=new TextEncoder;_writerIsClosed=!1;_paused=!1;_unsentData;_disposed=!1;_handled=!1;constructor(t,r={}){this._h3Event=t,this._writer=this._transformStream.writable.getWriter(),this._writer.closed.then(()=>{this._writerIsClosed=!0}),r.autoclose!==!1&&this._h3Event.node.req.on("close",()=>this.close())}async push(t){if(typeof t=="string"){await this._sendEvent({data:t});return}if(Array.isArray(t)){if(t.length===0)return;if(typeof t[0]=="string"){let r=[];for(let n of t)r.push({data:n});await this._sendEvents(r);return}await this._sendEvents(t);return}await this._sendEvent(t)}async _sendEvent(t){if(!this._writerIsClosed){if(this._paused&&!this._unsentData){this._unsentData=P(t);return}if(this._paused){this._unsentData+=P(t);return}await this._writer.write(this._encoder.encode(P(t))).catch()}}async _sendEvents(t){if(this._writerIsClosed)return;let r=mt(t);if(this._paused&&!this._unsentData){this._unsentData=r;return}if(this._paused){this._unsentData+=r;return}await this._writer.write(this._encoder.encode(r)).catch()}pause(){this._paused=!0}get isPaused(){return this._paused}async resume(){this._paused=!1,await this.flush()}async flush(){this._writerIsClosed||this._unsentData?.length&&(await this._writer.write(this._encoder.encode(this._unsentData)),this._unsentData=void 0)}async close(){if(!this._disposed){if(!this._writerIsClosed)try{await this._writer.close()}catch{}this._h3Event._handled&&this._handled&&!this._h3Event.node.res.closed&&this._h3Event.node.res.end(),this._disposed=!0}}onClosed(t){this._writer.closed.then(t)}async send(){yt(this._h3Event),x(this._h3Event,200),this._h3Event._handled=!0,this._handled=!0,await T(this._h3Event,this._transformStream.readable)}};function fr(e,t){return new W(e,t)}async function dr(e,t){if(e.method!=="GET"&&e.method!=="HEAD"){if(!t.fallthrough)throw p({statusMessage:"Method Not Allowed",statusCode:405});return!1}let r=I(k(C(e.path).pathname));if(/(^|[\\/])(\.\.|%2e%2e|%2e\.|\.%2e)($|[\\/])/i.test(r)){if(!t.fallthrough)throw p({statusCode:404});return!1}let n=wt(g(e,"accept-encoding"),t.encodings);n.length>1&&R(e,"vary","accept-encoding");let o=r,s,a=_t(r,n,t.indexNames||["/index.html"]);for(let i of a){let f=await t.getMeta(i);if(f){s=f,o=i;break}}if(!s){if(!t.fallthrough)throw p({statusCode:404});return!1}if(s.etag&&!A(e,"etag")&&R(e,"etag",s.etag),s.etag&&g(e,"if-none-match")===s.etag)return x(e,304,"Not Modified"),m(e,"");if(s.mtime){let i=new Date(s.mtime),f=g(e,"if-modified-since");if(f&&new Date(f)>=i)return x(e,304,"Not Modified"),m(e,null);A(e,"last-modified")||R(e,"last-modified",i.toUTCString())}if(s.type&&!A(e,"content-type")&&R(e,"content-type",s.type),s.encoding&&!A(e,"content-encoding")&&R(e,"content-encoding",s.encoding),s.size!==void 0&&s.size>0&&!A(e,"content-length")&&R(e,"content-length",s.size),e.method==="HEAD")return m(e,null);let c=await t.getContents(o);return we(c)?T(e,c):m(e,c)}function wt(e,t){return!t||!e?[]:String(e||"").split(",").map(r=>t[r.trim()]).filter(Boolean)}function _t(e,t,r){let n=[];for(let o of["",...r])for(let s of[...t,""])n.push(`${e}${o}${s}`);return n}var z=class{__is_event__=!0;node;web;context={};_method;_path;_headers;_requestBody;_handled=!1;_onBeforeResponseCalled;_onAfterResponseCalled;constructor(t,r){this.node={req:t,res:r}}get method(){return this._method||(this._method=(this.node.req.method||"GET").toUpperCase()),this._method}get path(){return this._path||this.node.req.url||"/"}get headers(){return this._headers||(this._headers=Et(this.node.req.headers)),this._headers}get handled(){return this._handled||this.node.res.writableEnded||this.node.res.headersSent}respondWith(t){return Promise.resolve(t).then(r=>_e(this,r))}toString(){return`[${this.method}] ${this.path}`}toJSON(){return this.toString()}get req(){return this.node.req}get res(){return this.node.res}};function Rt(e,t){return new z(e,t)}function Et(e){let t=new Headers;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let o of n)t.append(r,o);else n&&t.set(r,n);return t}function bt(e){if(typeof e=="function")return e.__is_handler__=!0,e;let t={onRequest:le(e.onRequest),onBeforeResponse:le(e.onBeforeResponse)},r=n=>Ct(n,e.handler,t);return r.__is_handler__=!0,r.__resolve__=e.handler.__resolve__,r.__websocket__=e.websocket,r}function le(e){return e?Array.isArray(e)?e:[e]:void 0}async function Ct(e,t,r){if(r.onRequest){for(let s of r.onRequest)if(await s(e),e.handled)return}let o={body:await t(e)};if(r.onBeforeResponse)for(let s of r.onBeforeResponse)await s(e,o);return o.body}var V=bt;function At(e){return E(e,"__is_handler__")}function G(e,t,r){return e}function St(e){let t,r,n=()=>r?Promise.resolve(r):(t||(t=Promise.resolve(e()).then(s=>{let a=s.default||s;if(typeof a!="function")throw new TypeError("Invalid lazy handler result. It should be a function:",a);return r={handler:G(s.default||s)},r})),t),o=V(s=>r?r.handler(s):n().then(a=>a.handler(s)));return o.__resolve__=n,o}var xt=St,lr=globalThis.Headers,hr=globalThis.Response;function pr(e={}){let t=[],r=Ht(t,e),n=Pt(t);r.__resolve__=n;let o=Ot(()=>Mt(n,e)),s={use:(a,u,c)=>J(s,a,u,c),resolve:n,handler:r,stack:t,options:e,get websocket(){return o()}};return s}function J(e,t,r,n){if(Array.isArray(t))for(let o of t)J(e,o,r,n);else if(Array.isArray(r))for(let o of r)J(e,t,o,n);else typeof t=="string"?e.stack.push(U({...n,route:t,handler:r})):typeof t=="function"?e.stack.push(U({...r,handler:t})):e.stack.push(U({...t}));return e}function Ht(e,t){let r=t.debug?2:void 0;return V(async n=>{n.node.req.originalUrl=n.node.req.originalUrl||n.node.req.url||"/";let o=Tt(n._path||n.node.req.url||"/");n._path=o;let s;t.onRequest&&await t.onRequest(n);for(let a of e){if(a.route.length>1){if(!o.startsWith(a.route))continue;s=o.slice(a.route.length)||"/"}else s=o;if(a.match&&!a.match(s,n))continue;n._path=s,n.node.req.url=s;let u=await a.handler(n),c=u===void 0?void 0:await u;if(c!==void 0){let i={body:c};t.onBeforeResponse&&(n._onBeforeResponseCalled=!0,await t.onBeforeResponse(n,i)),await Nt(n,i.body,r),t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,i));return}if(n.handled){t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0));return}}if(!n.handled)throw p({statusCode:404,statusMessage:`Cannot find any path matching ${n.path||"/"}.`});t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0))})}function Pt(e){return async t=>{let r;for(let n of e){if(n.route==="/"&&!n.handler.__resolve__||!t.startsWith(n.route)||(r=t.slice(n.route.length)||"/",n.match&&!n.match(r,void 0)))continue;let o={route:n.route,handler:n.handler};if(o.handler.__resolve__){let s=await o.handler.__resolve__(r);if(!s)continue;o={...o,...s,route:Z(o.route||"/",s.route||"/")}}return o}}}function U(e){let t=e.handler;return t.handler&&(t=t.handler),e.lazy?t=xt(t):At(t)||(t=G(t,void 0,e.route)),{route:k(e.route),match:e.match,handler:t}}function Nt(e,t,r){if(t===null)return ge(e);if(t){if(at(t))return _e(e,t);if(we(t))return T(e,t);if(t.buffer)return m(e,t);if(t.arrayBuffer&&typeof t.arrayBuffer=="function")return t.arrayBuffer().then(o=>m(e,Buffer.from(o),t.type));if(t instanceof Error)throw p(t);if(typeof t.end=="function")return!0}let n=typeof t;if(n==="string")return m(e,t,S.html);if(n==="object"||n==="boolean"||n==="number")return m(e,JSON.stringify(t,void 0,r),S.json);if(n==="bigint")return m(e,t.toString(),S.json);throw p({statusCode:500,statusMessage:`[h3] Cannot send ${n} as response.`})}function Ot(e){let t;return()=>(t||(t=e()),t)}function Tt(e){let t=e.indexOf("?"),r=t===-1?e:e.slice(0,t),n=t===-1?"":e.slice(t);return(r.includes("%25")?L(r.replace(/%25/g,"%2525")):L(r))+n}function Mt(e,t){return{...t.websocket,async resolve(r){let n=r.request?.url||r.url||"/",{pathname:o}=typeof n=="string"?C(n):n;return(await e(o))?.handler?.__websocket__||{}}}}var qt=["connect","delete","get","head","options","post","put","trace","patch"];function mr(e={}){let t=re({}),r={},n,o={},s=(c,i,f)=>{let d=r[c];if(d||(r[c]=d={path:c,handlers:{}},t.insert(c,d)),Array.isArray(f))for(let l of f)s(c,i,l);else d.handlers[f]=G(i);return o};o.use=o.add=(c,i,f)=>s(c,i,f||"all");for(let c of qt)o[c]=(i,f)=>o.add(i,f,c);let a=(c="/",i="get")=>{let f=c.indexOf("?");f!==-1&&(c=c.slice(0,Math.max(0,f)));let d=t.lookup(c);if(!d||!d.handlers)return{error:p({statusCode:404,name:"Not Found",statusMessage:`Cannot find any route matching ${c||"/"}.`})};let l=d.handlers[i]||d.handlers.all;if(!l){n||(n=oe(t));let M=n.matchAll(c).reverse();for(let H of M){if(H.handlers[i]){l=H.handlers[i],d.handlers[i]=d.handlers[i]||l;break}if(H.handlers.all){l=H.handlers.all,d.handlers.all=d.handlers.all||l;break}}}return l?{matched:d,handler:l}:{error:p({statusCode:405,name:"Method Not Allowed",statusMessage:`Method ${i} is not allowed on this route.`})}},u=e.preemptive||e.preemtive;return o.handler=V(c=>{let i=a(c.path,c.method.toLowerCase());if("error"in i){if(u)throw i.error;return}c.context.matchedRoute=i.matched;let f=i.matched.params||{};return c.context.params=f,Promise.resolve(i.handler(c)).then(d=>d===void 0&&u?null:d)}),o.handler.__resolve__=async c=>{c=I(c);let i=a(c);if("error"in i)return;let f={route:i.matched.path,handler:i.handler};if(i.handler.__resolve__){let d=await i.handler.__resolve__(c);if(!d)return;f={...f,...d}}return f},o}function yr(e){return async function(r,n){let o=Rt(r,n);try{await e.handler(o)}catch(s){let a=p(s);if(Q(s)||(a.unhandled=!0),x(o,a.statusCode,a.statusMessage),e.options.onError&&await e.options.onError(a,o),o.handled)return;(a.unhandled||a.fatal)&&console.error("[h3]",a.fatal?"[fatal]":"[unhandled]",a),e.options.onBeforeResponse&&!o._onBeforeResponseCalled&&await e.options.onBeforeResponse(o,{body:a}),await Ke(o,a,!!e.options.debug),e.options.onAfterResponse&&!o._onAfterResponseCalled&&await e.options.onAfterResponse(o,{body:a})}}}export{p as a,Ke as b,tr as c,rr as d,he as e,g as f,nr as g,or as h,sr as i,ar as j,m as k,x as l,ir as m,R as n,cr as o,ur as p,fr as q,dr as r,bt as s,St as t,pr as u,mr as v,yr as w};
@@ -0,0 +1,5 @@
1
+ import{l as R}from"./chunk-6G6TMKXF.js";import{d}from"./chunk-M56NDIMD.js";import{Qb as u,Rb as b,Z as h,da as y}from"./chunk-N5PQPIBF.js";import{g as c}from"./chunk-VPRTJUIN.js";c();c();var l=class{constructor({export:e,input:r,inputBytes:n,output:o,outputBytes:s,logs:i,functionId:g,fuelConsumed:p,target:x,errorMessage:N,errorType:T,inputQueryVariablesMetafieldValue:O,inputQueryVariablesMetafieldNamespace:L,inputQueryVariablesMetafieldKey:k}){this.export=e,this.input=r,this.inputBytes=n,this.output=o,this.outputBytes=s,this.logs=i,this.functionId=g,this.fuelConsumed=p,this.target=x,this.errorMessage=N,this.errorType=T,this.inputQueryVariablesMetafieldValue=O,this.inputQueryVariablesMetafieldNamespace=L,this.inputQueryVariablesMetafieldKey=k}},f=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:n,httpResponse:o}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=n,this.httpResponse=o}};var _=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},m=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:n,httpRequest:o,httpResponse:s,error:i}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=n,this.httpRequest=o,this.httpResponse=s,this.error=i}};c();function E(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&E(t)||e?.deep&&Array.isArray(t)?a(t,e):t}function a(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?a(r,e):r);if(E(t)){let r={};for(let[n,o]of Object.entries(t))r[h(n)]=M(o,e);return r}return t}var S=450,I=5*1e3,w=60*1e3,z=5,Z=1e6,P="function_run",ee="function_network_access",C="function_network_access.response_from_cache",V="function_network_access.request_execution_in_background",q="function_network_access.request_execution",te="no_cached_response",re="cached_response_about_to_expire";function se(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&A(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function ne(t){let e=JSON.parse(t);return new f({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var U={no_cached_response:0,cached_response_about_to_expire:1};function oe(t){let e=JSON.parse(t);return new _({reason:U[e.reason]??2,httpRequest:e.http_request})}function ie(t){let e=JSON.parse(t);return new m({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ue=async t=>{let{errors:e}=t.response,r=S,n=null,o="not_attempted";if(e.length>0)if(u(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{n=await t.onResubscribe(),o="succeeded"}catch(s){u(`Failed to resubscribe to app logs: ${s}`),r=w,o="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=w,t.onThrottle(r)):(r=I,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:n,resubscribeResult:o}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var pe=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:n=!0})=>{let{cursor:o,...s}=t,i=a({...s,payload:e,localTime:y(t.log_timestamp),storeName:r});return e instanceof l&&(i.payload.logs=e.logs.split(`
2
+ `).filter(Boolean),i.payload.inputQueryVariablesMetafieldValue&&(i.payload.inputQueryVariablesMetafieldValue=A(i.payload.inputQueryVariablesMetafieldValue))),n?JSON.stringify(i,null,2):JSON.stringify(i)},ce=(t,e)=>{let r=a(JSON.parse(t));return e===P?new l(r):e===C?new f(r):e===V?new _(r):e===q?new m(r):r},le=async(t,e,r,n)=>{let o=await t.subscribeToAppLogs(e,r);if(!o.appLogsSubscribe)throw new d("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:i,errors:g}=o.appLogsSubscribe;if(u(`Token: ${s}
3
+ `),u(`API Key: ${e.apiKey}
4
+ `),g&&g.length>0){let p=g.join(", ");throw await R({stripAnsi:!1},()=>{b(`Errors subscribing to app logs: ${p}`,n),b("App log streaming is not available in this session.",n)}),new d(p)}else{if(!s)throw new d("Failed to subscribe to app logs: No response received");let p=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];u(`Subscribed to App Events for shop ID(s) ${p.join(", ")}`),i!==void 0&&u(`Success: ${i}
5
+ `)}return s};function ge(t){try{if(typeof t=="string"){let e=JSON.parse(t);return JSON.stringify(e,null,2)}else return typeof t=="object"&&t!==null?JSON.stringify(t,null,2):void 0}catch(e){throw new Error(`Error parsing JSON: ${e}`)}}var A=t=>{try{return JSON.parse(t)}catch{return t}};export{l as a,f as b,_ as c,m as d,a as e,S as f,I as g,z as h,Z as i,P as j,ee as k,C as l,V as m,q as n,te as o,re as p,se as q,ne as r,oe as s,ie as t,ue as u,ae as v,pe as w,ce as x,le as y,ge as z};
@@ -0,0 +1 @@
1
+ import{h as m}from"./chunk-CBXSPL4W.js";import{d as h}from"./chunk-M56NDIMD.js";import{g as i}from"./chunk-VPRTJUIN.js";i();var s=["live","unpublished","development"];async function A(r){let e=r.storeFqdn,t=(await m(r)).filter(c);if(t.length===0)throw new h(`There are no themes in the ${e} store`);return t.sort(p)}function c(r){return s.includes(r.role)}function p(r,e){return s.indexOf(r.role)-s.indexOf(e.role)}i();function R(r,e,t){return T(r,e,t)??d(r,e,t)}function T(r,e,t){let o=t.role;if(!o)return;let n=`No themes on the store ${r} match the role "${o}"`;return a(e,l=>l.role===o).orThrow(n)}function d(r,e,t){return t.themeIdentifiers.flatMap(n=>{let l=`No themes on the store ${r} match the ID or name "${n}"`;return a(e,u=>`${u.id}`===n||u.name.toLowerCase()===n.toLowerCase()?!0:g(u.name.toLowerCase(),n.toLowerCase())).orThrow(l)})}function a(r,e){let t=r.filter(e);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new h(o)}}}var f=class{constructor(e){this.queryProps=e}get role(){for(let e of s)if(this.queryProps[e])return e}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(e=>e?.length!==void 0?e.length>0:!!e)}};function g(r,e){let t=e.replace(/(^\*)|(\*$)/g,"");return e.startsWith("*")&&e.endsWith("*")?r.includes(t):e.startsWith("*")?r.endsWith(t):e.endsWith("*")?r.startsWith(t):!1}export{s as a,A as b,R as c,f as d};
@@ -0,0 +1 @@
1
+ import{Da as e}from"./chunk-54CAKCYR.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var p=class extends e{};export{p as a};
@@ -0,0 +1,17 @@
1
+ import{a as A,h as $,k as b}from"./chunk-OY3PNHPZ.js";import{e as w,f as v}from"./chunk-K6CTUBFC.js";import{e as y}from"./chunk-GVQIPEZT.js";import{l as E,m as C}from"./chunk-CBXSPL4W.js";import{xa as T}from"./chunk-XONFGLJQ.js";import{Qb as p}from"./chunk-N5PQPIBF.js";import{g as S}from"./chunk-VPRTJUIN.js";S();var P=20,_=1024*1024,B=2;function oe(t,e,r,o,s={},l){let n=A(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=j(t,e,n),f=Promise.all([o.ready(),u]).then(()=>L(n,o,t,e,i)),h=f.then(a=>a.promise).then(()=>M(n,o,t,e,s,i)),k=s?.deferPartialWork?u:h.then(a=>a.promise);return s?.backgroundWorkCatch&&Promise.all([u,f.then(a=>a.promise),h.then(a=>a.promise)]).catch(s.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(s?.deferPartialWork)return;let{progress:a,promise:m}=await f,d=s.multiEnvironment?4e3:1e3;await y(U({promise:m,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:d}),l?.stderr,s?.multiEnvironment);let{progress:g,promise:F}=await h;await y(U({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(g)}`,updateInterval:d}),l?.stderr,s?.multiEnvironment),await y([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,s?.multiEnvironment),N(i,s?.environment)}}}function U({promise:t,titleGetter:e,updateInterval:r}){let o=[],s=()=>{o.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&s()}})};return s(),o}function M(t,e,r,o,s,l){if(s.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=W(t,e),i=z(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let h=0;h<i.length;h+=P){let k=i.slice(h,h+P),a=E(r.id,k.map(m=>m.key),o).then(m=>{m.forEach(d=>{if(l.set(d.key,d),!d.success){let g=d.errors?.asset?.map(F=>`-${F}`).join(`
2
+ `);v(d.key,"delete")(new Error(`Failed to delete ${d.key}: ${g}`))}}),c.current+=k.length});u.push(a)}let f=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:f}}function W(t,e){let o=e.applyIgnoreFilters(t).filter(s=>!e.files.has(s.key));return p(`Files to be deleted:
3
+ ${o.map(s=>`-${s.key}`).join(`
4
+ `)}`),o}function z(t){let e=b(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configSchemaFile,...e.staticAssetFiles]}var J=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function j(t,e,r){let o=new Set(r.map(l=>l.key)),s=J.filter(({key:l})=>!o.has(l));s.length>0&&await C(t.id,s,e)}function L(t,e,r,o,s){let l=x(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=D(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(q(a).map(m=>O(m,e,o,r.id,s).then(()=>{c.current+=m.length,m.forEach(d=>e.unsyncedFileKeys.delete(d.key))}))).then(()=>{}),f=i.reduce((a,m)=>a.then(()=>u(m)),Promise.resolve()),h=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([f,h]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function x(t,e){let r=I(t),o=t.applyIgnoreFilters(r),s=new Map(e.map(n=>[n.key,n])),l=o.filter(n=>{let i=s.get(n.key);return!i||i.checksum!==n.checksum});return p(`Files to be uploaded:
5
+ ${l.map(n=>`-${n.key}`).join(`
6
+ `)}`),l}function D(t){let e=b(t);return{independentFiles:[e.otherLiquidFiles,e.otherJsonFiles,e.staticAssetFiles],dependentFiles:[e.configSchemaFile,e.layoutFiles,e.blockLiquidFiles,e.sectionLiquidFiles,e.sectionJsonFiles,e.templateJsonFiles,e.contextualizedJsonFiles,e.configDataFile]}}function q(t){let e=[],r=[],o=0;for(let s of t){let l=r.length>=P,n=o>=_;(l||n)&&(e.push(r),r=[],o=0),r.push(s),o+=s.size??0}return r.length>0&&e.push(r),e}function I(t){let e=[];return t.files.forEach((r,o)=>{let s=r.value?Buffer.byteLength(r.value,"utf8"):r.attachment?.length??0;e.push({key:o,checksum:r.checksum,size:s})}),e}async function O(t,e,r,o,s){let l=t.map(i=>{let c=e.files.get(i.key)?.value,u=e.files.get(i.key)?.attachment;return{key:i.key,...c&&{value:c},...u&&{attachment:u}}});p(`Uploading the following files:
7
+ ${t.map(i=>`-${i.key}`).join(`
8
+ `)}`),(await R(l,o,r)).forEach(i=>{s.set(i.key,i),G(i,e,o)})}function G(t,e,r){if(t.success)e.uploadErrors.delete(t.key);else{let o=t.errors?.asset??["Response was not successful."];e.uploadErrors.set(t.key,o),$(r,t.key)}}async function R(t,e,r,o=0){if(t.length===0)return[];o>0&&p(`Retry Attempt ${o}/${B} for the following files:
9
+ ${t.map(n=>`-${n.key}`).join(`
10
+ `)}`);let s=await C(e,t,r);p(`File Upload Results:
11
+ ${s.map(n=>`-${n.key}: ${n.success?"success":"failure"}`).join(`
12
+ `)}`);let l=s.filter(n=>!n.success);if(l.length>0){p(`The following files failed to upload:
13
+ ${l.map(i=>`-${i.key}`).join(`
14
+ `)}`);let n=await K(l,t,e,r,o);return s.concat(n)}return s}async function K(t,e,r,o,s){let l=new Set(t.map(i=>i.key)),n=e.filter(i=>l.has(i.key));return s===B?(T("theme-service:upload-failed-retry:max-retry"),p(`Max retry count reached for the following files:
15
+ ${n.map(i=>`-${i.key}`).join(`
16
+ `)}`),t):(T(`theme-service:upload-failed-retry:${n.length}`),R(n,r,o,s+1))}function N(t,e){for(let[r,o]of t.entries())if(!o.success){let s=o.errors?.asset?.join(`
17
+ `)??"File upload failed",l=e?`[${e}] ${r}`:r;w(l,new Error(s))}}export{oe as a};
@@ -0,0 +1 @@
1
+ import{g as r}from"./chunk-VPRTJUIN.js";r();import t from"crypto";function o(e){return t.createHash("sha1").update(e).digest("hex")}function c(e){return t.createHash("md5").update(e).digest("hex")}function d(){return t.randomUUID()}function p(e){return t.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(e).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}export{o as a,c as b,d as c,p as d};