shopify 4.3.0 → 4.5.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 (337) hide show
  1. package/dist/analytics-DMUNCDGT.js +1 -0
  2. package/dist/analytics-GAPN4I6R.js +1 -0
  3. package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
  5. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
  6. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
  7. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
  8. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  9. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
  10. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  11. package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
  12. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
  13. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
  14. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  15. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  16. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  17. package/dist/assets/hydrogen/starter/package.json +9 -10
  18. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
  19. package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
  20. package/dist/assets/hydrogen/vite/package.json +1 -2
  21. package/dist/assets/hydrogen/vite/vite.config.js +4 -3
  22. package/dist/bootstrap.js +1 -1
  23. package/dist/{chunk-3YDYZ232.js → chunk-235JVI2J.js} +8 -8
  24. package/dist/{chunk-2K7FGAT6.js → chunk-24RF5KN3.js} +1 -1
  25. package/dist/{chunk-GWHV62YT.js → chunk-2IPVQRMI.js} +1 -1
  26. package/dist/{chunk-QDVJJKLB.js → chunk-2MDFREEW.js} +1 -1
  27. package/dist/{chunk-JSOGPMWB.js → chunk-2MZACB7V.js} +1 -1
  28. package/dist/{chunk-LCZDC6EE.js → chunk-2ROG5NK3.js} +1 -1
  29. package/dist/{chunk-WVRGCNBZ.js → chunk-2VUG6LRN.js} +1 -1
  30. package/dist/{chunk-S22NCNAJ.js → chunk-32KQKGSY.js} +1 -1
  31. package/dist/chunk-3EQY5B4S.js +836 -0
  32. package/dist/{chunk-VRJTLVG3.js → chunk-3JAC5SI7.js} +1 -1
  33. package/dist/{chunk-G3JJLXPH.js → chunk-3JZKWK2V.js} +1 -1
  34. package/dist/chunk-3NMVMCOM.js +3 -0
  35. package/dist/chunk-3OE5HXHO.js +1 -0
  36. package/dist/{chunk-2RBIR3NM.js → chunk-4EYTWWYF.js} +1 -1
  37. package/dist/{chunk-G2OHWAY2.js → chunk-4LML2QWN.js} +1 -1
  38. package/dist/{chunk-UYSF234H.js → chunk-4Q54UDO3.js} +1 -1
  39. package/dist/{chunk-7572RLUP.js → chunk-4U3NC3UU.js} +1 -1
  40. package/dist/chunk-52H2R2FU.js +1 -0
  41. package/dist/{chunk-PMS4MNHB.js → chunk-57IRHKV3.js} +1 -1
  42. package/dist/{chunk-3AOQKI4B.js → chunk-5A7EMVAP.js} +1 -1
  43. package/dist/{chunk-T3ERXB7F.js → chunk-5EVFLUUA.js} +1 -1
  44. package/dist/{chunk-DYNH5SKT.js → chunk-5O7PY44R.js} +1 -1
  45. package/dist/chunk-63NFEXJR.js +275 -0
  46. package/dist/{chunk-PXHY753L.js → chunk-663TS34D.js} +1 -1
  47. package/dist/{chunk-JAWKLBOB.js → chunk-6I3FNLT3.js} +1 -1
  48. package/dist/{chunk-WA3YC5W4.js → chunk-6LTJMYUD.js} +2 -2
  49. package/dist/{chunk-5BKCIDMS.js → chunk-6V37CHBZ.js} +1 -1
  50. package/dist/{chunk-HOSFU6UP.js → chunk-74IG3ZE3.js} +3 -3
  51. package/dist/{chunk-4J32OHLY.js → chunk-7BVXGS44.js} +1 -1
  52. package/dist/{chunk-MRS6LAY7.js → chunk-7DYZVU7H.js} +1 -1
  53. package/dist/{chunk-YSIBRY6C.js → chunk-7EOQVQND.js} +1 -1
  54. package/dist/{chunk-3SPDFV5D.js → chunk-7HZG7FBK.js} +1 -1
  55. package/dist/{chunk-MIDYZPO4.js → chunk-7KHYEIA7.js} +1 -1
  56. package/dist/{chunk-5XDQ76DQ.js → chunk-7ZIO3X22.js} +1 -1
  57. package/dist/{chunk-6JKGUQRD.js → chunk-A2O3MBPH.js} +1 -1
  58. package/dist/{chunk-Q77MM2N2.js → chunk-ABCU552E.js} +1 -1
  59. package/dist/{chunk-N3CNWCC2.js → chunk-AP6FNGTA.js} +1 -1
  60. package/dist/chunk-AUZCENYI.js +1 -0
  61. package/dist/chunk-AYKRKE6O.js +2 -0
  62. package/dist/{chunk-PFGYC53K.js → chunk-AYSS2ERL.js} +1 -1
  63. package/dist/chunk-B367FOQA.js +7 -0
  64. package/dist/{chunk-PCCK4YTE.js → chunk-BBATKR3B.js} +1 -1
  65. package/dist/chunk-BCEWCYZD.js +1 -0
  66. package/dist/{chunk-2GU7OY3H.js → chunk-BH34ZLZ4.js} +1 -1
  67. package/dist/{chunk-ZM75DSIW.js → chunk-BLI7DUNV.js} +1 -1
  68. package/dist/{chunk-E7DHELFH.js → chunk-BNX4MZMV.js} +1 -1
  69. package/dist/{chunk-N5LVGFDS.js → chunk-BU7R7NFL.js} +1 -1
  70. package/dist/{chunk-NILXAUUT.js → chunk-BVHBMOIB.js} +1 -1
  71. package/dist/{chunk-7FQFEB33.js → chunk-BXDZX3BS.js} +34 -34
  72. package/dist/{chunk-MMIHHCMW.js → chunk-CVRAATZ5.js} +1 -1
  73. package/dist/{chunk-G3RWLAOG.js → chunk-DBBU6OVN.js} +1 -1
  74. package/dist/{chunk-G2LVUM7N.js → chunk-DKVU7LYY.js} +1 -1
  75. package/dist/{chunk-L2PC4MUV.js → chunk-DLZPP33V.js} +1 -1
  76. package/dist/{chunk-JEZ3PGVC.js → chunk-DQOS54HN.js} +1 -1
  77. package/dist/{chunk-OZBY45KT.js → chunk-E4GW6OXT.js} +1 -1
  78. package/dist/chunk-E64BQS4D.js +1 -0
  79. package/dist/chunk-F447QKVX.js +1 -0
  80. package/dist/{chunk-57PPQKJT.js → chunk-FA25RL4G.js} +1 -1
  81. package/dist/{chunk-TRYWVIVJ.js → chunk-FJOEHMXM.js} +1 -1
  82. package/dist/{chunk-NWXDOCL5.js → chunk-G6YOP2SJ.js} +1 -1
  83. package/dist/{chunk-YIRFEW5M.js → chunk-GOAKZ2IL.js} +1 -1
  84. package/dist/{chunk-AU5EZQW7.js → chunk-H2JU5BGK.js} +1 -1
  85. package/dist/{chunk-VJ6KDRZI.js → chunk-H3V6Y5JO.js} +1 -1
  86. package/dist/{chunk-GJXINXSU.js → chunk-HHA322FT.js} +46 -46
  87. package/dist/{chunk-HCTZN7L4.js → chunk-HP3NDE7S.js} +1 -1
  88. package/dist/{chunk-ANBOLDON.js → chunk-HX3TALXV.js} +1 -1
  89. package/dist/{chunk-OU3M32A2.js → chunk-I3Y6XTKN.js} +1 -1
  90. package/dist/{chunk-DCLUZFT7.js → chunk-ICHNVDFU.js} +1 -1
  91. package/dist/{chunk-RSRYC5ZF.js → chunk-ICXHUPP5.js} +1 -1
  92. package/dist/chunk-IE4SSSXU.js +593 -0
  93. package/dist/{chunk-5FVB7JHP.js → chunk-IFVYCKX5.js} +1 -1
  94. package/dist/{chunk-JUYJZUYU.js → chunk-J2ZES5K5.js} +1 -1
  95. package/dist/{chunk-JCIN73BE.js → chunk-J5U2FUIX.js} +1 -1
  96. package/dist/chunk-JC3PRJJS.js +1 -0
  97. package/dist/chunk-JGN7YG5X.js +3 -0
  98. package/dist/{chunk-ZGJ3DFTQ.js → chunk-JZVNNQWE.js} +1 -1
  99. package/dist/{chunk-CV5EQGES.js → chunk-K2CIMJJW.js} +1 -1
  100. package/dist/{chunk-T4NS63K4.js → chunk-K7I5BGFC.js} +1 -1
  101. package/dist/{chunk-33OHQUHZ.js → chunk-KESQOMEW.js} +1 -1
  102. package/dist/{chunk-4QTEPWEJ.js → chunk-KJQAJUDU.js} +4 -4
  103. package/dist/{chunk-TP7E54WN.js → chunk-KNEF6NAG.js} +1 -1
  104. package/dist/{chunk-S6B2ADVR.js → chunk-KUKYAIOR.js} +1 -1
  105. package/dist/{chunk-MEIEEENL.js → chunk-KZDI2BXR.js} +1 -1
  106. package/dist/chunk-LKZ7ARYS.js +18 -0
  107. package/dist/{chunk-W7DDV2EY.js → chunk-LMPD55L6.js} +1 -1
  108. package/dist/{chunk-YVQXEPHY.js → chunk-LXZM6Z4F.js} +1 -1
  109. package/dist/{chunk-S5IFJ737.js → chunk-MGPLKG23.js} +1 -1
  110. package/dist/chunk-MSJDZLZT.js +1 -0
  111. package/dist/{chunk-N3NE4MVN.js → chunk-N4LCWB56.js} +1 -1
  112. package/dist/{chunk-VI34CKV6.js → chunk-N5U5Q2MG.js} +1 -1
  113. package/dist/{chunk-JK3NIHTX.js → chunk-N5YIZJ4S.js} +1 -1
  114. package/dist/{chunk-CEHXOWA6.js → chunk-N625VE5T.js} +1 -1
  115. package/dist/{chunk-A5HKAMAC.js → chunk-NJLSZS27.js} +1 -1
  116. package/dist/{chunk-WHNWE7P2.js → chunk-O7OQK2OC.js} +1 -1
  117. package/dist/{chunk-5O43334U.js → chunk-P375IGKT.js} +1 -1
  118. package/dist/chunk-P3RGC53U.js +5 -0
  119. package/dist/{chunk-4FFPTEKD.js → chunk-P4243GCY.js} +1 -1
  120. package/dist/{chunk-FIYAECXH.js → chunk-PFEC2NUB.js} +1 -1
  121. package/dist/{chunk-JJ6RM54S.js → chunk-PH7F4BMG.js} +1 -1
  122. package/dist/chunk-PK6NOLT5.js +2 -0
  123. package/dist/chunk-PLHJQQVZ.js +1 -0
  124. package/dist/{chunk-AO3RFGNV.js → chunk-PVD544NN.js} +1 -1
  125. package/dist/chunk-Q3WOWDUU.js +1 -0
  126. package/dist/chunk-Q7BOSHWX.js +7 -0
  127. package/dist/{chunk-2XZBQZ5R.js → chunk-QAM7VCLV.js} +1 -1
  128. package/dist/{chunk-FOFJBRSL.js → chunk-QCBAFI6Z.js} +1 -1
  129. package/dist/{chunk-SSCYLDSX.js → chunk-QHWF3S7U.js} +1 -1
  130. package/dist/{chunk-EVZA2TCI.js → chunk-QJL3SXYA.js} +1 -1
  131. package/dist/{chunk-UB26DGTR.js → chunk-QRETBFXI.js} +1 -1
  132. package/dist/chunk-RBOYWA2D.js +1 -0
  133. package/dist/{chunk-N3YTDGFY.js → chunk-ROQXPIEZ.js} +1 -1
  134. package/dist/{chunk-ATSMK66C.js → chunk-RUKK4KXX.js} +1 -1
  135. package/dist/{chunk-PNP5OKNZ.js → chunk-RY2ESY3P.js} +1 -1
  136. package/dist/{chunk-HIQHYPLU.js → chunk-RY5CY3ZW.js} +1 -1
  137. package/dist/{chunk-Q73GEVSJ.js → chunk-S442LGHR.js} +1 -1
  138. package/dist/{chunk-OXJBYKMX.js → chunk-S5JJL3BP.js} +1 -1
  139. package/dist/{chunk-UU5P2IYU.js → chunk-SF53RKMO.js} +1 -1
  140. package/dist/{chunk-JAWOP4HJ.js → chunk-SY2AH7C2.js} +1 -1
  141. package/dist/{chunk-J5BRKYGE.js → chunk-TC3JOEMA.js} +1 -1
  142. package/dist/{chunk-M7YFD4EV.js → chunk-TEXYUUTD.js} +5 -5
  143. package/dist/chunk-TGM7L6RV.js +1 -0
  144. package/dist/{chunk-5H3VTG77.js → chunk-TKW3Z7XL.js} +1 -1
  145. package/dist/{chunk-HDC5V7RY.js → chunk-TM534QSE.js} +1 -1
  146. package/dist/{chunk-5FFHQTRC.js → chunk-U44HRKSU.js} +1 -1
  147. package/dist/{chunk-UTO4Z6P6.js → chunk-UEC23KAO.js} +1 -1
  148. package/dist/{chunk-RKDZGK5K.js → chunk-UFGDNIYX.js} +1 -1
  149. package/dist/{chunk-Q7C44DX5.js → chunk-UGGFSV7N.js} +1 -1
  150. package/dist/{chunk-USLYL5AC.js → chunk-UJVYIWUI.js} +1 -1
  151. package/dist/{chunk-OU4SKQTC.js → chunk-UP7H24B3.js} +2 -2
  152. package/dist/{chunk-YPBCSDFQ.js → chunk-UQZ7HZ47.js} +1 -1
  153. package/dist/{chunk-2EHBJWC6.js → chunk-UTLRP527.js} +1 -1
  154. package/dist/chunk-UTPJAU5S.js +1 -0
  155. package/dist/{chunk-DNXYKGV2.js → chunk-V66IHWQO.js} +1 -1
  156. package/dist/{chunk-YL3TYQGT.js → chunk-V774I3FW.js} +1 -1
  157. package/dist/{chunk-6KETAPWL.js → chunk-VKFDDZD3.js} +1 -1
  158. package/dist/{chunk-ZUKLGZOU.js → chunk-VNYKNAT5.js} +1 -1
  159. package/dist/{chunk-AERKD4TO.js → chunk-VUACOGOX.js} +1 -1
  160. package/dist/{chunk-KRQGLK2Q.js → chunk-WFB3FHKV.js} +1 -1
  161. package/dist/chunk-WPITBIL5.js +21 -0
  162. package/dist/{chunk-J3HX6ZGD.js → chunk-WTYH2O47.js} +1 -1
  163. package/dist/chunk-WU6GIY22.js +4 -0
  164. package/dist/{chunk-UC7KMA6W.js → chunk-XA5JA7DK.js} +1 -1
  165. package/dist/{chunk-2TMQG2UT.js → chunk-XSXX75VV.js} +1 -1
  166. package/dist/{chunk-7D45IAMQ.js → chunk-XXUWTD7A.js} +1 -1
  167. package/dist/chunk-XZWAX4FI.js +46 -0
  168. package/dist/{chunk-FQ5ZZX2G.js → chunk-YF4HKJB5.js} +1 -1
  169. package/dist/chunk-YJAX22JK.js +7 -0
  170. package/dist/{chunk-BL46CZ2M.js → chunk-YT3NPMWK.js} +1 -1
  171. package/dist/{chunk-NTRAWIEJ.js → chunk-YYLEWVO6.js} +3 -3
  172. package/dist/chunk-Z2Y6G2QF.js +1 -0
  173. package/dist/{chunk-M2YINBHF.js → chunk-Z66NZ2HC.js} +1 -1
  174. package/dist/{chunk-6LWOWDF4.js → chunk-ZFOWAMFK.js} +1 -1
  175. package/dist/{chunk-25HJX3L2.js → chunk-ZKBWEHIY.js} +1 -1
  176. package/dist/{chunk-2GAFKG64.js → chunk-ZZ3SMI2A.js} +1 -1
  177. package/dist/{chunk-TY6BZTG3.js → chunk-ZZWSMRKT.js} +1 -1
  178. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  179. package/dist/cli/commands/app/build.js +1 -1
  180. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  181. package/dist/cli/commands/app/bulk/execute.js +1 -1
  182. package/dist/cli/commands/app/bulk/status.js +1 -1
  183. package/dist/cli/commands/app/config/link.js +1 -1
  184. package/dist/cli/commands/app/config/pull.js +1 -1
  185. package/dist/cli/commands/app/config/use.js +1 -1
  186. package/dist/cli/commands/app/config/validate.js +1 -1
  187. package/dist/cli/commands/app/demo/watcher.js +1 -1
  188. package/dist/cli/commands/app/deploy.js +1 -1
  189. package/dist/cli/commands/app/dev/clean.js +1 -1
  190. package/dist/cli/commands/app/dev.js +1 -1
  191. package/dist/cli/commands/app/env/pull.js +1 -1
  192. package/dist/cli/commands/app/env/show.js +1 -1
  193. package/dist/cli/commands/app/execute.js +1 -1
  194. package/dist/cli/commands/app/function/build.js +1 -1
  195. package/dist/cli/commands/app/function/info.js +1 -1
  196. package/dist/cli/commands/app/function/replay.js +1 -1
  197. package/dist/cli/commands/app/function/run.js +1 -1
  198. package/dist/cli/commands/app/function/schema.js +1 -1
  199. package/dist/cli/commands/app/function/typegen.js +1 -1
  200. package/dist/cli/commands/app/generate/extension.js +1 -1
  201. package/dist/cli/commands/app/graphiql.js +1 -0
  202. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  203. package/dist/cli/commands/app/import-extensions.js +1 -1
  204. package/dist/cli/commands/app/info.js +1 -1
  205. package/dist/cli/commands/app/init.js +1 -1
  206. package/dist/cli/commands/app/logs.js +1 -1
  207. package/dist/cli/commands/app/release.js +1 -1
  208. package/dist/cli/commands/app/versions/list.js +1 -1
  209. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  210. package/dist/cli/commands/auth/login.js +1 -1
  211. package/dist/cli/commands/auth/logout.js +1 -1
  212. package/dist/cli/commands/cache/clear.js +1 -1
  213. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  214. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  215. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  216. package/dist/cli/commands/debug/command-flags.js +1 -1
  217. package/dist/cli/commands/doc/fetch.js +1 -1
  218. package/dist/cli/commands/doc/search.js +1 -1
  219. package/dist/cli/commands/docs/generate.js +1 -1
  220. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  221. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  222. package/dist/cli/commands/help.js +1 -1
  223. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  224. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  225. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  226. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  227. package/dist/cli/commands/notifications/generate.js +1 -1
  228. package/dist/cli/commands/notifications/list.js +1 -1
  229. package/dist/cli/commands/organization/list.js +1 -1
  230. package/dist/cli/commands/search.js +1 -1
  231. package/dist/cli/commands/theme/check.js +1 -1
  232. package/dist/cli/commands/theme/console.js +1 -1
  233. package/dist/cli/commands/theme/delete.js +1 -1
  234. package/dist/cli/commands/theme/dev.js +1 -1
  235. package/dist/cli/commands/theme/duplicate.js +1 -1
  236. package/dist/cli/commands/theme/info.js +1 -1
  237. package/dist/cli/commands/theme/init.js +1 -1
  238. package/dist/cli/commands/theme/language-server.js +1 -1
  239. package/dist/cli/commands/theme/list.js +1 -1
  240. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  241. package/dist/cli/commands/theme/open.js +1 -1
  242. package/dist/cli/commands/theme/package.js +1 -1
  243. package/dist/cli/commands/theme/preview.js +1 -1
  244. package/dist/cli/commands/theme/profile.js +1 -1
  245. package/dist/cli/commands/theme/publish.js +1 -1
  246. package/dist/cli/commands/theme/pull.js +1 -1
  247. package/dist/cli/commands/theme/push.js +1 -1
  248. package/dist/cli/commands/theme/rename.js +1 -1
  249. package/dist/cli/commands/theme/share.js +1 -1
  250. package/dist/cli/commands/upgrade.js +1 -1
  251. package/dist/cli/commands/version.js +1 -1
  252. package/dist/cli/help.d.ts +38 -0
  253. package/dist/cli/help.js +2 -0
  254. package/dist/command-registry.js +1 -1
  255. package/dist/{conf-store-UY3MDGGA.js → conf-store-V6ILVUUO.js} +1 -1
  256. package/dist/{deprecations-KNUMDRIU.js → deprecations-MOEFN6OW.js} +1 -1
  257. package/dist/dist-2BL5GGMG.js +1 -0
  258. package/dist/dist-E6QKEULH.js +1 -0
  259. package/dist/environments-5KA3OBIZ.js +1 -0
  260. package/dist/error-NYYI6HVX.js +1 -0
  261. package/dist/error-handler-BOESDKZA.js +1 -0
  262. package/dist/{fs-LJWVNO4H.js → fs-XE6SBVBF.js} +1 -1
  263. package/dist/hooks/app-init.js +1 -1
  264. package/dist/hooks/did-you-mean.js +1 -1
  265. package/dist/hooks/hydrogen-init.js +1 -1
  266. package/dist/hooks/plugin-plugins.js +1 -1
  267. package/dist/hooks/postrun.js +1 -1
  268. package/dist/hooks/prerun.js +1 -1
  269. package/dist/hooks/public-metadata.js +1 -1
  270. package/dist/hooks/sensitive-metadata.js +1 -1
  271. package/dist/hooks/tunnel-provider.js +1 -1
  272. package/dist/hooks/tunnel-start.js +1 -1
  273. package/dist/index.js +23 -10
  274. package/dist/{is-global-W6ALVC5L.js → is-global-JOHCPSKZ.js} +1 -1
  275. package/dist/lib-NOROGV6N.js +1 -0
  276. package/dist/lib-UCG2DNMS.js +1 -0
  277. package/dist/{local-GKEWZAIV.js → local-BTQDUX72.js} +1 -1
  278. package/dist/local-storage-WUSIVDTQ.js +1 -0
  279. package/dist/{metadata-UEUN64TK.js → metadata-APVOKTBV.js} +1 -1
  280. package/dist/{morph-CGOZEPPZ.js → morph-CG6HEMCQ.js} +4 -4
  281. package/dist/{node-package-manager-4ASQQIIF.js → node-package-manager-AC34ZJZD.js} +1 -1
  282. package/dist/notifications-system-4ODOESG2.js +1 -0
  283. package/dist/{output-S6E37GJQ.js → output-EAPQ7OWD.js} +1 -1
  284. package/dist/{prettier-EGVCP5CY.js → prettier-6ZMB2MMO.js} +1 -1
  285. package/dist/system-D7CH26HU.js +1 -0
  286. package/dist/tsconfig.tsbuildinfo +1 -1
  287. package/dist/ui-AXZBGWIQ.js +1 -0
  288. package/dist/upgrade-SLPJF6LD.js +1 -0
  289. package/dist/version-3IYH4V5U.js +1 -0
  290. package/dist/version-FAU37PQN.js +1 -0
  291. package/dist/{workerd-QOTT6UCO.js → workerd-XXPWKQOM.js} +1 -1
  292. package/oclif.manifest.json +712 -124
  293. package/package.json +15 -8
  294. package/dist/analytics-JH64XI2J.js +0 -1
  295. package/dist/analytics-MEGKKFGF.js +0 -1
  296. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  297. package/dist/chunk-762JWOWJ.js +0 -5
  298. package/dist/chunk-7LV55VWE.js +0 -1
  299. package/dist/chunk-A27NZMWB.js +0 -1
  300. package/dist/chunk-AVD3INWF.js +0 -1
  301. package/dist/chunk-AWEB5AQM.js +0 -1
  302. package/dist/chunk-AXNAGI32.js +0 -1
  303. package/dist/chunk-BQWK3C47.js +0 -278
  304. package/dist/chunk-CFOXXOO2.js +0 -1
  305. package/dist/chunk-DTIWUT2T.js +0 -18
  306. package/dist/chunk-DZQYG32N.js +0 -2
  307. package/dist/chunk-EH7ZTFS4.js +0 -613
  308. package/dist/chunk-EKVTNWHM.js +0 -1
  309. package/dist/chunk-G4OQABDT.js +0 -836
  310. package/dist/chunk-I22ZTRKK.js +0 -3
  311. package/dist/chunk-I4R7TML2.js +0 -7
  312. package/dist/chunk-J3H4LPN6.js +0 -18
  313. package/dist/chunk-JLE4NBMT.js +0 -1
  314. package/dist/chunk-LXVORHCQ.js +0 -1
  315. package/dist/chunk-MINZGZ4N.js +0 -1
  316. package/dist/chunk-S7F5KFQP.js +0 -1
  317. package/dist/chunk-T4IV643Z.js +0 -9
  318. package/dist/chunk-TPCG6DCA.js +0 -1
  319. package/dist/chunk-TUNUEOHO.js +0 -3
  320. package/dist/chunk-VPPWSKOY.js +0 -1
  321. package/dist/chunk-XVUHUA36.js +0 -1
  322. package/dist/chunk-YMAWEIUR.js +0 -1
  323. package/dist/dist-C5IV2YDQ.js +0 -1
  324. package/dist/dist-VL4KZWV2.js +0 -1
  325. package/dist/environments-YPRVO2CF.js +0 -1
  326. package/dist/error-XRBQTNFM.js +0 -1
  327. package/dist/error-handler-NI7D6GSY.js +0 -1
  328. package/dist/lib-AIKYSHWL.js +0 -1
  329. package/dist/lib-Q4PWEMFD.js +0 -1
  330. package/dist/local-storage-ZOZMA22B.js +0 -1
  331. package/dist/notifications-system-HLXJCAMG.js +0 -1
  332. package/dist/system-YQZNGSWB.js +0 -1
  333. package/dist/ui-D2FFWRK7.js +0 -1
  334. package/dist/upgrade-TVTCFMXM.js +0 -1
  335. package/dist/version-J6MDN7BZ.js +0 -1
  336. package/dist/version-RIRW5EXQ.js +0 -1
  337. /package/dist/{chunk-YLQ3LNNY.js → chunk-VDN6MEYI.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as vS,b as Hp}from"./chunk-XWPPBOGF.js";import{a as SC}from"./chunk-IWOTLFOY.js";import{b as EC}from"./chunk-EJDWYASP.js";import{a as mS}from"./chunk-AAK376RT.js";import{r as gC}from"./chunk-T6CC5WUU.js";import{h as Pf,i as sS,j as mC,k as cS,l as di,m as Hf,n as Ip,o as Au,p as Pp,r as fS,s as dS,t as hC,u as Zn,v as tc,w as yC,x as pS}from"./chunk-A4SBXDZB.js";import{a as vC,c as pa,e as nn,g as V}from"./chunk-VKWPEFWQ.js";var DS=pa(Bt=>{"use strict";V();var jf=Symbol.for("react.element"),TC=Symbol.for("react.portal"),_C=Symbol.for("react.fragment"),xC=Symbol.for("react.strict_mode"),RC=Symbol.for("react.profiler"),CC=Symbol.for("react.provider"),NC=Symbol.for("react.context"),DC=Symbol.for("react.forward_ref"),LC=Symbol.for("react.suspense"),OC=Symbol.for("react.memo"),bC=Symbol.for("react.lazy"),hS=Symbol.iterator;function AC(s){return s===null||typeof s!="object"?null:(s=hS&&s[hS]||s["@@iterator"],typeof s=="function"?s:null)}var ES={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},SS=Object.assign,TS={};function nc(s,o,p){this.props=s,this.context=o,this.refs=TS,this.updater=p||ES}nc.prototype.isReactComponent={};nc.prototype.setState=function(s,o){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,o,"setState")};nc.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function _S(){}_S.prototype=nc.prototype;function Uh(s,o,p){this.props=s,this.context=o,this.refs=TS,this.updater=p||ES}var wh=Uh.prototype=new _S;wh.constructor=Uh;SS(wh,nc.prototype);wh.isPureReactComponent=!0;var yS=Array.isArray,xS=Object.prototype.hasOwnProperty,zh={current:null},RS={key:!0,ref:!0,__self:!0,__source:!0};function CS(s,o,p){var E,h={},R=null,C=null;if(o!=null)for(E in o.ref!==void 0&&(C=o.ref),o.key!==void 0&&(R=""+o.key),o)xS.call(o,E)&&!RS.hasOwnProperty(E)&&(h[E]=o[E]);var F=arguments.length-2;if(F===1)h.children=p;else if(1<F){for(var A=Array(F),N=0;N<F;N++)A[N]=arguments[N+2];h.children=A}if(s&&s.defaultProps)for(E in F=s.defaultProps,F)h[E]===void 0&&(h[E]=F[E]);return{$$typeof:jf,type:s,key:R,ref:C,props:h,_owner:zh.current}}function UC(s,o){return{$$typeof:jf,type:s.type,key:o,ref:s.ref,props:s.props,_owner:s._owner}}function Mh(s){return typeof s=="object"&&s!==null&&s.$$typeof===jf}function wC(s){var o={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(p){return o[p]})}var gS=/\/+/g;function Ah(s,o){return typeof s=="object"&&s!==null&&s.key!=null?wC(""+s.key):o.toString(36)}function Bp(s,o,p,E,h){var R=typeof s;(R==="undefined"||R==="boolean")&&(s=null);var C=!1;if(s===null)C=!0;else switch(R){case"string":case"number":C=!0;break;case"object":switch(s.$$typeof){case jf:case TC:C=!0}}if(C)return C=s,h=h(C),s=E===""?"."+Ah(C,0):E,yS(h)?(p="",s!=null&&(p=s.replace(gS,"$&/")+"/"),Bp(h,o,p,"",function(N){return N})):h!=null&&(Mh(h)&&(h=UC(h,p+(!h.key||C&&C.key===h.key?"":(""+h.key).replace(gS,"$&/")+"/")+s)),o.push(h)),1;if(C=0,E=E===""?".":E+":",yS(s))for(var F=0;F<s.length;F++){R=s[F];var A=E+Ah(R,F);C+=Bp(R,o,p,A,h)}else if(A=AC(s),typeof A=="function")for(s=A.call(s),F=0;!(R=s.next()).done;)R=R.value,A=E+Ah(R,F++),C+=Bp(R,o,p,A,h);else if(R==="object")throw o=String(s),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.");return C}function jp(s,o,p){if(s==null)return s;var E=[],h=0;return Bp(s,E,"","",function(R){return o.call(p,R,h++)}),E}function zC(s){if(s._status===-1){var o=s._result;o=o(),o.then(function(p){(s._status===0||s._status===-1)&&(s._status=1,s._result=p)},function(p){(s._status===0||s._status===-1)&&(s._status=2,s._result=p)}),s._status===-1&&(s._status=0,s._result=o)}if(s._status===1)return s._result.default;throw s._result}var Ia={current:null},kp={transition:null},MC={ReactCurrentDispatcher:Ia,ReactCurrentBatchConfig:kp,ReactCurrentOwner:zh};function NS(){throw Error("act(...) is not supported in production builds of React.")}Bt.Children={map:jp,forEach:function(s,o,p){jp(s,function(){o.apply(this,arguments)},p)},count:function(s){var o=0;return jp(s,function(){o++}),o},toArray:function(s){return jp(s,function(o){return o})||[]},only:function(s){if(!Mh(s))throw Error("React.Children.only expected to receive a single React element child.");return s}};Bt.Component=nc;Bt.Fragment=_C;Bt.Profiler=RC;Bt.PureComponent=Uh;Bt.StrictMode=xC;Bt.Suspense=LC;Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MC;Bt.act=NS;Bt.cloneElement=function(s,o,p){if(s==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+s+".");var E=SS({},s.props),h=s.key,R=s.ref,C=s._owner;if(o!=null){if(o.ref!==void 0&&(R=o.ref,C=zh.current),o.key!==void 0&&(h=""+o.key),s.type&&s.type.defaultProps)var F=s.type.defaultProps;for(A in o)xS.call(o,A)&&!RS.hasOwnProperty(A)&&(E[A]=o[A]===void 0&&F!==void 0?F[A]:o[A])}var A=arguments.length-2;if(A===1)E.children=p;else if(1<A){F=Array(A);for(var N=0;N<A;N++)F[N]=arguments[N+2];E.children=F}return{$$typeof:jf,type:s.type,key:h,ref:R,props:E,_owner:C}};Bt.createContext=function(s){return s={$$typeof:NC,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},s.Provider={$$typeof:CC,_context:s},s.Consumer=s};Bt.createElement=CS;Bt.createFactory=function(s){var o=CS.bind(null,s);return o.type=s,o};Bt.createRef=function(){return{current:null}};Bt.forwardRef=function(s){return{$$typeof:DC,render:s}};Bt.isValidElement=Mh;Bt.lazy=function(s){return{$$typeof:bC,_payload:{_status:-1,_result:s},_init:zC}};Bt.memo=function(s,o){return{$$typeof:OC,type:s,compare:o===void 0?null:o}};Bt.startTransition=function(s){var o=kp.transition;kp.transition={};try{s()}finally{kp.transition=o}};Bt.unstable_act=NS;Bt.useCallback=function(s,o){return Ia.current.useCallback(s,o)};Bt.useContext=function(s){return Ia.current.useContext(s)};Bt.useDebugValue=function(){};Bt.useDeferredValue=function(s){return Ia.current.useDeferredValue(s)};Bt.useEffect=function(s,o){return Ia.current.useEffect(s,o)};Bt.useId=function(){return Ia.current.useId()};Bt.useImperativeHandle=function(s,o,p){return Ia.current.useImperativeHandle(s,o,p)};Bt.useInsertionEffect=function(s,o){return Ia.current.useInsertionEffect(s,o)};Bt.useLayoutEffect=function(s,o){return Ia.current.useLayoutEffect(s,o)};Bt.useMemo=function(s,o){return Ia.current.useMemo(s,o)};Bt.useReducer=function(s,o,p){return Ia.current.useReducer(s,o,p)};Bt.useRef=function(s){return Ia.current.useRef(s)};Bt.useState=function(s){return Ia.current.useState(s)};Bt.useSyncExternalStore=function(s,o,p){return Ia.current.useSyncExternalStore(s,o,p)};Bt.useTransition=function(){return Ia.current.useTransition()};Bt.version="18.3.1"});var LS=pa((kt,Vp)=>{"use strict";V();process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var s="18.3.1",o=Symbol.for("react.element"),p=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),F=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),Le=Symbol.for("react.offscreen"),Ce=Symbol.iterator,he="@@iterator";function Ee(y){if(y===null||typeof y!="object")return null;var L=Ce&&y[Ce]||y[he];return typeof L=="function"?L:null}var $e={current:null},st={transition:null},et={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},Xe={current:null},Xt={},qe=null;function Ve(y){qe=y}Xt.setExtraStackFrame=function(y){qe=y},Xt.getCurrentStack=null,Xt.getStackAddendum=function(){var y="";qe&&(y+=qe);var L=Xt.getCurrentStack;return L&&(y+=L()||""),y};var rn=!1,Ge=!1,gt=!1,ze=!1,W=!1,ce={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:st,ReactCurrentOwner:Xe};ce.ReactDebugCurrentFrame=Xt,ce.ReactCurrentActQueue=et;function Oe(y){{for(var L=arguments.length,B=new Array(L>1?L-1:0),X=1;X<L;X++)B[X-1]=arguments[X];Tt("warn",y,B)}}function oe(y){{for(var L=arguments.length,B=new Array(L>1?L-1:0),X=1;X<L;X++)B[X-1]=arguments[X];Tt("error",y,B)}}function Tt(y,L,B){{var X=ce.ReactDebugCurrentFrame,fe=X.getStackAddendum();fe!==""&&(L+="%s",B=B.concat([fe]));var nt=B.map(function(_e){return String(_e)});nt.unshift("Warning: "+L),Function.prototype.apply.call(console[y],console,nt)}}var je={};function Rt(y,L){{var B=y.constructor,X=B&&(B.displayName||B.name)||"ReactClass",fe=X+"."+L;if(je[fe])return;oe("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",L,X),je[fe]=!0}}var Ue={isMounted:function(y){return!1},enqueueForceUpdate:function(y,L,B){Rt(y,"forceUpdate")},enqueueReplaceState:function(y,L,B,X){Rt(y,"replaceState")},enqueueSetState:function(y,L,B,X){Rt(y,"setState")}},_t=Object.assign,rt={};Object.freeze(rt);function Wt(y,L,B){this.props=y,this.context=L,this.refs=rt,this.updater=B||Ue}Wt.prototype.isReactComponent={},Wt.prototype.setState=function(y,L){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,L,"setState")},Wt.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};{var Je={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},bn=function(y,L){Object.defineProperty(Wt.prototype,y,{get:function(){Oe("%s(...) is deprecated in plain JavaScript React classes. %s",L[0],L[1])}})};for(var Kt in Je)Je.hasOwnProperty(Kt)&&bn(Kt,Je[Kt])}function tt(){}tt.prototype=Wt.prototype;function U(y,L,B){this.props=y,this.context=L,this.refs=rt,this.updater=B||Ue}var J=U.prototype=new tt;J.constructor=U,_t(J,Wt.prototype),J.isPureReactComponent=!0;function Ke(){var y={current:null};return Object.seal(y),y}var Yt=Array.isArray;function vt(y){return Yt(y)}function Dt(y){{var L=typeof Symbol=="function"&&Symbol.toStringTag,B=L&&y[Symbol.toStringTag]||y.constructor.name||"Object";return B}}function Et(y){try{return Qt(y),!1}catch{return!0}}function Qt(y){return""+y}function Nn(y){if(Et(y))return oe("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dt(y)),Qt(y)}function An(y,L,B){var X=y.displayName;if(X)return X;var fe=L.displayName||L.name||"";return fe!==""?B+"("+fe+")":B}function kn(y){return y.displayName||"Context"}function gn(y){if(y==null)return null;if(typeof y.tag=="number"&&oe("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case E:return"Fragment";case p:return"Portal";case R:return"Profiler";case h:return"StrictMode";case N:return"Suspense";case le:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case F:var L=y;return kn(L)+".Consumer";case C:var B=y;return kn(B._context)+".Provider";case A:return An(y,y.render,"ForwardRef");case $:var X=y.displayName||null;return X!==null?X:gn(y.type)||"Memo";case xe:{var fe=y,nt=fe._payload,_e=fe._init;try{return gn(_e(nt))}catch{return null}}}return null}var $n=Object.prototype.hasOwnProperty,br={key:!0,ref:!0,__self:!0,__source:!0},ha,on,Ar;Ar={};function ir(y){if($n.call(y,"ref")){var L=Object.getOwnPropertyDescriptor(y,"ref").get;if(L&&L.isReactWarning)return!1}return y.ref!==void 0}function Pa(y){if($n.call(y,"key")){var L=Object.getOwnPropertyDescriptor(y,"key").get;if(L&&L.isReactWarning)return!1}return y.key!==void 0}function Ka(y,L){var B=function(){ha||(ha=!0,oe("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};B.isReactWarning=!0,Object.defineProperty(y,"key",{get:B,configurable:!0})}function ya(y,L){var B=function(){on||(on=!0,oe("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};B.isReactWarning=!0,Object.defineProperty(y,"ref",{get:B,configurable:!0})}function ga(y){if(typeof y.ref=="string"&&Xe.current&&y.__self&&Xe.current.stateNode!==y.__self){var L=gn(Xe.current.type);Ar[L]||(oe('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',L,y.ref),Ar[L]=!0)}}var Ea=function(y,L,B,X,fe,nt,_e){var Ze={$$typeof:o,type:y,key:L,ref:B,props:_e,_owner:nt};return Ze._store={},Object.defineProperty(Ze._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ze,"_self",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.defineProperty(Ze,"_source",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.freeze&&(Object.freeze(Ze.props),Object.freeze(Ze)),Ze};function ta(y,L,B){var X,fe={},nt=null,_e=null,Ze=null,St=null;if(L!=null){ir(L)&&(_e=L.ref,ga(L)),Pa(L)&&(Nn(L.key),nt=""+L.key),Ze=L.__self===void 0?null:L.__self,St=L.__source===void 0?null:L.__source;for(X in L)$n.call(L,X)&&!br.hasOwnProperty(X)&&(fe[X]=L[X])}var At=arguments.length-2;if(At===1)fe.children=B;else if(At>1){for(var Pt=Array(At),qt=0;qt<At;qt++)Pt[qt]=arguments[qt+2];Object.freeze&&Object.freeze(Pt),fe.children=Pt}if(y&&y.defaultProps){var mn=y.defaultProps;for(X in mn)fe[X]===void 0&&(fe[X]=mn[X])}if(nt||_e){var _n=typeof y=="function"?y.displayName||y.name||"Unknown":y;nt&&Ka(fe,_n),_e&&ya(fe,_n)}return Ea(y,nt,_e,Ze,St,Xe.current,fe)}function ye(y,L){var B=Ea(y.type,L,y.ref,y._self,y._source,y._owner,y.props);return B}function We(y,L,B){if(y==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var X,fe=_t({},y.props),nt=y.key,_e=y.ref,Ze=y._self,St=y._source,At=y._owner;if(L!=null){ir(L)&&(_e=L.ref,At=Xe.current),Pa(L)&&(Nn(L.key),nt=""+L.key);var Pt;y.type&&y.type.defaultProps&&(Pt=y.type.defaultProps);for(X in L)$n.call(L,X)&&!br.hasOwnProperty(X)&&(L[X]===void 0&&Pt!==void 0?fe[X]=Pt[X]:fe[X]=L[X])}var qt=arguments.length-2;if(qt===1)fe.children=B;else if(qt>1){for(var mn=Array(qt),_n=0;_n<qt;_n++)mn[_n]=arguments[_n+2];fe.children=mn}return Ea(y.type,nt,_e,Ze,St,At,fe)}function dt(y){return typeof y=="object"&&y!==null&&y.$$typeof===o}var Ie=".",an=":";function ur(y){var L=/[=:]/g,B={"=":"=0",":":"=2"},X=y.replace(L,function(fe){return B[fe]});return"$"+X}var Pe=!1,Me=/\/+/g;function vn(y){return y.replace(Me,"$&/")}function Zt(y,L){return typeof y=="object"&&y!==null&&y.key!=null?(Nn(y.key),ur(""+y.key)):L.toString(36)}function ut(y,L,B,X,fe){var nt=typeof y;(nt==="undefined"||nt==="boolean")&&(y=null);var _e=!1;if(y===null)_e=!0;else switch(nt){case"string":case"number":_e=!0;break;case"object":switch(y.$$typeof){case o:case p:_e=!0}}if(_e){var Ze=y,St=fe(Ze),At=X===""?Ie+Zt(Ze,0):X;if(vt(St)){var Pt="";At!=null&&(Pt=vn(At)+"/"),ut(St,L,Pt,"",function(Ql){return Ql})}else St!=null&&(dt(St)&&(St.key&&(!Ze||Ze.key!==St.key)&&Nn(St.key),St=ye(St,B+(St.key&&(!Ze||Ze.key!==St.key)?vn(""+St.key)+"/":"")+At)),L.push(St));return 1}var qt,mn,_n=0,On=X===""?Ie:X+an;if(vt(y))for(var Wn=0;Wn<y.length;Wn++)qt=y[Wn],mn=On+Zt(qt,Wn),_n+=ut(qt,L,B,mn,fe);else{var Mr=Ee(y);if(typeof Mr=="function"){var cn=y;Mr===cn.entries&&(Pe||Oe("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Pe=!0);for(var Si=Mr.call(cn),aa,Yo=0;!(aa=Si.next()).done;)qt=aa.value,mn=On+Zt(qt,Yo++),_n+=ut(qt,L,B,mn,fe)}else if(nt==="object"){var Yl=String(y);throw new Error("Objects are not valid as a React child (found: "+(Yl==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":Yl)+"). If you meant to render a collection of children, use an array instead.")}}return _n}function lr(y,L,B){if(y==null)return y;var X=[],fe=0;return ut(y,X,"","",function(nt){return L.call(B,nt,fe++)}),X}function pi(y){var L=0;return lr(y,function(){L++}),L}function or(y,L,B){lr(y,function(){L.apply(this,arguments)},B)}function Ot(y){return lr(y,function(L){return L})||[]}function Ur(y){if(!dt(y))throw new Error("React.Children.only expected to receive a single React element child.");return y}function wr(y){var L={$$typeof:F,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};L.Provider={$$typeof:C,_context:L};var B=!1,X=!1,fe=!1;{var nt={$$typeof:F,_context:L};Object.defineProperties(nt,{Provider:{get:function(){return X||(X=!0,oe("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),L.Provider},set:function(_e){L.Provider=_e}},_currentValue:{get:function(){return L._currentValue},set:function(_e){L._currentValue=_e}},_currentValue2:{get:function(){return L._currentValue2},set:function(_e){L._currentValue2=_e}},_threadCount:{get:function(){return L._threadCount},set:function(_e){L._threadCount=_e}},Consumer:{get:function(){return B||(B=!0,oe("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),L.Consumer}},displayName:{get:function(){return L.displayName},set:function(_e){fe||(Oe("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",_e),fe=!0)}}}),L.Consumer=nt}return L._currentRenderer=null,L._currentRenderer2=null,L}var sr=-1,Vn=0,zr=1,Za=2;function $i(y){if(y._status===sr){var L=y._result,B=L();if(B.then(function(nt){if(y._status===Vn||y._status===sr){var _e=y;_e._status=zr,_e._result=nt}},function(nt){if(y._status===Vn||y._status===sr){var _e=y;_e._status=Za,_e._result=nt}}),y._status===sr){var X=y;X._status=Vn,X._result=B}}if(y._status===zr){var fe=y._result;return fe===void 0&&oe(`lazy: Expected the result of a dynamic import() call. Instead received: %s
1
+ import{a as vS,b as Hp}from"./chunk-XWPPBOGF.js";import{a as SC}from"./chunk-IWOTLFOY.js";import{b as EC}from"./chunk-EJDWYASP.js";import{h as Pf,i as sS,j as mC,k as cS,l as di,m as Hf,n as Ip,o as Au,p as Pp,r as fS,s as dS,t as hC,u as Zn,v as tc,w as yC,x as pS}from"./chunk-A4SBXDZB.js";import{a as mS}from"./chunk-AAK376RT.js";import{r as gC}from"./chunk-T6CC5WUU.js";import{a as vC,c as pa,e as nn,g as V}from"./chunk-VKWPEFWQ.js";var DS=pa(Bt=>{"use strict";V();var jf=Symbol.for("react.element"),TC=Symbol.for("react.portal"),_C=Symbol.for("react.fragment"),xC=Symbol.for("react.strict_mode"),RC=Symbol.for("react.profiler"),CC=Symbol.for("react.provider"),NC=Symbol.for("react.context"),DC=Symbol.for("react.forward_ref"),LC=Symbol.for("react.suspense"),OC=Symbol.for("react.memo"),bC=Symbol.for("react.lazy"),hS=Symbol.iterator;function AC(s){return s===null||typeof s!="object"?null:(s=hS&&s[hS]||s["@@iterator"],typeof s=="function"?s:null)}var ES={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},SS=Object.assign,TS={};function nc(s,o,p){this.props=s,this.context=o,this.refs=TS,this.updater=p||ES}nc.prototype.isReactComponent={};nc.prototype.setState=function(s,o){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,o,"setState")};nc.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function _S(){}_S.prototype=nc.prototype;function Uh(s,o,p){this.props=s,this.context=o,this.refs=TS,this.updater=p||ES}var wh=Uh.prototype=new _S;wh.constructor=Uh;SS(wh,nc.prototype);wh.isPureReactComponent=!0;var yS=Array.isArray,xS=Object.prototype.hasOwnProperty,zh={current:null},RS={key:!0,ref:!0,__self:!0,__source:!0};function CS(s,o,p){var E,h={},R=null,C=null;if(o!=null)for(E in o.ref!==void 0&&(C=o.ref),o.key!==void 0&&(R=""+o.key),o)xS.call(o,E)&&!RS.hasOwnProperty(E)&&(h[E]=o[E]);var F=arguments.length-2;if(F===1)h.children=p;else if(1<F){for(var A=Array(F),N=0;N<F;N++)A[N]=arguments[N+2];h.children=A}if(s&&s.defaultProps)for(E in F=s.defaultProps,F)h[E]===void 0&&(h[E]=F[E]);return{$$typeof:jf,type:s,key:R,ref:C,props:h,_owner:zh.current}}function UC(s,o){return{$$typeof:jf,type:s.type,key:o,ref:s.ref,props:s.props,_owner:s._owner}}function Mh(s){return typeof s=="object"&&s!==null&&s.$$typeof===jf}function wC(s){var o={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(p){return o[p]})}var gS=/\/+/g;function Ah(s,o){return typeof s=="object"&&s!==null&&s.key!=null?wC(""+s.key):o.toString(36)}function Bp(s,o,p,E,h){var R=typeof s;(R==="undefined"||R==="boolean")&&(s=null);var C=!1;if(s===null)C=!0;else switch(R){case"string":case"number":C=!0;break;case"object":switch(s.$$typeof){case jf:case TC:C=!0}}if(C)return C=s,h=h(C),s=E===""?"."+Ah(C,0):E,yS(h)?(p="",s!=null&&(p=s.replace(gS,"$&/")+"/"),Bp(h,o,p,"",function(N){return N})):h!=null&&(Mh(h)&&(h=UC(h,p+(!h.key||C&&C.key===h.key?"":(""+h.key).replace(gS,"$&/")+"/")+s)),o.push(h)),1;if(C=0,E=E===""?".":E+":",yS(s))for(var F=0;F<s.length;F++){R=s[F];var A=E+Ah(R,F);C+=Bp(R,o,p,A,h)}else if(A=AC(s),typeof A=="function")for(s=A.call(s),F=0;!(R=s.next()).done;)R=R.value,A=E+Ah(R,F++),C+=Bp(R,o,p,A,h);else if(R==="object")throw o=String(s),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.");return C}function jp(s,o,p){if(s==null)return s;var E=[],h=0;return Bp(s,E,"","",function(R){return o.call(p,R,h++)}),E}function zC(s){if(s._status===-1){var o=s._result;o=o(),o.then(function(p){(s._status===0||s._status===-1)&&(s._status=1,s._result=p)},function(p){(s._status===0||s._status===-1)&&(s._status=2,s._result=p)}),s._status===-1&&(s._status=0,s._result=o)}if(s._status===1)return s._result.default;throw s._result}var Ia={current:null},kp={transition:null},MC={ReactCurrentDispatcher:Ia,ReactCurrentBatchConfig:kp,ReactCurrentOwner:zh};function NS(){throw Error("act(...) is not supported in production builds of React.")}Bt.Children={map:jp,forEach:function(s,o,p){jp(s,function(){o.apply(this,arguments)},p)},count:function(s){var o=0;return jp(s,function(){o++}),o},toArray:function(s){return jp(s,function(o){return o})||[]},only:function(s){if(!Mh(s))throw Error("React.Children.only expected to receive a single React element child.");return s}};Bt.Component=nc;Bt.Fragment=_C;Bt.Profiler=RC;Bt.PureComponent=Uh;Bt.StrictMode=xC;Bt.Suspense=LC;Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MC;Bt.act=NS;Bt.cloneElement=function(s,o,p){if(s==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+s+".");var E=SS({},s.props),h=s.key,R=s.ref,C=s._owner;if(o!=null){if(o.ref!==void 0&&(R=o.ref,C=zh.current),o.key!==void 0&&(h=""+o.key),s.type&&s.type.defaultProps)var F=s.type.defaultProps;for(A in o)xS.call(o,A)&&!RS.hasOwnProperty(A)&&(E[A]=o[A]===void 0&&F!==void 0?F[A]:o[A])}var A=arguments.length-2;if(A===1)E.children=p;else if(1<A){F=Array(A);for(var N=0;N<A;N++)F[N]=arguments[N+2];E.children=F}return{$$typeof:jf,type:s.type,key:h,ref:R,props:E,_owner:C}};Bt.createContext=function(s){return s={$$typeof:NC,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},s.Provider={$$typeof:CC,_context:s},s.Consumer=s};Bt.createElement=CS;Bt.createFactory=function(s){var o=CS.bind(null,s);return o.type=s,o};Bt.createRef=function(){return{current:null}};Bt.forwardRef=function(s){return{$$typeof:DC,render:s}};Bt.isValidElement=Mh;Bt.lazy=function(s){return{$$typeof:bC,_payload:{_status:-1,_result:s},_init:zC}};Bt.memo=function(s,o){return{$$typeof:OC,type:s,compare:o===void 0?null:o}};Bt.startTransition=function(s){var o=kp.transition;kp.transition={};try{s()}finally{kp.transition=o}};Bt.unstable_act=NS;Bt.useCallback=function(s,o){return Ia.current.useCallback(s,o)};Bt.useContext=function(s){return Ia.current.useContext(s)};Bt.useDebugValue=function(){};Bt.useDeferredValue=function(s){return Ia.current.useDeferredValue(s)};Bt.useEffect=function(s,o){return Ia.current.useEffect(s,o)};Bt.useId=function(){return Ia.current.useId()};Bt.useImperativeHandle=function(s,o,p){return Ia.current.useImperativeHandle(s,o,p)};Bt.useInsertionEffect=function(s,o){return Ia.current.useInsertionEffect(s,o)};Bt.useLayoutEffect=function(s,o){return Ia.current.useLayoutEffect(s,o)};Bt.useMemo=function(s,o){return Ia.current.useMemo(s,o)};Bt.useReducer=function(s,o,p){return Ia.current.useReducer(s,o,p)};Bt.useRef=function(s){return Ia.current.useRef(s)};Bt.useState=function(s){return Ia.current.useState(s)};Bt.useSyncExternalStore=function(s,o,p){return Ia.current.useSyncExternalStore(s,o,p)};Bt.useTransition=function(){return Ia.current.useTransition()};Bt.version="18.3.1"});var LS=pa((kt,Vp)=>{"use strict";V();process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var s="18.3.1",o=Symbol.for("react.element"),p=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),F=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),Le=Symbol.for("react.offscreen"),Ce=Symbol.iterator,he="@@iterator";function Ee(y){if(y===null||typeof y!="object")return null;var L=Ce&&y[Ce]||y[he];return typeof L=="function"?L:null}var $e={current:null},st={transition:null},et={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},Xe={current:null},Xt={},qe=null;function Ve(y){qe=y}Xt.setExtraStackFrame=function(y){qe=y},Xt.getCurrentStack=null,Xt.getStackAddendum=function(){var y="";qe&&(y+=qe);var L=Xt.getCurrentStack;return L&&(y+=L()||""),y};var rn=!1,Ge=!1,gt=!1,ze=!1,W=!1,ce={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:st,ReactCurrentOwner:Xe};ce.ReactDebugCurrentFrame=Xt,ce.ReactCurrentActQueue=et;function Oe(y){{for(var L=arguments.length,B=new Array(L>1?L-1:0),X=1;X<L;X++)B[X-1]=arguments[X];Tt("warn",y,B)}}function oe(y){{for(var L=arguments.length,B=new Array(L>1?L-1:0),X=1;X<L;X++)B[X-1]=arguments[X];Tt("error",y,B)}}function Tt(y,L,B){{var X=ce.ReactDebugCurrentFrame,fe=X.getStackAddendum();fe!==""&&(L+="%s",B=B.concat([fe]));var nt=B.map(function(_e){return String(_e)});nt.unshift("Warning: "+L),Function.prototype.apply.call(console[y],console,nt)}}var je={};function Rt(y,L){{var B=y.constructor,X=B&&(B.displayName||B.name)||"ReactClass",fe=X+"."+L;if(je[fe])return;oe("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",L,X),je[fe]=!0}}var Ue={isMounted:function(y){return!1},enqueueForceUpdate:function(y,L,B){Rt(y,"forceUpdate")},enqueueReplaceState:function(y,L,B,X){Rt(y,"replaceState")},enqueueSetState:function(y,L,B,X){Rt(y,"setState")}},_t=Object.assign,rt={};Object.freeze(rt);function Wt(y,L,B){this.props=y,this.context=L,this.refs=rt,this.updater=B||Ue}Wt.prototype.isReactComponent={},Wt.prototype.setState=function(y,L){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,L,"setState")},Wt.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};{var Je={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},bn=function(y,L){Object.defineProperty(Wt.prototype,y,{get:function(){Oe("%s(...) is deprecated in plain JavaScript React classes. %s",L[0],L[1])}})};for(var Kt in Je)Je.hasOwnProperty(Kt)&&bn(Kt,Je[Kt])}function tt(){}tt.prototype=Wt.prototype;function U(y,L,B){this.props=y,this.context=L,this.refs=rt,this.updater=B||Ue}var J=U.prototype=new tt;J.constructor=U,_t(J,Wt.prototype),J.isPureReactComponent=!0;function Ke(){var y={current:null};return Object.seal(y),y}var Yt=Array.isArray;function vt(y){return Yt(y)}function Dt(y){{var L=typeof Symbol=="function"&&Symbol.toStringTag,B=L&&y[Symbol.toStringTag]||y.constructor.name||"Object";return B}}function Et(y){try{return Qt(y),!1}catch{return!0}}function Qt(y){return""+y}function Nn(y){if(Et(y))return oe("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dt(y)),Qt(y)}function An(y,L,B){var X=y.displayName;if(X)return X;var fe=L.displayName||L.name||"";return fe!==""?B+"("+fe+")":B}function kn(y){return y.displayName||"Context"}function gn(y){if(y==null)return null;if(typeof y.tag=="number"&&oe("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case E:return"Fragment";case p:return"Portal";case R:return"Profiler";case h:return"StrictMode";case N:return"Suspense";case le:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case F:var L=y;return kn(L)+".Consumer";case C:var B=y;return kn(B._context)+".Provider";case A:return An(y,y.render,"ForwardRef");case $:var X=y.displayName||null;return X!==null?X:gn(y.type)||"Memo";case xe:{var fe=y,nt=fe._payload,_e=fe._init;try{return gn(_e(nt))}catch{return null}}}return null}var $n=Object.prototype.hasOwnProperty,br={key:!0,ref:!0,__self:!0,__source:!0},ha,on,Ar;Ar={};function ir(y){if($n.call(y,"ref")){var L=Object.getOwnPropertyDescriptor(y,"ref").get;if(L&&L.isReactWarning)return!1}return y.ref!==void 0}function Pa(y){if($n.call(y,"key")){var L=Object.getOwnPropertyDescriptor(y,"key").get;if(L&&L.isReactWarning)return!1}return y.key!==void 0}function Ka(y,L){var B=function(){ha||(ha=!0,oe("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};B.isReactWarning=!0,Object.defineProperty(y,"key",{get:B,configurable:!0})}function ya(y,L){var B=function(){on||(on=!0,oe("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",L))};B.isReactWarning=!0,Object.defineProperty(y,"ref",{get:B,configurable:!0})}function ga(y){if(typeof y.ref=="string"&&Xe.current&&y.__self&&Xe.current.stateNode!==y.__self){var L=gn(Xe.current.type);Ar[L]||(oe('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',L,y.ref),Ar[L]=!0)}}var Ea=function(y,L,B,X,fe,nt,_e){var Ze={$$typeof:o,type:y,key:L,ref:B,props:_e,_owner:nt};return Ze._store={},Object.defineProperty(Ze._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ze,"_self",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.defineProperty(Ze,"_source",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.freeze&&(Object.freeze(Ze.props),Object.freeze(Ze)),Ze};function ta(y,L,B){var X,fe={},nt=null,_e=null,Ze=null,St=null;if(L!=null){ir(L)&&(_e=L.ref,ga(L)),Pa(L)&&(Nn(L.key),nt=""+L.key),Ze=L.__self===void 0?null:L.__self,St=L.__source===void 0?null:L.__source;for(X in L)$n.call(L,X)&&!br.hasOwnProperty(X)&&(fe[X]=L[X])}var At=arguments.length-2;if(At===1)fe.children=B;else if(At>1){for(var Pt=Array(At),qt=0;qt<At;qt++)Pt[qt]=arguments[qt+2];Object.freeze&&Object.freeze(Pt),fe.children=Pt}if(y&&y.defaultProps){var mn=y.defaultProps;for(X in mn)fe[X]===void 0&&(fe[X]=mn[X])}if(nt||_e){var _n=typeof y=="function"?y.displayName||y.name||"Unknown":y;nt&&Ka(fe,_n),_e&&ya(fe,_n)}return Ea(y,nt,_e,Ze,St,Xe.current,fe)}function ye(y,L){var B=Ea(y.type,L,y.ref,y._self,y._source,y._owner,y.props);return B}function We(y,L,B){if(y==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var X,fe=_t({},y.props),nt=y.key,_e=y.ref,Ze=y._self,St=y._source,At=y._owner;if(L!=null){ir(L)&&(_e=L.ref,At=Xe.current),Pa(L)&&(Nn(L.key),nt=""+L.key);var Pt;y.type&&y.type.defaultProps&&(Pt=y.type.defaultProps);for(X in L)$n.call(L,X)&&!br.hasOwnProperty(X)&&(L[X]===void 0&&Pt!==void 0?fe[X]=Pt[X]:fe[X]=L[X])}var qt=arguments.length-2;if(qt===1)fe.children=B;else if(qt>1){for(var mn=Array(qt),_n=0;_n<qt;_n++)mn[_n]=arguments[_n+2];fe.children=mn}return Ea(y.type,nt,_e,Ze,St,At,fe)}function dt(y){return typeof y=="object"&&y!==null&&y.$$typeof===o}var Ie=".",an=":";function ur(y){var L=/[=:]/g,B={"=":"=0",":":"=2"},X=y.replace(L,function(fe){return B[fe]});return"$"+X}var Pe=!1,Me=/\/+/g;function vn(y){return y.replace(Me,"$&/")}function Zt(y,L){return typeof y=="object"&&y!==null&&y.key!=null?(Nn(y.key),ur(""+y.key)):L.toString(36)}function ut(y,L,B,X,fe){var nt=typeof y;(nt==="undefined"||nt==="boolean")&&(y=null);var _e=!1;if(y===null)_e=!0;else switch(nt){case"string":case"number":_e=!0;break;case"object":switch(y.$$typeof){case o:case p:_e=!0}}if(_e){var Ze=y,St=fe(Ze),At=X===""?Ie+Zt(Ze,0):X;if(vt(St)){var Pt="";At!=null&&(Pt=vn(At)+"/"),ut(St,L,Pt,"",function(Ql){return Ql})}else St!=null&&(dt(St)&&(St.key&&(!Ze||Ze.key!==St.key)&&Nn(St.key),St=ye(St,B+(St.key&&(!Ze||Ze.key!==St.key)?vn(""+St.key)+"/":"")+At)),L.push(St));return 1}var qt,mn,_n=0,On=X===""?Ie:X+an;if(vt(y))for(var Wn=0;Wn<y.length;Wn++)qt=y[Wn],mn=On+Zt(qt,Wn),_n+=ut(qt,L,B,mn,fe);else{var Mr=Ee(y);if(typeof Mr=="function"){var cn=y;Mr===cn.entries&&(Pe||Oe("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Pe=!0);for(var Si=Mr.call(cn),aa,Yo=0;!(aa=Si.next()).done;)qt=aa.value,mn=On+Zt(qt,Yo++),_n+=ut(qt,L,B,mn,fe)}else if(nt==="object"){var Yl=String(y);throw new Error("Objects are not valid as a React child (found: "+(Yl==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":Yl)+"). If you meant to render a collection of children, use an array instead.")}}return _n}function lr(y,L,B){if(y==null)return y;var X=[],fe=0;return ut(y,X,"","",function(nt){return L.call(B,nt,fe++)}),X}function pi(y){var L=0;return lr(y,function(){L++}),L}function or(y,L,B){lr(y,function(){L.apply(this,arguments)},B)}function Ot(y){return lr(y,function(L){return L})||[]}function Ur(y){if(!dt(y))throw new Error("React.Children.only expected to receive a single React element child.");return y}function wr(y){var L={$$typeof:F,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};L.Provider={$$typeof:C,_context:L};var B=!1,X=!1,fe=!1;{var nt={$$typeof:F,_context:L};Object.defineProperties(nt,{Provider:{get:function(){return X||(X=!0,oe("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),L.Provider},set:function(_e){L.Provider=_e}},_currentValue:{get:function(){return L._currentValue},set:function(_e){L._currentValue=_e}},_currentValue2:{get:function(){return L._currentValue2},set:function(_e){L._currentValue2=_e}},_threadCount:{get:function(){return L._threadCount},set:function(_e){L._threadCount=_e}},Consumer:{get:function(){return B||(B=!0,oe("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),L.Consumer}},displayName:{get:function(){return L.displayName},set:function(_e){fe||(Oe("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",_e),fe=!0)}}}),L.Consumer=nt}return L._currentRenderer=null,L._currentRenderer2=null,L}var sr=-1,Vn=0,zr=1,Za=2;function $i(y){if(y._status===sr){var L=y._result,B=L();if(B.then(function(nt){if(y._status===Vn||y._status===sr){var _e=y;_e._status=zr,_e._result=nt}},function(nt){if(y._status===Vn||y._status===sr){var _e=y;_e._status=Za,_e._result=nt}}),y._status===sr){var X=y;X._status=Vn,X._result=B}}if(y._status===zr){var fe=y._result;return fe===void 0&&oe(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
2
 
3
3
  Your code should look like:
4
4
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -1,10 +1,10 @@
1
- import{b as ye}from"./chunk-RKDZGK5K.js";import{b as Fe}from"./chunk-WA3YC5W4.js";import{a as ue,c as he}from"./chunk-RSRYC5ZF.js";import{a as Le}from"./chunk-EKVTNWHM.js";import{Ca as xe,Fa as Re,G as be,L as ve,O as Pe,Q as Ae,ca as Ie,ea as Ce,h as we}from"./chunk-4QTEPWEJ.js";import{$ as G,da as ke,o as ge}from"./chunk-UTO4Z6P6.js";import{B as re,D as ie,E as ne,f as R,g as te,i as ae,p as oe}from"./chunk-ANBOLDON.js";import{a as U}from"./chunk-VPPWSKOY.js";import{b as de}from"./chunk-OXJBYKMX.js";import{b as X}from"./chunk-N5LVGFDS.js";import{D as me,f as se,u as le,v as ce,z as S}from"./chunk-NTRAWIEJ.js";import{d as pe}from"./chunk-VI34CKV6.js";import{d as f}from"./chunk-TPCG6DCA.js";import{r as De}from"./chunk-T6CC5WUU.js";import{$ as O,$a as Q,Ab as ee,Ca as I,Fb as h,Gb as L,Hb as g,Ja as B,Oa as W,Ta as C,Ua as x,Va as q,Wa as Z,ka as V,ma as Y,sa as _,ua as $,wa as K,zb as J}from"./chunk-7FQFEB33.js";import{e as fe}from"./chunk-S5IFJ737.js";import{d as p,e as k,f as z,p as D,q as H}from"./chunk-773TIA5M.js";import{e as ze,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},E=Object.keys(b),F=E.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:E.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([d,m])=>({value:m.branch,label:m.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await ee(),o},Te=Oe;function T(e){return E.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=U,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Q(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return oe({directory:k(e),packageManager:t,args:a})}c();async function j(e,t){let r=(await Z([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(te[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return B(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=O(e.name),r=p(e.directory,a),o=ye(e.template);await Se(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
- Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await V(async i=>{let d=p(i,"download"),m=o.filePath?p(d,o.filePath):d,u=p(i,"app"),A=o.branch?`${o.baseURL}#${o.branch}`:o.baseURL;await K(d);let w=[{title:`Downloading template from ${A}`,task:async()=>{await he({repoUrl:A,destination:d,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await Fe(m,u,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let l=(await re(u)).content;l.name=a,l.author=await se()??"",l.private=!0;let v=["extensions/*"].concat(We(u));switch(t){case"npm":case"yarn":case"bun":l.workspaces=v;break;case"pnpm":{await qe(u,v),await _(p(u,".npmrc"),`auto-install-peers=true
1
+ import{b as we}from"./chunk-UFGDNIYX.js";import{a as he,c as ye}from"./chunk-ICXHUPP5.js";import{b as ue}from"./chunk-6LTJMYUD.js";import{a as Fe}from"./chunk-PLHJQQVZ.js";import{Ca as Re,Fa as Le,G as ve,L as Pe,O as Ae,Q as ke,ca as Ce,ea as xe,h as ge}from"./chunk-KJQAJUDU.js";import{$ as G,da as Ie,o as be}from"./chunk-UEC23KAO.js";import{B as re,D as ie,E as ne,f as R,g as te,i as ae,p as oe}from"./chunk-HX3TALXV.js";import{a as U}from"./chunk-Q3WOWDUU.js";import{b as de}from"./chunk-S5JJL3BP.js";import{b as X}from"./chunk-BU7R7NFL.js";import{D as me,f as se,u as le,v as ce,z as S}from"./chunk-YYLEWVO6.js";import{d as pe}from"./chunk-N5U5Q2MG.js";import{d as f}from"./chunk-AUZCENYI.js";import{$ as O,$a as Q,Ab as ee,Ca as I,Fb as h,Gb as L,Hb as g,Ja as B,Oa as W,Ta as C,Ua as x,Va as q,Wa as Z,ka as V,ma as Y,sa as _,ua as $,wa as K,zb as J}from"./chunk-BXDZX3BS.js";import{e as fe}from"./chunk-MGPLKG23.js";import{d as p,e as k,f as z,p as D,q as H}from"./chunk-773TIA5M.js";import{r as De}from"./chunk-T6CC5WUU.js";import{e as ze,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},E=Object.keys(b),F=E.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:E.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([d,m])=>({value:m.branch,label:m.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await ee(),o},Te=Oe;function T(e){return E.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=U,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Q(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return oe({directory:k(e),packageManager:t,args:a})}c();async function j(e,t){let r=(await Z([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(te[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return B(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=O(e.name),r=p(e.directory,a),o=we(e.template);await Se(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
2
+ Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await V(async i=>{let d=p(i,"download"),m=o.filePath?p(d,o.filePath):d,u=p(i,"app"),A=o.branch?`${o.baseURL}#${o.branch}`:o.baseURL;await K(d);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:d,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(m,u,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let l=(await re(u)).content;l.name=a,l.author=await se()??"",l.private=!0;let v=["extensions/*"].concat(We(u));switch(t){case"npm":case"yarn":case"bun":l.workspaces=v;break;case"pnpm":{await qe(u,v),await _(p(u,".npmrc"),`auto-install-peers=true
3
3
  `);break}case"homebrew":case"unknown":throw new ae}await _e({packageJSON:l,local:e.local,directory:u,useGlobalCLI:e.useGlobalCLI}),await ie(u,l)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let l=p(u,".gitignore");if(await C(l)){let v=await Y(l);R.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await $(l,v.trim())}}}),await fe()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let l=p(u,".npmrc");await _(l,`@shopify:registry=https://registry.npmjs.org
4
- `)}});let M=!1;w.push({title:"Preparing project directory",task:async()=>{await Se(r,a),M=!0,await W(u,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await $e({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await j(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await ue(r)}});try{await me(w)}catch(l){throw M&&await I(r).catch(()=>{}),l}});let n;if(e.selectedAppOrNameResult.result==="new"){let i=await be(r,e.name),d=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(d,i)}else n=e.selectedAppOrNameResult.app;await xe({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Re({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return ce({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:L(t,"shopify app generate extension")}],["To see your app, run",{command:L(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:L(t,"shopify app","--help")}]]}),{app:s.app}}async function Se(e,t){if(await C(e))throw new f(`
4
+ `)}});let M=!1;w.push({title:"Preparing project directory",task:async()=>{await Se(r,a),M=!0,await W(u,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await $e({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await j(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await me(w)}catch(l){throw M&&await I(r).catch(()=>{}),l}});let n;if(e.selectedAppOrNameResult.result==="new"){let i=await ve(r,e.name),d=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(d,i)}else n=e.selectedAppOrNameResult.app;await Re({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return ce({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:L(t,"shopify app generate extension")}],["To see your app, run",{command:L(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:L(t,"shopify app","--help")}]]}),{app:s.app}}async function Se(e,t){if(await C(e))throw new f(`
5
5
  A directory with this name (${t}) already exists.
6
6
  Choose a new name for your app.`)}async function Be(e){let t=new X({projectName:"shopify-cli-app"}),a=k(e);t.delete(a)}function We(e){return["web","web/frontend"].filter(t=>x(p(e,t)))}async function qe(e,t){let a=p(e,"pnpm-workspace.yaml");if(await C(a))return;let r=t.map(o=>` - '${o}'`).join(`
7
7
  `);await $(a,`packages:
8
- ${r}`)}var Ge=Ke;c();c();function N(e){try{return new URL(e)}catch{return}}function Ze(e){if(!e)return;let t=e.toLowerCase();for(let r of[t,`https://${t}`]){let o=N(r)?.hostname;if(o)return o}let a=t.replace(/^https?:\/\//,"").split("/")[0];if(a)return a}function Et(e){let t=Ze(e);if(!t)return;let a=t.match(/^([^.]+)\.myshopify\.com$/);return a?a[1]:void 0}function Ee(e){if(!e)return;let t=N(e);if(t&&t.origin!=="https://github.com")throw new f("Only GitHub repository references are supported, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]");if(!t&&!T(e))throw new f(g`Only ${F.map(a=>g`${h.yellow(a)}`.value).join(", ")} template aliases are supported, please provide a valid URL`)}function je(e,t){if(!e){if(t)throw new f(g`The ${h.yellow("--flavor")} flag requires the ${h.yellow("--template")} flag to be set`);return}if(!t)return;if(!T(e))throw new f(g`The ${h.yellow("--flavor")} flag is not supported for custom templates`);let a=b[e];if(!a.branches)throw new f(g`The ${h.yellow(e)} template does not support flavors`);if(!a.branches.options[t])throw new f(g`Invalid option for ${h.yellow("--flavor")}\nThe ${h.yellow("--flavor")} flag for ${h.yellow(e)} accepts only ${Object.keys(a.branches.options).map(r=>g`${h.yellow(r)}`.value).join(", ")}`)}var y=ze(De(),1);var Ne,P=class extends Le{async run(){let{flags:t}=await this.parse(Ne);if(Ee(t.template),je(t.template,t.flavor),t.name!==void 0&&t.name.trim()==="")throw new f("The --name flag can't be empty","Provide a valid app name, for example: --name my-app");let a=ne(t["package-manager"]),r=t.name??await Qe(t.path),o=G();await o.session();let n=await Te({template:t.template,flavor:t.flavor}),s,i;if(t["client-id"]){let m=await Ie({apiKey:t["client-id"]});i=m.title,o=m.developerPlatformClient??o,s={result:"existing",app:m}}else{let m;t["organization-id"]?m=await ke(t["organization-id"],o):m=await Ce(),o=G({organization:m});let{organization:u,apps:A,hasMorePages:w}=await o.orgAndApps(m.id);s=await Xe(t.name!==void 0,r,A,w,u,o),i=s.result==="new"?s.name:s.app.title}n.globalCLIResult.install&&await J(a),await pe(()=>({cmd_create_app_template:n.templateType,cmd_create_app_template_url:n.template}));let{app:d}=await Ge({name:i,selectedAppOrNameResult:s,packageManager:a,template:n.template,local:t.local,directory:t.path,useGlobalCLI:n.globalCLIResult.alreadyInstalled||n.globalCLIResult.install,developerPlatformClient:o,postCloneActions:{removeLockfilesFromGitignore:n.templateType!=="custom"}});return{app:d}}};Ne=P;P.summary="Create a new app project";P.flags={...de,name:y.Flags.string({char:"n",env:"SHOPIFY_FLAG_NAME",hidden:!1,description:"The name for the new app. When provided, skips the app selection prompt and creates a new app with this name."}),path:y.Flags.string({char:"p",env:"SHOPIFY_FLAG_PATH",parse:async e=>z(e),default:async()=>H(),hidden:!1}),template:y.Flags.string({description:`The app template. Accepts one of the following:
8
+ ${r}`)}var Ge=Ke;c();c();function N(e){try{return new URL(e)}catch{return}}function Ze(e){if(!e)return;let t=e.toLowerCase();for(let r of[t,`https://${t}`]){let o=N(r)?.hostname;if(o)return o}let a=t.replace(/^https?:\/\//,"").split("/")[0];if(a)return a}function Et(e){let t=Ze(e);if(!t)return;let a=t.match(/^([^.]+)\.myshopify\.com$/);return a?a[1]:void 0}function Ee(e){if(!e)return;let t=N(e);if(t&&t.origin!=="https://github.com")throw new f("Only GitHub repository references are supported, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]");if(!t&&!T(e))throw new f(g`Only ${F.map(a=>g`${h.yellow(a)}`.value).join(", ")} template aliases are supported, please provide a valid URL`)}function je(e,t){if(!e){if(t)throw new f(g`The ${h.yellow("--flavor")} flag requires the ${h.yellow("--template")} flag to be set`);return}if(!t)return;if(!T(e))throw new f(g`The ${h.yellow("--flavor")} flag is not supported for custom templates`);let a=b[e];if(!a.branches)throw new f(g`The ${h.yellow(e)} template does not support flavors`);if(!a.branches.options[t])throw new f(g`Invalid option for ${h.yellow("--flavor")}\nThe ${h.yellow("--flavor")} flag for ${h.yellow(e)} accepts only ${Object.keys(a.branches.options).map(r=>g`${h.yellow(r)}`.value).join(", ")}`)}var y=ze(De(),1);var Ne,P=class extends Fe{async run(){let{flags:t}=await this.parse(Ne);if(Ee(t.template),je(t.template,t.flavor),t.name!==void 0&&t.name.trim()==="")throw new f("The --name flag can't be empty","Provide a valid app name, for example: --name my-app");let a=ne(t["package-manager"]),r=t.name??await Qe(t.path),o=G();await o.session();let n=await Te({template:t.template,flavor:t.flavor}),s,i;if(t["client-id"]){let m=await Ce({apiKey:t["client-id"]});i=m.title,o=m.developerPlatformClient??o,s={result:"existing",app:m}}else{let m;t["organization-id"]?m=await Ie(t["organization-id"],o):m=await xe(),o=G({organization:m});let{organization:u,apps:A,hasMorePages:w}=await o.orgAndApps(m.id);s=await Xe(t.name!==void 0,r,A,w,u,o),i=s.result==="new"?s.name:s.app.title}n.globalCLIResult.install&&await J(a),await pe(()=>({cmd_create_app_template:n.templateType,cmd_create_app_template_url:n.template}));let{app:d}=await Ge({name:i,selectedAppOrNameResult:s,packageManager:a,template:n.template,local:t.local,directory:t.path,useGlobalCLI:n.globalCLIResult.alreadyInstalled||n.globalCLIResult.install,developerPlatformClient:o,postCloneActions:{removeLockfilesFromGitignore:n.templateType!=="custom"}});return{app:d}}};Ne=P;P.summary="Create a new app project";P.flags={...de,name:y.Flags.string({char:"n",env:"SHOPIFY_FLAG_NAME",hidden:!1,description:"The name for the new app. When provided, skips the app selection prompt and creates a new app with this name."}),path:y.Flags.string({char:"p",env:"SHOPIFY_FLAG_PATH",parse:async e=>z(e),default:async()=>H(),hidden:!1}),template:y.Flags.string({description:`The app template. Accepts one of the following:
9
9
  - <${F.join("|")}>
10
- - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]`,env:"SHOPIFY_FLAG_TEMPLATE"}),flavor:y.Flags.string({description:"Which flavor of the given template to use.",env:"SHOPIFY_FLAG_TEMPLATE_FLAVOR"}),"package-manager":y.Flags.string({char:"d",env:"SHOPIFY_FLAG_PACKAGE_MANAGER",hidden:!1,options:["npm","yarn","pnpm","bun"]}),local:y.Flags.boolean({char:"l",env:"SHOPIFY_FLAG_LOCAL",default:!1,hidden:!0}),"client-id":y.Flags.string({hidden:!1,description:"The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),"organization-id":y.Flags.string({hidden:!1,description:"The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/<organization-id>",env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};var sa=P;async function Qe(e){for(let t=0;t<3;t++){let a=await q({suffix:"app",directory:e});if(ge(a))return a}return""}async function Xe(e,t,a,r,o,n){let s=a.length===0||e;if(s||(s=await Ae()),s)return{result:"new",name:e?t:await Pe(t),org:o};{let i=await ve(we(n,o.id),a,r);if(!i)throw new f("Unable to select an app: the selection prompt was interrupted.");let d=await n.appFromIdentifiers(i.apiKey);if(!d)throw new f(`App with id ${i.id} not found`);return{result:"existing",app:d}}}export{Ze as a,Et as b,sa as c};
10
+ - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]`,env:"SHOPIFY_FLAG_TEMPLATE"}),flavor:y.Flags.string({description:"Which flavor of the given template to use.",env:"SHOPIFY_FLAG_TEMPLATE_FLAVOR"}),"package-manager":y.Flags.string({char:"d",env:"SHOPIFY_FLAG_PACKAGE_MANAGER",hidden:!1,options:["npm","yarn","pnpm","bun"]}),local:y.Flags.boolean({char:"l",env:"SHOPIFY_FLAG_LOCAL",default:!1,hidden:!0}),"client-id":y.Flags.string({hidden:!1,description:"The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),"organization-id":y.Flags.string({hidden:!1,description:"The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/<organization-id>",env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};var sa=P;async function Qe(e){for(let t=0;t<3;t++){let a=await q({suffix:"app",directory:e});if(be(a))return a}return""}async function Xe(e,t,a,r,o,n){let s=a.length===0||e;if(s||(s=await ke()),s)return{result:"new",name:e?t:await Ae(t),org:o};{let i=await Pe(ge(n,o.id),a,r);if(!i)throw new f("Unable to select an app: the selection prompt was interrupted.");let d=await n.appFromIdentifiers(i.apiKey);if(!d)throw new f(`App with id ${i.id} not found`);return{result:"existing",app:d}}}export{Ze as a,Et as b,sa as c};
@@ -0,0 +1 @@
1
+ import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-3EQY5B4S.js";import{b as l}from"./chunk-TM534QSE.js";import{d as p,g as F}from"./chunk-AUZCENYI.js";import{Fb as V,Hb as h}from"./chunk-BXDZX3BS.js";import{j as q}from"./chunk-NNOSZ447.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??(s=await b(e,n));let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-J3HX6ZGD.js";import{l as i}from"./chunk-TPCG6DCA.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
1
+ import{b as n}from"./chunk-WTYH2O47.js";import{l as i}from"./chunk-AUZCENYI.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
@@ -1 +1 @@
1
- import{b as h}from"./chunk-N5LVGFDS.js";import{Hb as a,Pb as u}from"./chunk-7FQFEB33.js";import{f as I}from"./chunk-S5IFJ737.js";import{c as D}from"./chunk-NNOSZ447.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();var p;(function(e){e.Local="local",e.Production="production"})(p||(p={}));function L(e=process.env){return e[D.serviceEnv]==="local"?p.Local:p.Production}function v(e=process.env){return L(e)===p.Local}var S;function n(){return S??(S=new h({projectName:`shopify-cli-kit${I()?"-test":""}`})),S}function g(){return v()?"devSessionStore":"sessionStore"}function x(){return v()?"currentDevSessionId":"currentSessionId"}function M(e=n()){return u(a`Getting session store...`),e.get(g())}function N(e,t=n()){u(a`Setting session store...`),t.set(g(),e)}function O(e=n()){u(a`Removing session store...`),e.delete(g())}function F(e=n()){return u(a`Getting current session ID...`),e.get(x())}function T(e,t=n()){u(a`Setting current session ID...`),t.set(x(),e)}function V(e=n()){u(a`Removing current session ID...`),e.delete(x())}async function W(e,t,r,o=n()){let c=b(e,o);if(c?.value!==void 0&&(r===void 0||Date.now()-c.timestamp<r))return c.value;let i=await t();return P(e,i,o),i}function P(e,t,r=n()){let o=r.get("cache")??{};o[e]={value:t,timestamp:Date.now()},r.set("cache",o)}function b(e,t=n()){return(t.get("cache")??{})[e]}function _(e=n()){e.delete("cache")}function y({days:e=0,hours:t=0,minutes:r=0,seconds:o=0}){return(e*24*60*60+t*60*60+r*60+o)*1e3}async function q(e,t,r,o=n()){let c=o.get("cache")??{},i=`most-recent-occurrence-${e}`,s=c[i];return s?.value!==void 0&&Date.now()-s.timestamp<y(t)?!1:(await r(),c[i]={value:!0,timestamp:Date.now()},o.set("cache",c),!0)}async function z(e,t=n()){let{key:r,limit:o,timeout:c,task:i}=e,s=t.get("cache")??{},m=`rate-limited-occurrences-${r}`,w=s[m],l=Date.now();if(w?.value){let C=l-y(c),d=w.value.filter(E=>E>=C);if(d.length>=o)return s[m]={value:d,timestamp:Date.now()},t.set("cache",s),!1;await i(),s[m]={value:[...d,l],timestamp:l}}else await i(),s[m]={value:[l],timestamp:l};return t.set("cache",s),!0}function B(e=n()){return e.get("autoUpgradeEnabled")??!0}function H(e,t=n()){t.set("autoUpgradeEnabled",e)}function A(){return new h({projectName:"shopify-cli-kit-partner-status"})}function J(e){return e&&A().get(e)?!0:null}function Q(e){A().set(e,{status:!0,checkedAt:new Date().toISOString()})}export{p as a,L as b,v as c,M as d,N as e,O as f,F as g,T as h,V as i,W as j,P as k,b as l,_ as m,y as n,q as o,z as p,B as q,H as r,A as s,J as t,Q as u};
1
+ import{b as h}from"./chunk-BU7R7NFL.js";import{Hb as a,Pb as u}from"./chunk-BXDZX3BS.js";import{f as I}from"./chunk-MGPLKG23.js";import{c as D}from"./chunk-NNOSZ447.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();var p;(function(e){e.Local="local",e.Production="production"})(p||(p={}));function L(e=process.env){return e[D.serviceEnv]==="local"?p.Local:p.Production}function v(e=process.env){return L(e)===p.Local}var S;function n(){return S??(S=new h({projectName:`shopify-cli-kit${I()?"-test":""}`})),S}function g(){return v()?"devSessionStore":"sessionStore"}function x(){return v()?"currentDevSessionId":"currentSessionId"}function M(e=n()){return u(a`Getting session store...`),e.get(g())}function N(e,t=n()){u(a`Setting session store...`),t.set(g(),e)}function O(e=n()){u(a`Removing session store...`),e.delete(g())}function F(e=n()){return u(a`Getting current session ID...`),e.get(x())}function T(e,t=n()){u(a`Setting current session ID...`),t.set(x(),e)}function V(e=n()){u(a`Removing current session ID...`),e.delete(x())}async function W(e,t,r,o=n()){let c=b(e,o);if(c?.value!==void 0&&(r===void 0||Date.now()-c.timestamp<r))return c.value;let i=await t();return P(e,i,o),i}function P(e,t,r=n()){let o=r.get("cache")??{};o[e]={value:t,timestamp:Date.now()},r.set("cache",o)}function b(e,t=n()){return(t.get("cache")??{})[e]}function _(e=n()){e.delete("cache")}function y({days:e=0,hours:t=0,minutes:r=0,seconds:o=0}){return(e*24*60*60+t*60*60+r*60+o)*1e3}async function q(e,t,r,o=n()){let c=o.get("cache")??{},i=`most-recent-occurrence-${e}`,s=c[i];return s?.value!==void 0&&Date.now()-s.timestamp<y(t)?!1:(await r(),c[i]={value:!0,timestamp:Date.now()},o.set("cache",c),!0)}async function z(e,t=n()){let{key:r,limit:o,timeout:c,task:i}=e,s=t.get("cache")??{},m=`rate-limited-occurrences-${r}`,w=s[m],l=Date.now();if(w?.value){let C=l-y(c),d=w.value.filter(E=>E>=C);if(d.length>=o)return s[m]={value:d,timestamp:Date.now()},t.set("cache",s),!1;await i(),s[m]={value:[...d,l],timestamp:l}}else await i(),s[m]={value:[l],timestamp:l};return t.set("cache",s),!0}function B(e=n()){return e.get("autoUpgradeEnabled")??!0}function H(e,t=n()){t.set("autoUpgradeEnabled",e)}function A(){return new h({projectName:"shopify-cli-kit-partner-status"})}function J(e){return e&&A().get(e)?!0:null}function Q(e){A().set(e,{status:!0,checkedAt:new Date().toISOString()})}export{p as a,L as b,v as c,M as d,N as e,O as f,F as g,T as h,V as i,W as j,P as k,b as l,_ as m,y as n,q as o,z as p,B as q,H as r,A as s,J as t,Q as u};
@@ -1,4 +1,4 @@
1
- import{a as s}from"./chunk-EKVTNWHM.js";import{a as r}from"./chunk-5BKCIDMS.js";import{Ca as n,Fa as p}from"./chunk-4QTEPWEJ.js";import{b as e}from"./chunk-OXJBYKMX.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var c=m(g(),1);var t,o=class extends s{async run(){let{flags:i}=await this.parse(t),f={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config},d=await n(f),{app:l}=await p({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=o;o.summary="Fetch your app configuration from the Developer Dashboard.";o.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
1
+ import{a as s}from"./chunk-PLHJQQVZ.js";import{a as r}from"./chunk-6V37CHBZ.js";import{Ca as n,Fa as p}from"./chunk-KJQAJUDU.js";import{b as e}from"./chunk-S5JJL3BP.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var c=m(g(),1);var t,o=class extends s{async run(){let{flags:i}=await this.parse(t),f={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config},d=await n(f),{app:l}=await p({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=o;o.summary="Fetch your app configuration from the Developer Dashboard.";o.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
2
2
 
3
3
  For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
4
4
  `;o.description=t.descriptionWithoutMarkdown();o.flags={...e,...r,"organization-id":c.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};var A=o;export{A as a};
@@ -1,4 +1,4 @@
1
- import{c as Me}from"./chunk-NILXAUUT.js";import{$ as ze,H as Ee,I as $e,K as ie,L as ae,P as te,b as Ie,ba as q,ca as Re,e as X,f as Te,ga as h,ha as Ce,ia as K,j as p,ja as Oe,ka as Le,la as Be,n as Ve,na as U,o as L,oa as Ke,pa as j,r as s,t as ee,v as D,w as qe,x as ne,z as B}from"./chunk-G4OQABDT.js";import{b as Pe}from"./chunk-ZDF5N422.js";import{w as oe}from"./chunk-ANBOLDON.js";import{b as we}from"./chunk-HDC5V7RY.js";import{a as M}from"./chunk-VPPWSKOY.js";import{b as Ue}from"./chunk-N5LVGFDS.js";import{a as Ge}from"./chunk-WW7TENNA.js";import{B as je}from"./chunk-NTRAWIEJ.js";import{d as k,g as v}from"./chunk-TPCG6DCA.js";import{Fb as We,Hb as Qe,N as be,Pb as x,Ta as De,U as Fe,Wa as xe,ga as _e,ma as Ae}from"./chunk-7FQFEB33.js";import{u as Z}from"./chunk-A4SBXDZB.js";import{f as H,j as He}from"./chunk-S5IFJ737.js";import{d as he,j as O}from"./chunk-773TIA5M.js";import{e as P,g as o}from"./chunk-VKWPEFWQ.js";o();function E(n,{httpsOnly:e=!1,message:i="Invalid URL"}={}){return n.refine(a=>Je(a,e),{message:i}).refine(a=>!a.includes(`
1
+ import{c as Me}from"./chunk-BVHBMOIB.js";import{$ as ze,H as Ee,I as $e,K as ie,L as ae,P as te,b as Ie,ba as q,ca as Re,e as X,f as Te,ga as h,ha as Ce,ia as K,j as p,ja as Oe,ka as Le,la as Be,n as Ve,na as U,o as L,oa as Ke,pa as j,r as s,t as ee,v as D,w as qe,x as ne,z as B}from"./chunk-3EQY5B4S.js";import{b as Pe}from"./chunk-ZDF5N422.js";import{w as oe}from"./chunk-HX3TALXV.js";import{b as we}from"./chunk-TM534QSE.js";import{a as M}from"./chunk-Q3WOWDUU.js";import{b as Ue}from"./chunk-BU7R7NFL.js";import{a as Ge}from"./chunk-WW7TENNA.js";import{B as je}from"./chunk-YYLEWVO6.js";import{d as k,g as v}from"./chunk-AUZCENYI.js";import{Fb as We,Hb as Qe,N as be,Pb as x,Ta as De,U as Fe,Wa as xe,ga as _e,ma as Ae}from"./chunk-BXDZX3BS.js";import{u as Z}from"./chunk-A4SBXDZB.js";import{f as H,j as He}from"./chunk-MGPLKG23.js";import{d as he,j as O}from"./chunk-773TIA5M.js";import{e as P,g as o}from"./chunk-VKWPEFWQ.js";o();function E(n,{httpsOnly:e=!1,message:i="Invalid URL"}={}){return n.refine(a=>Je(a,e),{message:i}).refine(a=>!a.includes(`
2
2
  `),{message:i})}function mt(n,{message:e="URL must be HTTPS URL or start with /"}={}){return n.refine(i=>i.startsWith("/")||Je(i,!0),{message:e})}function Je(n,e){try{let i=new URL(n);return e?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function pt(n){return typeof n=="string"&&!n.startsWith("/")?`/${n}`:n}var Ji=30;function ut(n){return n.length<=Ji}o();o();o();var Ye=p`
3
3
  mutation AppCreate(
4
4
  $org: Int!
@@ -1 +1 @@
1
- import{n as R}from"./chunk-G4OQABDT.js";import{a as T,b as k}from"./chunk-J3HX6ZGD.js";import{f as G}from"./chunk-VI34CKV6.js";import{d as l}from"./chunk-TPCG6DCA.js";import{Fb as u,Hb as h,Oa as y,Pa as x,Pb as f,ka as $,ua as b,wa as g}from"./chunk-7FQFEB33.js";import{d,i as w}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();function U(a){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(a);if(!t){let v=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return k(new Error(`Parsing the url ${a} failed. Supported formats are ${v.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",r=e==="github"?"github.com":e,s=t[4],i=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),o=t[7],p=o?`#${o}`:"",c=`git@${r}:${s}/${i}`,H=`https://${r}/${s}/${i}`,P=["https:/",r,s,i,n].join("/").concat(p);return T({full:P,site:r,user:s,name:i,ref:o,subDirectory:n,ssh:c,http:H})}function A(a){let t=new URL(a),e=t.hash?t.hash.slice(1):void 0,[r,s,i,...n]=t.pathname.split("/"),o=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${s}/${i}`,branch:e,filePath:o}}async function B(a,t,e,r){let s=`https://github.com/${a}/releases/download/${t}/${e}`;return G("cmd_all_timing_network_ms")(async()=>{f(h`Downloading ${u.link(e,s)}`),await $(async i=>{let n=d(i,e),o;try{if(o=await R(s,void 0,"slow-request"),!o.ok)throw new l(`Failed to download ${e}: ${o.statusText}`)}catch(c){throw new l(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let p=await o.arrayBuffer();await b(n,Buffer.from(p)),await x(n,493),await g(w(r)),await y(n,r)}),f(h`${u.successIcon()} Successfully downloaded ${u.path(r)}`)})}export{U as a,A as b,B as c};
1
+ import{n as R}from"./chunk-3EQY5B4S.js";import{a as T,b as k}from"./chunk-WTYH2O47.js";import{f as G}from"./chunk-N5U5Q2MG.js";import{d as l}from"./chunk-AUZCENYI.js";import{Fb as u,Hb as h,Oa as y,Pa as x,Pb as f,ka as $,ua as b,wa as g}from"./chunk-BXDZX3BS.js";import{d,i as w}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();function U(a){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(a);if(!t){let v=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return k(new Error(`Parsing the url ${a} failed. Supported formats are ${v.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",r=e==="github"?"github.com":e,s=t[4],i=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),o=t[7],p=o?`#${o}`:"",c=`git@${r}:${s}/${i}`,H=`https://${r}/${s}/${i}`,P=["https:/",r,s,i,n].join("/").concat(p);return T({full:P,site:r,user:s,name:i,ref:o,subDirectory:n,ssh:c,http:H})}function A(a){let t=new URL(a),e=t.hash?t.hash.slice(1):void 0,[r,s,i,...n]=t.pathname.split("/"),o=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${s}/${i}`,branch:e,filePath:o}}async function B(a,t,e,r){let s=`https://github.com/${a}/releases/download/${t}/${e}`;return G("cmd_all_timing_network_ms")(async()=>{f(h`Downloading ${u.link(e,s)}`),await $(async i=>{let n=d(i,e),o;try{if(o=await R(s,void 0,"slow-request"),!o.ok)throw new l(`Failed to download ${e}: ${o.statusText}`)}catch(c){throw new l(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let p=await o.arrayBuffer();await b(n,Buffer.from(p)),await x(n,493),await g(w(r)),await y(n,r)}),f(h`${u.successIcon()} Successfully downloaded ${u.path(r)}`)})}export{U as a,A as b,B as c};
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-EKVTNWHM.js";import{a as E}from"./chunk-5BKCIDMS.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-4QTEPWEJ.js";import{b as I}from"./chunk-OXJBYKMX.js";import{D as A,v,x as h}from"./chunk-NTRAWIEJ.js";import{d as w}from"./chunk-VI34CKV6.js";import{f as k}from"./chunk-TPCG6DCA.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
1
+ import{a as C}from"./chunk-PLHJQQVZ.js";import{a as E}from"./chunk-6V37CHBZ.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-KJQAJUDU.js";import{b as I}from"./chunk-S5JJL3BP.js";import{D as A,v,x as h}from"./chunk-YYLEWVO6.js";import{d as w}from"./chunk-N5U5Q2MG.js";import{f as k}from"./chunk-AUZCENYI.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
2
2
  ${r.message}`:""];if(i.userErrors&&i.userErrors.length>0){let t=i.userErrors?.map(R=>R.message).join(", ");h({headline:"Version couldn't be released.",body:[...u,`${u.length>0?`
3
3
 
4
4
  `:""}${t}`]})}else v({headline:"Version released to users.",body:u})}var p=T(b(),1);var g,s=class extends C{async run(){let{flags:e}=await this.parse(g),m=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],a=e["allow-deletes"],r=!!(o&&a),l=[];!o&&!a&&l.push("allow-updates"),this.failMissingNonTTYFlags(e,l);let{app:c,remoteApp:f,developerPlatformClient:i}=await y({directory:e.path,clientId:m,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:c,remoteApp:f,developerPlatformClient:i,force:r,allowUpdates:o,allowDeletes:a,version:e.version}),{app:c}}};g=s;s.summary="Release an app version.";s.usage="app release --version <version>";s.descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";s.description=g.descriptionWithoutMarkdown();s.flags={...I,...E,"allow-updates":p.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":p.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:p.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};var G=s;export{G as a};
@@ -1 +1 @@
1
- import{b as f,c as o,d as h}from"./chunk-PMS4MNHB.js";import{a as l}from"./chunk-EKVTNWHM.js";import{a as c}from"./chunk-5BKCIDMS.js";import{Fa as m}from"./chunk-4QTEPWEJ.js";import{b as d}from"./chunk-OXJBYKMX.js";import{Mb as e}from"./chunk-7FQFEB33.js";import{u as r}from"./chunk-A4SBXDZB.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var t=class g extends l{async run(){let{flags:a}=await this.parse(g),{app:s}=await m({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),i=new h(s);return await i.start(),e(`Watching for changes in ${s.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(n=>{switch(n.type){case o.Created:e(` \u2705 Extension created - ${r.green(n.extension.handle)}`);break;case o.Deleted:e(` \u274C Extension deleted: ${r.red(n.extension.handle)}`);break;case o.Updated:e(` \u{1F504} Updated: ${r.yellow(n.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:s}}};t.summary="Watch and prints out changes to an app.";t.hidden=!0;t.flags={...d,...c};var F=t;export{F as a};
1
+ import{b as f,c as o,d as h}from"./chunk-57IRHKV3.js";import{a as l}from"./chunk-PLHJQQVZ.js";import{a as c}from"./chunk-6V37CHBZ.js";import{Fa as m}from"./chunk-KJQAJUDU.js";import{b as d}from"./chunk-S5JJL3BP.js";import{Mb as e}from"./chunk-BXDZX3BS.js";import{u as r}from"./chunk-A4SBXDZB.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var t=class g extends l{async run(){let{flags:a}=await this.parse(g),{app:s}=await m({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),i=new h(s);return await i.start(),e(`Watching for changes in ${s.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(n=>{switch(n.type){case o.Created:e(` \u2705 Extension created - ${r.green(n.extension.handle)}`);break;case o.Deleted:e(` \u274C Extension deleted: ${r.red(n.extension.handle)}`);break;case o.Updated:e(` \u{1F504} Updated: ${r.yellow(n.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:s}}};t.summary="Watch and prints out changes to an app.";t.hidden=!0;t.flags={...d,...c};var F=t;export{F as a};
@@ -1,5 +1,5 @@
1
- import{a as te,b as ne}from"./chunk-N3YTDGFY.js";import{b as T}from"./chunk-WA3YC5W4.js";import{c as Y}from"./chunk-RSRYC5ZF.js";import{a as ee}from"./chunk-EKVTNWHM.js";import{a as W}from"./chunk-5BKCIDMS.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-4QTEPWEJ.js";import{f as H,h as J}from"./chunk-UTO4Z6P6.js";import{a as E}from"./chunk-QDVJJKLB.js";import{C as R,p as F,x as L,y as P}from"./chunk-ANBOLDON.js";import{b as V}from"./chunk-OXJBYKMX.js";import{d as v}from"./chunk-5C7HDTHJ.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-NTRAWIEJ.js";import{d as y}from"./chunk-TPCG6DCA.js";import{r as me}from"./chunk-T6CC5WUU.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-7FQFEB33.js";import{e as $}from"./chunk-S5IFJ737.js";import{d as u,n as S}from"./chunk-773TIA5M.js";import{e as fe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function ae(e,t,r,a={}){let{templates:n,groupOrder:i}=await e.templateSpecifications(t,a);return{templates:n.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await Y({repoUrl:o,destination:c,shallow:!0})})};return await ye(s),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async s=>{let o=await b(t,n,s,i);await T(o,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,s);await T(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),o==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(o);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,s);await T(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),o==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),s=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:s}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,s=n.map(ue=>ue.identifier),{templates:o,groupOrder:c}=await ae(r,a,s,{requestedTemplate:i}),l=await _e(o,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:s,templatesOverlimit:o}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:s??[],unavailableExtensions:o??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(s=>s.identifier===a||s.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return E.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
2
- The following extension types are supported: ${s.join(", ")}`,o)}if(le(t,a,n))throw new y(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${n.type} per app`);return n}var pe=ke;var x=fe(me(),1);var O,m=class extends ee{async run(){let{flags:t}=await this.parse(O);await E.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await B(t.path);let{app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}=await Z({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await pe({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}),{app:r}}};O=m;m.summary="Generate a new app Extension.";m.descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
1
+ import{a as te,b as ne}from"./chunk-ROQXPIEZ.js";import{c as Y}from"./chunk-ICXHUPP5.js";import{b as E}from"./chunk-6LTJMYUD.js";import{a as ee}from"./chunk-PLHJQQVZ.js";import{a as W}from"./chunk-6V37CHBZ.js";import{F as B,Fa as Z,H as K,S as Q,d as X,e as z}from"./chunk-KJQAJUDU.js";import{f as H,h as J}from"./chunk-UEC23KAO.js";import{a as T}from"./chunk-2MDFREEW.js";import{C as R,p as F,x as L,y as P}from"./chunk-HX3TALXV.js";import{b as V}from"./chunk-S5JJL3BP.js";import{d as v}from"./chunk-5C7HDTHJ.js";import{B as G,D as k,F as U,v as N,z as D}from"./chunk-YYLEWVO6.js";import{d as y}from"./chunk-AUZCENYI.js";import{Gb as q,Oa as I,Ta as M,Ua as C,Wa as j,Y as f,ka as g,wa as A,ya as w}from"./chunk-BXDZX3BS.js";import{e as $}from"./chunk-MGPLKG23.js";import{d as u,n as S}from"./chunk-773TIA5M.js";import{r as me}from"./chunk-T6CC5WUU.js";import{e as fe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function ae(e,t,r,a={}){let{templates:n,groupOrder:i}=await e.templateSpecifications(t,a);return{templates:n.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}p();function _(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function re(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,a=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),n=await ne({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:n,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:a,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await Y({repoUrl:o,destination:c,shallow:!0})})};return await ye(s),{directory:S(n),extensionTemplate:e.extensionTemplate}}async function ye(e){try{switch(e.type){case"theme":await he(e);break;case"function":await xe(e);break;default:await ge(e);break}let t=u(e.directory,H.lockFile);await w(t)}catch(t){throw await w(e.directory),t}}async function he({directory:e,url:t,type:r,name:a,extensionFlavor:n,onGetTemplateRepository:i}){return g(async s=>{let o=await b(t,n,s,i);await E(o,e,{name:a,type:r,uid:v(f(a))})})}async function xe({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let d=await b(t,i,l,s);await E(d,e,{name:n,handle:f(n),flavor:i?.value,uid:v(f(n))})}),o==="javascript"){let l=ie(i?.value??"rust");await oe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{a.usesWorkspaces&&await F({packageManager:a.packageManager,directory:a.directory});let l=we(o);await P(l,{packageManager:a.packageManager,type:"prod",directory:a.usesWorkspaces?e:a.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await k(c)}async function ge({directory:e,url:t,app:r,project:a,name:n,extensionFlavor:i,onGetTemplateRepository:s}){let o=_(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ie(i?.value??"vanilla-js");await g(async d=>{let h=await b(t,i,d,s);await E(h,e,{srcFileExtension:l,name:n,handle:f(n),flavor:i?.value??"",uid:v(f(n))})}),o==="javascript"&&await oe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=a.packageManager;if(a.usesWorkspaces)_(i?.value)==="javascript"&&await F({packageManager:l,directory:a.directory});else{await ve(a.directory,i?.value);let d=u(e,"package.json"),h=await Ee(d);await P(h,{packageManager:l,type:"prod",directory:a.directory}),await w(d)}}}];c.push({title:"Update shared type definition",task:async()=>{await K(r)}}),await k(c)}function ie(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function we(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${X}.0.0`}),t}async function oe(e,t,r="*"){let a=await j(u(e,"src",r)),n=[];for(let i of a)n.push(I(i,`${i}.${t}`));await Promise.all(n)}async function ve(e,t){t==="typescript-react"&&await R(e,{"@types/react":J.reactTypes})}async function Ee(e){if(!await M(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,a])=>({name:r,version:a}))}async function b(e,t,r,a){let n=u(r,"download");return await A(n),await a(e,n),te(t,n)}p();function Te(e,t=[]){let r=[...e.map(n=>({label:n.name,value:n.identifier,group:n.group||"Other",sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(n=>({label:`${n.name} (limit reached)`,value:n.identifier,group:n.group||"Other",disabled:!0,sortPriority:n.sortPriority??Number.MAX_SAFE_INTEGER}))],a=(n,i)=>n.sortPriority===i.sortPriority?n.label.localeCompare(i.label):n.sortPriority-i.sortPriority;return r.sort(a)}var Fe=async e=>{let t=e.extensionTemplates,r=e.templateType,a=e.extensionFlavor;if(!r){if(a&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(a))),t.length===0)throw new y("You have reached the limit for the number of extensions you can create.");r=await G({message:"Type of extension?",choices:Te(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let n=t.find(c=>c.identifier===r),i=e.name||await se(e.directory,n.defaultName),s=e.extensionFlavor??await Pe(n);return{extensionTemplate:n,extensionContent:{name:i,flavor:s}}};async function se(e,t,r=1){let a=t.includes(" ")?" ":"-",n=r<=1?t:`${t}${a}${r}`,i=u(e,f(n));return C(i)?se(e,t,r+1):U({message:"Name your extension:",defaultValue:n})}async function Pe(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:D({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ce=Fe;async function ke(e){let{app:t,developerPlatformClient:r,remoteApp:a,specifications:n,template:i}=e,s=n.map(ue=>ue.identifier),{templates:o,groupOrder:c}=await ae(r,a,s,{requestedTemplate:i}),l=await _e(o,c,n,t,e),d=await ce(l);await Oe(d,i);let h=Se(d,t,e,r),de=await re(h);Ae(de,e.project.packageManager)}async function _e(e,t,r,a,n){let i=await Ce(n.template,a,e,r);Ie(i,n.flavor);let{validTemplates:s,templatesOverlimit:o}=be(e,r,a);return{templateType:i?.identifier,name:n.name,extensionFlavor:n.flavor,directory:u(n.directory,"extensions"),app:a,extensionTemplates:s??[],unavailableExtensions:o??[],reset:n.reset,groupOrder:t}}function be(e,t,r){return Q(e,n=>!le(r,t,n)?"validTemplates":"templatesOverlimit")}function le(e,t,r){let a=r.type,n=t.find(s=>s.identifier===a||s.externalIdentifier===a);return e.extensionsForType({identifier:a,externalIdentifier:a}).length>=(n?.registrationLimit??1)}async function Oe(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Se(e,t,r,a){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:a}}function Ae(e,t){let r=Me(e.extensionTemplate,e.directory,t);N(r)}function Ie(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(a=>a.value);if(!r.includes(t))throw new y("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Me(e,t,r){let a={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&a.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:q(r,"shopify app dev")}]),e.supportLinks[0]&&a.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),a}async function Ce(e,t,r,a){if(!e)return;let n=r.find(i=>i.identifier===e);if(!n){let i=await $(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new y(`Unknown extension type: ${e}.
2
+ The following extension types are supported: ${s.join(", ")}`,o)}if(le(t,a,n))throw new y(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${n.type} per app`);return n}var pe=ke;var x=fe(me(),1);var O,m=class extends ee{async run(){let{flags:t}=await this.parse(O);await T.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await B(t.path);let{app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}=await Z({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await pe({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:a,specifications:n,remoteApp:i,developerPlatformClient:s}),{app:r}}};O=m;m.summary="Generate a new app Extension.";m.descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
3
3
 
4
4
  Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
5
5
  `;m.description=O.descriptionWithoutMarkdown();m.flags={...V,...W,template:x.Flags.string({char:"t",hidden:!1,description:"Extension template",env:"SHOPIFY_FLAG_EXTENSION_TEMPLATE"}),name:x.Flags.string({char:"n",hidden:!1,description:"name of your Extension",env:"SHOPIFY_FLAG_NAME"}),"clone-url":x.Flags.string({hidden:!0,char:"u",description:"The Git URL to clone the function extensions templates from. Defaults to: https://github.com/Shopify/function-examples",env:"SHOPIFY_FLAG_CLONE_URL"}),flavor:x.Flags.string({hidden:!1,description:"Choose a starting template for your extension, where applicable",options:["vanilla-js","react","typescript","typescript-react","wasm","rust"],env:"SHOPIFY_FLAG_FLAVOR"})};var Tt=m;export{Tt as a};
@@ -1 +1 @@
1
- import{a as T}from"./chunk-NWXDOCL5.js";import{b as P,c as w,d as v}from"./chunk-7572RLUP.js";import{a as F}from"./chunk-S7F5KFQP.js";import{a as x}from"./chunk-5BKCIDMS.js";import{Ga as y}from"./chunk-4QTEPWEJ.js";import{b as h,c as m}from"./chunk-OXJBYKMX.js";import{B as d,I as l}from"./chunk-NTRAWIEJ.js";import{r as N}from"./chunk-T6CC5WUU.js";import{Pb as r}from"./chunk-7FQFEB33.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
1
+ import{a as T}from"./chunk-G6YOP2SJ.js";import{b as P,c as w,d as v}from"./chunk-4U3NC3UU.js";import{a as F}from"./chunk-Z2Y6G2QF.js";import{a as x}from"./chunk-6V37CHBZ.js";import{Ga as y}from"./chunk-KJQAJUDU.js";import{b as h,c as m}from"./chunk-S5JJL3BP.js";import{B as d,I as l}from"./chunk-YYLEWVO6.js";import{Pb as r}from"./chunk-BXDZX3BS.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
@@ -1,4 +1,4 @@
1
- import{c as v}from"./chunk-DZQYG32N.js";import{a as y}from"./chunk-WHNWE7P2.js";import{a as c}from"./chunk-AVD3INWF.js";import{a as u}from"./chunk-MIDYZPO4.js";import{d as f}from"./chunk-VJ6KDRZI.js";import{k as p,q as m}from"./chunk-TUNUEOHO.js";import{xa as h}from"./chunk-G4OQABDT.js";import{b as l,d}from"./chunk-OXJBYKMX.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as F,g as a}from"./chunk-VKWPEFWQ.js";a();var t=F(O(),1);var w,o=class extends m{async command(r,n){let{ignore:g=[],only:_=[]}=r;h("theme-command:dev:single-env:authenticated");let i,e;if(r.theme){let s={filter:{theme:r.theme}};i=await u(n,s),e={...r,theme:i.id.toString(),store:n.storeFqdn}}else{i=await new c(n).findOrCreate();let s=r["theme-editor-sync"]&&i.createdAtRuntime;e={...r,theme:i.id.toString(),store:n.storeFqdn,"overwrite-json":s}}await f(i,"start development mode",r["allow-live"])&&(await v({adminSession:n,commandConfig:this.config,directory:e.path,store:e.store,password:e.password,storePassword:e["store-password"],theme:i,listing:e.listing,host:e.host,port:e.port,"live-reload":e["live-reload"],"error-overlay":e["error-overlay"],force:e.force,open:e.open,"theme-editor-sync":e["theme-editor-sync"],"standard-events-inspector":e["standard-events-inspector"],noDelete:e.nodelete,ignore:g,only:_,notify:e.notify}),await y({path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"],silent:!0}))}};w=o;o.summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";o.descriptionWithMarkdown=`
1
+ import{a as v}from"./chunk-PK6NOLT5.js";import{a as c}from"./chunk-F447QKVX.js";import{a as u}from"./chunk-7KHYEIA7.js";import{a as y}from"./chunk-O7OQK2OC.js";import{d as f}from"./chunk-H3V6Y5JO.js";import{p,v as m}from"./chunk-JGN7YG5X.js";import{xa as h}from"./chunk-3EQY5B4S.js";import{b as l,d}from"./chunk-S5JJL3BP.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as F,g as a}from"./chunk-VKWPEFWQ.js";a();var t=F(O(),1);var w,o=class extends m{async command(r,n){let{ignore:g=[],only:_=[]}=r;h("theme-command:dev:single-env:authenticated");let i,e;if(r.theme){let s={filter:{theme:r.theme}};i=await u(n,s),e={...r,theme:i.id.toString(),store:n.storeFqdn}}else{i=await new c(n).findOrCreate();let s=r["theme-editor-sync"]&&i.createdAtRuntime;e={...r,theme:i.id.toString(),store:n.storeFqdn,"overwrite-json":s}}await f(i,"start development mode",r["allow-live"])&&(await v({adminSession:n,commandConfig:this.config,directory:e.path,store:e.store,password:e.password,storePassword:e["store-password"],theme:i,listing:e.listing,host:e.host,port:e.port,"live-reload":e["live-reload"],"error-overlay":e["error-overlay"],force:e.force,open:e.open,"theme-editor-sync":e["theme-editor-sync"],"standard-events-inspector":e["standard-events-inspector"],noDelete:e.nodelete,ignore:g,only:_,notify:e.notify}),await y({path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"],silent:!0}))}};w=o;o.summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";o.descriptionWithMarkdown=`
2
2
  Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
3
3
 
4
4
  This command returns the following information:
@@ -0,0 +1 @@
1
+ import{a as h,b as w}from"./chunk-ZFOWAMFK.js";import{n as f}from"./chunk-3EQY5B4S.js";import{P as d}from"./chunk-YYLEWVO6.js";import{d as i}from"./chunk-AUZCENYI.js";import{Ga as m,na as p}from"./chunk-BXDZX3BS.js";import{d as u}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
@@ -1 +1 @@
1
- import{b as r}from"./chunk-JCIN73BE.js";import{b as a}from"./chunk-HOSFU6UP.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
1
+ import{b as r}from"./chunk-J5U2FUIX.js";import{b as a}from"./chunk-74IG3ZE3.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
@@ -1,2 +1,2 @@
1
- import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-7FQFEB33.js";import{d as i}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
1
+ import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-BXDZX3BS.js";import{d as i}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
2
2
  *`)),t}export{E as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-N3NE4MVN.js";import{a as e}from"./chunk-ATSMK66C.js";import{a as o}from"./chunk-OU3M32A2.js";import{b as i}from"./chunk-HOSFU6UP.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static{this.description="View all the available UI kit components"}static{this.hiddenAliases=["kitchen-sink all"]}static{this.hidden=!0}async run(){await o(),await e(),await s()}};export{t as a};
1
+ import{a as s}from"./chunk-N4LCWB56.js";import{a as e}from"./chunk-RUKK4KXX.js";import{a as o}from"./chunk-I3Y6XTKN.js";import{b as i}from"./chunk-74IG3ZE3.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static{this.description="View all the available UI kit components"}static{this.hiddenAliases=["kitchen-sink all"]}static{this.hidden=!0}async run(){await o(),await e(),await s()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{q as Yv}from"./chunk-TUNUEOHO.js";import{A as hy,B as ii,C as uy,D as Fn,E as py,F as my,G as za,H as fy,I as Oa,J as gy,K as rs,L as kT,M as by,N as Aa,O as is,P as os,Q as Pn,R as vy,S as sn,T as La,U as qa,V,W as CT,X as _T,a as ee,aa as Eu,b as Fa,c as Zv,d as Dn,e as ke,f as Pa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ns,m as oy,n as Ma,o as K,p as Ia,q as sy,r as Na,s as Vt,t as ay,u as B,v as lt,w as kr,x as ly,y as cy,z as dy}from"./chunk-4J32OHLY.js";import{b as Qv}from"./chunk-OXJBYKMX.js";import{a as jt,b as Z,c as w,d as Xv,e as $t,f as Bt,g as d}from"./chunk-VKWPEFWQ.js";var Ai=w(ct=>{"use strict";d();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function TT(n){return n===!0||n===!1}ct.boolean=TT;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function RT(n){return typeof n=="number"||n instanceof Number}ct.number=RT;function ET(n){return n instanceof Error}ct.error=ET;function DT(n){return typeof n=="function"}ct.func=DT;function wy(n){return Array.isArray(n)}ct.array=wy;function FT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=FT});var Yu=w(j=>{"use strict";d();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var oi=Ai(),Sy;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(Sy=j.ErrorCodes||(j.ErrorCodes={}));var Du=class n extends Error{constructor(e,t,r){super(t),this.code=oi.number(e)?e:Sy.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};j.ResponseError=Du;var Tt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};j.ParameterStructures=Tt;Tt.auto=new Tt("auto");Tt.byPosition=new Tt("byPosition");Tt.byName=new Tt("byName");var Ce=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Tt.auto}};j.AbstractMessageSignature=Ce;var Fu=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Pu;var Mu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Mu;var Iu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Iu;var Nu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Nu;var zu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=zu;var Ou=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=Ou;var Au=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Au;var Lu=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Lu;var qu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=qu;var Wu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=Wu;var Hu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Hu;var Uu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Uu;var ju=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=ju;var $u=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=$u;var Bu=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=Bu;var Vu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Vu;var Gu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Gu;var Ku=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Ku;var Ju=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ju;var Xu=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Xu;var Qu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Qu;var PT;(function(n){function e(i){let o=i;return o&&oi.string(o.method)&&(oi.string(o.id)||oi.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&oi.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(oi.string(o.id)||oi.number(o.id)||o.id===null)}n.isResponse=r})(PT=j.Message||(j.Message={}))});var ep=w(Kn=>{"use strict";d();var xy;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=Kn.LinkedMap=Kn.Touch=void 0;var ft;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(ft=Kn.Touch||(Kn.Touch={}));var Wa=class{constructor(){this[xy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=ft.None){let r=this._map.get(e);if(r)return t!==ft.None&&this.touch(r,t),r.value}set(e,t,r=ft.None){let i=this._map.get(e);if(i)i.value=t,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(xy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==ft.First&&t!==ft.Last)){if(t===ft.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===ft.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};Kn.LinkedMap=Wa;var Zu=class extends Wa{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=ft.AsNew){return super.get(e,t)}peek(e){return super.get(e,ft.None)}set(e,t){return super.set(e,t,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Kn.LRUCache=Zu});var ky=w(ss=>{"use strict";d();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var MT;(function(n){function e(t){return{dispose:t}}n.create=e})(MT=ss.Disposable||(ss.Disposable={}))});var Cr=w(rp=>{"use strict";d();Object.defineProperty(rp,"__esModule",{value:!0});var tp;function np(){if(tp===void 0)throw new Error("No runtime abstraction layer installed");return tp}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");tp=t}n.install=e})(np||(np={}));rp.default=np});var Li=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.Emitter=si.Event=void 0;var IT=Cr(),NT;(function(n){let e={dispose(){}};n.None=function(){return e}})(NT=si.Event||(si.Event={}));var ip=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,IT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ha=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new ip),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};si.Emitter=Ha;Ha._noop=function(){}});var ja=w(ai=>{"use strict";d();Object.defineProperty(ai,"__esModule",{value:!0});ai.CancellationTokenSource=ai.CancellationToken=void 0;var zT=Cr(),OT=Ai(),op=Li(),sp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:op.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:op.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||OT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(sp=ai.CancellationToken||(ai.CancellationToken={}));var AT=Object.freeze(function(n,e){let t=(0,zT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ua=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?AT:(this._emitter||(this._emitter=new op.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ap=class{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=sp.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=sp.None}};ai.CancellationTokenSource=ap});var Cy=w(qi=>{"use strict";d();Object.defineProperty(qi,"__esModule",{value:!0});qi.SharedArrayReceiverStrategy=qi.SharedArraySenderStrategy=void 0;var LT=ja(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var lp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=as.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};qi.SharedArraySenderStrategy=lp;var cp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},dp=class{constructor(e){this.token=new cp(e)}cancel(){}dispose(){}},hp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new LT.CancellationTokenSource:new dp(t)}};qi.SharedArrayReceiverStrategy=hp});var pp=w($a=>{"use strict";d();Object.defineProperty($a,"__esModule",{value:!0});$a.Semaphore=void 0;var qT=Cr(),up=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,qT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};$a.Semaphore=up});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var fp=Cr(),Wi=Ai(),mp=Li(),WT=pp(),HT;(function(n){function e(t){let r=t;return r&&Wi.func(r.listen)&&Wi.func(r.dispose)&&Wi.func(r.onError)&&Wi.func(r.onClose)&&Wi.func(r.onPartialMessage)}n.is=e})(HT=Jn.MessageReader||(Jn.MessageReader={}));var Ba=class{constructor(){this.errorEmitter=new mp.Emitter,this.closeEmitter=new mp.Emitter,this.partialMessageEmitter=new mp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Wi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=Ba;var gp;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,fp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(gp||(gp={}));var bp=class extends Ba{constructor(e,t){super(),this.readable=e,this.options=gp.fromOptions(t),this.buffer=(0,fp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new WT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,fp.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Jn.ReadableStreamMessageReader=bp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=Cr(),ls=Ai(),UT=pp(),Ry=Li(),jT="Content-Length: ",Ey=`\r
1
+ import{v as Yv}from"./chunk-JGN7YG5X.js";import{A as hy,B as ii,C as uy,D as Fn,E as py,F as my,G as za,H as fy,I as Oa,J as gy,K as rs,L as kT,M as by,N as Aa,O as is,P as os,Q as Pn,R as vy,S as sn,T as La,U as qa,V,W as CT,X as _T,a as ee,aa as Eu,b as Fa,c as Zv,d as Dn,e as ke,f as Pa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ns,m as oy,n as Ma,o as K,p as Ia,q as sy,r as Na,s as Vt,t as ay,u as B,v as lt,w as kr,x as ly,y as cy,z as dy}from"./chunk-7BVXGS44.js";import{b as Qv}from"./chunk-S5JJL3BP.js";import{a as jt,b as Z,c as w,d as Xv,e as $t,f as Bt,g as d}from"./chunk-VKWPEFWQ.js";var Ai=w(ct=>{"use strict";d();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function TT(n){return n===!0||n===!1}ct.boolean=TT;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function RT(n){return typeof n=="number"||n instanceof Number}ct.number=RT;function ET(n){return n instanceof Error}ct.error=ET;function DT(n){return typeof n=="function"}ct.func=DT;function wy(n){return Array.isArray(n)}ct.array=wy;function FT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=FT});var Yu=w(j=>{"use strict";d();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var oi=Ai(),Sy;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(Sy=j.ErrorCodes||(j.ErrorCodes={}));var Du=class n extends Error{constructor(e,t,r){super(t),this.code=oi.number(e)?e:Sy.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};j.ResponseError=Du;var Tt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};j.ParameterStructures=Tt;Tt.auto=new Tt("auto");Tt.byPosition=new Tt("byPosition");Tt.byName=new Tt("byName");var Ce=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Tt.auto}};j.AbstractMessageSignature=Ce;var Fu=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Pu;var Mu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Mu;var Iu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Iu;var Nu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Nu;var zu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=zu;var Ou=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=Ou;var Au=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Au;var Lu=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Lu;var qu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=qu;var Wu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=Wu;var Hu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Hu;var Uu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Uu;var ju=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=ju;var $u=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=$u;var Bu=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=Bu;var Vu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Vu;var Gu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Gu;var Ku=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Ku;var Ju=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ju;var Xu=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Xu;var Qu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Qu;var PT;(function(n){function e(i){let o=i;return o&&oi.string(o.method)&&(oi.string(o.id)||oi.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&oi.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(oi.string(o.id)||oi.number(o.id)||o.id===null)}n.isResponse=r})(PT=j.Message||(j.Message={}))});var ep=w(Kn=>{"use strict";d();var xy;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=Kn.LinkedMap=Kn.Touch=void 0;var ft;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(ft=Kn.Touch||(Kn.Touch={}));var Wa=class{constructor(){this[xy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=ft.None){let r=this._map.get(e);if(r)return t!==ft.None&&this.touch(r,t),r.value}set(e,t,r=ft.None){let i=this._map.get(e);if(i)i.value=t,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(xy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==ft.First&&t!==ft.Last)){if(t===ft.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===ft.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};Kn.LinkedMap=Wa;var Zu=class extends Wa{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=ft.AsNew){return super.get(e,t)}peek(e){return super.get(e,ft.None)}set(e,t){return super.set(e,t,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Kn.LRUCache=Zu});var ky=w(ss=>{"use strict";d();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var MT;(function(n){function e(t){return{dispose:t}}n.create=e})(MT=ss.Disposable||(ss.Disposable={}))});var Cr=w(rp=>{"use strict";d();Object.defineProperty(rp,"__esModule",{value:!0});var tp;function np(){if(tp===void 0)throw new Error("No runtime abstraction layer installed");return tp}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");tp=t}n.install=e})(np||(np={}));rp.default=np});var Li=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.Emitter=si.Event=void 0;var IT=Cr(),NT;(function(n){let e={dispose(){}};n.None=function(){return e}})(NT=si.Event||(si.Event={}));var ip=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,IT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ha=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new ip),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};si.Emitter=Ha;Ha._noop=function(){}});var ja=w(ai=>{"use strict";d();Object.defineProperty(ai,"__esModule",{value:!0});ai.CancellationTokenSource=ai.CancellationToken=void 0;var zT=Cr(),OT=Ai(),op=Li(),sp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:op.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:op.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||OT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(sp=ai.CancellationToken||(ai.CancellationToken={}));var AT=Object.freeze(function(n,e){let t=(0,zT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ua=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?AT:(this._emitter||(this._emitter=new op.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ap=class{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=sp.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=sp.None}};ai.CancellationTokenSource=ap});var Cy=w(qi=>{"use strict";d();Object.defineProperty(qi,"__esModule",{value:!0});qi.SharedArrayReceiverStrategy=qi.SharedArraySenderStrategy=void 0;var LT=ja(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var lp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=as.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};qi.SharedArraySenderStrategy=lp;var cp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},dp=class{constructor(e){this.token=new cp(e)}cancel(){}dispose(){}},hp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new LT.CancellationTokenSource:new dp(t)}};qi.SharedArrayReceiverStrategy=hp});var pp=w($a=>{"use strict";d();Object.defineProperty($a,"__esModule",{value:!0});$a.Semaphore=void 0;var qT=Cr(),up=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,qT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};$a.Semaphore=up});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var fp=Cr(),Wi=Ai(),mp=Li(),WT=pp(),HT;(function(n){function e(t){let r=t;return r&&Wi.func(r.listen)&&Wi.func(r.dispose)&&Wi.func(r.onError)&&Wi.func(r.onClose)&&Wi.func(r.onPartialMessage)}n.is=e})(HT=Jn.MessageReader||(Jn.MessageReader={}));var Ba=class{constructor(){this.errorEmitter=new mp.Emitter,this.closeEmitter=new mp.Emitter,this.partialMessageEmitter=new mp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Wi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=Ba;var gp;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,fp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(gp||(gp={}));var bp=class extends Ba{constructor(e,t){super(),this.readable=e,this.options=gp.fromOptions(t),this.buffer=(0,fp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new WT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,fp.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Jn.ReadableStreamMessageReader=bp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=Cr(),ls=Ai(),UT=pp(),Ry=Li(),jT="Content-Length: ",Ey=`\r
2
2
  `,$T;(function(n){function e(t){let r=t;return r&&ls.func(r.dispose)&&ls.func(r.onClose)&&ls.func(r.onError)&&ls.func(r.write)}n.is=e})($T=Xn.MessageWriter||(Xn.MessageWriter={}));var Va=class{constructor(){this.errorEmitter=new Ry.Emitter,this.closeEmitter=new Ry.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${ls.string(e.message)?e.message:"unknown"}`)}};Xn.AbstractMessageWriter=Va;var vp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Ty.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Ty.default)().applicationJson.encoder}}n.fromOptions=e})(vp||(vp={}));var yp=class extends Va{constructor(e,t){super(),this.writable=e,this.options=vp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new UT.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(jT,r.byteLength.toString(),Ey),i.push(Ey),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};Xn.WriteableStreamMessageWriter=yp});var Fy=w(Ga=>{"use strict";d();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.AbstractMessageBuffer=void 0;var BT=13,VT=10,GT=`\r
3
3
  `,wp=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case BT:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case VT:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=c.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,l=this.toString(s,"ascii").split(GT);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let h=l[c],p=h.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let f=h.substr(0,p),b=h.substr(p+1).trim();a.set(e?f.toLowerCase():f,b)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};Ga.AbstractMessageBuffer=wp});var Ay=w(U=>{"use strict";d();Object.defineProperty(U,"__esModule",{value:!0});U.createMessageConnection=U.ConnectionOptions=U.MessageStrategy=U.CancellationStrategy=U.CancellationSenderStrategy=U.CancellationReceiverStrategy=U.RequestCancellationReceiverStrategy=U.IdCancellationReceiverStrategy=U.ConnectionStrategy=U.ConnectionError=U.ConnectionErrors=U.LogTraceNotification=U.SetTraceNotification=U.TraceFormat=U.TraceValues=U.Trace=U.NullLogger=U.ProgressType=U.ProgressToken=void 0;var Py=Cr(),Pe=Ai(),J=Yu(),My=ep(),cs=Li(),Sp=ja(),hs;(function(n){n.type=new J.NotificationType("$/cancelRequest")})(hs||(hs={}));var Iy;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(Iy=U.ProgressToken||(U.ProgressToken={}));var ds;(function(n){n.type=new J.NotificationType("$/progress")})(ds||(ds={}));var xp=class{constructor(){}};U.ProgressType=xp;var kp;(function(n){function e(t){return Pe.func(t)}n.is=e})(kp||(kp={}));U.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var fe;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(fe=U.Trace||(U.Trace={}));var KT;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(KT=U.TraceValues||(U.TraceValues={}));(function(n){function e(r){if(!Pe.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(fe=U.Trace||(U.Trace={}));var an;(function(n){n.Text="text",n.JSON="json"})(an=U.TraceFormat||(U.TraceFormat={}));(function(n){function e(t){return Pe.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(an=U.TraceFormat||(U.TraceFormat={}));var Ny;(function(n){n.type=new J.NotificationType("$/setTrace")})(Ny=U.SetTraceNotification||(U.SetTraceNotification={}));var Cp;(function(n){n.type=new J.NotificationType("$/logTrace")})(Cp=U.LogTraceNotification||(U.LogTraceNotification={}));var Ka;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ka=U.ConnectionErrors||(U.ConnectionErrors={}));var Hi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};U.ConnectionError=Hi;var zy;(function(n){function e(t){let r=t;return r&&Pe.func(r.cancelUndispatched)}n.is=e})(zy=U.ConnectionStrategy||(U.ConnectionStrategy={}));var Rp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Pe.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Pe.func(r.dispose))}n.is=e})(Rp=U.IdCancellationReceiverStrategy||(U.IdCancellationReceiverStrategy={}));var Oy;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Pe.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Pe.func(r.dispose))}n.is=e})(Oy=U.RequestCancellationReceiverStrategy||(U.RequestCancellationReceiverStrategy={}));var _p;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Sp.CancellationTokenSource}});function e(t){return Rp.is(t)||Oy.is(t)}n.is=e})(_p=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var Tp;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(hs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Pe.func(r.sendCancellation)&&Pe.func(r.cleanup)}n.is=e})(Tp=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var Ep;(function(n){n.Message=Object.freeze({receiver:_p.Message,sender:Tp.Message});function e(t){let r=t;return r&&_p.is(r.receiver)&&Tp.is(r.sender)}n.is=e})(Ep=U.CancellationStrategy||(U.CancellationStrategy={}));var Dp;(function(n){function e(t){let r=t;return r&&Pe.func(r.handleMessage)}n.is=e})(Dp=U.MessageStrategy||(U.MessageStrategy={}));var JT;(function(n){function e(t){let r=t;return r&&(Ep.is(r.cancellationStrategy)||zy.is(r.connectionStrategy)||Dp.is(r.messageStrategy))}n.is=e})(JT=U.ConnectionOptions||(U.ConnectionOptions={}));var ln;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(ln||(ln={}));function XT(n,e,t,r){let i=t!==void 0?t:U.NullLogger,o=0,s=0,a=0,l="2.0",c,h=new Map,p,f=new Map,b=new Map,C,D=new My.LinkedMap,P=new Map,A=new Set,S=new Map,y=fe.Off,R=an.Text,N,q=ln.New,Se=new cs.Emitter,De=new cs.Emitter,Wt=new cs.Emitter,Dt=new cs.Emitter,kt=new cs.Emitter,Ct=r&&r.cancellationStrategy?r.cancellationStrategy:Ep.Message;function wr(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function ni(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function Ht(){return"not-"+(++s).toString()}function Ft(v,E){J.Message.isRequest(E)?v.set(wr(E.id),E):J.Message.isResponse(E)?v.set(ni(E.id),E):v.set(Ht(),E)}function Sr(v){}function Ut(){return q===ln.Listening}function Rn(){return q===ln.Closed}function pt(){return q===ln.Disposed}function xr(){(q===ln.New||q===ln.Listening)&&(q=ln.Closed,De.fire(void 0))}function Zo(v){Se.fire([v,void 0,void 0])}function Mi(v){Se.fire(v)}n.onClose(xr),n.onError(Zo),e.onClose(xr),e.onError(Mi);function Ii(){C||D.size===0||(C=(0,Py.default)().timer.setImmediate(()=>{C=void 0,ku()}))}function Ni(v){J.Message.isRequest(v)?Cu(v):J.Message.isNotification(v)?Tu(v):J.Message.isResponse(v)?_u(v):Da(v)}function ku(){if(D.size===0)return;let v=D.shift();try{let E=r?.messageStrategy;Dp.is(E)?E.handleMessage(v,Ni):Ni(v)}finally{Ii()}}let ri=v=>{try{if(J.Message.isNotification(v)&&v.method===hs.type.method){let E=v.params.id,I=wr(E),H=D.get(I);if(J.Message.isRequest(H)){let ge=r?.connectionStrategy,Ne=ge&&ge.cancelUndispatched?ge.cancelUndispatched(H,Sr):void 0;if(Ne&&(Ne.error!==void 0||Ne.result!==void 0)){D.delete(I),S.delete(E),Ne.id=H.id,G(Ne,v.method,Date.now()),e.write(Ne).catch(()=>i.error("Sending response for canceled message failed."));return}}let xe=S.get(E);if(xe!==void 0){xe.cancel(),_t(v);return}else A.add(E)}Ft(D,v)}finally{Ii()}};function Cu(v){if(pt())return;function E(ce,Fe,me){let Be={jsonrpc:l,id:v.id};ce instanceof J.ResponseError?Be.error=ce.toJson():Be.result=ce===void 0?null:ce,G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}function I(ce,Fe,me){let Be={jsonrpc:l,id:v.id,error:ce.toJson()};G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}function H(ce,Fe,me){ce===void 0&&(ce=null);let Be={jsonrpc:l,id:v.id,result:ce};G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}Re(v);let xe=h.get(v.method),ge,Ne;xe&&(ge=xe.type,Ne=xe.handler);let Oe=Date.now();if(Ne||c){let ce=v.id??String(Date.now()),Fe=Rp.is(Ct.receiver)?Ct.receiver.createCancellationTokenSource(ce):Ct.receiver.createCancellationTokenSource(v);v.id!==null&&A.has(v.id)&&Fe.cancel(),v.id!==null&&S.set(ce,Fe);try{let me;if(Ne)if(v.params===void 0){if(ge!==void 0&&ge.numberOfParams!==0){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines ${ge.numberOfParams} params but received none.`),v.method,Oe);return}me=Ne(Fe.token)}else if(Array.isArray(v.params)){if(ge!==void 0&&ge.parameterStructures===J.ParameterStructures.byName){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Oe);return}me=Ne(...v.params,Fe.token)}else{if(ge!==void 0&&ge.parameterStructures===J.ParameterStructures.byPosition){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Oe);return}me=Ne(v.params,Fe.token)}else c&&(me=c(v.method,v.params,Fe.token));let Be=me;me?Be.then?Be.then(mt=>{S.delete(ce),E(mt,v.method,Oe)},mt=>{S.delete(ce),mt instanceof J.ResponseError?I(mt,v.method,Oe):mt&&Pe.string(mt.message)?I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${mt.message}`),v.method,Oe):I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Oe)}):(S.delete(ce),E(me,v.method,Oe)):(S.delete(ce),H(me,v.method,Oe))}catch(me){S.delete(ce),me instanceof J.ResponseError?E(me,v.method,Oe):me&&Pe.string(me.message)?I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${me.message}`),v.method,Oe):I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Oe)}}else I(new J.ResponseError(J.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Oe)}function _u(v){if(!pt())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
4
4
  ${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let E=v.id,I=P.get(E);if(yT(v,I),I!==void 0){P.delete(E);try{if(v.error){let H=v.error;I.reject(new J.ResponseError(H.code,H.message,H.data))}else if(v.result!==void 0)I.resolve(v.result);else throw new Error("Should never happen.")}catch(H){H.message?i.error(`Response handler '${I.method}' failed with message: ${H.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}function Tu(v){if(pt())return;let E,I;if(v.method===hs.type.method){let H=v.params.id;A.delete(H),_t(v);return}else{let H=f.get(v.method);H&&(I=H.handler,E=H.type)}if(I||p)try{if(_t(v),I)if(v.params===void 0)E!==void 0&&E.numberOfParams!==0&&E.parameterStructures!==J.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${E.numberOfParams} params but received none.`),I();else if(Array.isArray(v.params)){let H=v.params;v.method===ds.type.method&&H.length===2&&Iy.is(H[0])?I({token:H[0],value:H[1]}):(E!==void 0&&(E.parameterStructures===J.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),E.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${E.numberOfParams} params but received ${H.length} arguments`)),I(...H))}else E!==void 0&&E.parameterStructures===J.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),I(v.params);else p&&p(v.method,v.params)}catch(H){H.message?i.error(`Notification handler '${v.method}' failed with message: ${H.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else Wt.fire(v)}function Da(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
@@ -1,3 +1,3 @@
1
- import{a as h}from"./chunk-AU5EZQW7.js";import{k as m,q as a}from"./chunk-TUNUEOHO.js";import{ua as t}from"./chunk-G4OQABDT.js";import{b as s}from"./chunk-OXJBYKMX.js";import{r as f}from"./chunk-T6CC5WUU.js";import{T as n}from"./chunk-7FQFEB33.js";import{e as w,g as i}from"./chunk-VKWPEFWQ.js";i();var o=w(f(),1);var d,e=class extends a{async command(r,p,c,y,l){let u={environment:r.environment,force:r.force,noColor:r["no-color"],password:r.password,path:r.path,store:r.store,theme:n("creative"),unpublished:!0,listing:r.listing};t("theme-command:share"),await h(u,p,c,l),t("theme-command:share")}};d=e;e.summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";e.descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
1
+ import{a as h}from"./chunk-H2JU5BGK.js";import{p as m,v as a}from"./chunk-JGN7YG5X.js";import{ua as t}from"./chunk-3EQY5B4S.js";import{b as s}from"./chunk-S5JJL3BP.js";import{T as n}from"./chunk-BXDZX3BS.js";import{r as f}from"./chunk-T6CC5WUU.js";import{e as w,g as i}from"./chunk-VKWPEFWQ.js";i();var o=w(f(),1);var d,e=class extends a{async command(r,p,c,y,l){let u={environment:r.environment,force:r.force,noColor:r["no-color"],password:r.password,path:r.path,store:r.store,theme:n("creative"),unpublished:!0,listing:r.listing};t("theme-command:share"),await h(u,p,c,l),t("theme-command:share")}};d=e;e.summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";e.descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
2
2
 
3
3
  This command returns a [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.`;e.description=d.descriptionWithoutMarkdown();e.flags={...s,...m,force:o.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),listing:o.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};e.multiEnvironmentsFlags=["store","password","path"];var I=e;export{I as a};
@@ -1,3 +1,3 @@
1
- import{n as u}from"./chunk-G4OQABDT.js";import{b as g}from"./chunk-OXJBYKMX.js";import{b as y}from"./chunk-HOSFU6UP.js";import{d as r}from"./chunk-TPCG6DCA.js";import{r as R}from"./chunk-T6CC5WUU.js";import{Lb as v,Mb as w,ua as l,wa as m}from"./chunk-7FQFEB33.js";import{f as p,i as h}from"./chunk-773TIA5M.js";import{e as A,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",L="X-Shopify-Surface",E="cli",F=["shopify.dev"];async function S(t,e){let c;try{c=new URL(t)}catch{throw new r(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new r(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await u(t,{headers:{Accept:U,[L]:E}});if(!i.ok)throw new r(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let f=await i.text();if(e){let o=p(e);await m(h(o)),await l(o,f),w(`Saved ${t} to ${o}`);return}v(f)}var n=A(R(),1),a=class t extends y{static{this.description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. For finding the relevant pieces of content across shopify.dev instead, use `doc search`."}static{this.examples=[`# fetch the Markdown version of a Shopify.dev page
1
+ import{n as u}from"./chunk-3EQY5B4S.js";import{b as g}from"./chunk-S5JJL3BP.js";import{b as y}from"./chunk-74IG3ZE3.js";import{d as r}from"./chunk-AUZCENYI.js";import{Lb as v,Mb as w,ua as l,wa as m}from"./chunk-BXDZX3BS.js";import{f as p,i as h}from"./chunk-773TIA5M.js";import{r as R}from"./chunk-T6CC5WUU.js";import{e as A,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",L="X-Shopify-Surface",E="cli",F=["shopify.dev"];async function S(t,e){let c;try{c=new URL(t)}catch{throw new r(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new r(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await u(t,{headers:{Accept:U,[L]:E}});if(!i.ok)throw new r(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let f=await i.text();if(e){let o=p(e);await m(h(o)),await l(o,f),w(`Saved ${t} to ${o}`);return}v(f)}var n=A(R(),1),a=class t extends y{static{this.description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. For finding the relevant pieces of content across shopify.dev instead, use `doc search`."}static{this.examples=[`# fetch the Markdown version of a Shopify.dev page
2
2
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# save the document to a file instead of printing it
3
3
  shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`]}static{this.flags={...g,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})}}async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output)}};export{a};