shopify 4.3.0 → 4.4.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 (336) hide show
  1. package/dist/analytics-DWUYMFHO.js +1 -0
  2. package/dist/analytics-SOXP4UBD.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-2EROVVCL.js +1 -0
  24. package/dist/{chunk-MEIEEENL.js → chunk-2MMGFZDP.js} +1 -1
  25. package/dist/{chunk-3YDYZ232.js → chunk-2NWWMNU5.js} +8 -8
  26. package/dist/{chunk-WHNWE7P2.js → chunk-3CYHS4W2.js} +1 -1
  27. package/dist/{chunk-DNXYKGV2.js → chunk-3FBSBMSQ.js} +1 -1
  28. package/dist/chunk-3OZ6ZZ4T.js +5 -0
  29. package/dist/{chunk-UTO4Z6P6.js → chunk-442S5SDM.js} +1 -1
  30. package/dist/{chunk-2RBIR3NM.js → chunk-45MEVWH5.js} +1 -1
  31. package/dist/{chunk-N5LVGFDS.js → chunk-47MGPVED.js} +1 -1
  32. package/dist/{chunk-UYSF234H.js → chunk-4N6YTHFD.js} +1 -1
  33. package/dist/chunk-4TST2MNC.js +1 -0
  34. package/dist/{chunk-NILXAUUT.js → chunk-5GVXMNC4.js} +1 -1
  35. package/dist/{chunk-PMS4MNHB.js → chunk-5JNEWYD5.js} +1 -1
  36. package/dist/{chunk-ATSMK66C.js → chunk-5QQN3SKH.js} +1 -1
  37. package/dist/{chunk-DCLUZFT7.js → chunk-5QWYIBE6.js} +1 -1
  38. package/dist/chunk-5W443CKL.js +836 -0
  39. package/dist/{chunk-JUYJZUYU.js → chunk-67KMRBSZ.js} +1 -1
  40. package/dist/{chunk-UC7KMA6W.js → chunk-6DIHOMCB.js} +1 -1
  41. package/dist/{chunk-NTRAWIEJ.js → chunk-6EZ7JWBK.js} +6 -6
  42. package/dist/{chunk-25HJX3L2.js → chunk-6RL7FUPD.js} +1 -1
  43. package/dist/chunk-6YPEONHB.js +46 -0
  44. package/dist/{chunk-JEZ3PGVC.js → chunk-733R5OKQ.js} +1 -1
  45. package/dist/chunk-73W5BGAZ.js +1 -0
  46. package/dist/{chunk-Q7C44DX5.js → chunk-75LJTY7F.js} +1 -1
  47. package/dist/{chunk-JCIN73BE.js → chunk-7EJ4UVYI.js} +1 -1
  48. package/dist/{chunk-BL46CZ2M.js → chunk-7LATYPLU.js} +1 -1
  49. package/dist/{chunk-TP7E54WN.js → chunk-7SVMAJTR.js} +1 -1
  50. package/dist/{chunk-7572RLUP.js → chunk-7UOPCYMV.js} +1 -1
  51. package/dist/chunk-APN3VWN4.js +3 -0
  52. package/dist/{chunk-FOFJBRSL.js → chunk-AT2GDXN7.js} +1 -1
  53. package/dist/{chunk-4QTEPWEJ.js → chunk-ATXODH6C.js} +4 -4
  54. package/dist/chunk-AY4GIVME.js +4 -0
  55. package/dist/{chunk-TY6BZTG3.js → chunk-B7BUEEBR.js} +1 -1
  56. package/dist/{chunk-G2LVUM7N.js → chunk-B7S23DLF.js} +1 -1
  57. package/dist/chunk-BCD4KTLJ.js +1 -0
  58. package/dist/{chunk-CEHXOWA6.js → chunk-BIMOHK2P.js} +1 -1
  59. package/dist/{chunk-UB26DGTR.js → chunk-C3CVLSLS.js} +1 -1
  60. package/dist/{chunk-G3RWLAOG.js → chunk-CD5O2BIT.js} +1 -1
  61. package/dist/chunk-CPE7XCC6.js +593 -0
  62. package/dist/{chunk-TRYWVIVJ.js → chunk-CZXGQ53M.js} +1 -1
  63. package/dist/chunk-D6YDSGR4.js +3 -0
  64. package/dist/{chunk-33OHQUHZ.js → chunk-DHBYYHBT.js} +1 -1
  65. package/dist/{chunk-OU4SKQTC.js → chunk-DLNBTHKL.js} +2 -2
  66. package/dist/chunk-DO2SHYFU.js +1 -0
  67. package/dist/{chunk-7FQFEB33.js → chunk-DONEJHDG.js} +33 -33
  68. package/dist/{chunk-JAWKLBOB.js → chunk-DQ4HA72R.js} +1 -1
  69. package/dist/{chunk-CV5EQGES.js → chunk-DZLA2RJP.js} +1 -1
  70. package/dist/{chunk-GJXINXSU.js → chunk-EKHWL542.js} +46 -46
  71. package/dist/{chunk-USLYL5AC.js → chunk-F5QG42MA.js} +1 -1
  72. package/dist/{chunk-2XZBQZ5R.js → chunk-FA4K3JRN.js} +1 -1
  73. package/dist/{chunk-3SPDFV5D.js → chunk-FPLUMESQ.js} +1 -1
  74. package/dist/chunk-FU232KQ7.js +1 -0
  75. package/dist/{chunk-S22NCNAJ.js → chunk-FZKKKGUJ.js} +1 -1
  76. package/dist/chunk-G24L7MB3.js +1 -0
  77. package/dist/{chunk-RKDZGK5K.js → chunk-G2I2ZUBV.js} +1 -1
  78. package/dist/{chunk-4FFPTEKD.js → chunk-G2S346IS.js} +1 -1
  79. package/dist/{chunk-HCTZN7L4.js → chunk-GBZL4TTY.js} +1 -1
  80. package/dist/{chunk-AO3RFGNV.js → chunk-GFCLUGAG.js} +1 -1
  81. package/dist/{chunk-MRS6LAY7.js → chunk-GKRCTMWY.js} +1 -1
  82. package/dist/{chunk-JJ6RM54S.js → chunk-GTUKM3ZW.js} +1 -1
  83. package/dist/{chunk-YL3TYQGT.js → chunk-GUO7S4NW.js} +1 -1
  84. package/dist/{chunk-ANBOLDON.js → chunk-GW3VY3FZ.js} +1 -1
  85. package/dist/{chunk-OXJBYKMX.js → chunk-H5C3QTOO.js} +1 -1
  86. package/dist/{chunk-T3ERXB7F.js → chunk-H6WN7GP4.js} +1 -1
  87. package/dist/{chunk-NWXDOCL5.js → chunk-HA6NISOZ.js} +1 -1
  88. package/dist/{chunk-L2PC4MUV.js → chunk-HCN6HXA5.js} +1 -1
  89. package/dist/chunk-HM5H7WBE.js +1 -0
  90. package/dist/chunk-HZMP62GK.js +21 -0
  91. package/dist/{chunk-57PPQKJT.js → chunk-HZSAUZBX.js} +1 -1
  92. package/dist/{chunk-ZGJ3DFTQ.js → chunk-HZYRCG4R.js} +1 -1
  93. package/dist/{chunk-6JKGUQRD.js → chunk-I73E3BD5.js} +1 -1
  94. package/dist/{chunk-Q73GEVSJ.js → chunk-IG6LPVS4.js} +1 -1
  95. package/dist/{chunk-T4NS63K4.js → chunk-IIOIDMG3.js} +1 -1
  96. package/dist/{chunk-FQ5ZZX2G.js → chunk-IPQH2RHD.js} +1 -1
  97. package/dist/chunk-IX4KP6E3.js +2 -0
  98. package/dist/{chunk-A5HKAMAC.js → chunk-J2WCMQZZ.js} +1 -1
  99. package/dist/chunk-J3HXFQ2L.js +1 -0
  100. package/dist/{chunk-QDVJJKLB.js → chunk-J5TNYNR5.js} +1 -1
  101. package/dist/{chunk-SSCYLDSX.js → chunk-J7UQBC45.js} +1 -1
  102. package/dist/{chunk-Q77MM2N2.js → chunk-JAW32T6G.js} +1 -1
  103. package/dist/{chunk-OZBY45KT.js → chunk-JOZXRV5K.js} +1 -1
  104. package/dist/{chunk-S5IFJ737.js → chunk-KKUDXLK2.js} +1 -1
  105. package/dist/{chunk-HDC5V7RY.js → chunk-KN3FTJDU.js} +1 -1
  106. package/dist/{chunk-AERKD4TO.js → chunk-KSZ5K6LJ.js} +1 -1
  107. package/dist/{chunk-G3JJLXPH.js → chunk-LCPD2BYX.js} +1 -1
  108. package/dist/chunk-LKZ7ARYS.js +18 -0
  109. package/dist/{chunk-ZUKLGZOU.js → chunk-LOHUNOQ7.js} +1 -1
  110. package/dist/{chunk-ZM75DSIW.js → chunk-LOQIRLTD.js} +1 -1
  111. package/dist/{chunk-FIYAECXH.js → chunk-MFLQRQQT.js} +1 -1
  112. package/dist/chunk-MQICT2LR.js +1 -0
  113. package/dist/{chunk-RSRYC5ZF.js → chunk-MZMYBFZQ.js} +1 -1
  114. package/dist/{chunk-2EHBJWC6.js → chunk-NADNFSKS.js} +1 -1
  115. package/dist/{chunk-N3YTDGFY.js → chunk-NWDP5IZ2.js} +1 -1
  116. package/dist/{chunk-WVRGCNBZ.js → chunk-NY5OGHM5.js} +1 -1
  117. package/dist/chunk-O6KTFMCD.js +1 -0
  118. package/dist/{chunk-YSIBRY6C.js → chunk-OAI7VSLW.js} +1 -1
  119. package/dist/{chunk-GWHV62YT.js → chunk-OORCODNK.js} +1 -1
  120. package/dist/{chunk-W7DDV2EY.js → chunk-OQORDQLH.js} +1 -1
  121. package/dist/{chunk-JAWOP4HJ.js → chunk-PETINPMX.js} +1 -1
  122. package/dist/{chunk-5XDQ76DQ.js → chunk-PJYNAUQB.js} +1 -1
  123. package/dist/{chunk-5H3VTG77.js → chunk-PMXCJIBP.js} +1 -1
  124. package/dist/{chunk-OU3M32A2.js → chunk-POAICASX.js} +1 -1
  125. package/dist/{chunk-6KETAPWL.js → chunk-PUAMSBXS.js} +1 -1
  126. package/dist/{chunk-M2YINBHF.js → chunk-PZYP3MCL.js} +1 -1
  127. package/dist/chunk-Q7BOSHWX.js +7 -0
  128. package/dist/{chunk-HIQHYPLU.js → chunk-QJ7TI6CK.js} +1 -1
  129. package/dist/{chunk-VJ6KDRZI.js → chunk-QMXKGSFH.js} +1 -1
  130. package/dist/{chunk-3AOQKI4B.js → chunk-QPN2M26G.js} +1 -1
  131. package/dist/{chunk-5FVB7JHP.js → chunk-QS3FMN67.js} +1 -1
  132. package/dist/{chunk-VRJTLVG3.js → chunk-RF6NUGCU.js} +1 -1
  133. package/dist/{chunk-PXHY753L.js → chunk-RYGZCBO4.js} +1 -1
  134. package/dist/{chunk-MMIHHCMW.js → chunk-SKLUHLS2.js} +1 -1
  135. package/dist/{chunk-2GU7OY3H.js → chunk-SP2WUATO.js} +1 -1
  136. package/dist/chunk-SWI3LCPE.js +7 -0
  137. package/dist/{chunk-J3HX6ZGD.js → chunk-SXTDVUT3.js} +1 -1
  138. package/dist/{chunk-4J32OHLY.js → chunk-T5GSCWN5.js} +1 -1
  139. package/dist/{chunk-J5BRKYGE.js → chunk-TC3JOEMA.js} +1 -1
  140. package/dist/{chunk-5FFHQTRC.js → chunk-TJGUNVRI.js} +1 -1
  141. package/dist/{chunk-EVZA2TCI.js → chunk-TKG42KLM.js} +1 -1
  142. package/dist/{chunk-DYNH5SKT.js → chunk-TQUSREKP.js} +1 -1
  143. package/dist/{chunk-PCCK4YTE.js → chunk-U73TPLFE.js} +1 -1
  144. package/dist/{chunk-HOSFU6UP.js → chunk-UKK5P74A.js} +3 -3
  145. package/dist/chunk-UMT7DWR4.js +1 -0
  146. package/dist/chunk-UUC5YKAS.js +2 -0
  147. package/dist/chunk-UYK6CXAU.js +1 -0
  148. package/dist/{chunk-JSOGPMWB.js → chunk-V3RZ3DTW.js} +1 -1
  149. package/dist/{chunk-5O43334U.js → chunk-V6ZSIUO3.js} +1 -1
  150. package/dist/{chunk-YPBCSDFQ.js → chunk-VFWWZMOQ.js} +1 -1
  151. package/dist/{chunk-MIDYZPO4.js → chunk-VOJWKGCW.js} +1 -1
  152. package/dist/{chunk-AU5EZQW7.js → chunk-VQW35HIQ.js} +1 -1
  153. package/dist/{chunk-PFGYC53K.js → chunk-WAGAC3YI.js} +1 -1
  154. package/dist/{chunk-TPCG6DCA.js → chunk-WKBVT5WG.js} +1 -1
  155. package/dist/{chunk-KRQGLK2Q.js → chunk-WLO5H255.js} +1 -1
  156. package/dist/{chunk-M7YFD4EV.js → chunk-WNWQSHEC.js} +5 -5
  157. package/dist/{chunk-VI34CKV6.js → chunk-WRRUFK4Y.js} +1 -1
  158. package/dist/{chunk-LCZDC6EE.js → chunk-WVHB2HCQ.js} +1 -1
  159. package/dist/{chunk-YIRFEW5M.js → chunk-WZVQHMGI.js} +1 -1
  160. package/dist/{chunk-G2OHWAY2.js → chunk-X4DIJTIK.js} +1 -1
  161. package/dist/{chunk-S6B2ADVR.js → chunk-XH6ZP7M5.js} +1 -1
  162. package/dist/{chunk-7D45IAMQ.js → chunk-XV3I45NA.js} +1 -1
  163. package/dist/{chunk-2K7FGAT6.js → chunk-Y3WIZSRU.js} +1 -1
  164. package/dist/{chunk-2GAFKG64.js → chunk-Y66GQ6V2.js} +1 -1
  165. package/dist/{chunk-N3CNWCC2.js → chunk-YGKQCEVG.js} +1 -1
  166. package/dist/{chunk-2TMQG2UT.js → chunk-YLGSM42I.js} +1 -1
  167. package/dist/{chunk-JK3NIHTX.js → chunk-YQH2JHFA.js} +1 -1
  168. package/dist/{chunk-E7DHELFH.js → chunk-YYL356OX.js} +1 -1
  169. package/dist/chunk-Z4LC3WE5.js +7 -0
  170. package/dist/{chunk-PNP5OKNZ.js → chunk-Z74QYLNC.js} +1 -1
  171. package/dist/{chunk-5BKCIDMS.js → chunk-ZAMDXIVC.js} +1 -1
  172. package/dist/{chunk-WA3YC5W4.js → chunk-ZEENHLSC.js} +2 -2
  173. package/dist/{chunk-6LWOWDF4.js → chunk-ZIREP3EZ.js} +1 -1
  174. package/dist/chunk-ZIXWWU2N.js +275 -0
  175. package/dist/{chunk-N3NE4MVN.js → chunk-ZQ5JVD5X.js} +1 -1
  176. package/dist/{chunk-YVQXEPHY.js → chunk-ZULTG2D2.js} +1 -1
  177. package/dist/{chunk-UU5P2IYU.js → chunk-ZZFZBFVM.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-C2LOYIOU.js} +1 -1
  256. package/dist/{deprecations-KNUMDRIU.js → deprecations-QOHE6JG6.js} +1 -1
  257. package/dist/dist-FF6C4ZHS.js +1 -0
  258. package/dist/dist-Q676YGVI.js +1 -0
  259. package/dist/environments-EGD263DV.js +1 -0
  260. package/dist/error-66U2HJ37.js +1 -0
  261. package/dist/error-handler-SW2ALZ5Z.js +1 -0
  262. package/dist/{fs-LJWVNO4H.js → fs-JPQRUGZI.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-QWTDUPNR.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-FRYN3NWL.js} +1 -1
  278. package/dist/local-storage-DFH3LT5G.js +1 -0
  279. package/dist/{metadata-UEUN64TK.js → metadata-KZVLHQII.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-LVFBY4LY.js} +1 -1
  282. package/dist/notifications-system-DP443VTE.js +1 -0
  283. package/dist/{output-S6E37GJQ.js → output-NH4I5Y3C.js} +1 -1
  284. package/dist/{prettier-EGVCP5CY.js → prettier-6ZMB2MMO.js} +1 -1
  285. package/dist/system-GNOF6HMI.js +1 -0
  286. package/dist/tsconfig.tsbuildinfo +1 -1
  287. package/dist/ui-QOGKADWB.js +1 -0
  288. package/dist/upgrade-K4S6JW64.js +1 -0
  289. package/dist/version-FJFTTOZU.js +1 -0
  290. package/dist/version-ZI4GZX72.js +1 -0
  291. package/dist/{workerd-QOTT6UCO.js → workerd-U6WWWY73.js} +1 -1
  292. package/oclif.manifest.json +714 -122
  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-TUNUEOHO.js +0 -3
  319. package/dist/chunk-VPPWSKOY.js +0 -1
  320. package/dist/chunk-XVUHUA36.js +0 -1
  321. package/dist/chunk-YMAWEIUR.js +0 -1
  322. package/dist/dist-C5IV2YDQ.js +0 -1
  323. package/dist/dist-VL4KZWV2.js +0 -1
  324. package/dist/environments-YPRVO2CF.js +0 -1
  325. package/dist/error-XRBQTNFM.js +0 -1
  326. package/dist/error-handler-NI7D6GSY.js +0 -1
  327. package/dist/lib-AIKYSHWL.js +0 -1
  328. package/dist/lib-Q4PWEMFD.js +0 -1
  329. package/dist/local-storage-ZOZMA22B.js +0 -1
  330. package/dist/notifications-system-HLXJCAMG.js +0 -1
  331. package/dist/system-YQZNGSWB.js +0 -1
  332. package/dist/ui-D2FFWRK7.js +0 -1
  333. package/dist/upgrade-TVTCFMXM.js +0 -1
  334. package/dist/version-J6MDN7BZ.js +0 -1
  335. package/dist/version-RIRW5EXQ.js +0 -1
  336. /package/dist/{chunk-YLQ3LNNY.js → chunk-VDN6MEYI.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{d as E}from"./chunk-TPCG6DCA.js";import{Fb as $,Hb as T,Pb as O,Ta as V,ma as N}from"./chunk-7FQFEB33.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
1
+ import{d as E}from"./chunk-WKBVT5WG.js";import{Fb as $,Hb as T,Pb as O,Ta as V,ma as N}from"./chunk-DONEJHDG.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
2
2
  `);let s;for(;(s=C.exec(r))!=null;){let a=s[1],t=s[2]||"";t=t.trim();let o=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(t=t.replace(/\\n/g,`
3
3
  `),t=t.replace(/\\r/g,"\r")),n[a]=t}return n}function U(e){e=e||{};let n=x(e);e.path=n;let r=l.configDotenv(e);if(!r.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let s=A(e).split(","),a=s.length,t;for(let o=0;o<a;o++)try{let i=s[o].trim(),f=M(r,i);t=l.decrypt(f.ciphertext,f.key);break}catch(i){if(o+1>=a)throw i}return l.parse(t)}function B(e){console.log(`[dotenv@${D}][WARN] ${e}`)}function v(e){console.log(`[dotenv@${D}][DEBUG] ${e}`)}function j(e){console.log(`[dotenv@${D}] ${e}`)}function A(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function M(e,n){let r;try{r=new URL(n)}catch(i){if(i.code==="ERR_INVALID_URL"){let f=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw f.code="INVALID_DOTENV_KEY",f}throw i}let s=r.password;if(!s){let i=new Error("INVALID_DOTENV_KEY: Missing key part");throw i.code="INVALID_DOTENV_KEY",i}let a=r.searchParams.get("environment");if(!a){let i=new Error("INVALID_DOTENV_KEY: Missing environment part");throw i.code="INVALID_DOTENV_KEY",i}let t=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[t];if(!o){let i=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw i.code="NOT_FOUND_DOTENV_ENVIRONMENT",i}return{ciphertext:o,key:s}}function x(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)b.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=y.resolve(process.cwd(),".env.vault");return b.existsSync(n)?n:null}function k(e){return e[0]==="~"?y.join(q.homedir(),e.slice(1)):e}function W(e){let n=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;(n||!r)&&j("Loading env from encrypted .env.vault");let s=l._parseVault(e),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),l.populate(a,s,e),{parsed:s}}function G(e){let n=y.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug),a=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?r=e.encoding:s&&v("No encoding is specified. UTF-8 is used by default");let t=[n];if(e&&e.path)if(!Array.isArray(e.path))t=[k(e.path)];else{t=[];for(let u of e.path)t.push(k(u))}let o,i={};for(let u of t)try{let c=l.parse(b.readFileSync(u,{encoding:r}));l.populate(i,c,e)}catch(c){s&&v(`Failed to load ${u} ${c.message}`),o=c}let f=process.env;if(e&&e.processEnv!=null&&(f=e.processEnv),l.populate(f,i,e),s||!a){let u=Object.keys(i).length,c=[];for(let p of t)try{let h=y.relative(process.cwd(),p);c.push(h)}catch(h){s&&v(`Failed to load ${p} ${h.message}`),o=h}j(`injecting env (${u}) from ${c.join(",")}`)}return o?{parsed:i,error:o}:{parsed:i}}function J(e){if(A(e).length===0)return l.configDotenv(e);let n=x(e);return n?l._configVault(e):(B(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),l.configDotenv(e))}function Q(e,n){let r=Buffer.from(n.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.subarray(0,12),t=s.subarray(-16);s=s.subarray(12,-16);try{let o=F.createDecipheriv("aes-256-gcm",r,a);return o.setAuthTag(t),`${o.update(s)}${o.final()}`}catch(o){let i=o instanceof RangeError,f=o.message==="Invalid key length",u=o.message==="Unsupported state or unable to authenticate data";if(i||f){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw o}}function H(e,n,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(a===!0&&(e[t]=n[t]),s&&v(a===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t]}var l={configDotenv:G,_configVault:W,_parseVault:U,config:J,decrypt:Q,parse:S,populate:H};d.exports.configDotenv=l.configDotenv;d.exports._configVault=l._configVault;d.exports._parseVault=l._parseVault;d.exports.config=l.config;d.exports.decrypt=l.decrypt;d.exports.parse=l.parse;d.exports.populate=l.populate;d.exports=l});m();var L=Y(K());async function oe(e){if(O(T`Reading the .env file at ${$.path(e)}`),!await V(e))throw new E(`The environment file at ${e} does not exist.`);let n=await N(e);return{path:e,variables:(0,L.parse)(n)}}function se(e,n){let r=[],s=e===null?[]:e.split(`
4
4
  `),a=[],t;for(let o of s){if(t){if(o.endsWith(t.quote)){let u=_(t.key,t.value+o.slice(0,-1),t.quote),c=n[t.key];c&&(a.push(t.key),u=_(t.key,c)),r.push(u),t=void 0}else t.value+=`${o}
@@ -1 +1 @@
1
- import{a as o}from"./chunk-N3NE4MVN.js";import{b as a}from"./chunk-HOSFU6UP.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static{this.description="View the UI kit components that process async tasks"}static{this.hidden=!0}async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-ZQ5JVD5X.js";import{b as a}from"./chunk-UKK5P74A.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static{this.description="View the UI kit components that process async tasks"}static{this.hidden=!0}async run(){await o()}};export{t as a};
@@ -1 +1 @@
1
- import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-G4OQABDT.js";import{h as n}from"./chunk-HDC5V7RY.js";import{b as g}from"./chunk-HOSFU6UP.js";import{F as S,z as h}from"./chunk-NTRAWIEJ.js";import{r as C}from"./chunk-T6CC5WUU.js";import{Ob as w}from"./chunk-7FQFEB33.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function N(e,t){let s=[],o=e[t];if(o)for(let[c,I]of Object.entries(o))s.push({label:I.identity.alias??c,value:c});return s}async function b(){let e=await p({},{forceNewSession:!0}),t=await f(e.userId);if(!t){let s=await S({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(e.userId,s),s}return t}async function v(){let e=await l(),t=await u(),s=[];return e&&s.push(...N(e,t)),s.length>0&&s.push({label:"Log in with a different account",value:r}),s}async function y(e){if(e){let o=await d(e);if(o)return n(o),e}let t=await v(),s=r;return t.length>0&&(s=await h({message:"Which account would you like to use?",choices:t})),s===r?b():(n(s),t.find(o=>o.value===s)?.label??s)}var A=L(C(),1);var a=class e extends g{static{this.description="Logs you in to your Shopify account."}static{this.flags={alias:A.Flags.string({description:"Alias of the session you want to login to.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})}}async run(){let{flags:t}=await this.parse(e),s=await y(t.alias);w(`Current account: ${s}.`)}};export{a};
1
+ import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-5W443CKL.js";import{h as n}from"./chunk-KN3FTJDU.js";import{b as g}from"./chunk-UKK5P74A.js";import{F as S,z as h}from"./chunk-6EZ7JWBK.js";import{Ob as w}from"./chunk-DONEJHDG.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function N(e,t){let s=[],o=e[t];if(o)for(let[c,I]of Object.entries(o))s.push({label:I.identity.alias??c,value:c});return s}async function b(){let e=await p({},{forceNewSession:!0}),t=await f(e.userId);if(!t){let s=await S({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(e.userId,s),s}return t}async function v(){let e=await l(),t=await u(),s=[];return e&&s.push(...N(e,t)),s.length>0&&s.push({label:"Log in with a different account",value:r}),s}async function y(e){if(e){let o=await d(e);if(o)return n(o),e}let t=await v(),s=r;return t.length>0&&(s=await h({message:"Which account would you like to use?",choices:t})),s===r?b():(n(s),t.find(o=>o.value===s)?.label??s)}var A=L(C(),1);var a=class e extends g{static{this.description="Logs you in to your Shopify account."}static{this.flags={alias:A.Flags.string({description:"Alias of the session you want to login to.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})}}async run(){let{flags:t}=await this.parse(e),s=await y(t.alias);w(`Current account: ${s}.`)}};export{a};
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-OZBY45KT.js";import{a as M}from"./chunk-EKVTNWHM.js";import{a as C}from"./chunk-5BKCIDMS.js";import{F as j,Fa as E}from"./chunk-4QTEPWEJ.js";import{e as I}from"./chunk-CFOXXOO2.js";import{a as J}from"./chunk-A5HKAMAC.js";import{R as h,da as g,ga as A,z as y}from"./chunk-G4OQABDT.js";import{b as O}from"./chunk-OXJBYKMX.js";import{D,E as f,u as T}from"./chunk-NTRAWIEJ.js";import{g as R}from"./chunk-TPCG6DCA.js";import{r as z}from"./chunk-T6CC5WUU.js";import{Fb as k,Hb as m,Mb as v}from"./chunk-7FQFEB33.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();s();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"30"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetafieldForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetafieldForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetafieldDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}},{kind:"Field",name:{kind:"Name",value:"customerAccount"}}]}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminFilterable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]};s();async function Q(e){let i="Admin",n=I(e.storeFqdn,"unstable");return{token:e.token,api:i,url:n}}async function w(e){return A({query:e.query,...await Q(e.session),variables:e.variables,autoRateLimitRestore:e.autoRateLimitRestore})}s();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metaobjectDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaobjectDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaobjectForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetaobjectForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetaobjectDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}}]}},{kind:"Field",name:{kind:"Name",value:"displayNameKey"}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"translatable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"renderable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaTitleKey"}},{kind:"Field",name:{kind:"Name",value:"metaDescriptionKey"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"fieldDefinitions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"required"}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]}}]};var $=_(J(),1);var Z={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",customer:"CUSTOMER",delivery_customization:"DELIVERY_CUSTOMIZATION",delivery_method:"DELIVERY_METHOD",delivery_option_generator:"DELIVERY_OPTION_GENERATOR",discount:"DISCOUNT",draft_order:"DRAFTORDER",fulfillment_constraint_rule:"FULFILLMENT_CONSTRAINT_RULE",gift_card_transaction:"GIFT_CARD_TRANSACTION",order_routing_location_rule:"ORDER_ROUTING_LOCATION_RULE",payment_customization:"PAYMENT_CUSTOMIZATION",selling_plan:"SELLING_PLAN",shop:"SHOP",validation:"VALIDATION",variant:"PRODUCTVARIANT",cart_transform:"CARTTRANSFORM"};async function q({query:e,session:i,toNodes:n,toVariables:t,performQuery:d=a=>w({query:e,session:i,variables:a,autoRateLimitRestore:!0})}){let a;try{let o=n(await d(t(a))),l=[];for(l.push(...o.nodes);o.pageInfo.hasNextPage;)a=o.pageInfo.endCursor,o=n(await d(t(a))),l.push(...o.nodes);return{status:"ok",items:l}}catch(o){if(o instanceof Error&&o.message.includes("ACCESS_DENIED"))return{status:"scope_error"};throw o}}function x(e,i){let n="";for(let t of e)n=(0,$.updateTomlValues)(n,t);return`# ${i}
1
+ import{a as L}from"./chunk-JOZXRV5K.js";import{a as M}from"./chunk-HM5H7WBE.js";import{a as C}from"./chunk-ZAMDXIVC.js";import{F as j,Fa as E}from"./chunk-ATXODH6C.js";import{e as I}from"./chunk-G24L7MB3.js";import{a as J}from"./chunk-J2WCMQZZ.js";import{R as h,da as g,ga as A,z as y}from"./chunk-5W443CKL.js";import{b as O}from"./chunk-H5C3QTOO.js";import{D,E as f,u as T}from"./chunk-6EZ7JWBK.js";import{g as R}from"./chunk-WKBVT5WG.js";import{Fb as k,Hb as m,Mb as v}from"./chunk-DONEJHDG.js";import{r as z}from"./chunk-T6CC5WUU.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();s();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"30"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetafieldForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetafieldForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetafieldDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}},{kind:"Field",name:{kind:"Name",value:"customerAccount"}}]}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminFilterable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]};s();async function Q(e){let i="Admin",n=I(e.storeFqdn,"unstable");return{token:e.token,api:i,url:n}}async function w(e){return A({query:e.query,...await Q(e.session),variables:e.variables,autoRateLimitRestore:e.autoRateLimitRestore})}s();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metaobjectDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaobjectDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaobjectForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetaobjectForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetaobjectDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}}]}},{kind:"Field",name:{kind:"Name",value:"displayNameKey"}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"translatable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"renderable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaTitleKey"}},{kind:"Field",name:{kind:"Name",value:"metaDescriptionKey"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"fieldDefinitions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"required"}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]}}]};var $=_(J(),1);var Z={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",customer:"CUSTOMER",delivery_customization:"DELIVERY_CUSTOMIZATION",delivery_method:"DELIVERY_METHOD",delivery_option_generator:"DELIVERY_OPTION_GENERATOR",discount:"DISCOUNT",draft_order:"DRAFTORDER",fulfillment_constraint_rule:"FULFILLMENT_CONSTRAINT_RULE",gift_card_transaction:"GIFT_CARD_TRANSACTION",order_routing_location_rule:"ORDER_ROUTING_LOCATION_RULE",payment_customization:"PAYMENT_CUSTOMIZATION",selling_plan:"SELLING_PLAN",shop:"SHOP",validation:"VALIDATION",variant:"PRODUCTVARIANT",cart_transform:"CARTTRANSFORM"};async function q({query:e,session:i,toNodes:n,toVariables:t,performQuery:d=a=>w({query:e,session:i,variables:a,autoRateLimitRestore:!0})}){let a;try{let o=n(await d(t(a))),l=[];for(l.push(...o.nodes);o.pageInfo.hasNextPage;)a=o.pageInfo.endCursor,o=n(await d(t(a))),l.push(...o.nodes);return{status:"ok",items:l}}catch(o){if(o instanceof Error&&o.message.includes("ACCESS_DENIED"))return{status:"scope_error"};throw o}}function x(e,i){let n="";for(let t of e)n=(0,$.updateTomlValues)(n,t);return`# ${i}
2
2
  ${n}`}function X(e,i){let n=i.map(le).map(a=>{switch(a.status){case"ok":{let{typeName:o,patches:l}=a;return x(l,`type: $app:${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null),t=e.flatMap(({items:a,ownerType:o,graphQLOwner:l})=>a.map(r=>({result:oe(r,o),graphQLOwner:l}))).map(({result:a,graphQLOwner:o})=>{switch(a.status){case"ok":{let{namespace:l,key:r,patches:b}=a;return x(b,`namespace: ${l==="app"?"$app":`$app:${l}`} key: ${r} owner_type: ${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null);return{tomlContent:[...n,...t].join(`
3
3
  `),metafieldCount:t.length,metaobjectCount:n.length}}async function K(e){let i=await de(e),n=i.storeFqdn,t=await ne(i),d=await ie(i);e.includeExistingDeclaredDefinitions||(t=te(t,e.appConfiguration),d=ae(d,e.appConfiguration));let{tomlContent:a,metafieldCount:o,metaobjectCount:l}=X(t,d);ee(o,l,n,a)}function ee(e,i,n,t){T({headline:"Conversion to TOML complete.",body:["Converted",{warn:`${e} metafields`},"and",{warn:`${i} metaobjects`},"from",{warn:n},"into TOML, ready for you to copy."],orderedNextSteps:!0,nextSteps:["Review the suggested TOML carefully before applying.",["Missing sections? Make sure your app has the required access scopes to load metafields and metaobjects (e.g.",{command:"read_customers"},"to load customer metafields,",{command:"read_metaobject_definitions"},"to load metaobjects.)"],["Missing definitions? Only metafields and metaobjects that are app-reserved (using",{command:"$app"},") will be converted."],["When you're ready, add the generated TOML to your app's configuration file and test out changes with the",{command:"shopify app dev"},"command."]]}),ue(t)}async function ne(e){let i=[];return await D(Object.entries(Z).map(([n,t])=>({title:m`Loading ${k.green(n)} metafields`,task:async()=>{let d=await q({query:P,session:e,toNodes:a=>a.metafieldDefinitions,toVariables:a=>({ownerType:t,after:a})});i.push({metafields:d,ownerType:n,graphQLOwner:t})}}))),i.map(({metafields:n,ownerType:t,graphQLOwner:d})=>n.status==="ok"?{ownerType:t,items:n.items,graphQLOwner:d}:null).filter(n=>n!==null)}async function ie(e){let i=await f({title:m`Loading ${k.green("metaobjects")}`,task:async()=>q({query:V,session:e,toNodes:n=>n.metaobjectDefinitions,toVariables:n=>({after:n})})});return i.status==="ok"?i.items:[]}function te(e,i){return e.map(n=>{let t=n.items.filter(d=>!U(i,[n.ownerType,"metafields",p(d.namespace)??"",d.key]));return t.length>0?{...n,items:t}:null}).filter(n=>n!==null)}function ae(e,i){return e.filter(n=>!U(i,["metaobjects","app",p(n.type)??""]))}function U(e,i){let n=e;for(let t of i){if(!n[t])return!1;n=n[t]}return!0}async function de(e){let{remoteApp:i,store:n}=e,t=i.apiSecretKeys[0]?.secret;if(!t)throw new R("No API secret keys found for app");return await h(n.shopDomain,i.apiKey,t)}function p(e){if(!e.match(/^app--\d+/))return null;let i="app";return e.match(/^app--\d+--/)&&(i=e.replace(/^app--\d+--/,"")),i}function oe(e,i){let n=p(e.namespace);if(!n)return{status:"not_app_reserved"};let t=e.key,d=se(e),a=me(d,i,n,t);return{status:"ok",key:t,namespace:n,patches:a}}function le(e){let i=p(e.type);if(!i)return{status:"not_app_reserved"};let n=re(e,i),t=ce(n,i);return{status:"ok",typeName:i,patches:t}}function se(e){let i={name:e.name===e.key?void 0:e.name,type:e.type.name,description:e.description??void 0,capabilities:u({admin_filterable:e.capabilities.adminFilterable.enabled||void 0}),access:u({admin:Y(e.access.admin),storefront:H(e.access.storefront),customer_account:pe(e.access.customerAccount)}),validations:B(e.validations)},{type:n,validations:t}=G(i.type,i.validations);return i.type=n,i.validations=t,i}function re(e,i){return{name:e.name===i?void 0:e.name,description:e.description??void 0,display_name_field:e.displayNameKey??void 0,access:u({admin:Y(e.access.admin),storefront:H(e.access.storefront)}),capabilities:u({translatable:e.capabilities.translatable.enabled||void 0,publishable:e.capabilities.publishable.enabled||void 0,renderable:e.capabilities.renderable?.enabled||void 0,renderable_meta_title_field:e.capabilities.renderable?.data?.metaTitleKey??void 0,renderable_meta_description_field:e.capabilities.renderable?.data?.metaDescriptionKey??void 0}),fields:Object.fromEntries(e.fieldDefinitions.map(n=>{let t={type:n.type.name,description:n.description??void 0,name:n.name===n.key?void 0:n.name,required:n.required||void 0,validations:B(n.validations)},{type:d,validations:a}=G(t.type,t.validations);return t.type=d,t.validations=a,[n.key,t]}))}}function G(e,i){if(!i)return{type:e,validations:void 0};if(i.metaobject_definition_type&&typeof i.metaobject_definition_type=="string"){let n=p(i.metaobject_definition_type);return{type:`${e}<$app:${n}>`,validations:u({...i,metaobject_definition_type:void 0})}}if(i.metaobject_definition_types&&Array.isArray(i.metaobject_definition_types)&&i.metaobject_definition_types.every(n=>typeof n=="string")){let n=i.metaobject_definition_types.map(t=>p(t));return{type:`${e}<${n.map(t=>`$app:${t}`).join(",")}>`,validations:u({...i,metaobject_definition_types:void 0})}}return{type:e,validations:i}}function B(e){let i=n=>{try{return JSON.parse(n)}catch{return n}};return u(Object.fromEntries(e.filter(n=>n.value!==void 0&&n.name!=="metaobject_definition_id"&&n.name!=="metaobject_definition_ids").map(n=>[n.name,n.value?i(n.value):void 0])))}function me(e,i,n,t){let d=[[[i,"metafields",n,t,"name"],e.name],[[i,"metafields",n,t,"type"],e.type],[[i,"metafields",n,t,"description"],e.description]],a=[[[i,"metafields",n,t,"access","admin"],e.access?.admin],[[i,"metafields",n,t,"access","storefront"],e.access?.storefront],[[i,"metafields",n,t,"access","customer_account"],e.access?.customer_account],[[i,"metafields",n,t,"capabilities","admin_filterable"],e.capabilities?.admin_filterable||void 0]];return e.validations&&W(e.validations).forEach(({validationKey:l,actualValue:r})=>{d.push([[i,"metafields",n,t,"validations",l],r])}),[N(d),N(a)]}function ce(e,i){let n=[[["metaobjects","app",i,"name"],e.name===i?void 0:e.name],[["metaobjects","app",i,"description"],e.description],[["metaobjects","app",i,"display_name_field"],e.display_name_field]],t=[[["metaobjects","app",i,"access","admin"],e.access?.admin],[["metaobjects","app",i,"access","storefront"],e.access?.storefront]];return e.capabilities?.translatable&&t.push([["metaobjects","app",i,"capabilities","translatable"],!0]),e.capabilities?.publishable&&t.push([["metaobjects","app",i,"capabilities","publishable"],!0]),e.capabilities?.renderable&&(t.push([["metaobjects","app",i,"capabilities","renderable"],!0]),e.capabilities?.renderable_meta_title_field&&t.push([["metaobjects","app",i,"capabilities","renderable_meta_title_field"],e.capabilities.renderable_meta_title_field]),e.capabilities?.renderable_meta_description_field&&t.push([["metaobjects","app",i,"capabilities","renderable_meta_description_field"],e.capabilities.renderable_meta_description_field])),Object.entries(e.fields).forEach(([d,a])=>{if(typeof a=="string")n.push([["metaobjects","app",i,"fields",d],a]);else{let o=Object.fromEntries(Object.entries(a).filter(([l,r])=>r!==void 0));Object.keys(o).length===1?n.push([["metaobjects","app",i,"fields",d],a.type]):(n.push([["metaobjects","app",i,"fields",d,"type"],a.type]),n.push([["metaobjects","app",i,"fields",d,"description"],a.description]),n.push([["metaobjects","app",i,"fields",d,"name"],a.name]),n.push([["metaobjects","app",i,"fields",d,"required"],a.required||void 0]),a.validations&&W(a.validations).forEach(({validationKey:r,actualValue:b})=>{n.push([["metaobjects","app",i,"fields",d,"validations",r],b])}))}}),[N(n),N(t)]}function W(e){return Object.entries(e).map(([i,n])=>{let t;return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||Array.isArray(n)&&n.every(d=>typeof d=="string")?t=n:t=JSON.stringify(n),{validationKey:i,actualValue:t}})}function ue(e){let i=e.split(`
4
4
  `);for(let n of i)n.match(/^\s*\[/)?v(m`${k.green(n)}`):n.match(/^\s*#/)?v(m`${k.gray(n)}`):v(m`${n}`)}function Y(e){switch(e){case"MERCHANT_READ_WRITE":return"merchant_read_write";case"MERCHANT_READ":case"PRIVATE":case"PUBLIC_READ":case"PUBLIC_READ_WRITE":case null:case void 0:return}}function H(e){switch(e){case"PUBLIC_READ":return"public_read";case"NONE":case null:case void 0:return}}function pe(e){switch(e){case"READ":return"read";case"READ_WRITE":return"read_write";case"NONE":case null:case void 0:return}}function u(e){if(e&&!g(e)&&!(typeof e=="object"&&Object.values(e).every(i=>i===void 0)))return e}function N(e){return e.filter(([i,n])=>n!==void 0)}var S=_(z(),1);var F,c=class extends M{async run(){let{appContextResult:i,...n}=await f({title:m`Loading application`,task:async()=>{let{flags:t}=await this.parse(F);await j(t.path);let d=await E({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),a=await L({appContextResult:d,storeFqdn:t.store,forceReselectStore:t.reset});return{appContextResult:d,appConfiguration:d.app.configuration,remoteApp:d.remoteApp,store:a,includeExistingDeclaredDefinitions:t["include-existing"]}}});return await K(n),{app:i.app}}};F=c;c.summary="Import metafield and metaobject definitions.";c.descriptionWithMarkdown="Import metafield and metaobject definitions from your development store. [Read more about declarative custom data definitions](https://shopify.dev/docs/apps/build/custom-data/declarative-custom-data-definitions).";c.description=F.descriptionWithoutMarkdown();c.flags={...O,...C,store:S.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>y(e)}),"include-existing":S.Flags.boolean({description:"Include existing declared definitions in the output.",default:!1,env:"SHOPIFY_FLAG_INCLUDE_EXISTING"})};var Ke=c;export{Ke as a};
@@ -1,4 +1,4 @@
1
- import{k as S,q as E}from"./chunk-TUNUEOHO.js";import{$ as re,aa as G}from"./chunk-4J32OHLY.js";import{r as C}from"./chunk-ANBOLDON.js";import{b as $}from"./chunk-OXJBYKMX.js";import{u as w,v as N}from"./chunk-NTRAWIEJ.js";import{r as oe}from"./chunk-T6CC5WUU.js";import{$a as A,Lb as l,Mb as P,N as x,Nb as T,Pb as L,Ta as b,na as R,ua as _}from"./chunk-7FQFEB33.js";import{d as F,p as I}from"./chunk-773TIA5M.js";import{e as O,g as k}from"./chunk-VKWPEFWQ.js";k();k();var i=O(G(),1),y=O(re(),1);function ie(t){switch(t){case"error":return i.Severity.ERROR;case"suggestion":case"warning":return i.Severity.WARNING;case"style":case"info":return i.Severity.INFO;case"crash":return}}function j(t){switch(t){case i.Severity.ERROR:return"error";case i.Severity.WARNING:return"warning";case i.Severity.INFO:return"info"}}function se(t,e,n){let o=i.path.fsPath(t),c=R(o).toString().split(`
1
+ import{p as S,v as E}from"./chunk-D6YDSGR4.js";import{$ as re,aa as G}from"./chunk-T5GSCWN5.js";import{r as C}from"./chunk-GW3VY3FZ.js";import{b as $}from"./chunk-H5C3QTOO.js";import{u as w,v as N}from"./chunk-6EZ7JWBK.js";import{$a as A,Lb as l,Mb as P,N as x,Nb as T,Pb as L,Ta as b,na as R,ua as _}from"./chunk-DONEJHDG.js";import{d as F,p as I}from"./chunk-773TIA5M.js";import{r as oe}from"./chunk-T6CC5WUU.js";import{e as O,g as k}from"./chunk-VKWPEFWQ.js";k();k();var i=O(G(),1),y=O(re(),1);function ie(t){switch(t){case"error":return i.Severity.ERROR;case"suggestion":case"warning":return i.Severity.WARNING;case"style":case"info":return i.Severity.INFO;case"crash":return}}function j(t){switch(t){case i.Severity.ERROR:return"error";case i.Severity.WARNING:return"warning";case i.Severity.INFO:return"info"}}function se(t,e,n){let o=i.path.fsPath(t),c=R(o).toString().split(`
2
2
  `).slice(e,n+1),a=c.length===1;return c.map((u,h)=>{let f=e+h+1,d=a?u.trim():u;return`${f} ${d}`}).join(`
3
3
  `)}function ce(t){switch(t){case i.Severity.ERROR:return{error:`
4
4
  [error]:`};case i.Severity.WARNING:return{warn:`
@@ -1 +1 @@
1
- import{b as d,c as f}from"./chunk-7572RLUP.js";import{a as c}from"./chunk-S7F5KFQP.js";import{a as p}from"./chunk-5BKCIDMS.js";import{Ga as u,e as i}from"./chunk-4QTEPWEJ.js";import{b as n}from"./chunk-OXJBYKMX.js";import{v as e}from"./chunk-NTRAWIEJ.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a,t=class extends c{async run(){let{flags:o}=await this.parse(a),{app:r}=await u({directory:o.path,userProvidedConfigName:o.config}),m=await f(r,o.path);return await i(m,{stdout:process.stdout,stderr:process.stderr,app:r}),e({headline:"GraphQL types generated successfully."}),{app:r}}};a=t;t.summary="Generate GraphQL types for a function.";t.descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...p,...d};var x=t;export{x as a};
1
+ import{b as d,c as f}from"./chunk-7UOPCYMV.js";import{a as c}from"./chunk-MQICT2LR.js";import{a as p}from"./chunk-ZAMDXIVC.js";import{Ga as u,e as i}from"./chunk-ATXODH6C.js";import{b as n}from"./chunk-H5C3QTOO.js";import{v as e}from"./chunk-6EZ7JWBK.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a,t=class extends c{async run(){let{flags:o}=await this.parse(a),{app:r}=await u({directory:o.path,userProvidedConfigName:o.config}),m=await f(r,o.path);return await i(m,{stdout:process.stdout,stderr:process.stderr,app:r}),e({headline:"GraphQL types generated successfully."}),{app:r}}};a=t;t.summary="Generate GraphQL types for a function.";t.descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...p,...d};var x=t;export{x as a};
@@ -1,4 +1,4 @@
1
- import{a as B,j as C,m as P}from"./chunk-3YDYZ232.js";import{B as U,C as _}from"./chunk-DTIWUT2T.js";import{e as g}from"./chunk-VJ6KDRZI.js";import{l as v,m as w}from"./chunk-5XDQ76DQ.js";import{xa as E}from"./chunk-G4OQABDT.js";import{Pb as m}from"./chunk-7FQFEB33.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
1
+ import{a as B,j as C,m as P}from"./chunk-2NWWMNU5.js";import{e as g}from"./chunk-QMXKGSFH.js";import{e as U,f as _}from"./chunk-6YPEONHB.js";import{l as v,m as w}from"./chunk-PJYNAUQB.js";import{xa as E}from"./chunk-5W443CKL.js";import{Pb as m}from"./chunk-DONEJHDG.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
2
2
  `);_(f.key,"delete")(new Error(`Failed to delete ${f.key}: ${y}`))}}),c.current+=k.length});u.push(a)}let h=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:h}}function L(t,e){let s=e.applyIgnoreFilters(t).filter(o=>!e.files.has(o.key));return m(`Files to be deleted:
3
3
  ${s.map(o=>`-${o.key}`).join(`
4
4
  `)}`),s}function x(t){let e=P(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configSchemaFile,...e.staticAssetFiles]}var D=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function R(t,e,r){let s=new Set(r.map(l=>l.key)),o=D.filter(({key:l})=>!s.has(l));o.length>0&&await w(t.id,o,e)}function q(t,e,r,s,o){let l=I(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=z(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(S(a).map(d=>N(d,e,s,r.id,o).then(()=>{c.current+=d.length,d.forEach(f=>e.unsyncedFileKeys.delete(f.key))}))).then(()=>{}),h=i.reduce((a,d)=>a.then(()=>u(d)),Promise.resolve()),p=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([h,p]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function I(t,e){let r=K(t),s=t.applyIgnoreFilters(r),o=new Map(e.map(n=>[n.key,n])),l=s.filter(n=>{let i=o.get(n.key);return!i||i.checksum!==n.checksum});return m(`Files to be uploaded:
@@ -1,3 +1,3 @@
1
- import{d as w,n as y,r as n}from"./chunk-G4OQABDT.js";import{w as l}from"./chunk-ANBOLDON.js";import{k as u,l as m}from"./chunk-HDC5V7RY.js";import{a as h}from"./chunk-VPPWSKOY.js";import{a as x}from"./chunk-WW7TENNA.js";import{O as S,u as d,w as g,x as N}from"./chunk-NTRAWIEJ.js";import{f as _}from"./chunk-TPCG6DCA.js";import{Pb as a}from"./chunk-7FQFEB33.js";import{a as f}from"./chunk-NNOSZ447.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var $="https://cdn.shopify.com/static/cli/notifications.json",D="Cache is empty",C=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear"];function c(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??$}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),I=n.object({notifications:n.array(E)});async function Q(e,t=process.env){try{let r=x();if(b(r,t)||w(t))return;let o=await k(),s=v(o.notifications,r,e);a(`Notifications to show: ${s.length}`),await V(s)}catch(r){if(r.message===D){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:s}=await import("./error-handler-NI7D6GSY.js");await s(o,"unexpected_error")}}function b(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||C.includes(e)}async function V(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
1
+ import{d as w,n as y,r as n}from"./chunk-5W443CKL.js";import{w as l}from"./chunk-GW3VY3FZ.js";import{k as u,l as m}from"./chunk-KN3FTJDU.js";import{a as h}from"./chunk-FU232KQ7.js";import{a as x}from"./chunk-WW7TENNA.js";import{O as S,u as d,w as g,x as N}from"./chunk-6EZ7JWBK.js";import{f as _}from"./chunk-WKBVT5WG.js";import{Pb as a}from"./chunk-DONEJHDG.js";import{a as f}from"./chunk-NNOSZ447.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var $="https://cdn.shopify.com/static/cli/notifications.json",D="Cache is empty",C=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear"];function c(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??$}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),I=n.object({notifications:n.array(E)});async function Q(e,t=process.env){try{let r=x();if(b(r,t)||w(t))return;let o=await k(),s=v(o.notifications,r,e);a(`Notifications to show: ${s.length}`),await V(s)}catch(r){if(r.message===D){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:s}=await import("./error-handler-SW2ALZ5Z.js");await s(o,"unexpected_error")}}function b(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||C.includes(e)}async function V(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
2
2
  `),link:t.cta};switch(t.type){case"info":{d(r);break}case"warning":{g(r);break}case"error":throw N(r),new Error("abort")}u(`notification-${t.id}`,new Date().getTime().toString())})}async function k(){let e=`notifications-${c()}`,t=m(e)?.value;if(!t)throw new Error(D);let r=JSON.parse(t);return I.parse(r)}async function X(){a("Fetching notifications...");let e=await y(c(),void 0,{useNetworkLevelRetry:!1,useAbortSignal:!0,timeoutMs:3*1e3});if(e.status!==200)throw new Error(`Failed to fetch notifications: ${e.statusText}`);let t=await e.text(),r=JSON.parse(t),o=I.parse(r);return await O(t),o}async function O(e){u(`notifications-${c()}`,e),a(`Notifications from ${c()} stored in the cache`)}function Z(e,t=process.argv,r=process.env){if(b(e,r)||!t[0]||!t[1])return;let o=t[0],i=[t[1],"notifications","list","--ignore-errors"];S(o,i,{background:!0,env:{...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},externalErrorHandler:async T=>{a(`Failed to fetch notifications in background: ${T.message}`)}})}function v(e,t,r,o=new Date(new Date().setUTCHours(0,0,0,0)),s=h){return e.filter(i=>B(i,s)).filter(i=>F(i,o)).filter(i=>A(i,t)).filter(i=>j(i,t,r)).filter(i=>q(i))}function B(e,t){let r=!e.minVersion||l(t,`>=${e.minVersion}`),o=!e.maxVersion||l(t,`<=${e.maxVersion}`);return r&&o}function F(e,t){let r=!e.minDate||new Date(e.minDate)<=t,o=!e.maxDate||new Date(e.maxDate)>=t;return r&&o}function A(e,t){return t===""?!0:!e.commands||e.commands.includes(t)}function j(e,t,r){let o=t.split(":")[0]??"all",s=e.surface??"all";return r?r.includes(s):s===o||s==="all"}function q(e){if(!e.frequency)return!0;let t=`notification-${e.id}`,r=m(t)?.value;if(!r)return!0;switch(e.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(r)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(r)>168*3600*1e3}}function ee(e){let t=[];return e.minDate&&t.push(`from ${e.minDate}`),e.maxDate&&t.push(`to ${e.maxDate}`),e.minVersion&&t.push(`from v${e.minVersion}`),e.maxVersion&&t.push(`to v${e.maxVersion}`),e.frequency==="once"&&t.push("show only once"),e.frequency==="once_a_day"&&t.push("show once a day"),e.frequency==="once_a_week"&&t.push("show once a week"),e.surface&&t.push(`surface = ${e.surface}`),e.commands&&t.push(`commands = ${e.commands.join(", ")}`),t.join(`
3
3
  `)}export{Q as a,k as b,X as c,Z as d,v as e,ee as f};
@@ -0,0 +1,7 @@
1
+ import{p,v as d}from"./chunk-D6YDSGR4.js";import{a as u}from"./chunk-ZIREP3EZ.js";import{aa as P}from"./chunk-T5GSCWN5.js";import{b as l}from"./chunk-H5C3QTOO.js";import{v as f}from"./chunk-6EZ7JWBK.js";import{d as i}from"./chunk-WKBVT5WG.js";import{Ta as c,ma as h}from"./chunk-DONEJHDG.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();var g=w(P(),1),k=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await v(e),o=`${e}/${t}`,a=`${e}/(${k})`;await u({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),f({body:["Your local theme was packaged in",{filePath:m(o)}]})}async function v(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let o=await j(t);if(o===void 0||o.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[o.theme_name,o.theme_version].filter(Boolean).join("-")}.zip`}async function j(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}var _,s=class extends d{async command(t){await y(t.path)}};_=s;s.summary="Package your theme into a .zip file, ready to upload to the Online Store.";s.descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
2
+
3
+ Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
4
+
5
+ The package includes the \`listings\` directory if present (required for multi-preset themes per [Theme Store requirements](https://shopify.dev/docs/storefronts/themes/store/requirements#adding-presets-to-your-theme-zip-submission)).
6
+
7
+ The ZIP file uses the name \`theme_name-theme_version.zip\`, based on parameters in your [settings_schema.json](https://shopify.dev/docs/storefronts/themes/architecture/config/settings-schema-json) file.`;s.description=_.descriptionWithoutMarkdown();s.flags={...l,path:p.path};s.multiEnvironmentsFlags=null;var E=s;export{E as a};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-EKVTNWHM.js";import{a as k}from"./chunk-5BKCIDMS.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-4QTEPWEJ.js";import{b as y}from"./chunk-OXJBYKMX.js";import{v as u}from"./chunk-NTRAWIEJ.js";import{d as h}from"./chunk-TPCG6DCA.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
1
+ import{a as v}from"./chunk-HM5H7WBE.js";import{a as k}from"./chunk-ZAMDXIVC.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-ATXODH6C.js";import{b as y}from"./chunk-H5C3QTOO.js";import{v as u}from"./chunk-6EZ7JWBK.js";import{d as h}from"./chunk-WKBVT5WG.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
@@ -1 +1 @@
1
- import{z as r}from"./chunk-G4OQABDT.js";import{r as o}from"./chunk-T6CC5WUU.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
1
+ import{z as r}from"./chunk-5W443CKL.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{r as o}from"./chunk-T6CC5WUU.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
@@ -1,4 +1,4 @@
1
- import{Ea as cs,Fb as kt,Hb as gs,Pa as hs,Pb as ms,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,ua as ls,wa as bt}from"./chunk-7FQFEB33.js";import{d as we,g as yt,i as as}from"./chunk-773TIA5M.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
1
+ import{Ea as cs,Fb as kt,Hb as gs,Pa as hs,Pb as ms,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,ua as ls,wa as bt}from"./chunk-DONEJHDG.js";import{d as we,g as yt,i as as}from"./chunk-773TIA5M.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
2
2
  `?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},D=class{liquidMethodMissing(e,s){}},wi=Object.prototype.toString,ys=String.prototype.toLowerCase,Qt=Object.hasOwnProperty;function d(t){return typeof t=="string"}function x(t){return typeof t=="function"}function bi(t){return t&&x(t.then)}function _e(t){return t&&x(t.next)&&x(t.throw)&&x(t.return)}function Kt(t){return function(...e){return new Promise((s,i)=>{t(...e,(r,n)=>{r?i(r):s(n)})})}}function h(t){return t=m(t),d(t)?t:k(t)?"":S(t)?t.map(e=>h(e)).join(""):String(t)}function ge(t){return t=m(t),S(t)?t:d(t)&&t.length>0?[t]:Ti(t)?Array.from(t):dt(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function L(t){return t=m(t),k(t)?[]:S(t)?t:[t]}function m(t){return t instanceof D&&x(t.valueOf)?t.valueOf():t}function xt(t){return+m(t)||0}function ft(t){return typeof t=="number"}function Vs(t){return t&&x(t.toLiquid)?Vs(t.toLiquid()):t}function k(t){return t==null}function ki(t){return t===void 0}function S(t){return wi.call(t)==="[object Array]"}function Ps(t){return t&&ft(t.length)}function Ti(t){return dt(t)&&Symbol.iterator in t}function ws(t,e){t=t||{};for(let s in t)if(Qt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function xi(t){return t[t.length-1]}function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Cs(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function oe(t,e,s=" "){return $s(t,e,s,(i,r)=>r+i)}function Si(t,e,s=" "){return $s(t,e,s,(i,r)=>i+r)}function $s(t,e,s,i){t=String(t);let r=e-t.length;return r<=0?t:i(t,s.repeat(r))}function js(t){return t}function _i(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function Li(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Fi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||t<e?-1:t>e?1:0}function Oi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||(t=ys.call(t),e=ys.call(e),t<e)?-1:t>e?1:0}function pt(t){return function(...e){return t.call(this,...e.map(m))}}function V(t){return function(...e){return t.call(this,...e.map(xt))}}function*ke(t){let e=new Set;for(let s of t){let i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}var bs="__liquidClass__",E=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,bs,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:vi(this.token),enumerable:!1}),this.message=zi(this.message,this.token),this.stack=this.message+`
3
3
  `+this.context+`
4
4
  `+this.stack,this.originalError&&(this.stack+=`
@@ -11,5 +11,5 @@ From `+this.originalError.stack)}static is(e){return e?.[bs]==="LiquidError"}},L
11
11
  `)}function _r(t){let e=h(t);this.context.memoryLimit.use(e.length);let s=new Map([["<script","</script>"],["<style","</style>"],["<!--","-->"],["<",">"]]),i="",r=0;for(;r<e.length;){let n=e.indexOf("<",r);if(n<0)return i+e.slice(r);i+=e.slice(r,n);for(let[o,a]of s){if(!e.startsWith(o,n))continue;let c=e.indexOf(a,n+o.length);if(c>=0){r=c+a.length;break}s.delete(o)}if(r===n)return i+e.slice(n)}return i}var Lr=Object.freeze({__proto__:null,escape:gt,xml_escape:kr,escape_once:xr,newline_to_br:Sr,strip_html:_r}),It=class{constructor(e){this.mapping=e,this.sep="/"}async exists(e){return this.existsSync(e)}existsSync(e){return!k(this.mapping[e])}async readFile(e){return this.readFileSync(e)}readFileSync(e){let s=this.mapping[e];if(k(s))throw new Error(`ENOENT: ${e}`);return s}dirname(e){let s=e.split(this.sep);return s.pop(),s.join(this.sep)}resolve(e,s,i){if(s+=i,e===".")return s;let r=e.split(/\/+/);for(let n of s.split(this.sep))n==="."||n===""||(n===".."?(r.length>1||r[0]!=="")&&r.pop():r.push(n));return r.join(this.sep)}},Q={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,keyValueSeparator:":",cache:void 0,extname:"",fs:dr,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",locale:"",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Zs,memoryLimit:1/0,parseLimit:1/0,renderLimit:1/0};function Fr(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Pe(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Pe(1024):void 0,t.cache=e}return t={...Q,...t.jekyllInclude?{dynamicPartials:!1}:{},...t},(!t.fs.dirname||!t.fs.sep)&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"),t.relativeReference=!1),t.root=Se(t.root),t.partials=Se(t.partials),t.layouts=Se(t.layouts),t.outputEscape=t.outputEscape&&Or(t.outputEscape),t.locale||(t.locale=Ws()?.().resolvedOptions().locale??"en-US"),t.templates&&(t.fs=new It(t.templates),t.relativeReference=!0,t.root=t.partials=t.layouts="."),t}function Or(t){return t==="escape"?gt:t==="json"?Qs.json:(_(x(t),"`outputEscape` need to be of type string or function"),t)}function Se(t){let e=[];return S(t)&&(e=t),d(t)&&(e=[t]),e}function vr(t,e){let s=!1;for(let i=0;i<t.length;i++){let r=t[i];ei(r)&&(!s&&r.trimLeft&&zr(t[i-1],e.greedy),J(r)&&(r.name==="raw"?s=!0:r.name==="endraw"&&(s=!1)),!s&&r.trimRight&&Rr(t[i+1],e.greedy))}}function zr(t,e){if(!t||!mt(t))return;let s=e?te:Is;for(;w[t.input.charCodeAt(t.end-1-t.trimRight)]&s;)t.trimRight++}function Rr(t,e){if(!t||!mt(t))return;let s=e?te:Is;for(;w[t.input.charCodeAt(t.begin+t.trimLeft)]&s;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
12
12
  `&&t.trimLeft++}var z=class{constructor(e,s=Q.operators,i,r){this.input=e,this.file=i,this.rawBeginAt=-1,this.p=r?r[0]:0,this.N=r?r[1]:e.length,this.opTrie=vt(s),this.literalTrie=vt(Bs)}readExpression(){return new Ve(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){let e=this.readOperator();if(e){yield e;continue}let s=this.readValue();if(s){yield s;continue}return}}readOperator(){this.skipBlank();let e=this.matchTrie(this.opTrie);if(e!==-1)return new Mt(this.input,this.p,this.p=e,this.file)}matchTrie(e){let s=e,i=this.p,r;for(;s[this.input[i]]&&i<this.N;)s=s[this.input[i++]],s.end&&(r=s);return!r||r.needBoundary&&Te(this.peek(i-this.p))?-1:i}readFilteredValue(){let e=this.p,s=this.readExpression();this.assert(s.valid(),`invalid value expression: ${this.snapshot()}`);let i=this.readFilters();return new Ct(s,i,this.input,e,this.p,this.file)}readFilters(){let e=[];for(;;){let s=this.readFilter();if(!s)return e;e.push(s)}}readFilter(){if(this.skipBlank(),this.end())return null;this.assert(this.read()==="|",'expected "|" before filter');let e=this.readIdentifier();if(!e.size())return this.assert(this.end(),"expected filter name"),null;let s=[];if(this.skipBlank(),this.peek()===":")do{++this.p;let i=this.readFilterArg();i&&s.push(i),this.skipBlank(),this.assert(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");else if(!(this.peek()==="|"||this.end()))throw this.error('expected ":" after filter name');return new Ee(e.getText(),s,this.input,e.begin,this.p,this.file)}readFilterArg(){let e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;let s=this.readValue();return[e.getText(),s]}readTopLevelTokens(e=Q){let s=[];for(;this.p<this.N;){let i=this.readTopLevelToken(e);s.push(i)}return vr(s,e),s}readTopLevelToken(e){let{tagDelimiterLeft:s,outputDelimiterLeft:i}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(s)?this.readTagToken(e):this.match(i)?this.readOutputToken(e):this.readHTMLToken([s,i])}readHTMLToken(e){let s=this.p;for(;this.p<this.N&&!e.some(i=>this.match(i));)++this.p;return new Me(this.input,s,this.p,this.file)}readTagToken(e){let{file:s,input:i}=this,r=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.error(`tag ${this.snapshot(r)} not closed`,r);let n=new ue(i,r,this.p,e,s);return n.name==="raw"&&(this.rawBeginAt=r),n}readToDelimiter(e,s=!1){for(this.skipBlank();this.p<this.N;){if(s&&this.peekType()&ks){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=Q){let{file:s,input:i}=this,{outputDelimiterRight:r}=e,n=this.p;if(this.readToDelimiter(r,!0)===-1)throw this.error(`output ${this.snapshot(n)} not closed`,n);return new At(i,n,this.p,e,s)}readEndrawOrRawContent(e){let{tagDelimiterLeft:s,tagDelimiterRight:i}=e,r=this.p,n=this.readTo(s)-s.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){n=this.readTo(s)-s.length;continue}for(;this.p<=this.N;){if(this.rmatch(i)){let o=this.p;return r===n?(this.rawBeginAt=-1,new ue(this.input,r,o,e,this.file)):(this.p=n,new Me(this.input,r,n,this.file))}if(this.rmatch(s))break;this.p++}}throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`,r)}readLiquidTagTokens(e=Q){let s=[];for(;this.p<this.N;){let i=this.readLiquidTagToken(e);i&&s.push(i)}return s}readLiquidTagToken(e){if(this.skipBlank(),this.end())return;let s=this.p;this.readToDelimiter(`
13
13
  `);let i=this.p;return new Pt(this.input,s,i,e,this.file)}error(e,s=this.p){return new Le(e,new ie(this.input,s,this.N,this.file))}assert(e,s,i){if(!e)throw this.error(typeof s=="function"?s():s,i)}snapshot(e=this.p){return JSON.stringify(Li(this.input.slice(e,this.N),32))}readWord(){return this.readIdentifier()}readIdentifier(){this.skipBlank();let e=this.p;for(;!this.end()&&Te(this.peek());)++this.p;return new ie(this.input,e,this.p,this.file)}readNonEmptyIdentifier(){let e=this.readIdentifier();return e.size()?e:void 0}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){let s=[];for(;;){let i=this.readHash(e);if(!i)return s;s.push(i)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;let s=this.p,i=this.readNonEmptyIdentifier();if(!i)return;let r;this.skipBlank();let n=d(e)?e:e?"=":":";return this.peek()===n&&(++this.p,r=this.readValue()),new Dt(this.input,s,this.p,i,r,this.file)}remaining(){return this.input.slice(this.p,this.N)}advance(e=1){this.p+=e}end(){return this.p>=this.N}read(){return this.input[this.p++]}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){this.skipBlank();let e=this.p,s=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),i=this.readProperties(!s);return i.length?new De(s,i,this.input,e,this.p):s}readScopeValue(){this.skipBlank();let e=this.p,s=this.readProperties();if(s.length)return new De(void 0,s,this.input,e,this.p)}readProperties(e=!0){let s=[];for(;;){if(this.peek()==="["){this.p++;let i=this.readValue()||new ie(this.input,this.p,this.p,this.file);this.assert(this.readTo("]")!==-1,"[ not closed"),s.push(i);continue}if(e&&!s.length){let i=this.readNonEmptyIdentifier();if(i){s.push(i);continue}}if(this.peek()==="."&&this.peek(1)!=="."){this.p++;let i=this.readNonEmptyIdentifier();if(!i)break;s.push(i);continue}break}return s}readNumber(){this.skipBlank();let e=!1,s=!1,i=0;for(this.peekType()&Ni&&i++;this.p+i<=this.N;)if(this.peekType(i)&Ai)s=!0,i++;else if(this.peek(i)==="."&&this.peek(i+1)!=="."){if(e||!s)return;e=!0,i++}else break;if(s&&!Te(this.peek(i))){let r=new Nt(this.input,this.p,this.p+i,this.file);return this.advance(i),r}}readLiteral(){this.skipBlank();let e=this.matchTrie(this.literalTrie);if(e===-1)return;let s=new qt(this.input,this.p,e,this.file);return this.p=e,s}readRange(){this.skipBlank();let e=this.p;if(this.peek()!=="(")return;++this.p;let s=this.readValueOrThrow();this.skipBlank(),this.assert(this.read()==="."&&this.read()===".","invalid range syntax");let i=this.readValueOrThrow();return this.skipBlank(),this.assert(this.read()===")","invalid range syntax"),new Vt(this.input,e,this.p,s,i,this.file)}readValueOrThrow(){let e=this.readValue();return this.assert(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();let e=this.p;if(!(this.peekType()&ks))return;++this.p;let s=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!s));)s?s=!1:this.input[this.p-1]==="\\"&&(s=!0);return new Et(this.input,e,this.p,this.file)}*readFileNameTemplate(e){let{outputDelimiterLeft:s}=e,i=[","," ","\r",`
14
- `," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:w[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&te;)++this.p}},Ce=class{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){let i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||J(e)&&this.trigger(`tag:${e.name}`,e))continue;let s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}},fe=class{constructor(e){this.token=e}},b=class extends fe{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}},j=class{constructor(e,s){this.hash={};let i=e instanceof z?e:new z(e,{});for(let r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){let s={};for(let i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield T(this.hash[i],e);return s}};function Ar(t){return class extends b{constructor(e,s,i){super(e,s,i),x(t.parse)&&t.parse.call(this,e,s)}*render(e,s){let i=yield new j(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function Ks(t){return S(t)}var de=class{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=x(s)?s:x(s?.handler)?s.handler:js,this.raw=!x(s)&&!!s?.raw,this.args=e.args,this.liquid=i}*render(e,s){let i=[];for(let r of this.args)Ks(r)?i.push([r[0],yield T(r[1],s)]):i.push(yield T(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}},F=class{constructor(e,s){this.filters=[];let i=typeof e=="string"?new z(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new de(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(let r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){let i=e.filters[s];return _(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}},$e=class extends fe{constructor(e,s){super(e);let i=new z(e.input,s.options.operators,e.file,e.contentRange);this.value=new F(i.readFilteredValue(),s);let r=this.value.filters,n=s.options.outputEscape;if(!r[r.length-1]?.raw&&n){let o=new Ee(toString.call(n),[],"",0,0);r.push(new de(o,n,s))}}*render(e,s){let i=yield this.value.value(e,!1);s.write(i)}*arguments(){yield this.value}},Bt=class extends fe{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}},H=class t{constructor(e,s){this.segments=e,this.location=s}toString(){return Ie(this.segments,!0)}toArray(){function*e(...s){for(let i of s)i instanceof t?yield Array.from(e(...i.segments)):yield i}return Array.from(e(...this.segments))}},ne=class{constructor(){this.map=new Map}get(e){let s=Ie([e.segments[0]]);return this.map.has(s)||this.map.set(s,[]),this.map.get(s)}has(e){return this.map.has(Ie([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}},Gs={partials:!0};function*Xs(t,e,s){let i=new ne,r=new ne,n=new ne,o=new je(new Set),a=new Set;function c(u,p){i.push(u);let g=p.alias(u);if(g!==void 0){let y=g.segments[0];d(y)&&!o.has(y)&&r.push(g)}else{let y=u.segments[0];d(y)&&!p.has(y)&&r.push(u)}for(let y of u.segments)y instanceof H&&c(y,p)}function*f(u,p){if(u.arguments)for(let g of u.arguments())for(let y of Rs(g))c(y,p);if(u.localScope)for(let g of u.localScope()){p.add(g.content),p.deleteAlias(g.content);let[y,se]=g.getPosition();n.push(new H([g.content],{row:y,col:se,file:g.file}))}if(u.children)if(u.partialScope){let g=u.partialScope();if(g===void 0){for(let Z of yield u.children(e,s))yield f(Z,p);return}if(a.has(g.name))return;let y=new Set,se=g.isolated?new je(y):p.push(y);for(let Z of g.scope)if(d(Z))y.add(Z);else{let[ns,pi]=Z;y.add(ns);let os=Array.from(Rs(pi));os.length&&se.setAlias(ns,os[0].segments)}for(let Z of yield u.children(e,s))yield f(Z,se),a.add(g.name);se.pop()}else{u.blockScope&&p.push(new Set(u.blockScope()));for(let g of yield u.children(e,s))yield f(g,p);u.blockScope&&p.pop()}}for(let u of t)yield f(u,o);return{variables:i.asObject(),globals:r.asObject(),locals:n.asObject()}}function P(t,e={}){let s={...Gs,...e};return q(Xs(t,s.partials,!1))}function C(t,e={}){let s={...Gs,...e};return M(Xs(t,s.partials,!0))}var je=class{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(let s of this.stack)if(s.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){return this.stack.pop()?.names}add(e){this.stack[0].names.add(e)}alias(e){let s=e.segments[0];if(!d(s))return;let i=this.getAlias(s);if(i!==void 0)return new H([...i,...e.segments.slice(1)],e.location)}setAlias(e,s){this.stack[this.stack.length-1].aliases.set(e,s)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(let s of this.stack){if(s.aliases.has(e))return s.aliases.get(e);if(s.names.has(e))return}}};function*Rs(t){v(t)?yield*ee(t):t instanceof F&&(yield*Nr(t))}function*Nr(t){for(let e of t.initial.postfix)v(e)&&(yield*ee(e));for(let e of t.filters)for(let s of e.args)Ks(s)&&s[1]?yield*ee(s[1]):v(s)&&(yield*ee(s))}function*ee(t){Xt(t)?(yield*ee(t.lhs),yield*ee(t.rhs)):pe(t)&&(yield Ut(t))}function Ut(t){let e=[],s=t.file,i=t.props[0];s=s||i.file,Be(i)||Ht(i)||Yt(i)?e.push(i.content):pe(i)&&e.push(...Ut(i).segments);for(let o of t.props.slice(1))s=s||o.file,Be(o)||Ht(o)||Yt(o)?e.push(o.content):pe(o)&&e.push(Ut(o));let[r,n]=t.getPosition();return new H(e,{row:r,col:n,file:s})}var As=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function Ie(t,e=!1){let s=[],i=t[0];d(i)&&(!e||i.match(As)?s.push(`${i}`):s.push(`['${i}']`));for(let r of t.slice(1))r instanceof H?s.push(`[${Ie(r.segments)}]`):d(r)?r.match(As)?s.push(`.${r}`):s.push(`['${r}']`):s.push(`[${r}]`);return s.join("")}(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(l.LookupType||(l.LookupType={}));var Wt=class{constructor(e){if(this.options=e,e.relativeReference){let i=e.fs.sep;_(i,"`fs.sep` is required for relative reference");let r=["."+i,".."+i,"./","../"];this.shouldLoadRelative=n=>r.some(o=>n.startsWith(o))}else this.shouldLoadRelative=i=>!1;let s=e.fs;this.contains=zt(s.contains?.bind(s)||(async()=>!0),s.containsSync?.bind(s)||(()=>!0)),this.exists=zt(s.exists?.bind(s)||(async()=>!1),s.existsSync?.bind(s))}*lookup(e,s,i,r){let n=this.options[s];for(let o of this.candidates(e,n,r)){let a=!1;for(let c of n)if(yield this.contains(!!i,c,o)){a=!0;break}if(a&&(yield this.exists(!!i,o)))return o}throw this.lookupError(e,n)}*candidates(e,s,i){let{fs:r,extname:n}=this.options;this.shouldLoadRelative(e)&&i&&(yield r.resolve(this.dirname(i),e,n));for(let o of s)yield r.resolve(o,e,n);if(r.fallback!==void 0){let o=r.fallback(e);o!==void 0&&(yield o)}}dirname(e){let s=this.options.fs;return _(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){let i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}},N=class{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Wt(this.liquid.options),this.parseLimit=new ce("parse length",e.options.parseLimit),this.readFile=zt(this.fs.readFile?.bind(this.fs)||(async()=>{throw new Error("readFile not implemented")}),this.fs.readFileSync?.bind(this.fs))}parse(e,s){e=String(e),this.parseLimit.use(e.length);let r=new z(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}parseTokens(e){let s,i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new ve(r);return i}parseToken(e,s){try{if(J(e)){let i=this.liquid.tags[e.name];return _(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return ti(e)?new $e(e,this.liquid):new Bt(e)}catch(i){throw E.is(i)?i:new Fe(i,e)}}parseStream(e){return new Ce(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=l.LookupType.Root,r){let n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;let c=this._parseFile(e,s,i,r),f=s?yield c:q(c);n.write(o,f);try{return yield f}catch(u){throw n.remove(o),u}}*_parseFile(e,s,i=l.LookupType.Root,r){let n=yield this.loader.lookup(e,i,s,r);return this.parse(yield this.readFile(!!s,n),n)}};(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited"})(l.TokenKind||(l.TokenKind={}));function ei(t){return!!(R(t)&l.TokenKind.Delimited)}function Gt(t){return R(t)===l.TokenKind.Operator}function mt(t){return R(t)===l.TokenKind.HTML}function ti(t){return R(t)===l.TokenKind.Output}function J(t){return R(t)===l.TokenKind.Tag}function Be(t){return R(t)===l.TokenKind.Quoted}function qr(t){return R(t)===l.TokenKind.Literal}function Ht(t){return R(t)===l.TokenKind.Number}function pe(t){return R(t)===l.TokenKind.PropertyAccess}function Yt(t){return R(t)===l.TokenKind.Word}function Xt(t){return R(t)===l.TokenKind.Range}function v(t){return(R(t)&1667)>0}function R(t){return t?t.kind:-1}var Mr=Object.freeze({__proto__:null,isDelimitedToken:ei,isOperatorToken:Gt,isHTMLToken:mt,isOutputToken:ti,isTagToken:J,isQuotedToken:Be,isLiteralToken:qr,isNumberToken:Ht,isPropertyAccessToken:pe,isWordToken:Yt,isRangeToken:Xt,isValueToken:v}),Ue=function(){return Ue=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Ue.apply(this,arguments)};function Y(t){let e=Object.create(null);return t&&Object.assign(e,t),e}var B=class t{constructor(e={},s=Q,i={},{memoryLimit:r,renderLimit:n}={}){this.scopes=[Y()],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!i.sync,this.opts=s,this.globals=i.globals??s.globals,this.environments=dt(e)?e:Object(e),this.strictVariables=i.strictVariables??this.opts.strictVariables,this.ownPropertyOnly=i.ownPropertyOnly??s.ownPropertyOnly,this.memoryLimit=r??new ce("memory alloc",i.memoryLimit??s.memoryLimit),this.renderLimit=n??new ce("template render",$t().now()+(i.renderLimit??s.renderLimit))}getRegister(e,s=void 0){return this.registers[e]=this.registers[e]||s}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>Ue(e,s),{})}get(e){return this.getSync(e)}getSync(e){return M(this._get(e))}*_get(e){let s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return M(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){d(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield this.readProperty(e,s[r]),i&&ki(e))throw new St(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new t(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables,ownPropertyOnly:this.ownPropertyOnly},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){let i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}readProperty(e,s){if(e=Vs(e),s=m(s),k(e))return e;if(S(e)&&s<0)return e[e.length+ +s];let i=Dr(e,s,this.ownPropertyOnly);return i===void 0&&e instanceof D?e.liquidMethodMissing(s,this):x(i)?i.call(e):s==="size"?Pr(e):s==="first"?Er(e):s==="last"?Vr(e):i}};function Dr(t,e,s){if(!(s&&!Qt.call(t,e)&&!(t instanceof D)))return t[e]}function Er(t){return S(t)?t[0]:t.first}function Vr(t){return S(t)?t[t.length-1]:t.last}function Pr(t){if(Qt.call(t,"size")||t.size!==void 0)return t.size;if(S(t)||d(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var K;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(K||(K={}));var Cr=V(Math.abs),$r=V(Math.max),jr=V(Math.min),Ir=V(Math.ceil),Br=V((t,e,s=!1)=>s?Math.floor(t/e):t/e),Ur=V(Math.floor),Wr=V((t,e)=>t-e),Hr=V((t,e)=>t+e),Yr=V((t,e)=>t%e),Jr=V((t,e)=>t*e);function Zr(t,e=0){t=xt(t),e=xt(e);let s=Math.pow(10,e),i=t*s;return Math.sign(t)*Math.round(Math.abs(i))/s}var Qr=Object.freeze({__proto__:null,abs:Cr,at_least:$r,at_most:jr,ceil:Ir,divided_by:Br,floor:Ur,minus:Wr,plus:Hr,modulo:Yr,times:Jr,round:Zr}),Kr=t=>decodeURIComponent(h(t)).replace(/\+/g," "),Gr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+"),Xr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),en=t=>encodeURI(h(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Ns=/[^\p{M}\p{L}\p{Nd}]+/ug,tn={raw:/\s+/g,default:Ns,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:Ns,none:null};function sn(t,e="default",s=!1){t=h(t);let i=tn[e];return i&&(e==="latin"&&(t=rn(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function rn(t){return t.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var nn=Object.freeze({__proto__:null,url_decode:Kr,url_encode:Gr,cgi_escape:Xr,uri_escape:en,slugify:sn}),on=pt(function(t,e){let s=L(t),i=k(e)?" ":h(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),an=pt(t=>Ps(t)?xi(t):""),ln=pt(t=>Ps(t)?t[0]:""),cn=pt(function(t){let e=L(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*si(t,e,s){let i=[],r=L(t);this.context.memoryLimit.use(r.length);for(let n of r)i.push([n,e?yield this.context._getFromScope(n,h(e).split("."),!1):n]);return i.sort((n,o)=>s(n[1],o[1])).map(n=>n[0])}function*hn(t,e){return yield*si.call(this,t,e,Fi)}function*un(t,e){return yield*si.call(this,t,e,Oi)}var fn=t=>t&&t.length||0;function*dn(t,e){let s=[],i=L(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push(yield this.context._getFromScope(r,h(e),!1));return s}function*pn(t,e){let s=0,i=L(t);for(let r of i){let n=Number(e?yield this.context._getFromScope(r,h(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function gn(t){let e=L(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!k(m(s)))}function ii(t,e=[]){let s=L(t),i=L(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function mn(t,e){return ii.call(this,t,[e])}function yn(t,e){let s=L(t);this.context.memoryLimit.use(s.length);let i=[...s];return i.unshift(e),i}function wn(t){let e=[...L(t)];return e.pop(),e}function bn(t){let e=L(t);this.context.memoryLimit.use(e.length);let s=[...e];return s.shift(),s}function kn(t,e,s=1){return t=m(t),k(t)?[]:(S(t)||(t=h(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function ri(t){return this.context.opts.jekyllWhere?e=>ae.is(t)?$(e,t):S(e)?er(e,t):$(e,t):t===void 0?e=>U(e,this.context):e=>$(e,t)}function*ni(t,e,s,i){let r=[];e=L(e),this.context.memoryLimit.use(e.length);let n=new z(h(s)).readScopeValue();for(let a of e)r.push(yield T(n,this.context.spawn(a)));let o=ri.call(this,i);return e.filter((a,c)=>o(r[c])===t)}function*oi(t,e,s,i){let r=[],n=new F(h(i),this.liquid),o=L(e);this.context.memoryLimit.use(o.length);for(let a of o){this.context.push({[s]:a});let c=yield n.value(this.context);this.context.pop(),c===t&&r.push(a)}return r}function*Tn(t,e,s){return yield*ni.call(this,!0,t,e,s)}function*xn(t,e,s){return yield*ni.call(this,!1,t,e,s)}function*Sn(t,e,s){return yield*oi.call(this,!0,t,e,s)}function*_n(t,e,s){return yield*oi.call(this,!1,t,e,s)}function*Ln(t,e){let s=new Map;t=ge(t);let i=new z(h(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(let r of t){let n=yield T(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*Fn(t,e,s){let i=new Map,r=new F(h(s),this.liquid);t=ge(t),this.context.memoryLimit.use(t.length);for(let n of t){this.context.push({[e]:n});let o=yield r.value(this.context);this.context.pop(),i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*es(t,e,s){let i=new z(h(e)).readScopeValue(),r=L(t),n=ri.call(this,s);for(let o=0;o<r.length;o++){let a=yield T(i,this.context.spawn(r[o]));if(n(a))return[o,r[o]]}}function*ts(t,e,s){let i=new F(h(s),this.liquid),r=L(t);for(let n=0;n<r.length;n++){this.context.push({[e]:r[n]});let o=yield i.value(this.context);if(this.context.pop(),o)return[n,r[n]]}}function*On(t,e,s){return!!(yield*es.call(this,t,e,s))}function*vn(t,e,s){return!!(yield*ts.call(this,t,e,s))}function*zn(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[0]:void 0}function*Rn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[0]:void 0}function*An(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[1]:void 0}function*Nn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[1]:void 0}function qn(t){return t=L(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function Mn(t,e=1){if(t=m(t),k(t))return[];S(t)||(t=h(t)),this.context.memoryLimit.use(e);let s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var Dn=Object.freeze({__proto__:null,join:on,last:an,first:ln,reverse:cn,sort:hn,sort_natural:un,size:fn,map:dn,sum:pn,compact:gn,concat:ii,push:mn,unshift:yn,pop:wn,shift:bn,slice:kn,where:Tn,reject:xn,where_exp:Sn,reject_exp:_n,group_by:Ln,group_by_exp:Fn,has:On,has_exp:vn,find_index:zn,find_index_exp:Rn,find:An,find_exp:Nn,uniq:qn,sample:Mn});function ss(t,e,s){let i=(t?.length??0)+(s?.length??0);this.context.memoryLimit.use(i);let r=li(t,this.context.opts,s);return r?(e=m(e),e=k(e)?this.context.opts.dateFormat:h(e),this.context.memoryLimit.use(e.length),xe(r,e,this.context.memoryLimit)):t}function En(t){return ss.call(this,t,"%Y-%m-%dT%H:%M:%S%:z")}function Vn(t){return ss.call(this,t,"%a, %d %b %Y %H:%M:%S %z")}function Pn(t,e,s){return ai.call(this,t,"%b",e,s)}function Cn(t,e,s){return ai.call(this,t,"%B",e,s)}function ai(t,e,s,i){let r=li(t,this.context.opts);if(!r)return t;let n=this.context.memoryLimit;if(s==="ordinal"){let o=r.getDate();return i==="US"?xe(r,`${e} ${o}%q, %Y`,n):xe(r,`${o}%q ${e} %Y`,n)}return xe(r,`%d ${e} %Y`,n)}function li(t,e,s){let i,r=s??e.timezoneOffset,n=e.locale;if(t=m(t),!k(t))return t==="now"||t==="today"?i=new I(Date.now(),n,r):ft(t)?i=new I(t*1e3,n,r):d(t)?/^\d+$/.test(t)?i=new I(+t*1e3,n,r):e.preserveTimezones&&s===void 0?i=I.createDateFixedToTimezone(t,n):i=new I(t,n,r):i=new I(t,n,r),i.valid()?i:void 0}var $n=Object.freeze({__proto__:null,date:ss,date_to_xmlschema:En,date_to_rfc822:Vn,date_to_string:Pn,date_to_long_string:Cn}),Tt=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,qs=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function jn(t,e){_(arguments.length===2,"append expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),s+i}function In(t,e){_(arguments.length===2,"prepend expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),i+s}function Bn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let i=0,r=new Set(e);i<s.length;i++)if(!r.has(s[i]))return s.slice(i);return""}return s.trimStart()}function Un(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function Wn(t){let e=h(t);return this.context.memoryLimit.use(e.length),h(e).toUpperCase()}function Hn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.split(e).join("")}function Yn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.replace(e,"")}function Jn(t,e){let s=h(t),i=h(e);this.context.memoryLimit.use(s.length+i.length);let r=s.lastIndexOf(i);return r===-1?s:s.substring(0,r)+s.substring(r+i.length)}function Zn(t,e){if(t=h(t),this.context.memoryLimit.use(t.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let s=t.length-1,i=new Set(e);s>=0;s--)if(!i.has(t[s]))return t.slice(0,s+1);return""}return t.trimEnd()}function Qn(t,e){let s=h(t);this.context.memoryLimit.use(s.length);let i=s.split(h(e));for(;i.length&&i[i.length-1]==="";)i.pop();return i}function Kn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){let i=new Set(h(e));this.context.memoryLimit.use(i.size);let r=0,n=s.length-1;for(;i.has(s[r]);)r++;for(;n>=r&&i.has(s[n]);)n--;return s.slice(r,n+1)}return s.trim()}function Gn(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function Xn(t){return t=h(t),this.context.memoryLimit.use(t.length),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function eo(t,e,s){let i=h(t);e=h(e),s=h(s);let r=i.split(e),n=i.length+(r.length-1)*(s.length-e.length);return this.context.memoryLimit.use(n),r.join(s)}function to(t,e,s){let i=h(t);return e=h(e),s=h(s),this.context.memoryLimit.use(i.length+e.length+s.length),i.replace(e,()=>s)}function so(t,e,s){let i=h(t),r=h(e),n=h(s);this.context.memoryLimit.use(i.length+r.length+n.length);let o=i.lastIndexOf(r);return o===-1?i:i.substring(0,o)+n+i.substring(o+r.length)}function io(t,e=50,s="..."){let i=h(t);return s=h(s),this.context.memoryLimit.use(i.length+s.length),i.length<=e?t:i.substring(0,e-s.length)+s}function ro(t,e=15,s="..."){let i=h(t);s=h(s),this.context.memoryLimit.use(i.length+s.length);let r=i.split(/\s+/);e<=0&&(e=1);let n=r.slice(0,e).join(" ");return r.length>=e&&(n+=s),n}function no(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function oo(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),t=s.trim(),!t)return 0;switch(e){case"cjk":return(t.match(Tt)||[]).length+(t.match(qs)||[]).length;case"auto":return Tt.test(t)?t.match(Tt).length+(t.match(qs)||[]).length:t.split(/\s+/).length;default:return t.split(/\s+/).length}}function ao(t,e="and"){switch(e=h(e),this.context.memoryLimit.use(t.length+e.length),t.length){case 0:return"";case 1:return t[0];case 2:return`${t[0]} ${e} ${t[1]}`;default:return`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}}var lo=Object.freeze({__proto__:null,append:jn,prepend:In,lstrip:Bn,downcase:Un,upcase:Wn,remove:Hn,remove_first:Yn,remove_last:Jn,rstrip:Zn,split:Qn,strip:Kn,strip_newlines:Gn,capitalize:Xn,replace:eo,replace_first:to,replace_last:so,truncate:io,truncatewords:ro,normalize_whitespace:no,number_of_words:oo,array_to_sentence_string:ao});function co(t){return Buffer.from(t,"utf8").toString("base64")}function ho(t){return Buffer.from(t,"base64").toString("utf8")}function uo(t){if(typeof Buffer<"u"&&Buffer.isBuffer(t))return this.context.memoryLimit.use(t.byteLength),t.toString("base64");let e=h(t);return this.context.memoryLimit.use(e.length),co(e)}function fo(t){let e=h(t);return this.context.memoryLimit.use(e.length),ho(e)}var po=Object.freeze({__proto__:null,base64_encode:uo,base64_decode:fo});function go(t){return Es.createHash("sha256").update(t,"utf8").digest("hex")}function mo(t,e){return Es.createHmac("sha256",e).update(t,"utf8").digest("hex")}function yo(t){let e=h(t);return this.context.memoryLimit.use(e.length),go(e)}function wo(t,e){let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),mo(s,i)}var bo=Object.freeze({__proto__:null,sha256:yo,hmac_sha256:wo}),ci={...Lr,...Qr,...nn,...Dn,...$n,...lo,...po,...bo,...Qs},We=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new F(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}*arguments(){yield this.value}*localScope(){yield this.identifier}},Ms=["offset","limit","reversed"],He=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier(),o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(!n.size()||o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.hash=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:else",u=>{Ae(u.args),c=this.elseTemplates}).on("tag:endfor",u=>{Ae(u.args),f.stop()}).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=this.liquid.renderer,r=ge(yield T(this.collection,e));if(!r.length){yield i.renderTemplates(this.elseTemplates,e,s);return}let n="continue-"+this.variable+"-"+this.collection.getText();e.push(Y({continue:e.getRegister(n,{})}));let o=yield this.hash.render(e);e.pop(),r=(this.liquid.options.orderedFilterParameters?Object.keys(o).filter(f=>Ms.includes(f)):Ms.filter(f=>o[f]!==void 0)).reduce((f,u)=>u==="offset"?To(f,o.offset):u==="limit"?xo(f,o.limit):ko(f),r),e.setRegister(n,(o.offset||0)+r.length);let c=Y({forloop:new le(r.length,this.collection.getText(),this.variable)});e.push(c);for(let f of r){if(c[this.variable]=f,e.continueCalled=e.breakCalled=!1,yield i.renderTemplates(this.templates,e,s),e.breakCalled)break;c.forloop.next()}e.continueCalled=e.breakCalled=!1,e.pop()}*children(){let e=this.templates.slice();return this.elseTemplates&&e.push(...this.elseTemplates),e}*arguments(){yield this.collection;for(let e of Object.values(this.hash.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}};function ko(t){return[...t].reverse()}function To(t,e){return t.slice(e)}function xo(t,e){return t.slice(0,e)}var Ye=class extends b{constructor(e,s,i,r){for(super(e,s,i),this.templates=[],this.identifier=this.readVariable(),this.variable=this.identifier.content;s.length;){let n=s.shift();if(J(n)&&n.name==="endcapture")return;this.templates.push(r.parseToken(n,s))}throw new Error(`tag ${e.getText()} not closed`)}readVariable(){let e=this.tokenizer.readIdentifier();if(e.content||(e=this.tokenizer.readQuoted(),e))return e;throw this.tokenizer.error("invalid capture name")}*render(e){let i=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=i}*children(){return this.templates}*localScope(){yield this.identifier}},Je=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[],this.value=new F(this.tokenizer.readFilteredValue(),this.liquid),this.elseTemplates=[];let n=[],o=0,a=r.parseStream(s).on("tag:when",c=>{if(o>0)return;n=[];let f=[];for(;!c.tokenizer.end();)f.push(c.tokenizer.readValueOrThrow()),c.tokenizer.skipBlank(),c.tokenizer.peek()===","?c.tokenizer.readTo(","):c.tokenizer.readTo("or");this.branches.push({values:f,templates:n})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endcase",()=>a.stop()).on("template",c=>{(n!==this.elseTemplates||o===1)&&n.push(c)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});a.start()}*render(e,s){let i=this.liquid.renderer,r=m(yield this.value.value(e,e.opts.lenientIf)),n=!1;for(let o of this.branches)for(let a of o.values){let c=yield T(a,e,e.opts.lenientIf);if($(r,c)){yield i.renderTemplates(o.templates,e,s),n=!0;break}}n||(yield i.renderTemplates(this.elseTemplates,e,s))}*arguments(){yield this.value,yield*this.branches.flatMap(e=>e.values)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}},Ze=class extends b{constructor(e,s,i){for(super(e,s,i);s.length;){let r=s.shift();if(J(r)&&r.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}},Qe=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer;for(this.file=is(n,this.liquid,r),this.currentFile=e.file;!n.end();){n.skipBlank();let o=n.p,a=n.readIdentifier();if((a.content==="with"||a.content==="for")&&(n.skipBlank(),n.peek()!==":")){let c=n.readValue();if(c){let f=n.p,u=n.readIdentifier(),p;u.content==="as"?p=n.readIdentifier():n.p=f,this[a.content]={value:c,alias:p&&p.content},n.skipBlank(),n.peek()===","&&n.advance();continue}}n.p=o;break}this.hash=new j(n,i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r}=this,n=yield rs(this.file,e,i);_(n,()=>`illegal file path "${n}"`);let o=e.spawn(),a=o.bottom();if(Ue(a,yield r.render(e)),this.with){let{value:c,alias:f}=this.with;a[f||n]=yield T(c,e)}if(this.for){let{value:c,alias:f}=this.for,u=ge(yield T(c,e));a.forloop=new le(u.length,c.getText(),f);for(let p of u){a[f]=p;let g=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(g,o,s),a.forloop.next()}}else{let c=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(c,o,s)}}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e=Object.keys(this.hash.hash);if(this.with){let{value:s,alias:i}=this.with;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}if(this.for){let{value:s,alias:i}=this.for;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}return{name:this.file,isolated:!0,scope:e}}}*arguments(){for(let e of Object.values(this.hash.hash))v(e)&&(yield e);if(this.with){let{value:e}=this.with;v(e)&&(yield e)}if(this.for){let{value:e}=this.for;v(e)&&(yield e)}}};function is(t,e,s){if(e.options.dynamicPartials){let n=t.readValue();if(t.assert(n,"illegal file path"),n.getText()==="none")return;if(Be(n)){let o=s.parse(Js(n));return Ds(o)}return n}let i=[...t.readFileNameTemplate(e.options)],r=Ds(s.parseTokens(i));return r==="none"?void 0:r}function Ds(t){return t.length===1&&mt(t[0].token)?t[0].token.getContent():t}function*rs(t,e,s){return typeof t=="string"?t:Array.isArray(t)?s.renderer.renderTemplates(t,e):yield T(t,e)}var Ke=class extends b{constructor(e,s,i,r){super(e,s,i);let{tokenizer:n}=e;this.file=is(n,this.liquid,r),this.currentFile=e.file;let o=n.p;n.readIdentifier().content==="with"?(n.skipBlank(),n.peek()!==":"?this.withVar=n.readValue():n.p=o):n.p=o,this.hash=new j(n,i.options.jekyllInclude||i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r,withVar:n}=this,{renderer:o}=i,a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",K.OUTPUT);let f=Y(yield r.render(e));n&&(f[a]=yield T(n,e));let u=yield i._parsePartialFile(a,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?Y({include:f}):f),yield o.renderTemplates(u,e,s),e.pop(),e.restoreRegister(c)}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e;return this.liquid.options.jekyllInclude?e=["include"]:(e=Object.keys(this.hash.hash),this.withVar&&e.push([this.file,this.withVar])),{name:this.file,isolated:!1,scope:e}}}*arguments(){yield*Object.values(this.hash.hash).filter(v),v(this.file)&&(yield this.file),v(this.withVar)&&(yield this.withVar)}},Ge=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0),s.write(h(--i[this.variable]))}*localScope(){yield this.identifier}},Xe=class extends b{constructor(e,s,i){super(e,s,i),this.candidates=[];let r=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),r&&(this.tokenizer.peek()===":"?(this.group=r,this.tokenizer.advance()):this.candidates.push(r));!this.tokenizer.end();){let n=this.tokenizer.readValue();n&&this.candidates.push(n),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,s){let r=`cycle:${yield T(this.group,e)}:`+this.candidates.join(","),n=e.getRegister("cycle",{}),o=n[r];o===void 0&&(o=n[r]=0);let a=this.candidates[o];return o=(o+1)%this.candidates.length,n[r]=o,yield T(a,e)}*arguments(){yield*this.candidates,this.group&&(yield this.group)}},et=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[];let n=[];r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})).on("tag:elsif",o=>{_(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new F(o.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})}).on("tag:else",o=>{Ae(o.args),_(!this.elseTemplates,"duplicated else"),n=this.elseTemplates=[]}).on("tag:endif",function(o){Ae(o.args),this.stop()}).on("template",o=>n.push(o)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,templates:n}of this.branches){let o=yield r.value(e,e.opts.lenientIf);if(U(o,e)){yield i.renderTemplates(n,e,s);return}}yield i.renderTemplates(this.elseTemplates||[],e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},tt=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0);let r=i[this.variable];i[this.variable]++,s.write(h(r))}*localScope(){yield this.identifier}},st=class extends b{constructor(e,s,i,r){super(e,s,i),this.file=is(this.tokenizer,this.liquid,r),this.currentFile=e.file,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=r.parseTokens(s)}*render(e,s){let{liquid:i,args:r,file:n}=this,{renderer:o}=i;if(n===void 0){e.setRegister("blockMode",K.OUTPUT),yield o.renderTemplates(this.templates,e,s);return}let a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=yield i._parseLayoutFile(a,e.sync,this.currentFile);e.setRegister("blockMode",K.STORE);let f=yield o.renderTemplates(this.templates,e),u=e.getRegister("blocks",{});u[""]===void 0&&(u[""]=(p,g)=>g.write(f)),e.setRegister("blockMode",K.OUTPUT),e.push(Y(yield r.render(e))),yield o.renderTemplates(c,e,s),e.pop()}*children(e){let s=this.templates.slice();return e&&d(this.file)&&s.push(...yield this.liquid._parsePartialFile(this.file,!0,this.currentFile)),s}*arguments(){for(let e of Object.values(this.args.hash))v(e)&&(yield e);v(this.file)&&(yield this.file)}partialScope(){if(d(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}},it=class extends b{constructor(e,s,i,r){super(e,s,i),this.templates=[];let n=/\w+/.exec(e.args);for(this.block=n?n[0]:"";s.length;){let o=s.shift();if(J(o)&&o.name==="endblock")return;let a=r.parseToken(o,s);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,s){let i=this.getBlockRender(e);e.getRegister("blockMode")===K.STORE?e.getRegister("blocks",{})[this.block]=i:yield i(new qe,s)}getBlockRender(e){let s=this,{liquid:i,templates:r}=this,n=e.getRegister("blocks",{})[this.block],o=function*(a,c){let f=e.getRegister("blockStack",[]);if(f.includes(s))throw new Error("block tag cannot be nested");f.push(s),e.push(Y({block:a})),yield i.renderer.renderTemplates(r,e,c),e.pop(),f.pop()};return n?(a,c)=>n(new qe(f=>o(a,f)),c):o}*children(){return this.templates}blockScope(){return["block"]}},rt=class extends b{constructor(e,s,i){for(super(e,s,i),this.tokens=[];s.length;){let r=s.shift();if(J(r)&&r.name==="endraw")return;this.tokens.push(r)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}},Jt=class extends le{constructor(e,s,i,r){super(e,i,r),this.length=e,this.cols=s}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}},nt=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();let o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:endtablerow",()=>f.stop()).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=ge(yield T(this.collection,e)),r=yield this.args.render(e),n=r.offset||0,o=r.limit===void 0?i.length:r.limit;i=i.slice(n,n+o);let a=r.cols||i.length,c=this.liquid.renderer,f=new Jt(i.length,a,this.collection.getText(),this.variable),u=Y({tablerowloop:f});e.push(u);for(let p=0;p<i.length;p++,f.next())u[this.variable]=i[p],f.col0()===0&&(f.row()!==1&&s.write("</tr>"),s.write(`<tr class="row${f.row()}">`)),s.write(`<td class="col${f.col()}">`),yield c.renderTemplates(this.templates,e,s),s.write("</td>");i.length&&s.write("</tr>"),e.pop()}*children(){return this.templates}*arguments(){yield this.collection;for(let e of Object.values(this.args.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}},ot=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[];let n=[],o=0;r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),test:me,templates:n=[]})).on("tag:elsif",a=>{if(o>0){n=[];return}this.branches.push({value:new F(a.tokenizer.readFilteredValue(),this.liquid),test:U,templates:n=[]})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",a=>{(n!==this.elseTemplates||o===1)&&n.push(a)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,test:n,templates:o}of this.branches){let a=yield r.value(e,e.opts.lenientIf);if(n(a,e)){yield i.renderTemplates(o,e,s);return}}yield i.renderTemplates(this.elseTemplates,e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},at=class extends b{render(e,s){e.breakCalled=!0}},lt=class extends b{render(e,s){e.continueCalled=!0}},ct=class extends b{constructor(e,s,i){super(e,s,i),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new F(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,s){if(!this.value)return;let i=yield this.value.value(e,!1);s.write(i)}*arguments(){this.value&&(yield this.value)}},ht=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=r.parseTokens(n)}*render(e,s){yield this.liquid.renderer.renderTemplates(this.templates,e,s)}*children(){return this.templates}},ut=class extends b{constructor(e,s,i){if(super(e,s,i),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}},hi={assign:We,for:He,capture:Ye,case:Je,comment:Ze,include:Ke,render:Qe,decrement:Ge,increment:tt,cycle:Xe,if:et,layout:st,block:it,raw:rt,tablerow:nt,unless:ot,break:at,continue:lt,echo:ct,liquid:ht,"#":ut},Zt=class t{constructor(e={}){this.renderer=new jt,this.filters=Object.create(null),this.tags=Object.create(null),this.options=Fr(e),this.parser=new N(this),ws(hi,(s,i)=>this.registerTag(i,s)),ws(ci,(s,i)=>this.registerFilter(i,s))}parse(e,s){return new N(this).parse(e,s)}_render(e,s,i){let r=s instanceof B?s:new B(s,this.options,i);return this.renderer.renderTemplates(e,r)}async render(e,s,i){return q(this._render(e,s,{...i,sync:!1}))}renderSync(e,s,i){return M(this._render(e,s,{...i,sync:!0}))}renderToNodeStream(e,s,i={}){let r=new B(s,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,r)}_parseAndRender(e,s,i){let r=this.parse(e);return this._render(r,s,i)}async parseAndRender(e,s,i){return q(this._parseAndRender(e,s,{...i,sync:!1}))}parseAndRenderSync(e,s,i){return M(this._parseAndRender(e,s,{...i,sync:!0}))}_parsePartialFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Partials,i)}_parseLayoutFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Layouts,i)}_parseFile(e,s,i,r){return new N(this).parseFile(e,s,i,r)}async parseFile(e,s){return q(new N(this).parseFile(e,!1,s))}parseFileSync(e,s){return M(new N(this).parseFile(e,!0,s))}*_renderFile(e,s,i){let r=yield this._parseFile(e,i.sync,i.lookupType);return yield this._render(r,s,i)}async renderFile(e,s,i){return q(this._renderFile(e,s,{...i,sync:!1}))}renderFileSync(e,s,i){return M(this._renderFile(e,s,{...i,sync:!0}))}async renderFileToNodeStream(e,s,i){let r=await this.parseFile(e);return this.renderToNodeStream(r,s,i)}_evalValue(e,s){let i=new F(e,this),r=s instanceof B?s:new B(s,this.options);return i.value(r)}async evalValue(e,s){return q(this._evalValue(e,s))}evalValueSync(e,s){return M(this._evalValue(e,s))}registerFilter(e,s){this.filters[e]=s}registerTag(e,s){this.tags[e]=x(s)?s:Ar(s)}plugin(e){return e.call(this,t)}express(){let e=this,s=!0;return function(i,r,n){if(s){s=!1;let o=Se(this.root);e.options.root.unshift(...o),e.options.layouts.unshift(...o),e.options.partials.unshift(...o)}e.renderFile(i,r).then(o=>n(null,o),n)}}async analyze(e,s={}){return P(e,s)}analyzeSync(e,s={}){return C(e,s)}async parseAndAnalyze(e,s,i={}){return P(this.parse(e,s),i)}parseAndAnalyzeSync(e,s,i={}){return C(this.parse(e,s),i)}async variables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}variablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}async fullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}fullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}async variableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}variableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}async globalVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}globalVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}async globalFullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}globalFullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}async globalVariableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}globalVariableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}},So="10.27.0";l.AssertionError=Re;l.AssignTag=We;l.BlockTag=it;l.BreakTag=at;l.CaptureTag=Ye;l.CaseTag=Je;l.CommentTag=Ze;l.Context=B;l.ContinueTag=lt;l.CycleTag=Xe;l.DecrementTag=Ge;l.Drop=D;l.EchoTag=ct;l.Expression=Ve;l.Filter=de;l.ForTag=He;l.Hash=j;l.IfTag=et;l.IncludeTag=Ke;l.IncrementTag=tt;l.InlineCommentTag=ut;l.LayoutTag=st;l.Liquid=Zt;l.LiquidError=E;l.LiquidTag=ht;l.Output=$e;l.ParseError=Fe;l.ParseStream=Ce;l.Parser=N;l.RawTag=rt;l.RenderError=Oe;l.RenderTag=Qe;l.TablerowTag=nt;l.Tag=b;l.TagToken=ue;l.Token=O;l.TokenizationError=Le;l.Tokenizer=z;l.TypeGuards=Mr;l.UndefinedVariableError=ze;l.UnlessTag=ot;l.Value=F;l.Variable=H;l.analyze=P;l.analyzeSync=C;l.assert=_;l.createTrie=vt;l.defaultOperators=Zs;l.defaultOptions=Q;l.evalQuotedToken=Js;l.evalToken=T;l.filters=ci;l.isFalsy=me;l.isTruthy=U;l.tags=hi;l.toPromise=q;l.toValue=m;l.toValueSync=M;l.version=So});ye();var di=mi(ui());function fi(t,e){let s=new di.Liquid;return s.render(s.parse(t),e)}async function Ao(t,e,s){ms(gs`Copying template from directory ${kt.path(t)} to ${kt.path(e)}`);let i=await ds(we(t,"**/*"),{dot:!0}),r=we(t,".cli-liquid-bypass"),n=[];await fs(r)&&(n=(await wt(r)).split(`
14
+ `," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:w[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&te;)++this.p}},Ce=class{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){let i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||J(e)&&this.trigger(`tag:${e.name}`,e))continue;let s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}},fe=class{constructor(e){this.token=e}},b=class extends fe{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}},j=class{constructor(e,s){this.hash={};let i=e instanceof z?e:new z(e,{});for(let r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){let s={};for(let i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield T(this.hash[i],e);return s}};function Ar(t){return class extends b{constructor(e,s,i){super(e,s,i),x(t.parse)&&t.parse.call(this,e,s)}*render(e,s){let i=yield new j(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function Ks(t){return S(t)}var de=class{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=x(s)?s:x(s?.handler)?s.handler:js,this.raw=!x(s)&&!!s?.raw,this.args=e.args,this.liquid=i}*render(e,s){let i=[];for(let r of this.args)Ks(r)?i.push([r[0],yield T(r[1],s)]):i.push(yield T(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}},F=class{constructor(e,s){this.filters=[];let i=typeof e=="string"?new z(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new de(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(let r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){let i=e.filters[s];return _(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}},$e=class extends fe{constructor(e,s){super(e);let i=new z(e.input,s.options.operators,e.file,e.contentRange);this.value=new F(i.readFilteredValue(),s);let r=this.value.filters,n=s.options.outputEscape;if(!r[r.length-1]?.raw&&n){let o=new Ee(toString.call(n),[],"",0,0);r.push(new de(o,n,s))}}*render(e,s){let i=yield this.value.value(e,!1);s.write(i)}*arguments(){yield this.value}},Bt=class extends fe{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}},H=class t{constructor(e,s){this.segments=e,this.location=s}toString(){return Ie(this.segments,!0)}toArray(){function*e(...s){for(let i of s)i instanceof t?yield Array.from(e(...i.segments)):yield i}return Array.from(e(...this.segments))}},ne=class{constructor(){this.map=new Map}get(e){let s=Ie([e.segments[0]]);return this.map.has(s)||this.map.set(s,[]),this.map.get(s)}has(e){return this.map.has(Ie([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}},Gs={partials:!0};function*Xs(t,e,s){let i=new ne,r=new ne,n=new ne,o=new je(new Set),a=new Set;function c(u,p){i.push(u);let g=p.alias(u);if(g!==void 0){let y=g.segments[0];d(y)&&!o.has(y)&&r.push(g)}else{let y=u.segments[0];d(y)&&!p.has(y)&&r.push(u)}for(let y of u.segments)y instanceof H&&c(y,p)}function*f(u,p){if(u.arguments)for(let g of u.arguments())for(let y of Rs(g))c(y,p);if(u.localScope)for(let g of u.localScope()){p.add(g.content),p.deleteAlias(g.content);let[y,se]=g.getPosition();n.push(new H([g.content],{row:y,col:se,file:g.file}))}if(u.children)if(u.partialScope){let g=u.partialScope();if(g===void 0){for(let Z of yield u.children(e,s))yield f(Z,p);return}if(a.has(g.name))return;let y=new Set,se=g.isolated?new je(y):p.push(y);for(let Z of g.scope)if(d(Z))y.add(Z);else{let[ns,pi]=Z;y.add(ns);let os=Array.from(Rs(pi));os.length&&se.setAlias(ns,os[0].segments)}for(let Z of yield u.children(e,s))yield f(Z,se),a.add(g.name);se.pop()}else{u.blockScope&&p.push(new Set(u.blockScope()));for(let g of yield u.children(e,s))yield f(g,p);u.blockScope&&p.pop()}}for(let u of t)yield f(u,o);return{variables:i.asObject(),globals:r.asObject(),locals:n.asObject()}}function P(t,e={}){let s={...Gs,...e};return q(Xs(t,s.partials,!1))}function C(t,e={}){let s={...Gs,...e};return M(Xs(t,s.partials,!0))}var je=class{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(let s of this.stack)if(s.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){return this.stack.pop()?.names}add(e){this.stack[0].names.add(e)}alias(e){let s=e.segments[0];if(!d(s))return;let i=this.getAlias(s);if(i!==void 0)return new H([...i,...e.segments.slice(1)],e.location)}setAlias(e,s){this.stack[this.stack.length-1].aliases.set(e,s)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(let s of this.stack){if(s.aliases.has(e))return s.aliases.get(e);if(s.names.has(e))return}}};function*Rs(t){v(t)?yield*ee(t):t instanceof F&&(yield*Nr(t))}function*Nr(t){for(let e of t.initial.postfix)v(e)&&(yield*ee(e));for(let e of t.filters)for(let s of e.args)Ks(s)&&s[1]?yield*ee(s[1]):v(s)&&(yield*ee(s))}function*ee(t){Xt(t)?(yield*ee(t.lhs),yield*ee(t.rhs)):pe(t)&&(yield Ut(t))}function Ut(t){let e=[],s=t.file,i=t.props[0];s=s||i.file,Be(i)||Ht(i)||Yt(i)?e.push(i.content):pe(i)&&e.push(...Ut(i).segments);for(let o of t.props.slice(1))s=s||o.file,Be(o)||Ht(o)||Yt(o)?e.push(o.content):pe(o)&&e.push(Ut(o));let[r,n]=t.getPosition();return new H(e,{row:r,col:n,file:s})}var As=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function Ie(t,e=!1){let s=[],i=t[0];d(i)&&(!e||i.match(As)?s.push(`${i}`):s.push(`['${i}']`));for(let r of t.slice(1))r instanceof H?s.push(`[${Ie(r.segments)}]`):d(r)?r.match(As)?s.push(`.${r}`):s.push(`['${r}']`):s.push(`[${r}]`);return s.join("")}(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(l.LookupType||(l.LookupType={}));var Wt=class{constructor(e){if(this.options=e,e.relativeReference){let i=e.fs.sep;_(i,"`fs.sep` is required for relative reference");let r=["."+i,".."+i,"./","../"];this.shouldLoadRelative=n=>r.some(o=>n.startsWith(o))}else this.shouldLoadRelative=i=>!1;let s=e.fs;this.contains=zt(s.contains?.bind(s)||(async()=>!0),s.containsSync?.bind(s)||(()=>!0)),this.exists=zt(s.exists?.bind(s)||(async()=>!1),s.existsSync?.bind(s))}*lookup(e,s,i,r){let n=this.options[s];for(let o of this.candidates(e,n,r)){let a=!1;for(let c of n)if(yield this.contains(!!i,c,o)){a=!0;break}if(a&&(yield this.exists(!!i,o)))return o}throw this.lookupError(e,n)}*candidates(e,s,i){let{fs:r,extname:n}=this.options;this.shouldLoadRelative(e)&&i&&(yield r.resolve(this.dirname(i),e,n));for(let o of s)yield r.resolve(o,e,n);if(r.fallback!==void 0){let o=r.fallback(e);o!==void 0&&(yield o)}}dirname(e){let s=this.options.fs;return _(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){let i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}},N=class{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Wt(this.liquid.options),this.parseLimit=new ce("parse length",e.options.parseLimit),this.readFile=zt(this.fs.readFile?.bind(this.fs)||(async()=>{throw new Error("readFile not implemented")}),this.fs.readFileSync?.bind(this.fs))}parse(e,s){e=String(e),this.parseLimit.use(e.length);let r=new z(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}parseTokens(e){let s,i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new ve(r);return i}parseToken(e,s){try{if(J(e)){let i=this.liquid.tags[e.name];return _(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return ti(e)?new $e(e,this.liquid):new Bt(e)}catch(i){throw E.is(i)?i:new Fe(i,e)}}parseStream(e){return new Ce(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=l.LookupType.Root,r){let n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;let c=this._parseFile(e,s,i,r),f=s?yield c:q(c);n.write(o,f);try{return yield f}catch(u){throw n.remove(o),u}}*_parseFile(e,s,i=l.LookupType.Root,r){let n=yield this.loader.lookup(e,i,s,r);return this.parse(yield this.readFile(!!s,n),n)}};(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited"})(l.TokenKind||(l.TokenKind={}));function ei(t){return!!(R(t)&l.TokenKind.Delimited)}function Gt(t){return R(t)===l.TokenKind.Operator}function mt(t){return R(t)===l.TokenKind.HTML}function ti(t){return R(t)===l.TokenKind.Output}function J(t){return R(t)===l.TokenKind.Tag}function Be(t){return R(t)===l.TokenKind.Quoted}function qr(t){return R(t)===l.TokenKind.Literal}function Ht(t){return R(t)===l.TokenKind.Number}function pe(t){return R(t)===l.TokenKind.PropertyAccess}function Yt(t){return R(t)===l.TokenKind.Word}function Xt(t){return R(t)===l.TokenKind.Range}function v(t){return(R(t)&1667)>0}function R(t){return t?t.kind:-1}var Mr=Object.freeze({__proto__:null,isDelimitedToken:ei,isOperatorToken:Gt,isHTMLToken:mt,isOutputToken:ti,isTagToken:J,isQuotedToken:Be,isLiteralToken:qr,isNumberToken:Ht,isPropertyAccessToken:pe,isWordToken:Yt,isRangeToken:Xt,isValueToken:v}),Ue=function(){return Ue=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Ue.apply(this,arguments)};function Y(t){let e=Object.create(null);return t&&Object.assign(e,t),e}var B=class t{constructor(e={},s=Q,i={},{memoryLimit:r,renderLimit:n}={}){this.scopes=[Y()],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!i.sync,this.opts=s,this.globals=i.globals??s.globals,this.environments=dt(e)?e:Object(e),this.strictVariables=i.strictVariables??this.opts.strictVariables,this.ownPropertyOnly=i.ownPropertyOnly??s.ownPropertyOnly,this.memoryLimit=r??new ce("memory alloc",i.memoryLimit??s.memoryLimit),this.renderLimit=n??new ce("template render",$t().now()+(i.renderLimit??s.renderLimit))}getRegister(e,s=void 0){return this.registers[e]=this.registers[e]||s}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>Ue(e,s),{})}get(e){return this.getSync(e)}getSync(e){return M(this._get(e))}*_get(e){let s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return M(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){d(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield this.readProperty(e,s[r]),i&&ki(e))throw new St(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new t(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables,ownPropertyOnly:this.ownPropertyOnly},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){let i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}readProperty(e,s){if(e=Vs(e),s=m(s),k(e))return e;if(S(e)&&s<0)return e[e.length+ +s];let i=Dr(e,s,this.ownPropertyOnly);return i===void 0&&e instanceof D?e.liquidMethodMissing(s,this):x(i)?i.call(e):s==="size"?Pr(e):s==="first"?Er(e):s==="last"?Vr(e):i}};function Dr(t,e,s){if(!(s&&!Qt.call(t,e)&&!(t instanceof D)))return t[e]}function Er(t){return S(t)?t[0]:t.first}function Vr(t){return S(t)?t[t.length-1]:t.last}function Pr(t){if(Qt.call(t,"size")||t.size!==void 0)return t.size;if(S(t)||d(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var K;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(K||(K={}));var Cr=V(Math.abs),$r=V(Math.max),jr=V(Math.min),Ir=V(Math.ceil),Br=V((t,e,s=!1)=>s?Math.floor(t/e):t/e),Ur=V(Math.floor),Wr=V((t,e)=>t-e),Hr=V((t,e)=>t+e),Yr=V((t,e)=>t%e),Jr=V((t,e)=>t*e);function Zr(t,e=0){t=xt(t),e=xt(e);let s=Math.pow(10,e),i=t*s;return Math.sign(t)*Math.round(Math.abs(i))/s}var Qr=Object.freeze({__proto__:null,abs:Cr,at_least:$r,at_most:jr,ceil:Ir,divided_by:Br,floor:Ur,minus:Wr,plus:Hr,modulo:Yr,times:Jr,round:Zr}),Kr=t=>decodeURIComponent(h(t)).replace(/\+/g," "),Gr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+"),Xr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),en=t=>encodeURI(h(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Ns=/[^\p{M}\p{L}\p{Nd}]+/ug,tn={raw:/\s+/g,default:Ns,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:Ns,none:null};function sn(t,e="default",s=!1){t=h(t);let i=tn[e];return i&&(e==="latin"&&(t=rn(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function rn(t){return t.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var nn=Object.freeze({__proto__:null,url_decode:Kr,url_encode:Gr,cgi_escape:Xr,uri_escape:en,slugify:sn}),on=pt(function(t,e){let s=L(t),i=k(e)?" ":h(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),an=pt(t=>Ps(t)?xi(t):""),ln=pt(t=>Ps(t)?t[0]:""),cn=pt(function(t){let e=L(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*si(t,e,s){let i=[],r=L(t);this.context.memoryLimit.use(r.length);for(let n of r)i.push([n,e?yield this.context._getFromScope(n,h(e).split("."),!1):n]);return i.sort((n,o)=>s(n[1],o[1])).map(n=>n[0])}function*hn(t,e){return yield*si.call(this,t,e,Fi)}function*un(t,e){return yield*si.call(this,t,e,Oi)}var fn=t=>t&&t.length||0;function*dn(t,e){let s=[],i=L(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push(yield this.context._getFromScope(r,h(e),!1));return s}function*pn(t,e){let s=0,i=L(t);for(let r of i){let n=Number(e?yield this.context._getFromScope(r,h(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function gn(t){let e=L(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!k(m(s)))}function ii(t,e=[]){let s=L(t),i=L(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function mn(t,e){return ii.call(this,t,[e])}function yn(t,e){let s=L(t);this.context.memoryLimit.use(s.length);let i=[...s];return i.unshift(e),i}function wn(t){let e=[...L(t)];return e.pop(),e}function bn(t){let e=L(t);this.context.memoryLimit.use(e.length);let s=[...e];return s.shift(),s}function kn(t,e,s=1){return t=m(t),k(t)?[]:(S(t)||(t=h(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function ri(t){return this.context.opts.jekyllWhere?e=>ae.is(t)?$(e,t):S(e)?er(e,t):$(e,t):t===void 0?e=>U(e,this.context):e=>$(e,t)}function*ni(t,e,s,i){let r=[];e=L(e),this.context.memoryLimit.use(e.length);let n=new z(h(s)).readScopeValue();for(let a of e)r.push(yield T(n,this.context.spawn(a)));let o=ri.call(this,i);return e.filter((a,c)=>o(r[c])===t)}function*oi(t,e,s,i){let r=[],n=new F(h(i),this.liquid),o=L(e);this.context.memoryLimit.use(o.length);for(let a of o){this.context.push({[s]:a});let c=yield n.value(this.context);this.context.pop(),c===t&&r.push(a)}return r}function*Tn(t,e,s){return yield*ni.call(this,!0,t,e,s)}function*xn(t,e,s){return yield*ni.call(this,!1,t,e,s)}function*Sn(t,e,s){return yield*oi.call(this,!0,t,e,s)}function*_n(t,e,s){return yield*oi.call(this,!1,t,e,s)}function*Ln(t,e){let s=new Map;t=ge(t);let i=new z(h(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(let r of t){let n=yield T(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*Fn(t,e,s){let i=new Map,r=new F(h(s),this.liquid);t=ge(t),this.context.memoryLimit.use(t.length);for(let n of t){this.context.push({[e]:n});let o=yield r.value(this.context);this.context.pop(),i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*es(t,e,s){let i=new z(h(e)).readScopeValue(),r=L(t),n=ri.call(this,s);for(let o=0;o<r.length;o++){let a=yield T(i,this.context.spawn(r[o]));if(n(a))return[o,r[o]]}}function*ts(t,e,s){let i=new F(h(s),this.liquid),r=L(t);for(let n=0;n<r.length;n++){this.context.push({[e]:r[n]});let o=yield i.value(this.context);if(this.context.pop(),o)return[n,r[n]]}}function*On(t,e,s){return!!(yield*es.call(this,t,e,s))}function*vn(t,e,s){return!!(yield*ts.call(this,t,e,s))}function*zn(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[0]:void 0}function*Rn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[0]:void 0}function*An(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[1]:void 0}function*Nn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[1]:void 0}function qn(t){return t=L(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function Mn(t,e=1){if(t=m(t),k(t))return[];S(t)||(t=h(t)),this.context.memoryLimit.use(e);let s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var Dn=Object.freeze({__proto__:null,join:on,last:an,first:ln,reverse:cn,sort:hn,sort_natural:un,size:fn,map:dn,sum:pn,compact:gn,concat:ii,push:mn,unshift:yn,pop:wn,shift:bn,slice:kn,where:Tn,reject:xn,where_exp:Sn,reject_exp:_n,group_by:Ln,group_by_exp:Fn,has:On,has_exp:vn,find_index:zn,find_index_exp:Rn,find:An,find_exp:Nn,uniq:qn,sample:Mn});function ss(t,e,s){let i=(t?.length??0)+(s?.length??0);this.context.memoryLimit.use(i);let r=li(t,this.context.opts,s);return r?(e=m(e),e=k(e)?this.context.opts.dateFormat:h(e),this.context.memoryLimit.use(e.length),xe(r,e,this.context.memoryLimit)):t}function En(t){return ss.call(this,t,"%Y-%m-%dT%H:%M:%S%:z")}function Vn(t){return ss.call(this,t,"%a, %d %b %Y %H:%M:%S %z")}function Pn(t,e,s){return ai.call(this,t,"%b",e,s)}function Cn(t,e,s){return ai.call(this,t,"%B",e,s)}function ai(t,e,s,i){let r=li(t,this.context.opts);if(!r)return t;let n=this.context.memoryLimit;if(s==="ordinal"){let o=r.getDate();return i==="US"?xe(r,`${e} ${o}%q, %Y`,n):xe(r,`${o}%q ${e} %Y`,n)}return xe(r,`%d ${e} %Y`,n)}function li(t,e,s){let i,r=s??e.timezoneOffset,n=e.locale;if(t=m(t),!k(t))return t==="now"||t==="today"?i=new I(Date.now(),n,r):ft(t)?i=new I(t*1e3,n,r):d(t)?/^\d+$/.test(t)?i=new I(+t*1e3,n,r):e.preserveTimezones&&s===void 0?i=I.createDateFixedToTimezone(t,n):i=new I(t,n,r):i=new I(t,n,r),i.valid()?i:void 0}var $n=Object.freeze({__proto__:null,date:ss,date_to_xmlschema:En,date_to_rfc822:Vn,date_to_string:Pn,date_to_long_string:Cn}),Tt=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,qs=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function jn(t,e){_(arguments.length===2,"append expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),s+i}function In(t,e){_(arguments.length===2,"prepend expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),i+s}function Bn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let i=0,r=new Set(e);i<s.length;i++)if(!r.has(s[i]))return s.slice(i);return""}return s.trimStart()}function Un(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function Wn(t){let e=h(t);return this.context.memoryLimit.use(e.length),h(e).toUpperCase()}function Hn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.split(e).join("")}function Yn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.replace(e,"")}function Jn(t,e){let s=h(t),i=h(e);this.context.memoryLimit.use(s.length+i.length);let r=s.lastIndexOf(i);return r===-1?s:s.substring(0,r)+s.substring(r+i.length)}function Zn(t,e){if(t=h(t),this.context.memoryLimit.use(t.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let s=t.length-1,i=new Set(e);s>=0;s--)if(!i.has(t[s]))return t.slice(0,s+1);return""}return t.trimEnd()}function Qn(t,e){let s=h(t);this.context.memoryLimit.use(s.length);let i=s.split(h(e));for(;i.length&&i[i.length-1]==="";)i.pop();return i}function Kn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){let i=new Set(h(e));this.context.memoryLimit.use(i.size);let r=0,n=s.length-1;for(;i.has(s[r]);)r++;for(;n>=r&&i.has(s[n]);)n--;return s.slice(r,n+1)}return s.trim()}function Gn(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function Xn(t){return t=h(t),this.context.memoryLimit.use(t.length),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function eo(t,e,s){let i=h(t);e=h(e),s=h(s);let r=i.split(e),n=i.length+(r.length-1)*(s.length-e.length);return this.context.memoryLimit.use(n),r.join(s)}function to(t,e,s){let i=h(t);return e=h(e),s=h(s),this.context.memoryLimit.use(i.length+e.length+s.length),i.replace(e,()=>s)}function so(t,e,s){let i=h(t),r=h(e),n=h(s);this.context.memoryLimit.use(i.length+r.length+n.length);let o=i.lastIndexOf(r);return o===-1?i:i.substring(0,o)+n+i.substring(o+r.length)}function io(t,e=50,s="..."){let i=h(t);return s=h(s),this.context.memoryLimit.use(i.length+s.length),i.length<=e?t:i.substring(0,e-s.length)+s}function ro(t,e=15,s="..."){let i=h(t);s=h(s),this.context.memoryLimit.use(i.length+s.length);let r=i.split(/\s+/);e<=0&&(e=1);let n=r.slice(0,e).join(" ");return r.length>=e&&(n+=s),n}function no(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function oo(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),t=s.trim(),!t)return 0;switch(e){case"cjk":return(t.match(Tt)||[]).length+(t.match(qs)||[]).length;case"auto":return Tt.test(t)?t.match(Tt).length+(t.match(qs)||[]).length:t.split(/\s+/).length;default:return t.split(/\s+/).length}}function ao(t,e="and"){switch(e=h(e),this.context.memoryLimit.use(t.length+e.length),t.length){case 0:return"";case 1:return t[0];case 2:return`${t[0]} ${e} ${t[1]}`;default:return`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}}var lo=Object.freeze({__proto__:null,append:jn,prepend:In,lstrip:Bn,downcase:Un,upcase:Wn,remove:Hn,remove_first:Yn,remove_last:Jn,rstrip:Zn,split:Qn,strip:Kn,strip_newlines:Gn,capitalize:Xn,replace:eo,replace_first:to,replace_last:so,truncate:io,truncatewords:ro,normalize_whitespace:no,number_of_words:oo,array_to_sentence_string:ao});function co(t){return Buffer.from(t,"utf8").toString("base64")}function ho(t){return Buffer.from(t,"base64").toString("utf8")}function uo(t){if(typeof Buffer<"u"&&Buffer.isBuffer(t))return this.context.memoryLimit.use(t.byteLength),t.toString("base64");let e=h(t);return this.context.memoryLimit.use(e.length),co(e)}function fo(t){let e=h(t);return this.context.memoryLimit.use(e.length),ho(e)}var po=Object.freeze({__proto__:null,base64_encode:uo,base64_decode:fo});function go(t){return Es.createHash("sha256").update(t,"utf8").digest("hex")}function mo(t,e){return Es.createHmac("sha256",e).update(t,"utf8").digest("hex")}function yo(t){let e=h(t);return this.context.memoryLimit.use(e.length),go(e)}function wo(t,e){let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),mo(s,i)}var bo=Object.freeze({__proto__:null,sha256:yo,hmac_sha256:wo}),ci={...Lr,...Qr,...nn,...Dn,...$n,...lo,...po,...bo,...Qs},We=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new F(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}*arguments(){yield this.value}*localScope(){yield this.identifier}},Ms=["offset","limit","reversed"],He=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier(),o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(!n.size()||o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.hash=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:else",u=>{Ae(u.args),c=this.elseTemplates}).on("tag:endfor",u=>{Ae(u.args),f.stop()}).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=this.liquid.renderer,r=ge(yield T(this.collection,e));if(!r.length){yield i.renderTemplates(this.elseTemplates,e,s);return}let n="continue-"+this.variable+"-"+this.collection.getText();e.push(Y({continue:e.getRegister(n,{})}));let o=yield this.hash.render(e);e.pop(),r=(this.liquid.options.orderedFilterParameters?Object.keys(o).filter(f=>Ms.includes(f)):Ms.filter(f=>o[f]!==void 0)).reduce((f,u)=>u==="offset"?To(f,o.offset):u==="limit"?xo(f,o.limit):ko(f),r),e.setRegister(n,(o.offset||0)+r.length);let c=Y({forloop:new le(r.length,this.collection.getText(),this.variable)});e.push(c);for(let f of r){if(c[this.variable]=f,e.continueCalled=e.breakCalled=!1,yield i.renderTemplates(this.templates,e,s),e.breakCalled)break;c.forloop.next()}e.continueCalled=e.breakCalled=!1,e.pop()}*children(){let e=this.templates.slice();return this.elseTemplates&&e.push(...this.elseTemplates),e}*arguments(){yield this.collection;for(let e of Object.values(this.hash.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}};function ko(t){return[...t].reverse()}function To(t,e){return t.slice(e)}function xo(t,e){return t.slice(0,e)}var Ye=class extends b{constructor(e,s,i,r){for(super(e,s,i),this.templates=[],this.identifier=this.readVariable(),this.variable=this.identifier.content;s.length;){let n=s.shift();if(J(n)&&n.name==="endcapture")return;this.templates.push(r.parseToken(n,s))}throw new Error(`tag ${e.getText()} not closed`)}readVariable(){let e=this.tokenizer.readIdentifier();if(e.content||(e=this.tokenizer.readQuoted(),e))return e;throw this.tokenizer.error("invalid capture name")}*render(e){let i=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=i}*children(){return this.templates}*localScope(){yield this.identifier}},Je=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[],this.value=new F(this.tokenizer.readFilteredValue(),this.liquid),this.elseTemplates=[];let n=[],o=0,a=r.parseStream(s).on("tag:when",c=>{if(o>0)return;n=[];let f=[];for(;!c.tokenizer.end();)f.push(c.tokenizer.readValueOrThrow()),c.tokenizer.skipBlank(),c.tokenizer.peek()===","?c.tokenizer.readTo(","):c.tokenizer.readTo("or");this.branches.push({values:f,templates:n})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endcase",()=>a.stop()).on("template",c=>{(n!==this.elseTemplates||o===1)&&n.push(c)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});a.start()}*render(e,s){let i=this.liquid.renderer,r=m(yield this.value.value(e,e.opts.lenientIf)),n=!1;for(let o of this.branches)for(let a of o.values){let c=yield T(a,e,e.opts.lenientIf);if($(r,c)){yield i.renderTemplates(o.templates,e,s),n=!0;break}}n||(yield i.renderTemplates(this.elseTemplates,e,s))}*arguments(){yield this.value,yield*this.branches.flatMap(e=>e.values)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}},Ze=class extends b{constructor(e,s,i){for(super(e,s,i);s.length;){let r=s.shift();if(J(r)&&r.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}},Qe=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer;for(this.file=is(n,this.liquid,r),this.currentFile=e.file;!n.end();){n.skipBlank();let o=n.p,a=n.readIdentifier();if((a.content==="with"||a.content==="for")&&(n.skipBlank(),n.peek()!==":")){let c=n.readValue();if(c){let f=n.p,u=n.readIdentifier(),p;u.content==="as"?p=n.readIdentifier():n.p=f,this[a.content]={value:c,alias:p&&p.content},n.skipBlank(),n.peek()===","&&n.advance();continue}}n.p=o;break}this.hash=new j(n,i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r}=this,n=yield rs(this.file,e,i);_(n,()=>`illegal file path "${n}"`);let o=e.spawn(),a=o.bottom();if(Ue(a,yield r.render(e)),this.with){let{value:c,alias:f}=this.with;a[f||n]=yield T(c,e)}if(this.for){let{value:c,alias:f}=this.for,u=ge(yield T(c,e));a.forloop=new le(u.length,c.getText(),f);for(let p of u){a[f]=p;let g=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(g,o,s),a.forloop.next()}}else{let c=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(c,o,s)}}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e=Object.keys(this.hash.hash);if(this.with){let{value:s,alias:i}=this.with;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}if(this.for){let{value:s,alias:i}=this.for;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}return{name:this.file,isolated:!0,scope:e}}}*arguments(){for(let e of Object.values(this.hash.hash))v(e)&&(yield e);if(this.with){let{value:e}=this.with;v(e)&&(yield e)}if(this.for){let{value:e}=this.for;v(e)&&(yield e)}}};function is(t,e,s){if(e.options.dynamicPartials){let n=t.readValue();if(t.assert(n,"illegal file path"),n.getText()==="none")return;if(Be(n)){let o=s.parse(Js(n));return Ds(o)}return n}let i=[...t.readFileNameTemplate(e.options)],r=Ds(s.parseTokens(i));return r==="none"?void 0:r}function Ds(t){return t.length===1&&mt(t[0].token)?t[0].token.getContent():t}function*rs(t,e,s){return typeof t=="string"?t:Array.isArray(t)?s.renderer.renderTemplates(t,e):yield T(t,e)}var Ke=class extends b{constructor(e,s,i,r){super(e,s,i);let{tokenizer:n}=e;this.file=is(n,this.liquid,r),this.currentFile=e.file;let o=n.p;n.readIdentifier().content==="with"?(n.skipBlank(),n.peek()!==":"?this.withVar=n.readValue():n.p=o):n.p=o,this.hash=new j(n,i.options.jekyllInclude||i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r,withVar:n}=this,{renderer:o}=i,a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",K.OUTPUT);let f=Y(yield r.render(e));n&&(f[a]=yield T(n,e));let u=yield i._parsePartialFile(a,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?Y({include:f}):f),yield o.renderTemplates(u,e,s),e.pop(),e.restoreRegister(c)}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e;return this.liquid.options.jekyllInclude?e=["include"]:(e=Object.keys(this.hash.hash),this.withVar&&e.push([this.file,this.withVar])),{name:this.file,isolated:!1,scope:e}}}*arguments(){yield*Object.values(this.hash.hash).filter(v),v(this.file)&&(yield this.file),v(this.withVar)&&(yield this.withVar)}},Ge=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0),s.write(h(--i[this.variable]))}*localScope(){yield this.identifier}},Xe=class extends b{constructor(e,s,i){super(e,s,i),this.candidates=[];let r=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),r&&(this.tokenizer.peek()===":"?(this.group=r,this.tokenizer.advance()):this.candidates.push(r));!this.tokenizer.end();){let n=this.tokenizer.readValue();n&&this.candidates.push(n),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,s){let r=`cycle:${yield T(this.group,e)}:`+this.candidates.join(","),n=e.getRegister("cycle",{}),o=n[r];o===void 0&&(o=n[r]=0);let a=this.candidates[o];return o=(o+1)%this.candidates.length,n[r]=o,yield T(a,e)}*arguments(){yield*this.candidates,this.group&&(yield this.group)}},et=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[];let n=[];r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})).on("tag:elsif",o=>{_(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new F(o.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})}).on("tag:else",o=>{Ae(o.args),_(!this.elseTemplates,"duplicated else"),n=this.elseTemplates=[]}).on("tag:endif",function(o){Ae(o.args),this.stop()}).on("template",o=>n.push(o)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,templates:n}of this.branches){let o=yield r.value(e,e.opts.lenientIf);if(U(o,e)){yield i.renderTemplates(n,e,s);return}}yield i.renderTemplates(this.elseTemplates||[],e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},tt=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0);let r=i[this.variable];i[this.variable]++,s.write(h(r))}*localScope(){yield this.identifier}},st=class extends b{constructor(e,s,i,r){super(e,s,i),this.file=is(this.tokenizer,this.liquid,r),this.currentFile=e.file,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=r.parseTokens(s)}*render(e,s){let{liquid:i,args:r,file:n}=this,{renderer:o}=i;if(n===void 0){e.setRegister("blockMode",K.OUTPUT),yield o.renderTemplates(this.templates,e,s);return}let a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=yield i._parseLayoutFile(a,e.sync,this.currentFile);e.setRegister("blockMode",K.STORE);let f=yield o.renderTemplates(this.templates,e),u=e.getRegister("blocks",{});u[""]===void 0&&(u[""]=(p,g)=>g.write(f)),e.setRegister("blockMode",K.OUTPUT),e.push(Y(yield r.render(e))),yield o.renderTemplates(c,e,s),e.pop()}*children(e){let s=this.templates.slice();return e&&d(this.file)&&s.push(...yield this.liquid._parsePartialFile(this.file,!0,this.currentFile)),s}*arguments(){for(let e of Object.values(this.args.hash))v(e)&&(yield e);v(this.file)&&(yield this.file)}partialScope(){if(d(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}},it=class extends b{constructor(e,s,i,r){super(e,s,i),this.templates=[];let n=/\w+/.exec(e.args);for(this.block=n?n[0]:"";s.length;){let o=s.shift();if(J(o)&&o.name==="endblock")return;let a=r.parseToken(o,s);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,s){let i=this.getBlockRender(e);e.getRegister("blockMode")===K.STORE?e.getRegister("blocks",{})[this.block]=i:yield i(new qe,s)}getBlockRender(e){let s=this,{liquid:i,templates:r}=this,n=e.getRegister("blocks",{})[this.block],o=function*(a,c){let f=e.getRegister("blockStack",[]);if(f.includes(s))throw new Error("block tag cannot be nested");f.push(s),e.push(Y({block:a})),yield i.renderer.renderTemplates(r,e,c),e.pop(),f.pop()};return n?(a,c)=>n(new qe(f=>o(a,f)),c):o}*children(){return this.templates}blockScope(){return["block"]}},rt=class extends b{constructor(e,s,i){for(super(e,s,i),this.tokens=[];s.length;){let r=s.shift();if(J(r)&&r.name==="endraw")return;this.tokens.push(r)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}},Jt=class extends le{constructor(e,s,i,r){super(e,i,r),this.length=e,this.cols=s}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}},nt=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();let o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:endtablerow",()=>f.stop()).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=ge(yield T(this.collection,e)),r=yield this.args.render(e),n=r.offset||0,o=r.limit===void 0?i.length:r.limit;i=i.slice(n,n+o);let a=r.cols||i.length,c=this.liquid.renderer,f=new Jt(i.length,a,this.collection.getText(),this.variable),u=Y({tablerowloop:f});e.push(u);for(let p=0;p<i.length;p++,f.next())u[this.variable]=i[p],f.col0()===0&&(f.row()!==1&&s.write("</tr>"),s.write(`<tr class="row${f.row()}">`)),s.write(`<td class="col${f.col()}">`),yield c.renderTemplates(this.templates,e,s),s.write("</td>");i.length&&s.write("</tr>"),e.pop()}*children(){return this.templates}*arguments(){yield this.collection;for(let e of Object.values(this.args.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}},ot=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[];let n=[],o=0;r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),test:me,templates:n=[]})).on("tag:elsif",a=>{if(o>0){n=[];return}this.branches.push({value:new F(a.tokenizer.readFilteredValue(),this.liquid),test:U,templates:n=[]})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",a=>{(n!==this.elseTemplates||o===1)&&n.push(a)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,test:n,templates:o}of this.branches){let a=yield r.value(e,e.opts.lenientIf);if(n(a,e)){yield i.renderTemplates(o,e,s);return}}yield i.renderTemplates(this.elseTemplates,e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},at=class extends b{render(e,s){e.breakCalled=!0}},lt=class extends b{render(e,s){e.continueCalled=!0}},ct=class extends b{constructor(e,s,i){super(e,s,i),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new F(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,s){if(!this.value)return;let i=yield this.value.value(e,!1);s.write(i)}*arguments(){this.value&&(yield this.value)}},ht=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=r.parseTokens(n)}*render(e,s){yield this.liquid.renderer.renderTemplates(this.templates,e,s)}*children(){return this.templates}},ut=class extends b{constructor(e,s,i){if(super(e,s,i),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}},hi={assign:We,for:He,capture:Ye,case:Je,comment:Ze,include:Ke,render:Qe,decrement:Ge,increment:tt,cycle:Xe,if:et,layout:st,block:it,raw:rt,tablerow:nt,unless:ot,break:at,continue:lt,echo:ct,liquid:ht,"#":ut},Zt=class t{constructor(e={}){this.renderer=new jt,this.filters=Object.create(null),this.tags=Object.create(null),this.options=Fr(e),this.parser=new N(this),ws(hi,(s,i)=>this.registerTag(i,s)),ws(ci,(s,i)=>this.registerFilter(i,s))}parse(e,s){return new N(this).parse(e,s)}_render(e,s,i){let r=s instanceof B?s:new B(s,this.options,i);return this.renderer.renderTemplates(e,r)}async render(e,s,i){return q(this._render(e,s,{...i,sync:!1}))}renderSync(e,s,i){return M(this._render(e,s,{...i,sync:!0}))}renderToNodeStream(e,s,i={}){let r=new B(s,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,r)}_parseAndRender(e,s,i){let r=this.parse(e);return this._render(r,s,i)}async parseAndRender(e,s,i){return q(this._parseAndRender(e,s,{...i,sync:!1}))}parseAndRenderSync(e,s,i){return M(this._parseAndRender(e,s,{...i,sync:!0}))}_parsePartialFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Partials,i)}_parseLayoutFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Layouts,i)}_parseFile(e,s,i,r){return new N(this).parseFile(e,s,i,r)}async parseFile(e,s){return q(new N(this).parseFile(e,!1,s))}parseFileSync(e,s){return M(new N(this).parseFile(e,!0,s))}*_renderFile(e,s,i){let r=yield this._parseFile(e,i.sync,i.lookupType);return yield this._render(r,s,i)}async renderFile(e,s,i){return q(this._renderFile(e,s,{...i,sync:!1}))}renderFileSync(e,s,i){return M(this._renderFile(e,s,{...i,sync:!0}))}async renderFileToNodeStream(e,s,i){let r=await this.parseFile(e);return this.renderToNodeStream(r,s,i)}_evalValue(e,s){let i=new F(e,this),r=s instanceof B?s:new B(s,this.options);return i.value(r)}async evalValue(e,s){return q(this._evalValue(e,s))}evalValueSync(e,s){return M(this._evalValue(e,s))}registerFilter(e,s){this.filters[e]=s}registerTag(e,s){this.tags[e]=x(s)?s:Ar(s)}plugin(e){return e.call(this,t)}express(){let e=this,s=!0;return function(i,r,n){if(s){s=!1;let o=Se(this.root);e.options.root.unshift(...o),e.options.layouts.unshift(...o),e.options.partials.unshift(...o)}e.renderFile(i,r).then(o=>n(null,o),n)}}async analyze(e,s={}){return P(e,s)}analyzeSync(e,s={}){return C(e,s)}async parseAndAnalyze(e,s,i={}){return P(this.parse(e,s),i)}parseAndAnalyzeSync(e,s,i={}){return C(this.parse(e,s),i)}async variables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}variablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}async fullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}fullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}async variableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}variableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}async globalVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}globalVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}async globalFullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}globalFullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}async globalVariableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}globalVariableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}},So="10.27.0";l.AssertionError=Re;l.AssignTag=We;l.BlockTag=it;l.BreakTag=at;l.CaptureTag=Ye;l.CaseTag=Je;l.CommentTag=Ze;l.Context=B;l.ContinueTag=lt;l.CycleTag=Xe;l.DecrementTag=Ge;l.Drop=D;l.EchoTag=ct;l.Expression=Ve;l.Filter=de;l.ForTag=He;l.Hash=j;l.IfTag=et;l.IncludeTag=Ke;l.IncrementTag=tt;l.InlineCommentTag=ut;l.LayoutTag=st;l.Liquid=Zt;l.LiquidError=E;l.LiquidTag=ht;l.Output=$e;l.ParseError=Fe;l.ParseStream=Ce;l.Parser=N;l.RawTag=rt;l.RenderError=Oe;l.RenderTag=Qe;l.TablerowTag=nt;l.Tag=b;l.TagToken=ue;l.Token=O;l.TokenizationError=Le;l.Tokenizer=z;l.TypeGuards=Mr;l.UndefinedVariableError=ze;l.UnlessTag=ot;l.Value=F;l.Variable=H;l.analyze=P;l.analyzeSync=C;l.assert=_;l.createTrie=vt;l.defaultOperators=Zs;l.defaultOptions=Q;l.evalQuotedToken=Js;l.evalToken=T;l.filters=ci;l.isFalsy=me;l.isTruthy=U;l.tags=hi;l.toPromise=q;l.toValue=m;l.toValueSync=M;l.version=So});ye();var di=mi(ui(),1);function fi(t,e){let s=new di.Liquid;return s.render(s.parse(t),e)}async function Ao(t,e,s){ms(gs`Copying template from directory ${kt.path(t)} to ${kt.path(e)}`);let i=await ds(we(t,"**/*"),{dot:!0}),r=we(t,".cli-liquid-bypass"),n=[];await fs(r)&&(n=(await wt(r)).split(`
15
15
  `).filter(a=>a.trim().length>0));let o=i.map(a=>a.split("/")).sort((a,c)=>a.length<c.length?1:-1).map(a=>a.join("/"));await Promise.all(o.map(async a=>{let c=await fi(we(e,yt(t,a)),s),f=n.some(u=>{let p=yt(t,a),g=u.replace(/^\.\//,"");return ps(p,g)||p.startsWith(g)});if(await cs(a))await bt(c);else if(a.endsWith(".liquid")&&!f){await bt(as(c));let u=await wt(a),p=await fi(u,s),g=await us(a),y=c.replace(".liquid","");await be(a,y),await ls(y,p),g&&await hs(y,493)}else if(a.endsWith(".raw")){let u=c.replace(".raw","");await be(a,u)}else await be(a,c)}))}export{fi as a,Ao as b};