halo-pc 1.0.51 → 1.0.53

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 (287) hide show
  1. package/dist/assets/Article-BW8eAB0-.js +197 -0
  2. package/dist/assets/ArticleFooter-Bgcgo5ul.js +84 -0
  3. package/dist/assets/Autocomplete-04DZEjsg.js +54 -0
  4. package/dist/assets/Autocomplete-BlyjnHzg.js +53 -0
  5. package/dist/assets/Autocomplete-CMrWQUxn.js +27 -0
  6. package/dist/assets/CSharp-Bs-1EWWR.js +27 -0
  7. package/dist/assets/Calender-dOG_jl9u.js +10 -0
  8. package/dist/assets/Callback-BqGRGNtK.js +25 -0
  9. package/dist/assets/Cascader-CnequxoL.js +86 -0
  10. package/dist/assets/Cascader-IJ3jft2B.js +46 -0
  11. package/dist/assets/Checkbox-B43ESOxJ.js +27 -0
  12. package/dist/assets/Checkbox-DjvF4NCz.js +75 -0
  13. package/dist/assets/Code-50tqkJIE.js +41 -0
  14. package/dist/assets/Code-CDnAXHXb.js +4 -0
  15. package/dist/assets/Code-CPcLgZ92.js +30 -0
  16. package/dist/assets/Code-DrzngizU.js +59 -0
  17. package/dist/assets/Code.vue_vue_type_style_index_0_lang-CDxbuceH.js +64 -0
  18. package/dist/assets/Color--mRQSe4e.js +34 -0
  19. package/dist/assets/Color-CLRn-pIY.js +22 -0
  20. package/dist/assets/Column-BTaMkPuH.js +73 -0
  21. package/dist/assets/Comment-BHXA8N0K.js +105 -0
  22. package/dist/assets/Compare-BxyBlcHX.js +62 -0
  23. package/dist/assets/Compare-DydxjkYG.js +42 -0
  24. package/dist/assets/Copy-GxnvB2Sm.js +48 -0
  25. package/dist/assets/Custom-BxcKWpSP.js +54 -0
  26. package/dist/assets/DataExport-BcruPHEM.js +4 -0
  27. package/dist/assets/DataExport.vue_vue_type_script_setup_true_lang-C6tWZ8mB.js +113 -0
  28. package/dist/assets/DataImport-CdXvwlli.js +4 -0
  29. package/dist/assets/DataImport.vue_vue_type_script_setup_true_lang-D4OmNvny.js +177 -0
  30. package/dist/assets/Date-5U1z7UXl.js +27 -0
  31. package/dist/assets/Date-OfQxaoDL.js +42 -0
  32. package/dist/assets/DateRange-DEvme6Wz.js +62 -0
  33. package/dist/assets/DateRange-W7uK-0Q3.js +19 -0
  34. package/dist/assets/DateTime-ByF4OyPL.js +43 -0
  35. package/dist/assets/DateTime-C_l10Os6.js +27 -0
  36. package/dist/assets/DateTimeRange-GpUXpNlL.js +66 -0
  37. package/dist/assets/Daterange-D1OvMMvQ.js +62 -0
  38. package/dist/assets/Decimal-IkGfpE-p.js +36 -0
  39. package/dist/assets/Decimal-QPElgXM5.js +27 -0
  40. package/dist/assets/Delete-DifJD2iW.js +61 -0
  41. package/dist/assets/Detail-6p4Jgu5U.js +73 -0
  42. package/dist/assets/Dictionary-CvI_7FO8.js +60 -0
  43. package/dist/assets/Email-B-nUtHIg.js +53 -0
  44. package/dist/assets/Email-BsqMbKuf.js +19 -0
  45. package/dist/assets/File-CTboPD47.js +162 -0
  46. package/dist/assets/Image-CTKxOM9T.js +9 -0
  47. package/dist/assets/Index-BBRyKHV1.js +178 -0
  48. package/dist/assets/Index-BY6EHWPo.js +4 -0
  49. package/dist/assets/Index-Bdb8xf8A.js +75 -0
  50. package/dist/assets/Index-Br5wtQCU.js +4 -0
  51. package/dist/assets/Index-DDpdqPUT.js +4 -0
  52. package/dist/assets/Index-DGICr-zO.js +4 -0
  53. package/dist/assets/Index-Dat74cWT.js +4 -0
  54. package/dist/assets/Index-aTHMqHdZ.js +4 -0
  55. package/dist/assets/Index.vue_vue_type_script_setup_true_lang-CKXjZbZm.js +82 -0
  56. package/dist/assets/Index.vue_vue_type_script_setup_true_lang-c_kmud9W.js +68 -0
  57. package/dist/assets/Install-xTa0b51o.js +133 -0
  58. package/dist/assets/Int-BFP6vIcR.js +19 -0
  59. package/dist/assets/Int-CWb_A-nY.js +43 -0
  60. package/dist/assets/Int-CdT_UEOL.js +46 -0
  61. package/dist/assets/List-CNlfibdL.js +75 -0
  62. package/dist/assets/Maintaince-DoaN5v4p.js +19 -0
  63. package/dist/assets/Markdown-DInji1_q.js +37 -0
  64. package/dist/assets/Markdown-YEBerW7I.js +27 -0
  65. package/dist/assets/Month-B92uGMxO.js +43 -0
  66. package/dist/assets/Month-CCcnnqgz.js +27 -0
  67. package/dist/assets/Month-CbIVJc94.js +42 -0
  68. package/dist/assets/Normal-CWDfA3Bl.js +259 -0
  69. package/dist/assets/Paging-DQes1B_A.js +98 -0
  70. package/dist/assets/PagingHeader-BDGFzyvm.js +147 -0
  71. package/dist/assets/PagingRow-DSlSGiAV.js +72 -0
  72. package/dist/assets/Password-C06RyIsi.js +55 -0
  73. package/dist/assets/Password-Cqm5_jcE.js +24 -0
  74. package/dist/assets/Progress-C_S9K_bo.js +25 -0
  75. package/dist/assets/Progress-pdUnRwmC.js +34 -0
  76. package/dist/assets/Racebar-BTin0dPn.js +168 -0
  77. package/dist/assets/Radio-BXCq0-e0.js +27 -0
  78. package/dist/assets/Radio-GcyYOxn0.js +47 -0
  79. package/dist/assets/Rate-DJMyAd6-.js +34 -0
  80. package/dist/assets/Rate-DxB6xeV6.js +34 -0
  81. package/dist/assets/Register-BmxG2pD4.js +201 -0
  82. package/dist/assets/RichText-COdDClMp.js +121 -0
  83. package/dist/assets/RichText-MkjGGBqR.js +22 -0
  84. package/dist/assets/SearchForm-BgOPf7uG.js +4 -0
  85. package/dist/assets/SearchForm.vue_vue_type_style_index_0_lang-Cj6tbcvd.js +147 -0
  86. package/dist/assets/SearchHeader-nnRzvdrx.js +4 -0
  87. package/dist/assets/SearchHeader.vue_vue_type_style_index_0_lang-CHx_o3cL.js +69 -0
  88. package/dist/assets/Select-CV1JKkID.js +27 -0
  89. package/dist/assets/Select-DQTFln0r.js +85 -0
  90. package/dist/assets/Select-vBFgN0sw.js +122 -0
  91. package/dist/assets/Single-6DxzOqUa.js +321 -0
  92. package/dist/assets/Statistic-C9-x_5VI.js +78 -0
  93. package/dist/assets/Statistic-DOqjwV9b.js +157 -0
  94. package/dist/assets/Stock-B7mAFNC_.js +4 -0
  95. package/dist/assets/Stock-CDNRWrLy.js +30 -0
  96. package/dist/assets/Stock.vue_vue_type_style_index_0_lang-12CCzO2g.js +303 -0
  97. package/dist/assets/Switch-BY-0wSNs.js +27 -0
  98. package/dist/assets/Switch-Brwh143O.js +50 -0
  99. package/dist/assets/Table-BSbpncPe.js +225 -0
  100. package/dist/assets/Table-DH-ateim.js +274 -0
  101. package/dist/assets/Text-C-mzSg7d.js +4 -0
  102. package/dist/assets/Text-Du3Mfs9M.js +57 -0
  103. package/dist/assets/Text-ux7pj9CL.js +53 -0
  104. package/dist/assets/Text.vue_vue_type_style_index_0_lang-BsK-PxEq.js +57 -0
  105. package/dist/assets/TextLink-C2dFJ1xR.js +64 -0
  106. package/dist/assets/Textarea-6IWWDV6p.js +37 -0
  107. package/dist/assets/Textarea-DfMegvsQ.js +28 -0
  108. package/dist/assets/Time-BdsPTOwX.js +42 -0
  109. package/dist/assets/Timeline-BJE5-MDV.js +60 -0
  110. package/dist/assets/Tree-CPYvQpRc.js +295 -0
  111. package/dist/assets/Tree-uvDeFVk4.js +124 -0
  112. package/dist/assets/TreeNode-8P3FykA1.js +39 -0
  113. package/dist/assets/Tree_Old-h__WmqFA.js +11 -0
  114. package/dist/assets/Update-DyH-b15b.js +58 -0
  115. package/dist/assets/UpdateChild-BLL357Mm.js +91 -0
  116. package/dist/assets/Upload-BG5kTc46.js +70 -0
  117. package/dist/assets/Upload-z8n9VoPU.js +149 -0
  118. package/dist/assets/Year-DMCePo2k.js +46 -0
  119. package/dist/assets/Year-DQf2Vu7j.js +27 -0
  120. package/dist/assets/main-DDCxKbDF.js +12627 -0
  121. package/dist/main.css +1 -0
  122. package/dist/main.js +73 -0
  123. package/dist/vendor/clipboard-Ng1iAUpU.js +504 -0
  124. package/dist/vendor/clone-B9z63rns.js +136 -0
  125. package/dist/vendor/element-plus-BNctWhlD.js +540 -0
  126. package/dist/vendor/file-saver-ypit2jx5.js +76 -0
  127. package/dist/vendor/intro.js-BUb8U_EJ.js +2040 -0
  128. package/dist/vendor/liquidjs-CyjuyKnF.js +3397 -0
  129. package/dist/vendor/moment-CwOqp704.js +2589 -0
  130. package/dist/vendor/sprintf-js-CI46yikS.js +145 -0
  131. package/dist/vendor/underscore-CK1gjYcm.js +1073 -0
  132. package/dist/vendor/underscore.string-BevGGlfe.js +798 -0
  133. package/dist/vendor/util-deprecate-DyPMeoo2.js +33 -0
  134. package/esm/comp/business/Condition.vue.d.ts +5 -4
  135. package/esm/comp/business/Drawer.vue.d.ts +6 -6
  136. package/esm/comp/business/Feedback.vue.d.ts +3 -96
  137. package/esm/comp/business/Switch.vue.d.ts +2 -1
  138. package/esm/comp/common/Captcha.vue.d.ts +3 -6
  139. package/esm/comp/common/Debug.vue.d.ts +7 -11
  140. package/esm/comp/common/Editable.vue.d.ts +7 -11
  141. package/esm/comp/common/Loading.vue.d.ts +7 -11
  142. package/esm/comp/common/MouseContext.vue.d.ts +2 -1
  143. package/esm/comp/common/Particles.vue.d.ts +2 -1
  144. package/esm/comp/common/Resizer.vue.d.ts +10 -13
  145. package/esm/comp/common/Table.vue.d.ts +13 -22
  146. package/esm/comp/common/TableColumn.vue.d.ts +9 -13
  147. package/esm/comp/control/Autocomplete.vue.d.ts +4 -3
  148. package/esm/comp/control/Cascader.vue.d.ts +5 -6
  149. package/esm/comp/control/Checkbox.vue.d.ts +3 -2
  150. package/esm/comp/control/Code.vue.d.ts +4 -3
  151. package/esm/comp/control/Color.vue.d.ts +4 -3
  152. package/esm/comp/control/Compare.vue.d.ts +5 -6
  153. package/esm/comp/control/Date.vue.d.ts +4 -3
  154. package/esm/comp/control/DateRange.vue.d.ts +4 -3
  155. package/esm/comp/control/DateTime.vue.d.ts +4 -3
  156. package/esm/comp/control/DateTimeRange.vue.d.ts +4 -3
  157. package/esm/comp/control/Decimal.vue.d.ts +4 -3
  158. package/esm/comp/control/Email.vue.d.ts +4 -3
  159. package/esm/comp/control/Image.vue.d.ts +2 -1
  160. package/esm/comp/control/Index.vue.d.ts +5 -6
  161. package/esm/comp/control/Int.vue.d.ts +4 -3
  162. package/esm/comp/control/Markdown.vue.d.ts +4 -3
  163. package/esm/comp/control/Month.vue.d.ts +4 -3
  164. package/esm/comp/control/Password.vue.d.ts +4 -3
  165. package/esm/comp/control/Progress.vue.d.ts +4 -3
  166. package/esm/comp/control/Radio.vue.d.ts +4 -3
  167. package/esm/comp/control/Rate.vue.d.ts +4 -3
  168. package/esm/comp/control/RichText.vue.d.ts +5 -3
  169. package/esm/comp/control/Select.vue.d.ts +5 -6
  170. package/esm/comp/control/Switch.vue.d.ts +5 -4
  171. package/esm/comp/control/Text.vue.d.ts +4 -3
  172. package/esm/comp/control/Textarea.vue.d.ts +4 -3
  173. package/esm/comp/control/Time.vue.d.ts +4 -3
  174. package/esm/comp/control/Upload.vue.d.ts +5 -6
  175. package/esm/comp/control/Year.vue.d.ts +4 -3
  176. package/esm/comp/driver/Crud.vue.d.ts +11 -744
  177. package/esm/comp/driver/Index.vue.d.ts +8 -1416
  178. package/esm/comp/driver/Picker.vue.d.ts +7 -94
  179. package/esm/comp/global/HeaderTab.vue.d.ts +7 -11
  180. package/esm/comp/global/Menu.vue.d.ts +3 -261
  181. package/esm/comp/global/MenuItem.vue.d.ts +3 -185
  182. package/esm/comp/global/MissComponent.vue.d.ts +7 -11
  183. package/esm/comp/global/SideTab.vue.d.ts +8 -12
  184. package/esm/comp/global/Window.vue.d.ts +7 -8
  185. package/esm/comp/header/Breadcrumb.vue.d.ts +2 -1
  186. package/esm/comp/header/Changes.vue.d.ts +2 -1
  187. package/esm/comp/header/Hamburger.vue.d.ts +3 -2
  188. package/esm/comp/header/HeaderRight.vue.d.ts +3 -22
  189. package/esm/comp/header/Index.vue.d.ts +7 -11
  190. package/esm/comp/header/Log.vue.d.ts +2 -1
  191. package/esm/comp/header/Logo.vue.d.ts +3 -2
  192. package/esm/comp/header/Refresh.vue.d.ts +3 -2
  193. package/esm/comp/header/Setting.vue.d.ts +2 -1
  194. package/esm/comp/layout/Desktop.vue.d.ts +2 -110
  195. package/esm/comp/layout/Index.vue.d.ts +7 -469
  196. package/esm/comp/layout/Side.vue.d.ts +5 -6
  197. package/esm/comp/layout/Top.vue.d.ts +3 -355
  198. package/esm/comp/list/Calender.vue.d.ts +2 -1
  199. package/esm/comp/list/Racebar.vue.d.ts +3 -32
  200. package/esm/comp/list/Statistic.vue.d.ts +3 -32
  201. package/esm/comp/list/Stock.vue.d.ts +2 -3
  202. package/esm/comp/list/Timeline.vue.d.ts +2 -1
  203. package/esm/comp/list/Tree.vue.d.ts +3 -9
  204. package/esm/comp/page/Column.vue.d.ts +3 -2
  205. package/esm/comp/page/Custom.vue.d.ts +2 -1
  206. package/esm/comp/page/Delete.vue.d.ts +3 -2
  207. package/esm/comp/page/Index.vue.d.ts +2 -1
  208. package/esm/comp/page/List.vue.d.ts +3 -4
  209. package/esm/comp/page/Paging.vue.d.ts +3 -48
  210. package/esm/comp/page/Single.vue.d.ts +3 -2
  211. package/esm/comp/paging/Article.vue.d.ts +3 -33
  212. package/esm/comp/paging/Code.vue.d.ts +2 -1
  213. package/esm/comp/paging/DataExport.vue.d.ts +3 -4
  214. package/esm/comp/paging/DataImport.vue.d.ts +2 -1
  215. package/esm/comp/paging/File.vue.d.ts +2 -1
  216. package/esm/comp/paging/Index.vue.d.ts +3 -4
  217. package/esm/comp/paging/SearchForm.vue.d.ts +5 -7
  218. package/esm/comp/paging/SearchHeader.vue.d.ts +5 -6
  219. package/esm/comp/paging/Table.vue.d.ts +4 -563
  220. package/esm/comp/panel/Group.vue.d.ts +7 -11
  221. package/esm/comp/panel/Header.vue.d.ts +3 -2
  222. package/esm/comp/panel/Operation.vue.d.ts +10 -17
  223. package/esm/comp/panel/Panel.vue.d.ts +14 -15
  224. package/esm/comp/panel/Shrink.vue.d.ts +8 -12
  225. package/esm/comp/partial/ArticleFooter.vue.d.ts +5 -4
  226. package/esm/comp/partial/Detail.vue.d.ts +3 -2
  227. package/esm/comp/partial/PagingHeader.vue.d.ts +6 -5
  228. package/esm/comp/partial/PagingRow.vue.d.ts +5 -4
  229. package/esm/comp/partial/TreeNode.vue.d.ts +2 -1
  230. package/esm/comp/partial/Update.vue.d.ts +3 -2
  231. package/esm/comp/partial/UpdateChild.vue.d.ts +4 -3
  232. package/esm/comp/search/Autocomplete.vue.d.ts +4 -3
  233. package/esm/comp/search/Daterange.vue.d.ts +2 -1
  234. package/esm/comp/search/Index.vue.d.ts +4 -3
  235. package/esm/comp/search/Int.vue.d.ts +4 -3
  236. package/esm/comp/search/Month.vue.d.ts +4 -3
  237. package/esm/comp/search/Select.vue.d.ts +5 -6
  238. package/esm/comp/search/Text.vue.d.ts +7 -5
  239. package/esm/comp/single/Code.vue.d.ts +5 -4
  240. package/esm/comp/single/Comment.vue.d.ts +2 -1
  241. package/esm/comp/single/Index.vue.d.ts +7 -8
  242. package/esm/comp/single/Normal.vue.d.ts +5 -7
  243. package/esm/comp/single/Statistic.vue.d.ts +2 -1
  244. package/esm/comp/single/Stock.vue.d.ts +2 -1
  245. package/esm/comp/single/Table.vue.d.ts +5 -498
  246. package/esm/comp/single/Tree.vue.d.ts +3 -5
  247. package/esm/comp/single/Tree_Old.vue.d.ts +2 -1
  248. package/esm/comp/text/Autocomplete.vue.d.ts +2 -1
  249. package/esm/comp/text/CSharp.vue.d.ts +2 -1
  250. package/esm/comp/text/Cascader.vue.d.ts +5 -4
  251. package/esm/comp/text/Checkbox.vue.d.ts +2 -1
  252. package/esm/comp/text/Code.vue.d.ts +2 -1
  253. package/esm/comp/text/Color.vue.d.ts +2 -1
  254. package/esm/comp/text/Compare.vue.d.ts +2 -1
  255. package/esm/comp/text/Copy.vue.d.ts +9 -12
  256. package/esm/comp/text/Date.vue.d.ts +2 -1
  257. package/esm/comp/text/DateRange.vue.d.ts +2 -1
  258. package/esm/comp/text/DateTime.vue.d.ts +2 -1
  259. package/esm/comp/text/Decimal.vue.d.ts +2 -1
  260. package/esm/comp/text/Dictionary.vue.d.ts +5 -4
  261. package/esm/comp/text/Email.vue.d.ts +2 -1
  262. package/esm/comp/text/Index.vue.d.ts +4 -3
  263. package/esm/comp/text/Int.vue.d.ts +2 -1
  264. package/esm/comp/text/Markdown.vue.d.ts +2 -1
  265. package/esm/comp/text/Month.vue.d.ts +2 -1
  266. package/esm/comp/text/Password.vue.d.ts +2 -1
  267. package/esm/comp/text/Progress.vue.d.ts +2 -1
  268. package/esm/comp/text/Radio.vue.d.ts +2 -1
  269. package/esm/comp/text/Rate.vue.d.ts +4 -3
  270. package/esm/comp/text/RichText.vue.d.ts +2 -1
  271. package/esm/comp/text/Select.vue.d.ts +2 -1
  272. package/esm/comp/text/Switch.vue.d.ts +2 -1
  273. package/esm/comp/text/Text.vue.d.ts +2 -3
  274. package/esm/comp/text/TextLink.vue.d.ts +13 -15
  275. package/esm/comp/text/Textarea.vue.d.ts +2 -1
  276. package/esm/comp/text/Upload.vue.d.ts +2 -1
  277. package/esm/comp/text/Year.vue.d.ts +2 -1
  278. package/esm/view/help/401.vue.d.ts +2 -1
  279. package/esm/view/help/404.vue.d.ts +2 -1
  280. package/esm/view/help/Install.vue.d.ts +2 -3
  281. package/esm/view/help/Maintaince.vue.d.ts +2 -1
  282. package/esm/view/help/Upgrade.vue.d.ts +2 -1
  283. package/esm/view/sso/Callback.vue.d.ts +2 -1
  284. package/esm/view/sso/Index.vue.d.ts +2 -5
  285. package/esm/view/sso/Register.vue.d.ts +2 -33
  286. package/esm/vite.config.d.ts +1 -5
  287. package/package.json +53 -56
@@ -0,0 +1,3397 @@
1
+ class z {
2
+ constructor(e, s, i, r, n) {
3
+ this.kind = e, this.input = s, this.begin = i, this.end = r, this.file = n;
4
+ }
5
+ getText() {
6
+ return this.input.slice(this.begin, this.end);
7
+ }
8
+ getPosition() {
9
+ let [e, s] = [1, 1];
10
+ for (let i = 0; i < this.begin; i++)
11
+ this.input[i] === `
12
+ ` ? (e++, s = 1) : s++;
13
+ return [e, s];
14
+ }
15
+ size() {
16
+ return this.end - this.begin;
17
+ }
18
+ }
19
+ class Y {
20
+ liquidMethodMissing(e, s) {
21
+ }
22
+ }
23
+ const Yt = Object.prototype.toString, Pe = String.prototype.toLowerCase, Le = Object.hasOwnProperty;
24
+ function f(t) {
25
+ return typeof t == "string";
26
+ }
27
+ function v(t) {
28
+ return typeof t == "function";
29
+ }
30
+ function Jt(t) {
31
+ return t && v(t.then);
32
+ }
33
+ function le(t) {
34
+ return t && v(t.next) && v(t.throw) && v(t.return);
35
+ }
36
+ function Zt(t) {
37
+ return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
38
+ }
39
+ function u(t) {
40
+ return t = p(t), f(t) ? t : O(t) ? "" : S(t) ? t.map((e) => u(e)).join("") : String(t);
41
+ }
42
+ function ie(t) {
43
+ return t = p(t), S(t) ? t : f(t) && t.length > 0 ? [t] : Gt(t) ? Array.from(t) : pe(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
44
+ }
45
+ function x(t) {
46
+ return t = p(t), O(t) ? [] : S(t) ? t : [t];
47
+ }
48
+ function p(t) {
49
+ return t instanceof Y && v(t.valueOf) ? t.valueOf() : t;
50
+ }
51
+ function ve(t) {
52
+ return +p(t) || 0;
53
+ }
54
+ function de(t) {
55
+ return typeof t == "number";
56
+ }
57
+ function gt(t) {
58
+ return t && v(t.toLiquid) ? gt(t.toLiquid()) : t;
59
+ }
60
+ function O(t) {
61
+ return t == null;
62
+ }
63
+ function Qt(t) {
64
+ return t === void 0;
65
+ }
66
+ function S(t) {
67
+ return Yt.call(t) === "[object Array]";
68
+ }
69
+ function mt(t) {
70
+ return t && de(t.length);
71
+ }
72
+ function Gt(t) {
73
+ return pe(t) && Symbol.iterator in t;
74
+ }
75
+ function Ie(t, e) {
76
+ t = t || {};
77
+ for (const s in t)
78
+ if (Le.call(t, s) && e(t[s], s, t) === !1)
79
+ break;
80
+ return t;
81
+ }
82
+ function yt(t) {
83
+ return t[t.length - 1];
84
+ }
85
+ function pe(t) {
86
+ const e = typeof t;
87
+ return t !== null && (e === "object" || e === "function");
88
+ }
89
+ function wt(t, e, s = 1) {
90
+ const i = [];
91
+ for (let r = t; r < e; r += s)
92
+ i.push(r);
93
+ return i;
94
+ }
95
+ function se(t, e, s = " ") {
96
+ return bt(t, e, s, (i, r) => r + i);
97
+ }
98
+ function Xt(t, e, s = " ") {
99
+ return bt(t, e, s, (i, r) => i + r);
100
+ }
101
+ function bt(t, e, s, i) {
102
+ t = String(t);
103
+ let r = e - t.length;
104
+ for (; r-- > 0; )
105
+ t = i(t, s);
106
+ return t;
107
+ }
108
+ function Tt(t) {
109
+ return t;
110
+ }
111
+ function Kt(t) {
112
+ return [...t].some((s) => s >= "a" && s <= "z") ? t.toUpperCase() : t.toLowerCase();
113
+ }
114
+ function es(t, e) {
115
+ return t.length > e ? t.slice(0, e - 3) + "..." : t;
116
+ }
117
+ function Be(t, e) {
118
+ return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = Pe.call(t), e = Pe.call(e), t < e) ? -1 : t > e ? 1 : 0;
119
+ }
120
+ function ge(t) {
121
+ return function(...e) {
122
+ return t.call(this, ...e.map(p));
123
+ };
124
+ }
125
+ function D(t) {
126
+ return function(...e) {
127
+ return t.call(this, ...e.map(ve));
128
+ };
129
+ }
130
+ function Oe(t) {
131
+ return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
132
+ }
133
+ function* re(t) {
134
+ const e = /* @__PURE__ */ new Set();
135
+ for (const s of t) {
136
+ const i = JSON.stringify(s);
137
+ e.has(i) || (e.add(i), yield s);
138
+ }
139
+ }
140
+ const Ue = "__liquidClass__";
141
+ class J extends Error {
142
+ constructor(e, s) {
143
+ 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, Ue, { value: "LiquidError", enumerable: !1 });
144
+ }
145
+ update() {
146
+ Object.defineProperty(this, "context", { value: as(this.token), enumerable: !1 }), this.message = ls(this.message, this.token), this.stack = this.message + `
147
+ ` + this.context + `
148
+ ` + this.stack, this.originalError && (this.stack += `
149
+ From ` + this.originalError.stack);
150
+ }
151
+ static is(e) {
152
+ return e?.[Ue] === "LiquidError";
153
+ }
154
+ }
155
+ class ts extends J {
156
+ constructor(e, s) {
157
+ super(e, s), this.name = "TokenizationError", super.update();
158
+ }
159
+ }
160
+ class ss extends J {
161
+ constructor(e, s) {
162
+ super(e, s), this.name = "ParseError", this.message = e.message, super.update();
163
+ }
164
+ }
165
+ class is extends J {
166
+ constructor(e, s) {
167
+ super(e, s.token), this.name = "RenderError", this.message = e.message, super.update();
168
+ }
169
+ static is(e) {
170
+ return e.name === "RenderError";
171
+ }
172
+ }
173
+ class kt extends J {
174
+ constructor(e) {
175
+ super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
176
+ const s = e.length > 1 ? "s" : "";
177
+ this.message = `${e.length} error${s} found`, super.update();
178
+ }
179
+ static is(e) {
180
+ return e.name === "LiquidErrors";
181
+ }
182
+ }
183
+ class rs extends J {
184
+ constructor(e, s) {
185
+ super(e, s), this.name = "UndefinedVariableError", this.message = e.message, super.update();
186
+ }
187
+ }
188
+ class ns extends Error {
189
+ constructor(e) {
190
+ super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
191
+ }
192
+ }
193
+ class os extends Error {
194
+ constructor(e) {
195
+ super(e), this.name = "AssertionError", this.message = e + "";
196
+ }
197
+ }
198
+ function as(t) {
199
+ const [e, s] = t.getPosition(), i = t.input.split(`
200
+ `), r = Math.max(e - 2, 1), n = Math.min(e + 3, i.length);
201
+ return wt(r, n + 1).map((a) => {
202
+ const l = a === e ? ">> " : " ", c = se(String(a), String(n).length);
203
+ let h = `${l}${c}| `;
204
+ const d = a === e ? `
205
+ ` + se("^", s + h.length) : "";
206
+ return h += i[a - 1], h += d, h;
207
+ }).join(`
208
+ `);
209
+ }
210
+ function ls(t, e) {
211
+ e.file && (t += `, file:${e.file}`);
212
+ const [s, i] = e.getPosition();
213
+ return t += `, line:${s}, col:${i}`, t;
214
+ }
215
+ const m = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], hs = 1, X = 4, He = 8, vt = 16, cs = 32, us = 64, fs = 128;
216
+ function ne(t) {
217
+ const e = t.charCodeAt(0);
218
+ return e >= 128 ? !m[e] : !!(m[e] & hs);
219
+ }
220
+ m[160] = m[5760] = m[6158] = m[8192] = m[8193] = m[8194] = m[8195] = m[8196] = m[8197] = m[8198] = m[8199] = m[8200] = m[8201] = m[8202] = m[8232] = m[8233] = m[8239] = m[8287] = m[12288] = X;
221
+ m[8220] = m[8221] = fs;
222
+ function _(t, e) {
223
+ if (!t) {
224
+ const s = typeof e == "function" ? e() : e || `expect ${t} to be true`;
225
+ throw new os(s);
226
+ }
227
+ }
228
+ function he(t, e = `unexpected ${JSON.stringify(t)}`) {
229
+ _(!t, e);
230
+ }
231
+ class ds extends Y {
232
+ equals(e) {
233
+ return O(p(e));
234
+ }
235
+ gt() {
236
+ return !1;
237
+ }
238
+ geq() {
239
+ return !1;
240
+ }
241
+ lt() {
242
+ return !1;
243
+ }
244
+ leq() {
245
+ return !1;
246
+ }
247
+ valueOf() {
248
+ return null;
249
+ }
250
+ }
251
+ class K extends Y {
252
+ equals(e) {
253
+ return e instanceof K ? !1 : (e = p(e), f(e) || S(e) ? e.length === 0 : pe(e) ? Object.keys(e).length === 0 : !1);
254
+ }
255
+ gt() {
256
+ return !1;
257
+ }
258
+ geq() {
259
+ return !1;
260
+ }
261
+ lt() {
262
+ return !1;
263
+ }
264
+ leq() {
265
+ return !1;
266
+ }
267
+ valueOf() {
268
+ return "";
269
+ }
270
+ static is(e) {
271
+ return e instanceof K;
272
+ }
273
+ }
274
+ class ze extends K {
275
+ equals(e) {
276
+ return e === !1 || O(p(e)) ? !0 : f(e) ? /^\s*$/.test(e) : super.equals(e);
277
+ }
278
+ static is(e) {
279
+ return e instanceof ze;
280
+ }
281
+ }
282
+ class Re extends Y {
283
+ constructor(e, s, i) {
284
+ super(), this.i = 0, this.length = e, this.name = `${i}-${s}`;
285
+ }
286
+ next() {
287
+ this.i++;
288
+ }
289
+ index0() {
290
+ return this.i;
291
+ }
292
+ index() {
293
+ return this.i + 1;
294
+ }
295
+ first() {
296
+ return this.i === 0;
297
+ }
298
+ last() {
299
+ return this.i === this.length - 1;
300
+ }
301
+ rindex() {
302
+ return this.length - this.i;
303
+ }
304
+ rindex0() {
305
+ return this.length - this.i - 1;
306
+ }
307
+ valueOf() {
308
+ return JSON.stringify(this);
309
+ }
310
+ }
311
+ class xt {
312
+ constructor() {
313
+ this.buffer = "";
314
+ }
315
+ write(e) {
316
+ this.buffer += u(e);
317
+ }
318
+ }
319
+ class ps {
320
+ constructor() {
321
+ throw this.buffer = "", this.stream = null, new Error("streaming not supported in browser");
322
+ }
323
+ }
324
+ class gs {
325
+ constructor() {
326
+ this.buffer = "";
327
+ }
328
+ write(e) {
329
+ e = p(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = u(this.buffer) + u(e);
330
+ }
331
+ }
332
+ class We extends Y {
333
+ constructor(e = () => "") {
334
+ super(), this.superBlockRender = e;
335
+ }
336
+ /**
337
+ * Provide parent access in child block by
338
+ * {{ block.super }}
339
+ */
340
+ *super() {
341
+ const e = new xt();
342
+ return yield this.superBlockRender(e), e.buffer;
343
+ }
344
+ }
345
+ function N(t) {
346
+ return t && v(t.equals) && v(t.gt) && v(t.geq) && v(t.lt) && v(t.leq);
347
+ }
348
+ const Ye = new ds(), St = {
349
+ true: !0,
350
+ false: !1,
351
+ nil: Ye,
352
+ null: Ye,
353
+ empty: new K(),
354
+ blank: new ze()
355
+ };
356
+ function Je(t) {
357
+ const e = {};
358
+ for (const [s, i] of Object.entries(t)) {
359
+ let r = e;
360
+ for (let n = 0; n < s.length; n++) {
361
+ const o = s[n];
362
+ r[o] = r[o] || {}, n === s.length - 1 && ne(s[n]) && (r[o].needBoundary = !0), r = r[o];
363
+ }
364
+ r.data = i, r.end = !0;
365
+ }
366
+ return e;
367
+ }
368
+ var ce = function() {
369
+ return ce = Object.assign || function(e) {
370
+ for (var s, i = 1, r = arguments.length; i < r; i++) {
371
+ s = arguments[i];
372
+ for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (e[n] = s[n]);
373
+ }
374
+ return e;
375
+ }, ce.apply(this, arguments);
376
+ };
377
+ function k(t, e, s, i) {
378
+ function r(n) {
379
+ return n instanceof s ? n : new s(function(o) {
380
+ o(n);
381
+ });
382
+ }
383
+ return new (s || (s = Promise))(function(n, o) {
384
+ function a(h) {
385
+ try {
386
+ c(i.next(h));
387
+ } catch (d) {
388
+ o(d);
389
+ }
390
+ }
391
+ function l(h) {
392
+ try {
393
+ c(i.throw(h));
394
+ } catch (d) {
395
+ o(d);
396
+ }
397
+ }
398
+ function c(h) {
399
+ h.done ? n(h.value) : r(h.value).then(a, l);
400
+ }
401
+ c((i = i.apply(t, [])).next());
402
+ });
403
+ }
404
+ function M(t) {
405
+ return k(this, void 0, void 0, function* () {
406
+ if (!le(t))
407
+ return t;
408
+ let e, s = !1, i = "next";
409
+ do {
410
+ const r = t[i](e);
411
+ s = r.done, e = r.value, i = "next";
412
+ try {
413
+ le(e) && (e = M(e)), Jt(e) && (e = yield e);
414
+ } catch (n) {
415
+ i = "throw", e = n;
416
+ }
417
+ } while (!s);
418
+ return e;
419
+ });
420
+ }
421
+ function V(t) {
422
+ if (!le(t))
423
+ return t;
424
+ let e, s = !1, i = "next";
425
+ do {
426
+ const r = t[i](e);
427
+ if (s = r.done, e = r.value, i = "next", le(e))
428
+ try {
429
+ e = V(e);
430
+ } catch (n) {
431
+ i = "throw", e = n;
432
+ }
433
+ } while (!s);
434
+ return e;
435
+ }
436
+ const ms = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
437
+ function ys(t) {
438
+ return [31, ws(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
439
+ }
440
+ function _t(t) {
441
+ let e = 0;
442
+ for (let s = 0; s < t.getMonth(); ++s)
443
+ e += ys(t)[s];
444
+ return e + t.getDate();
445
+ }
446
+ function Ze(t, e) {
447
+ const s = _t(t) + (e - t.getDay()), r = 7 - new Date(t.getFullYear(), 0, 1).getDay() + e;
448
+ return String(Math.floor((s - r) / 7) + 1);
449
+ }
450
+ function ws(t) {
451
+ const e = t.getFullYear();
452
+ return !!((e & 3) === 0 && (e % 100 || e % 400 === 0 && e));
453
+ }
454
+ function bs(t) {
455
+ const e = t.getDate();
456
+ if ([11, 12, 13].includes(e))
457
+ return "th";
458
+ switch (e % 10) {
459
+ case 1:
460
+ return "st";
461
+ case 2:
462
+ return "nd";
463
+ case 3:
464
+ return "rd";
465
+ default:
466
+ return "th";
467
+ }
468
+ }
469
+ function Ts(t) {
470
+ return parseInt(t.getFullYear().toString().substring(0, 2), 10);
471
+ }
472
+ const ks = {
473
+ d: 2,
474
+ e: 2,
475
+ H: 2,
476
+ I: 2,
477
+ j: 3,
478
+ k: 2,
479
+ l: 2,
480
+ L: 3,
481
+ m: 2,
482
+ M: 2,
483
+ S: 2,
484
+ U: 2,
485
+ W: 2
486
+ }, vs = new Set("aAbBceklpP");
487
+ function Qe(t, e) {
488
+ const s = Math.abs(t.getTimezoneOffset()), i = Math.floor(s / 60), r = s % 60;
489
+ return (t.getTimezoneOffset() > 0 ? "-" : "+") + se(i, 2, "0") + (e.flags[":"] ? ":" : "") + se(r, 2, "0");
490
+ }
491
+ const xe = {
492
+ a: (t) => t.getShortWeekdayName(),
493
+ A: (t) => t.getLongWeekdayName(),
494
+ b: (t) => t.getShortMonthName(),
495
+ B: (t) => t.getLongMonthName(),
496
+ c: (t) => t.toLocaleString(),
497
+ C: (t) => Ts(t),
498
+ d: (t) => t.getDate(),
499
+ e: (t) => t.getDate(),
500
+ H: (t) => t.getHours(),
501
+ I: (t) => String(t.getHours() % 12 || 12),
502
+ j: (t) => _t(t),
503
+ k: (t) => t.getHours(),
504
+ l: (t) => String(t.getHours() % 12 || 12),
505
+ L: (t) => t.getMilliseconds(),
506
+ m: (t) => t.getMonth() + 1,
507
+ M: (t) => t.getMinutes(),
508
+ N: (t, e) => {
509
+ const s = Number(e.width) || 9, i = String(t.getMilliseconds()).slice(0, s);
510
+ return Xt(i, s, "0");
511
+ },
512
+ p: (t) => t.getHours() < 12 ? "AM" : "PM",
513
+ P: (t) => t.getHours() < 12 ? "am" : "pm",
514
+ q: (t) => bs(t),
515
+ s: (t) => Math.round(t.getTime() / 1e3),
516
+ S: (t) => t.getSeconds(),
517
+ u: (t) => t.getDay() || 7,
518
+ U: (t) => Ze(t, 0),
519
+ w: (t) => t.getDay(),
520
+ W: (t) => Ze(t, 1),
521
+ x: (t) => t.toLocaleDateString(),
522
+ X: (t) => t.toLocaleTimeString(),
523
+ y: (t) => t.getFullYear().toString().slice(2, 4),
524
+ Y: (t) => t.getFullYear(),
525
+ z: Qe,
526
+ Z: (t, e) => t.getTimeZoneName() || Qe(t, e),
527
+ t: () => " ",
528
+ n: () => `
529
+ `,
530
+ "%": () => "%"
531
+ };
532
+ xe.h = xe.b;
533
+ function oe(t, e) {
534
+ let s = "", i = e, r;
535
+ for (; r = ms.exec(i); )
536
+ s += i.slice(0, r.index), i = i.slice(r.index + r[0].length), s += xs(t, r);
537
+ return s + i;
538
+ }
539
+ function xs(t, e) {
540
+ const [s, i = "", r, n, o] = e, a = xe[o];
541
+ if (!a)
542
+ return s;
543
+ const l = {};
544
+ for (const g of i)
545
+ l[g] = !0;
546
+ let c = String(a(t, { flags: l, width: r, modifier: n })), h = vs.has(o) ? " " : "0", d = r || ks[o] || 0;
547
+ return l["^"] ? c = c.toUpperCase() : l["#"] && (c = Kt(c)), l._ ? h = " " : l[0] && (h = "0"), l["-"] && (d = 0), se(c, d, h);
548
+ }
549
+ function Ft() {
550
+ return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
551
+ }
552
+ const Ss = 6e4, _s = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, Lt = [
553
+ "January",
554
+ "February",
555
+ "March",
556
+ "April",
557
+ "May",
558
+ "June",
559
+ "July",
560
+ "August",
561
+ "September",
562
+ "October",
563
+ "November",
564
+ "December"
565
+ ], Fs = Lt.map((t) => t.slice(0, 3)), Ot = [
566
+ "Sunday",
567
+ "Monday",
568
+ "Tuesday",
569
+ "Wednesday",
570
+ "Thursday",
571
+ "Friday",
572
+ "Saturday"
573
+ ], Ls = Ot.map((t) => t.slice(0, 3));
574
+ class R {
575
+ constructor(e, s, i) {
576
+ this.locale = s, this.DateTimeFormat = Ft(), this.date = new Date(e), this.timezoneFixed = i !== void 0, i === void 0 && (i = this.date.getTimezoneOffset()), this.timezoneOffset = f(i) ? R.getTimezoneOffset(i, this.date) : i, this.timezoneName = f(i) ? i : "";
577
+ const r = (this.date.getTimezoneOffset() - this.timezoneOffset) * Ss, n = this.date.getTime() + r;
578
+ this.displayDate = new Date(n);
579
+ }
580
+ getTime() {
581
+ return this.displayDate.getTime();
582
+ }
583
+ getMilliseconds() {
584
+ return this.displayDate.getMilliseconds();
585
+ }
586
+ getSeconds() {
587
+ return this.displayDate.getSeconds();
588
+ }
589
+ getMinutes() {
590
+ return this.displayDate.getMinutes();
591
+ }
592
+ getHours() {
593
+ return this.displayDate.getHours();
594
+ }
595
+ getDay() {
596
+ return this.displayDate.getDay();
597
+ }
598
+ getDate() {
599
+ return this.displayDate.getDate();
600
+ }
601
+ getMonth() {
602
+ return this.displayDate.getMonth();
603
+ }
604
+ getFullYear() {
605
+ return this.displayDate.getFullYear();
606
+ }
607
+ toLocaleString(e, s) {
608
+ return s?.timeZone ? this.date.toLocaleString(e, s) : this.displayDate.toLocaleString(e, s);
609
+ }
610
+ toLocaleTimeString(e) {
611
+ return this.displayDate.toLocaleTimeString(e);
612
+ }
613
+ toLocaleDateString(e) {
614
+ return this.displayDate.toLocaleDateString(e);
615
+ }
616
+ getTimezoneOffset() {
617
+ return this.timezoneOffset;
618
+ }
619
+ getTimeZoneName() {
620
+ if (this.timezoneFixed)
621
+ return this.timezoneName;
622
+ if (this.DateTimeFormat)
623
+ return this.DateTimeFormat().resolvedOptions().timeZone;
624
+ }
625
+ getLongMonthName() {
626
+ var e;
627
+ return (e = this.format({ month: "long" })) !== null && e !== void 0 ? e : Lt[this.getMonth()];
628
+ }
629
+ getShortMonthName() {
630
+ var e;
631
+ return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e : Fs[this.getMonth()];
632
+ }
633
+ getLongWeekdayName() {
634
+ var e;
635
+ return (e = this.format({ weekday: "long" })) !== null && e !== void 0 ? e : Ot[this.displayDate.getDay()];
636
+ }
637
+ getShortWeekdayName() {
638
+ var e;
639
+ return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e : Ls[this.displayDate.getDay()];
640
+ }
641
+ valid() {
642
+ return !isNaN(this.getTime());
643
+ }
644
+ format(e) {
645
+ return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
646
+ }
647
+ /**
648
+ * Create a Date object fixed to it's declared Timezone. Both
649
+ * - 2021-08-06T02:29:00.000Z and
650
+ * - 2021-08-06T02:29:00.000+08:00
651
+ * will always be displayed as
652
+ * - 2021-08-06 02:29:00
653
+ * regardless timezoneOffset in JavaScript realm
654
+ *
655
+ * The implementation hack:
656
+ * Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
657
+ * we create a different Date to trick strftime, it's both simpler and more performant.
658
+ * Given that a template is expected to be parsed fewer times than rendered.
659
+ */
660
+ static createDateFixedToTimezone(e, s) {
661
+ const i = e.match(_s);
662
+ if (i && i[1] === "Z")
663
+ return new R(+new Date(e), s, 0);
664
+ if (i && i[2] && i[3] && i[4]) {
665
+ const [, , r, n, o] = i, a = (r === "+" ? -1 : 1) * (parseInt(n, 10) * 60 + parseInt(o, 10));
666
+ return new R(+new Date(e), s, a);
667
+ }
668
+ return new R(e, s);
669
+ }
670
+ static getTimezoneOffset(e, s) {
671
+ const i = s.toLocaleString("en-US", { timeZone: e }), r = s.toLocaleString("en-US", { timeZone: "UTC" }), n = new Date(i);
672
+ return (+new Date(r) - +n) / (60 * 1e3);
673
+ }
674
+ }
675
+ class Se {
676
+ constructor(e, s) {
677
+ this.base = 0, this.message = `${e} limit exceeded`, this.limit = s;
678
+ }
679
+ use(e) {
680
+ e = +e || 0, _(this.base + e <= this.limit, this.message), this.base += e;
681
+ }
682
+ check(e) {
683
+ e = +e || 0, _(e <= this.limit, this.message);
684
+ }
685
+ }
686
+ class Ee extends z {
687
+ constructor(e, [s, i], r, n, o, a, l, c) {
688
+ super(e, r, n, o, c), this.trimLeft = !1, this.trimRight = !1;
689
+ const h = r[s] === "-", d = r[i - 1] === "-";
690
+ let g = h ? s + 1 : s, w = d ? i - 1 : i;
691
+ for (; g < w && m[r.charCodeAt(g)] & X; )
692
+ g++;
693
+ for (; w > g && m[r.charCodeAt(w - 1)] & X; )
694
+ w--;
695
+ this.contentRange = [g, w], this.trimLeft = h || a, this.trimRight = d || l;
696
+ }
697
+ get content() {
698
+ return this.input.slice(this.contentRange[0], this.contentRange[1]);
699
+ }
700
+ }
701
+ class Ge extends Ee {
702
+ constructor(e, s, i, r, n) {
703
+ const { trimTagLeft: o, trimTagRight: a, tagDelimiterLeft: l, tagDelimiterRight: c } = r, [h, d] = [s + l.length, i - c.length];
704
+ super(y.Tag, [h, d], e, s, i, o, a, n), this.tokenizer = new A(e, r.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal tag syntax, tag name expected"), this.tokenizer.skipBlank(), this.args = this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
705
+ }
706
+ }
707
+ class Os extends Ee {
708
+ constructor(e, s, i, r, n) {
709
+ const { trimOutputLeft: o, trimOutputRight: a, outputDelimiterLeft: l, outputDelimiterRight: c } = r, h = [s + l.length, i - c.length];
710
+ super(y.Output, h, e, s, i, o, a, n);
711
+ }
712
+ }
713
+ class Xe extends z {
714
+ constructor(e, s, i, r) {
715
+ super(y.HTML, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.trimLeft = 0, this.trimRight = 0;
716
+ }
717
+ getContent() {
718
+ return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
719
+ }
720
+ }
721
+ class zs extends z {
722
+ constructor(e, s, i, r) {
723
+ super(y.Number, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.content = Number(this.getText());
724
+ }
725
+ }
726
+ class we extends z {
727
+ constructor(e, s, i, r) {
728
+ super(y.Word, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.content = this.getText();
729
+ }
730
+ }
731
+ class Rs extends z {
732
+ constructor(e, s, i, r) {
733
+ super(y.Literal, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.literal = this.getText(), this.content = St[this.literal];
734
+ }
735
+ }
736
+ const Ke = {
737
+ "==": 2,
738
+ "!=": 2,
739
+ ">": 2,
740
+ "<": 2,
741
+ ">=": 2,
742
+ "<=": 2,
743
+ contains: 2,
744
+ not: 1,
745
+ and: 0,
746
+ or: 0
747
+ }, Es = {
748
+ "==": 0,
749
+ "!=": 0,
750
+ ">": 0,
751
+ "<": 0,
752
+ ">=": 0,
753
+ "<=": 0,
754
+ contains: 0,
755
+ not: 1,
756
+ and: 0,
757
+ or: 0
758
+ /* OperatorType.Binary */
759
+ };
760
+ class Ns extends z {
761
+ constructor(e, s, i, r) {
762
+ super(y.Operator, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.operator = this.getText();
763
+ }
764
+ getPrecedence() {
765
+ const e = this.getText();
766
+ return e in Ke ? Ke[e] : 1;
767
+ }
768
+ }
769
+ class et extends z {
770
+ constructor(e, s, i, r, n, o) {
771
+ super(y.PropertyAccess, i, r, n, o), this.variable = e, this.props = s;
772
+ }
773
+ }
774
+ class zt extends z {
775
+ constructor(e, s, i, r, n, o) {
776
+ super(y.Filter, i, r, n, o), this.name = e, this.args = s;
777
+ }
778
+ }
779
+ class As extends z {
780
+ constructor(e, s, i, r, n, o) {
781
+ super(y.Hash, e, s, i, o), this.input = e, this.begin = s, this.end = i, this.name = r, this.value = n, this.file = o;
782
+ }
783
+ }
784
+ const Ds = /[\da-fA-F]/, tt = /[0-7]/, st = {
785
+ b: "\b",
786
+ f: "\f",
787
+ n: `
788
+ `,
789
+ r: "\r",
790
+ t: " ",
791
+ v: "\v"
792
+ };
793
+ function it(t) {
794
+ const e = t.charCodeAt(0);
795
+ return e >= 97 ? e - 87 : e >= 65 ? e - 55 : e - 48;
796
+ }
797
+ function Ms(t) {
798
+ let e = "";
799
+ for (let s = 1; s < t.length - 1; s++) {
800
+ if (t[s] !== "\\") {
801
+ e += t[s];
802
+ continue;
803
+ }
804
+ if (st[t[s + 1]] !== void 0)
805
+ e += st[t[++s]];
806
+ else if (t[s + 1] === "u") {
807
+ let i = 0, r = s + 2;
808
+ for (; r <= s + 5 && Ds.test(t[r]); )
809
+ i = i * 16 + it(t[r++]);
810
+ s = r - 1, e += String.fromCharCode(i);
811
+ } else if (!tt.test(t[s + 1]))
812
+ e += t[++s];
813
+ else {
814
+ let i = s + 1, r = 0;
815
+ for (; i <= s + 3 && tt.test(t[i]); )
816
+ r = r * 8 + it(t[i++]);
817
+ s = i - 1, e += String.fromCharCode(r);
818
+ }
819
+ }
820
+ return e;
821
+ }
822
+ class Vs extends z {
823
+ constructor(e, s, i, r) {
824
+ super(y.Quoted, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.content = Ms(this.getText());
825
+ }
826
+ }
827
+ class qs extends z {
828
+ constructor(e, s, i, r, n, o) {
829
+ super(y.Range, e, s, i, o), this.input = e, this.begin = s, this.end = i, this.lhs = r, this.rhs = n, this.file = o;
830
+ }
831
+ }
832
+ class js extends Ee {
833
+ constructor(e, s, i, r, n) {
834
+ super(y.Tag, [s, i], e, s, i, !1, !1, n), this.tokenizer = new A(e, r.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank();
835
+ }
836
+ get args() {
837
+ return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
838
+ }
839
+ }
840
+ class Cs extends z {
841
+ constructor(e, s, i, r, n, o) {
842
+ super(y.FilteredValue, i, r, n, o), this.initial = e, this.filters = s, this.input = i, this.begin = r, this.end = n, this.file = o;
843
+ }
844
+ }
845
+ const $s = {
846
+ now: () => Date.now()
847
+ };
848
+ function Rt() {
849
+ return typeof global == "object" && global.performance || typeof window == "object" && window.performance || $s;
850
+ }
851
+ class Ps {
852
+ renderTemplatesToNodeStream(e, s) {
853
+ const i = new ps();
854
+ return Promise.resolve().then(() => M(this.renderTemplates(e, s, i))).then(() => i.end(), (r) => i.error(r)), i.stream;
855
+ }
856
+ *renderTemplates(e, s, i) {
857
+ i || (i = s.opts.keepOutputType ? new gs() : new xt());
858
+ const r = [];
859
+ for (const n of e) {
860
+ s.renderLimit.check(Rt().now());
861
+ try {
862
+ const o = yield n.render(s, i);
863
+ if (o && i.write(o), s.breakCalled || s.continueCalled)
864
+ break;
865
+ } catch (o) {
866
+ const a = J.is(o) ? o : new is(o, n);
867
+ if (s.opts.catchAllErrors)
868
+ r.push(a);
869
+ else
870
+ throw a;
871
+ }
872
+ }
873
+ if (r.length)
874
+ throw new kt(r);
875
+ return i.buffer;
876
+ }
877
+ }
878
+ class Is {
879
+ constructor(e) {
880
+ this.postfix = [...Ws(e)];
881
+ }
882
+ *evaluate(e, s) {
883
+ _(e, "unable to evaluate: context not defined");
884
+ const i = [];
885
+ for (const r of this.postfix)
886
+ if (qt(r)) {
887
+ const n = i.pop();
888
+ let o;
889
+ if (Es[r.operator] === 1)
890
+ o = yield e.opts.operators[r.operator](n, e);
891
+ else {
892
+ const a = i.pop();
893
+ o = yield e.opts.operators[r.operator](a, n, e);
894
+ }
895
+ i.push(o);
896
+ } else
897
+ i.push(yield T(r, e, s));
898
+ return i[0];
899
+ }
900
+ valid() {
901
+ return !!this.postfix.length;
902
+ }
903
+ }
904
+ function* T(t, e, s = !1) {
905
+ if (t) {
906
+ if ("content" in t)
907
+ return t.content;
908
+ if (fe(t))
909
+ return yield Bs(t, e, s);
910
+ if (jt(t))
911
+ return yield Hs(t, e);
912
+ }
913
+ }
914
+ function* Bs(t, e, s) {
915
+ const i = [];
916
+ for (const r of t.props)
917
+ i.push(yield T(r, e, !1));
918
+ try {
919
+ if (t.variable) {
920
+ const r = yield T(t.variable, e, s);
921
+ return yield e._getFromScope(r, i);
922
+ } else
923
+ return yield e._get(i);
924
+ } catch (r) {
925
+ if (s && r.name === "InternalUndefinedVariableError")
926
+ return null;
927
+ throw new rs(r, t);
928
+ }
929
+ }
930
+ function Us(t) {
931
+ return t.content;
932
+ }
933
+ function* Hs(t, e) {
934
+ const s = yield T(t.lhs, e), i = yield T(t.rhs, e);
935
+ return e.memoryLimit.use(i - s + 1), wt(+s, +i + 1);
936
+ }
937
+ function* Ws(t) {
938
+ const e = [];
939
+ for (const s of t)
940
+ if (qt(s)) {
941
+ for (; e.length && e[e.length - 1].getPrecedence() > s.getPrecedence(); )
942
+ yield e.pop();
943
+ e.push(s);
944
+ } else
945
+ yield s;
946
+ for (; e.length; )
947
+ yield e.pop();
948
+ }
949
+ function B(t, e) {
950
+ return !me(t, e);
951
+ }
952
+ function me(t, e) {
953
+ return t = p(t), e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
954
+ }
955
+ const Ys = {
956
+ "==": q,
957
+ "!=": (t, e) => !q(t, e),
958
+ ">": (t, e) => N(t) ? t.gt(e) : N(e) ? e.lt(t) : p(t) > p(e),
959
+ "<": (t, e) => N(t) ? t.lt(e) : N(e) ? e.gt(t) : p(t) < p(e),
960
+ ">=": (t, e) => N(t) ? t.geq(e) : N(e) ? e.leq(t) : p(t) >= p(e),
961
+ "<=": (t, e) => N(t) ? t.leq(e) : N(e) ? e.geq(t) : p(t) <= p(e),
962
+ contains: (t, e) => (t = p(t), S(t) ? t.some((s) => q(s, e)) : v(t?.indexOf) ? t.indexOf(p(e)) > -1 : !1),
963
+ not: (t, e) => me(p(t), e),
964
+ and: (t, e, s) => B(p(t), s) && B(p(e), s),
965
+ or: (t, e, s) => B(p(t), s) || B(p(e), s)
966
+ };
967
+ function q(t, e) {
968
+ return N(t) ? t.equals(e) : N(e) ? e.equals(t) : (t = p(t), e = p(e), S(t) ? S(e) && Js(t, e) : t === e);
969
+ }
970
+ function Js(t, e) {
971
+ return t.length !== e.length ? !1 : !t.some((s, i) => !q(s, e[i]));
972
+ }
973
+ function Zs(t, e) {
974
+ return t.some((s) => q(s, e));
975
+ }
976
+ class be {
977
+ constructor(e, s, i, r) {
978
+ this.key = e, this.value = s, this.next = i, this.prev = r;
979
+ }
980
+ }
981
+ class rt {
982
+ constructor(e, s = 0) {
983
+ this.limit = e, this.size = s, this.cache = {}, this.head = new be("HEAD", null, null, null), this.tail = new be("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
984
+ }
985
+ write(e, s) {
986
+ if (this.cache[e])
987
+ this.cache[e].value = s;
988
+ else {
989
+ const i = new be(e, s, this.head.next, this.head);
990
+ this.head.next.prev = i, this.head.next = i, this.cache[e] = i, this.size++, this.ensureLimit();
991
+ }
992
+ }
993
+ read(e) {
994
+ if (!this.cache[e])
995
+ return;
996
+ const { value: s } = this.cache[e];
997
+ return this.remove(e), this.write(e, s), s;
998
+ }
999
+ remove(e) {
1000
+ const s = this.cache[e];
1001
+ s.prev.next = s.next, s.next.prev = s.prev, delete this.cache[e], this.size--;
1002
+ }
1003
+ clear() {
1004
+ this.head.next = this.tail, this.tail.prev = this.head, this.size = 0, this.cache = {};
1005
+ }
1006
+ ensureLimit() {
1007
+ this.size > this.limit && this.remove(this.tail.prev.key);
1008
+ }
1009
+ }
1010
+ function Et(t, e) {
1011
+ const s = document.createElement("base");
1012
+ s.href = t;
1013
+ const i = document.getElementsByTagName("head")[0];
1014
+ i.insertBefore(s, i.firstChild);
1015
+ const r = document.createElement("a");
1016
+ r.href = e;
1017
+ const n = r.href;
1018
+ return i.removeChild(s), n;
1019
+ }
1020
+ function Qs(t, e, s) {
1021
+ return t.length && yt(t) !== "/" && (t += "/"), Et(t, e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (r, n, o) => {
1022
+ const a = o.split("/").pop();
1023
+ return /\.\w+$/.test(a) ? r : n + o + s;
1024
+ });
1025
+ }
1026
+ function Gs(t) {
1027
+ return k(this, void 0, void 0, function* () {
1028
+ return new Promise((e, s) => {
1029
+ const i = new XMLHttpRequest();
1030
+ i.onload = () => {
1031
+ i.status >= 200 && i.status < 300 ? e(i.responseText) : s(new Error(i.statusText));
1032
+ }, i.onerror = () => {
1033
+ s(new Error("An error occurred whilst receiving the response."));
1034
+ }, i.open("GET", t), i.send();
1035
+ });
1036
+ });
1037
+ }
1038
+ function Xs(t) {
1039
+ const e = new XMLHttpRequest();
1040
+ if (e.open("GET", t, !1), e.send(), e.status < 200 || e.status >= 300)
1041
+ throw new Error(e.statusText);
1042
+ return e.responseText;
1043
+ }
1044
+ function Ks(t) {
1045
+ return k(this, void 0, void 0, function* () {
1046
+ return !0;
1047
+ });
1048
+ }
1049
+ function ei(t) {
1050
+ return !0;
1051
+ }
1052
+ function ti(t) {
1053
+ return Et(t, ".");
1054
+ }
1055
+ const si = "/";
1056
+ var ii = /* @__PURE__ */ Object.freeze({
1057
+ __proto__: null,
1058
+ resolve: Qs,
1059
+ readFile: Gs,
1060
+ readFileSync: Xs,
1061
+ exists: Ks,
1062
+ existsSync: ei,
1063
+ dirname: ti,
1064
+ sep: si
1065
+ });
1066
+ function ri(t, e, ...s) {
1067
+ return t = p(t), S(t) || f(t) ? t.length ? t : e : t === !1 && new Map(s).get("allow_false") ? !1 : me(t, this.context) ? e : t;
1068
+ }
1069
+ function nt(t, e = 0) {
1070
+ return JSON.stringify(t, null, e);
1071
+ }
1072
+ function ni(t, e = 0) {
1073
+ const s = [];
1074
+ return JSON.stringify(t, function(i, r) {
1075
+ if (typeof r != "object" || r === null)
1076
+ return r;
1077
+ for (; s.length > 0 && s[s.length - 1] !== this; )
1078
+ s.pop();
1079
+ return s.includes(r) ? "[Circular]" : (s.push(r), r);
1080
+ }, e);
1081
+ }
1082
+ function oi(t) {
1083
+ return Number(t);
1084
+ }
1085
+ const ai = {
1086
+ raw: !0,
1087
+ handler: Tt
1088
+ };
1089
+ var Nt = {
1090
+ default: ri,
1091
+ raw: ai,
1092
+ jsonify: nt,
1093
+ to_integer: oi,
1094
+ json: nt,
1095
+ inspect: ni
1096
+ };
1097
+ const li = {
1098
+ "&": "&amp;",
1099
+ "<": "&lt;",
1100
+ ">": "&gt;",
1101
+ '"': "&#34;",
1102
+ "'": "&#39;"
1103
+ }, hi = {
1104
+ "&amp;": "&",
1105
+ "&lt;": "<",
1106
+ "&gt;": ">",
1107
+ "&#34;": '"',
1108
+ "&#39;": "'"
1109
+ };
1110
+ function ye(t) {
1111
+ return t = u(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) => li[e]);
1112
+ }
1113
+ function ci(t) {
1114
+ return ye.call(this, t);
1115
+ }
1116
+ function ui(t) {
1117
+ return t = u(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) => hi[e]);
1118
+ }
1119
+ function fi(t) {
1120
+ return ye.call(this, ui.call(this, t));
1121
+ }
1122
+ function di(t) {
1123
+ const e = u(t);
1124
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, `<br />
1125
+ `);
1126
+ }
1127
+ function pi(t) {
1128
+ const e = u(t);
1129
+ return this.context.memoryLimit.use(e.length), e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
1130
+ }
1131
+ var gi = /* @__PURE__ */ Object.freeze({
1132
+ __proto__: null,
1133
+ escape: ye,
1134
+ xml_escape: ci,
1135
+ escape_once: fi,
1136
+ newline_to_br: di,
1137
+ strip_html: pi
1138
+ });
1139
+ class mi {
1140
+ constructor(e) {
1141
+ this.mapping = e, this.sep = "/";
1142
+ }
1143
+ exists(e) {
1144
+ return k(this, void 0, void 0, function* () {
1145
+ return this.existsSync(e);
1146
+ });
1147
+ }
1148
+ existsSync(e) {
1149
+ return !O(this.mapping[e]);
1150
+ }
1151
+ readFile(e) {
1152
+ return k(this, void 0, void 0, function* () {
1153
+ return this.readFileSync(e);
1154
+ });
1155
+ }
1156
+ readFileSync(e) {
1157
+ const s = this.mapping[e];
1158
+ if (O(s))
1159
+ throw new Error(`ENOENT: ${e}`);
1160
+ return s;
1161
+ }
1162
+ dirname(e) {
1163
+ const s = e.split(this.sep);
1164
+ return s.pop(), s.join(this.sep);
1165
+ }
1166
+ resolve(e, s, i) {
1167
+ if (s += i, e === ".")
1168
+ return s;
1169
+ const r = e.split(/\/+/);
1170
+ for (const n of s.split(this.sep))
1171
+ n === "." || n === "" || (n === ".." ? (r.length > 1 || r[0] !== "") && r.pop() : r.push(n));
1172
+ return r.join(this.sep);
1173
+ }
1174
+ }
1175
+ const Q = {
1176
+ root: ["."],
1177
+ layouts: ["."],
1178
+ partials: ["."],
1179
+ relativeReference: !0,
1180
+ jekyllInclude: !1,
1181
+ keyValueSeparator: ":",
1182
+ cache: void 0,
1183
+ extname: "",
1184
+ fs: ii,
1185
+ dynamicPartials: !0,
1186
+ jsTruthy: !1,
1187
+ dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
1188
+ locale: "",
1189
+ trimTagRight: !1,
1190
+ trimTagLeft: !1,
1191
+ trimOutputRight: !1,
1192
+ trimOutputLeft: !1,
1193
+ greedy: !0,
1194
+ tagDelimiterLeft: "{%",
1195
+ tagDelimiterRight: "%}",
1196
+ outputDelimiterLeft: "{{",
1197
+ outputDelimiterRight: "}}",
1198
+ preserveTimezones: !1,
1199
+ strictFilters: !1,
1200
+ strictVariables: !1,
1201
+ ownPropertyOnly: !0,
1202
+ lenientIf: !1,
1203
+ globals: {},
1204
+ keepOutputType: !1,
1205
+ operators: Ys,
1206
+ memoryLimit: 1 / 0,
1207
+ parseLimit: 1 / 0,
1208
+ renderLimit: 1 / 0
1209
+ };
1210
+ function yi(t) {
1211
+ var e, s;
1212
+ if (t.hasOwnProperty("root") && (t.hasOwnProperty("partials") || (t.partials = t.root), t.hasOwnProperty("layouts") || (t.layouts = t.root)), t.hasOwnProperty("cache")) {
1213
+ let i;
1214
+ typeof t.cache == "number" ? i = t.cache > 0 ? new rt(t.cache) : void 0 : typeof t.cache == "object" ? i = t.cache : i = t.cache ? new rt(1024) : void 0, t.cache = i;
1215
+ }
1216
+ return t = Object.assign(Object.assign(Object.assign({}, 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 = ae(t.root), t.partials = ae(t.partials), t.layouts = ae(t.layouts), t.outputEscape = t.outputEscape && wi(t.outputEscape), t.locale || (t.locale = (s = (e = Ft()) === null || e === void 0 ? void 0 : e().resolvedOptions().locale) !== null && s !== void 0 ? s : "en-US"), t.templates && (t.fs = new mi(t.templates), t.relativeReference = !0, t.root = t.partials = t.layouts = "."), t;
1217
+ }
1218
+ function wi(t) {
1219
+ return t === "escape" ? ye : t === "json" ? Nt.json : (_(v(t), "`outputEscape` need to be of type string or function"), t);
1220
+ }
1221
+ function ae(t) {
1222
+ let e = [];
1223
+ return S(t) && (e = t), f(t) && (e = [t]), e;
1224
+ }
1225
+ function bi(t, e) {
1226
+ let s = !1;
1227
+ for (let i = 0; i < t.length; i++) {
1228
+ const r = t[i];
1229
+ Oi(r) && (!s && r.trimLeft && Ti(t[i - 1], e.greedy), Z(r) && (r.name === "raw" ? s = !0 : r.name === "endraw" && (s = !1)), !s && r.trimRight && ki(t[i + 1], e.greedy));
1230
+ }
1231
+ }
1232
+ function Ti(t, e) {
1233
+ if (!t || !Ae(t))
1234
+ return;
1235
+ const s = e ? X : vt;
1236
+ for (; m[t.input.charCodeAt(t.end - 1 - t.trimRight)] & s; )
1237
+ t.trimRight++;
1238
+ }
1239
+ function ki(t, e) {
1240
+ if (!t || !Ae(t))
1241
+ return;
1242
+ const s = e ? X : vt;
1243
+ for (; m[t.input.charCodeAt(t.begin + t.trimLeft)] & s; )
1244
+ t.trimLeft++;
1245
+ t.input.charAt(t.begin + t.trimLeft) === `
1246
+ ` && t.trimLeft++;
1247
+ }
1248
+ class A {
1249
+ constructor(e, s = Q.operators, i, r) {
1250
+ this.input = e, this.file = i, this.rawBeginAt = -1, this.p = r ? r[0] : 0, this.N = r ? r[1] : e.length, this.opTrie = Je(s), this.literalTrie = Je(St);
1251
+ }
1252
+ readExpression() {
1253
+ return new Is(this.readExpressionTokens());
1254
+ }
1255
+ *readExpressionTokens() {
1256
+ for (; this.p < this.N; ) {
1257
+ const e = this.readOperator();
1258
+ if (e) {
1259
+ yield e;
1260
+ continue;
1261
+ }
1262
+ const s = this.readValue();
1263
+ if (s) {
1264
+ yield s;
1265
+ continue;
1266
+ }
1267
+ return;
1268
+ }
1269
+ }
1270
+ readOperator() {
1271
+ this.skipBlank();
1272
+ const e = this.matchTrie(this.opTrie);
1273
+ if (e !== -1)
1274
+ return new Ns(this.input, this.p, this.p = e, this.file);
1275
+ }
1276
+ matchTrie(e) {
1277
+ let s = e, i = this.p, r;
1278
+ for (; s[this.input[i]] && i < this.N; )
1279
+ s = s[this.input[i++]], s.end && (r = s);
1280
+ return !r || r.needBoundary && ne(this.peek(i - this.p)) ? -1 : i;
1281
+ }
1282
+ readFilteredValue() {
1283
+ const e = this.p, s = this.readExpression();
1284
+ this.assert(s.valid(), `invalid value expression: ${this.snapshot()}`);
1285
+ const i = this.readFilters();
1286
+ return new Cs(s, i, this.input, e, this.p, this.file);
1287
+ }
1288
+ readFilters() {
1289
+ const e = [];
1290
+ for (; ; ) {
1291
+ const s = this.readFilter();
1292
+ if (!s)
1293
+ return e;
1294
+ e.push(s);
1295
+ }
1296
+ }
1297
+ readFilter() {
1298
+ if (this.skipBlank(), this.end())
1299
+ return null;
1300
+ this.assert(this.read() === "|", 'expected "|" before filter');
1301
+ const e = this.readIdentifier();
1302
+ if (!e.size())
1303
+ return this.assert(this.end(), "expected filter name"), null;
1304
+ const s = [];
1305
+ if (this.skipBlank(), this.peek() === ":")
1306
+ do {
1307
+ ++this.p;
1308
+ const i = this.readFilterArg();
1309
+ i && s.push(i), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
1310
+ } while (this.peek() === ",");
1311
+ else if (!(this.peek() === "|" || this.end())) throw this.error('expected ":" after filter name');
1312
+ return new zt(e.getText(), s, this.input, e.begin, this.p, this.file);
1313
+ }
1314
+ readFilterArg() {
1315
+ const e = this.readValue();
1316
+ if (!e)
1317
+ return;
1318
+ if (this.skipBlank(), this.peek() !== ":")
1319
+ return e;
1320
+ ++this.p;
1321
+ const s = this.readValue();
1322
+ return [e.getText(), s];
1323
+ }
1324
+ readTopLevelTokens(e = Q) {
1325
+ const s = [];
1326
+ for (; this.p < this.N; ) {
1327
+ const i = this.readTopLevelToken(e);
1328
+ s.push(i);
1329
+ }
1330
+ return bi(s, e), s;
1331
+ }
1332
+ readTopLevelToken(e) {
1333
+ const { tagDelimiterLeft: s, outputDelimiterLeft: i } = e;
1334
+ return this.rawBeginAt > -1 ? this.readEndrawOrRawContent(e) : this.match(s) ? this.readTagToken(e) : this.match(i) ? this.readOutputToken(e) : this.readHTMLToken([s, i]);
1335
+ }
1336
+ readHTMLToken(e) {
1337
+ const s = this.p;
1338
+ for (; this.p < this.N && !e.some((i) => this.match(i)); )
1339
+ ++this.p;
1340
+ return new Xe(this.input, s, this.p, this.file);
1341
+ }
1342
+ readTagToken(e) {
1343
+ const { file: s, input: i } = this, r = this.p;
1344
+ if (this.readToDelimiter(e.tagDelimiterRight) === -1)
1345
+ throw this.error(`tag ${this.snapshot(r)} not closed`, r);
1346
+ const n = new Ge(i, r, this.p, e, s);
1347
+ return n.name === "raw" && (this.rawBeginAt = r), n;
1348
+ }
1349
+ readToDelimiter(e, s = !1) {
1350
+ for (this.skipBlank(); this.p < this.N; ) {
1351
+ if (s && this.peekType() & He) {
1352
+ this.readQuoted();
1353
+ continue;
1354
+ }
1355
+ if (++this.p, this.rmatch(e))
1356
+ return this.p;
1357
+ }
1358
+ return -1;
1359
+ }
1360
+ readOutputToken(e = Q) {
1361
+ const { file: s, input: i } = this, { outputDelimiterRight: r } = e, n = this.p;
1362
+ if (this.readToDelimiter(r, !0) === -1)
1363
+ throw this.error(`output ${this.snapshot(n)} not closed`, n);
1364
+ return new Os(i, n, this.p, e, s);
1365
+ }
1366
+ readEndrawOrRawContent(e) {
1367
+ const { tagDelimiterLeft: s, tagDelimiterRight: i } = e, r = this.p;
1368
+ let n = this.readTo(s) - s.length;
1369
+ for (; this.p < this.N; ) {
1370
+ if (this.readIdentifier().getText() !== "endraw") {
1371
+ n = this.readTo(s) - s.length;
1372
+ continue;
1373
+ }
1374
+ for (; this.p <= this.N; ) {
1375
+ if (this.rmatch(i)) {
1376
+ const o = this.p;
1377
+ return r === n ? (this.rawBeginAt = -1, new Ge(this.input, r, o, e, this.file)) : (this.p = n, new Xe(this.input, r, n, this.file));
1378
+ }
1379
+ if (this.rmatch(s))
1380
+ break;
1381
+ this.p++;
1382
+ }
1383
+ }
1384
+ throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, r);
1385
+ }
1386
+ readLiquidTagTokens(e = Q) {
1387
+ const s = [];
1388
+ for (; this.p < this.N; ) {
1389
+ const i = this.readLiquidTagToken(e);
1390
+ i && s.push(i);
1391
+ }
1392
+ return s;
1393
+ }
1394
+ readLiquidTagToken(e) {
1395
+ if (this.skipBlank(), this.end())
1396
+ return;
1397
+ const s = this.p;
1398
+ this.readToDelimiter(`
1399
+ `);
1400
+ const i = this.p;
1401
+ return new js(this.input, s, i, e, this.file);
1402
+ }
1403
+ error(e, s = this.p) {
1404
+ return new ts(e, new we(this.input, s, this.N, this.file));
1405
+ }
1406
+ assert(e, s, i) {
1407
+ if (!e)
1408
+ throw this.error(typeof s == "function" ? s() : s, i);
1409
+ }
1410
+ snapshot(e = this.p) {
1411
+ return JSON.stringify(es(this.input.slice(e, this.N), 32));
1412
+ }
1413
+ /**
1414
+ * @deprecated use #readIdentifier instead
1415
+ */
1416
+ readWord() {
1417
+ return this.readIdentifier();
1418
+ }
1419
+ readIdentifier() {
1420
+ this.skipBlank();
1421
+ const e = this.p;
1422
+ for (; !this.end() && ne(this.peek()); )
1423
+ ++this.p;
1424
+ return new we(this.input, e, this.p, this.file);
1425
+ }
1426
+ readNonEmptyIdentifier() {
1427
+ const e = this.readIdentifier();
1428
+ return e.size() ? e : void 0;
1429
+ }
1430
+ readTagName() {
1431
+ return this.skipBlank(), this.input[this.p] === "#" ? this.input.slice(this.p, ++this.p) : this.readIdentifier().getText();
1432
+ }
1433
+ readHashes(e) {
1434
+ const s = [];
1435
+ for (; ; ) {
1436
+ const i = this.readHash(e);
1437
+ if (!i)
1438
+ return s;
1439
+ s.push(i);
1440
+ }
1441
+ }
1442
+ readHash(e) {
1443
+ this.skipBlank(), this.peek() === "," && ++this.p;
1444
+ const s = this.p, i = this.readNonEmptyIdentifier();
1445
+ if (!i)
1446
+ return;
1447
+ let r;
1448
+ this.skipBlank();
1449
+ const n = f(e) ? e : e ? "=" : ":";
1450
+ return this.peek() === n && (++this.p, r = this.readValue()), new As(this.input, s, this.p, i, r, this.file);
1451
+ }
1452
+ remaining() {
1453
+ return this.input.slice(this.p, this.N);
1454
+ }
1455
+ advance(e = 1) {
1456
+ this.p += e;
1457
+ }
1458
+ end() {
1459
+ return this.p >= this.N;
1460
+ }
1461
+ read() {
1462
+ return this.input[this.p++];
1463
+ }
1464
+ readTo(e) {
1465
+ for (; this.p < this.N; )
1466
+ if (++this.p, this.rmatch(e))
1467
+ return this.p;
1468
+ return -1;
1469
+ }
1470
+ readValue() {
1471
+ this.skipBlank();
1472
+ const e = this.p, s = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), i = this.readProperties(!s);
1473
+ return i.length ? new et(s, i, this.input, e, this.p) : s;
1474
+ }
1475
+ readScopeValue() {
1476
+ this.skipBlank();
1477
+ const e = this.p, s = this.readProperties();
1478
+ if (s.length)
1479
+ return new et(void 0, s, this.input, e, this.p);
1480
+ }
1481
+ readProperties(e = !0) {
1482
+ const s = [];
1483
+ for (; ; ) {
1484
+ if (this.peek() === "[") {
1485
+ this.p++;
1486
+ const i = this.readValue() || new we(this.input, this.p, this.p, this.file);
1487
+ this.assert(this.readTo("]") !== -1, "[ not closed"), s.push(i);
1488
+ continue;
1489
+ }
1490
+ if (e && !s.length) {
1491
+ const i = this.readNonEmptyIdentifier();
1492
+ if (i) {
1493
+ s.push(i);
1494
+ continue;
1495
+ }
1496
+ }
1497
+ if (this.peek() === "." && this.peek(1) !== ".") {
1498
+ this.p++;
1499
+ const i = this.readNonEmptyIdentifier();
1500
+ if (!i)
1501
+ break;
1502
+ s.push(i);
1503
+ continue;
1504
+ }
1505
+ break;
1506
+ }
1507
+ return s;
1508
+ }
1509
+ readNumber() {
1510
+ this.skipBlank();
1511
+ let e = !1, s = !1, i = 0;
1512
+ for (this.peekType() & us && i++; this.p + i <= this.N; )
1513
+ if (this.peekType(i) & cs)
1514
+ s = !0, i++;
1515
+ else if (this.peek(i) === "." && this.peek(i + 1) !== ".") {
1516
+ if (e || !s)
1517
+ return;
1518
+ e = !0, i++;
1519
+ } else
1520
+ break;
1521
+ if (s && !ne(this.peek(i))) {
1522
+ const r = new zs(this.input, this.p, this.p + i, this.file);
1523
+ return this.advance(i), r;
1524
+ }
1525
+ }
1526
+ readLiteral() {
1527
+ this.skipBlank();
1528
+ const e = this.matchTrie(this.literalTrie);
1529
+ if (e === -1)
1530
+ return;
1531
+ const s = new Rs(this.input, this.p, e, this.file);
1532
+ return this.p = e, s;
1533
+ }
1534
+ readRange() {
1535
+ this.skipBlank();
1536
+ const e = this.p;
1537
+ if (this.peek() !== "(")
1538
+ return;
1539
+ ++this.p;
1540
+ const s = this.readValueOrThrow();
1541
+ this.skipBlank(), this.assert(this.read() === "." && this.read() === ".", "invalid range syntax");
1542
+ const i = this.readValueOrThrow();
1543
+ return this.skipBlank(), this.assert(this.read() === ")", "invalid range syntax"), new qs(this.input, e, this.p, s, i, this.file);
1544
+ }
1545
+ readValueOrThrow() {
1546
+ const e = this.readValue();
1547
+ return this.assert(e, () => `unexpected token ${this.snapshot()}, value expected`), e;
1548
+ }
1549
+ readQuoted() {
1550
+ this.skipBlank();
1551
+ const e = this.p;
1552
+ if (!(this.peekType() & He))
1553
+ return;
1554
+ ++this.p;
1555
+ let s = !1;
1556
+ for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !s)); )
1557
+ s ? s = !1 : this.input[this.p - 1] === "\\" && (s = !0);
1558
+ return new Vs(this.input, e, this.p, this.file);
1559
+ }
1560
+ *readFileNameTemplate(e) {
1561
+ const { outputDelimiterLeft: s } = e, i = [",", " ", s], r = new Set(i);
1562
+ for (; this.p < this.N && !r.has(this.peek()); )
1563
+ yield this.match(s) ? this.readOutputToken(e) : this.readHTMLToken(i);
1564
+ }
1565
+ match(e) {
1566
+ for (let s = 0; s < e.length; s++)
1567
+ if (e[s] !== this.input[this.p + s])
1568
+ return !1;
1569
+ return !0;
1570
+ }
1571
+ rmatch(e) {
1572
+ for (let s = 0; s < e.length; s++)
1573
+ if (e[e.length - 1 - s] !== this.input[this.p - 1 - s])
1574
+ return !1;
1575
+ return !0;
1576
+ }
1577
+ peekType(e = 0) {
1578
+ return this.p + e >= this.N ? 0 : m[this.input.charCodeAt(this.p + e)];
1579
+ }
1580
+ peek(e = 0) {
1581
+ return this.p + e >= this.N ? "" : this.input[this.p + e];
1582
+ }
1583
+ skipBlank() {
1584
+ for (; this.peekType() & X; )
1585
+ ++this.p;
1586
+ }
1587
+ }
1588
+ class vi {
1589
+ constructor(e, s) {
1590
+ this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = s;
1591
+ }
1592
+ on(e, s) {
1593
+ return this.handlers[e] = s, this;
1594
+ }
1595
+ trigger(e, s) {
1596
+ const i = this.handlers[e];
1597
+ return i ? (i.call(this, s), !0) : !1;
1598
+ }
1599
+ start() {
1600
+ this.trigger("start");
1601
+ let e;
1602
+ for (; !this.stopRequested && (e = this.tokens.shift()); ) {
1603
+ if (this.trigger("token", e) || Z(e) && this.trigger(`tag:${e.name}`, e))
1604
+ continue;
1605
+ const s = this.parseToken(e, this.tokens);
1606
+ this.trigger("template", s);
1607
+ }
1608
+ return this.stopRequested || this.trigger("end"), this;
1609
+ }
1610
+ stop() {
1611
+ return this.stopRequested = !0, this;
1612
+ }
1613
+ }
1614
+ class Ne {
1615
+ constructor(e) {
1616
+ this.token = e;
1617
+ }
1618
+ }
1619
+ class b extends Ne {
1620
+ constructor(e, s, i) {
1621
+ super(e), this.name = e.name, this.liquid = i, this.tokenizer = e.tokenizer;
1622
+ }
1623
+ }
1624
+ class ee {
1625
+ constructor(e, s) {
1626
+ this.hash = {};
1627
+ const i = e instanceof A ? e : new A(e, {});
1628
+ for (const r of i.readHashes(s))
1629
+ this.hash[r.name.content] = r.value;
1630
+ }
1631
+ *render(e) {
1632
+ const s = {};
1633
+ for (const i of Object.keys(this.hash))
1634
+ s[i] = this.hash[i] === void 0 ? !0 : yield T(this.hash[i], e);
1635
+ return s;
1636
+ }
1637
+ }
1638
+ function xi(t) {
1639
+ return class extends b {
1640
+ constructor(e, s, i) {
1641
+ super(e, s, i), v(t.parse) && t.parse.call(this, e, s);
1642
+ }
1643
+ *render(e, s) {
1644
+ const i = yield new ee(this.token.args, e.opts.keyValueSeparator).render(e);
1645
+ return yield t.render.call(this, e, s, i);
1646
+ }
1647
+ };
1648
+ }
1649
+ function At(t) {
1650
+ return S(t);
1651
+ }
1652
+ class Dt {
1653
+ constructor(e, s, i) {
1654
+ this.token = e, this.name = e.name, this.handler = v(s) ? s : v(s?.handler) ? s.handler : Tt, this.raw = !v(s) && !!s?.raw, this.args = e.args, this.liquid = i;
1655
+ }
1656
+ *render(e, s) {
1657
+ const i = [];
1658
+ for (const r of this.args)
1659
+ At(r) ? i.push([r[0], yield T(r[1], s)]) : i.push(yield T(r, s));
1660
+ return yield this.handler.apply({ context: s, token: this.token, liquid: this.liquid }, [e, ...i]);
1661
+ }
1662
+ }
1663
+ class L {
1664
+ /**
1665
+ * @param str the value to be valuated, eg.: "foobar" | truncate: 3
1666
+ */
1667
+ constructor(e, s) {
1668
+ this.filters = [];
1669
+ const i = typeof e == "string" ? new A(e, s.options.operators).readFilteredValue() : e;
1670
+ this.initial = i.initial, this.filters = i.filters.map((r) => new Dt(r, this.getFilter(s, r.name), s));
1671
+ }
1672
+ *value(e, s) {
1673
+ s = s || e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
1674
+ let i = yield this.initial.evaluate(e, s);
1675
+ for (const r of this.filters)
1676
+ i = yield r.render(i, e);
1677
+ return i;
1678
+ }
1679
+ getFilter(e, s) {
1680
+ const i = e.filters[s];
1681
+ return _(i || !e.options.strictFilters, () => `undefined filter: ${s}`), i;
1682
+ }
1683
+ }
1684
+ class Si extends Ne {
1685
+ constructor(e, s) {
1686
+ var i;
1687
+ super(e);
1688
+ const r = new A(e.input, s.options.operators, e.file, e.contentRange);
1689
+ this.value = new L(r.readFilteredValue(), s);
1690
+ const n = this.value.filters, o = s.options.outputEscape;
1691
+ if (!(!((i = n[n.length - 1]) === null || i === void 0) && i.raw) && o) {
1692
+ const a = new zt(toString.call(o), [], "", 0, 0);
1693
+ n.push(new Dt(a, o, s));
1694
+ }
1695
+ }
1696
+ *render(e, s) {
1697
+ const i = yield this.value.value(e, !1);
1698
+ s.write(i);
1699
+ }
1700
+ *arguments() {
1701
+ yield this.value;
1702
+ }
1703
+ }
1704
+ class _i extends Ne {
1705
+ constructor(e) {
1706
+ super(e), this.str = e.getContent();
1707
+ }
1708
+ *render(e, s) {
1709
+ s.write(this.str);
1710
+ }
1711
+ }
1712
+ class H {
1713
+ constructor(e, s) {
1714
+ this.segments = e, this.location = s;
1715
+ }
1716
+ toString() {
1717
+ return ue(this.segments, !0);
1718
+ }
1719
+ /** Return this variable's segments as an array, possibly with nested arrays for nested paths. */
1720
+ toArray() {
1721
+ function* e(...s) {
1722
+ for (const i of s)
1723
+ i instanceof H ? yield Array.from(e(...i.segments)) : yield i;
1724
+ }
1725
+ return Array.from(e(...this.segments));
1726
+ }
1727
+ }
1728
+ class Te {
1729
+ constructor() {
1730
+ this.map = /* @__PURE__ */ new Map();
1731
+ }
1732
+ get(e) {
1733
+ const s = ue([e.segments[0]]);
1734
+ return this.map.has(s) || this.map.set(s, []), this.map.get(s);
1735
+ }
1736
+ has(e) {
1737
+ return this.map.has(ue([e.segments[0]]));
1738
+ }
1739
+ push(e) {
1740
+ this.get(e).push(e);
1741
+ }
1742
+ asObject() {
1743
+ return Object.fromEntries(this.map);
1744
+ }
1745
+ }
1746
+ const Mt = {
1747
+ partials: !0
1748
+ };
1749
+ function* Vt(t, e, s) {
1750
+ const i = new Te(), r = new Te(), n = new Te(), o = new ot(/* @__PURE__ */ new Set()), a = /* @__PURE__ */ new Set();
1751
+ function l(h, d) {
1752
+ i.push(h);
1753
+ const g = d.alias(h);
1754
+ if (g !== void 0) {
1755
+ const w = g.segments[0];
1756
+ f(w) && !o.has(w) && r.push(g);
1757
+ } else {
1758
+ const w = h.segments[0];
1759
+ f(w) && !d.has(w) && r.push(h);
1760
+ }
1761
+ for (const w of h.segments)
1762
+ w instanceof H && l(w, d);
1763
+ }
1764
+ function* c(h, d) {
1765
+ if (h.arguments)
1766
+ for (const g of h.arguments())
1767
+ for (const w of at(g))
1768
+ l(w, d);
1769
+ if (h.localScope)
1770
+ for (const g of h.localScope()) {
1771
+ d.add(g.content), d.deleteAlias(g.content);
1772
+ const [w, te] = g.getPosition();
1773
+ n.push(new H([g.content], { row: w, col: te, file: g.file }));
1774
+ }
1775
+ if (h.children)
1776
+ if (h.partialScope) {
1777
+ const g = h.partialScope();
1778
+ if (g === void 0) {
1779
+ for (const $ of yield h.children(e, s))
1780
+ yield c($, d);
1781
+ return;
1782
+ }
1783
+ if (a.has(g.name))
1784
+ return;
1785
+ const w = /* @__PURE__ */ new Set(), te = g.isolated ? new ot(w) : d.push(w);
1786
+ for (const $ of g.scope)
1787
+ if (f($))
1788
+ w.add($);
1789
+ else {
1790
+ const [Ce, Wt] = $;
1791
+ w.add(Ce);
1792
+ const $e = Array.from(at(Wt));
1793
+ $e.length && te.setAlias(Ce, $e[0].segments);
1794
+ }
1795
+ for (const $ of yield h.children(e, s))
1796
+ yield c($, te), a.add(g.name);
1797
+ te.pop();
1798
+ } else {
1799
+ h.blockScope && d.push(new Set(h.blockScope()));
1800
+ for (const g of yield h.children(e, s))
1801
+ yield c(g, d);
1802
+ h.blockScope && d.pop();
1803
+ }
1804
+ }
1805
+ for (const h of t)
1806
+ yield c(h, o);
1807
+ return {
1808
+ variables: i.asObject(),
1809
+ globals: r.asObject(),
1810
+ locals: n.asObject()
1811
+ };
1812
+ }
1813
+ function j(t, e = {}) {
1814
+ const s = Object.assign(Object.assign({}, Mt), e);
1815
+ return M(Vt(t, s.partials, !1));
1816
+ }
1817
+ function C(t, e = {}) {
1818
+ const s = Object.assign(Object.assign({}, Mt), e);
1819
+ return V(Vt(t, s.partials, !0));
1820
+ }
1821
+ class ot {
1822
+ constructor(e) {
1823
+ this.stack = [{ names: e, aliases: /* @__PURE__ */ new Map() }];
1824
+ }
1825
+ /** Return true if `name` is in scope. */
1826
+ has(e) {
1827
+ for (const s of this.stack)
1828
+ if (s.names.has(e))
1829
+ return !0;
1830
+ return !1;
1831
+ }
1832
+ push(e) {
1833
+ return this.stack.push({ names: e, aliases: /* @__PURE__ */ new Map() }), this;
1834
+ }
1835
+ pop() {
1836
+ var e;
1837
+ return (e = this.stack.pop()) === null || e === void 0 ? void 0 : e.names;
1838
+ }
1839
+ // Add a name to the template scope.
1840
+ add(e) {
1841
+ this.stack[0].names.add(e);
1842
+ }
1843
+ /** Return the variable that `variable` aliases, or `variable` if it doesn't alias anything. */
1844
+ alias(e) {
1845
+ const s = e.segments[0];
1846
+ if (!f(s))
1847
+ return;
1848
+ const i = this.getAlias(s);
1849
+ if (i !== void 0)
1850
+ return new H([...i, ...e.segments.slice(1)], e.location);
1851
+ }
1852
+ // TODO: `from` could be a path with multiple segments, like `include.x`.
1853
+ setAlias(e, s) {
1854
+ this.stack[this.stack.length - 1].aliases.set(e, s);
1855
+ }
1856
+ deleteAlias(e) {
1857
+ this.stack[this.stack.length - 1].aliases.delete(e);
1858
+ }
1859
+ getAlias(e) {
1860
+ for (const s of this.stack) {
1861
+ if (s.aliases.has(e))
1862
+ return s.aliases.get(e);
1863
+ if (s.names.has(e))
1864
+ return;
1865
+ }
1866
+ }
1867
+ }
1868
+ function* at(t) {
1869
+ F(t) ? yield* G(t) : t instanceof L && (yield* Fi(t));
1870
+ }
1871
+ function* Fi(t) {
1872
+ for (const e of t.initial.postfix)
1873
+ F(e) && (yield* G(e));
1874
+ for (const e of t.filters)
1875
+ for (const s of e.args)
1876
+ At(s) && s[1] ? yield* G(s[1]) : F(s) && (yield* G(s));
1877
+ }
1878
+ function* G(t) {
1879
+ jt(t) ? (yield* G(t.lhs), yield* G(t.rhs)) : fe(t) && (yield _e(t));
1880
+ }
1881
+ function _e(t) {
1882
+ const e = [];
1883
+ let s = t.file;
1884
+ const i = t.props[0];
1885
+ s = s || i.file, Fe(i) || ht(i) || ct(i) ? e.push(i.content) : fe(i) && e.push(..._e(i).segments);
1886
+ for (const o of t.props.slice(1))
1887
+ s = s || o.file, Fe(o) || ht(o) || ct(o) ? e.push(o.content) : fe(o) && e.push(_e(o));
1888
+ const [r, n] = t.getPosition();
1889
+ return new H(e, {
1890
+ row: r,
1891
+ col: n,
1892
+ file: s
1893
+ });
1894
+ }
1895
+ const lt = /^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;
1896
+ function ue(t, e = !1) {
1897
+ const s = [], i = t[0];
1898
+ f(i) && (!e || i.match(lt) ? s.push(`${i}`) : s.push(`['${i}']`));
1899
+ for (const r of t.slice(1))
1900
+ r instanceof H ? s.push(`[${ue(r.segments)}]`) : f(r) ? r.match(lt) ? s.push(`.${r}`) : s.push(`['${r}']`) : s.push(`[${r}]`);
1901
+ return s.join("");
1902
+ }
1903
+ var W;
1904
+ (function(t) {
1905
+ t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
1906
+ })(W || (W = {}));
1907
+ class Li {
1908
+ constructor(e) {
1909
+ if (this.options = e, e.relativeReference) {
1910
+ const s = e.fs.sep;
1911
+ _(s, "`fs.sep` is required for relative reference");
1912
+ const i = new RegExp(["." + s, ".." + s, "./", "../"].map((r) => Zt(r)).join("|"));
1913
+ this.shouldLoadRelative = (r) => i.test(r);
1914
+ } else
1915
+ this.shouldLoadRelative = (s) => !1;
1916
+ this.contains = this.options.fs.contains || (() => !0);
1917
+ }
1918
+ *lookup(e, s, i, r) {
1919
+ const { fs: n } = this.options, o = this.options[s];
1920
+ for (const a of this.candidates(e, o, r, s !== W.Root))
1921
+ if (i ? n.existsSync(a) : yield n.exists(a))
1922
+ return a;
1923
+ throw this.lookupError(e, o);
1924
+ }
1925
+ *candidates(e, s, i, r) {
1926
+ const { fs: n, extname: o } = this.options;
1927
+ if (this.shouldLoadRelative(e) && i) {
1928
+ const a = n.resolve(this.dirname(i), e, o);
1929
+ for (const l of s)
1930
+ if (!r || this.contains(l, a)) {
1931
+ yield a;
1932
+ break;
1933
+ }
1934
+ }
1935
+ for (const a of s) {
1936
+ const l = n.resolve(a, e, o);
1937
+ (!r || this.contains(a, l)) && (yield l);
1938
+ }
1939
+ if (n.fallback !== void 0) {
1940
+ const a = n.fallback(e);
1941
+ a !== void 0 && (yield a);
1942
+ }
1943
+ }
1944
+ dirname(e) {
1945
+ const s = this.options.fs;
1946
+ return _(s.dirname, "`fs.dirname` is required for relative reference"), s.dirname(e);
1947
+ }
1948
+ lookupError(e, s) {
1949
+ const i = new Error("ENOENT");
1950
+ return i.message = `ENOENT: Failed to lookup "${e}" in "${s}"`, i.code = "ENOENT", i;
1951
+ }
1952
+ }
1953
+ class P {
1954
+ constructor(e) {
1955
+ 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 Li(this.liquid.options), this.parseLimit = new Se("parse length", e.options.parseLimit);
1956
+ }
1957
+ parse(e, s) {
1958
+ e = String(e), this.parseLimit.use(e.length);
1959
+ const r = new A(e, this.liquid.options.operators, s).readTopLevelTokens(this.liquid.options);
1960
+ return this.parseTokens(r);
1961
+ }
1962
+ parseTokens(e) {
1963
+ let s;
1964
+ const i = [], r = [];
1965
+ for (; s = e.shift(); )
1966
+ try {
1967
+ i.push(this.parseToken(s, e));
1968
+ } catch (n) {
1969
+ if (this.liquid.options.catchAllErrors)
1970
+ r.push(n);
1971
+ else
1972
+ throw n;
1973
+ }
1974
+ if (r.length)
1975
+ throw new kt(r);
1976
+ return i;
1977
+ }
1978
+ parseToken(e, s) {
1979
+ try {
1980
+ if (Z(e)) {
1981
+ const i = this.liquid.tags[e.name];
1982
+ return _(i, `tag "${e.name}" not found`), new i(e, s, this.liquid, this);
1983
+ }
1984
+ return zi(e) ? new Si(e, this.liquid) : new _i(e);
1985
+ } catch (i) {
1986
+ throw J.is(i) ? i : new ss(i, e);
1987
+ }
1988
+ }
1989
+ parseStream(e) {
1990
+ return new vi(e, (s, i) => this.parseToken(s, i));
1991
+ }
1992
+ *_parseFileCached(e, s, i = W.Root, r) {
1993
+ const n = this.cache, o = this.loader.shouldLoadRelative(e) ? r + "," + e : i + ":" + e, a = yield n.read(o);
1994
+ if (a)
1995
+ return a;
1996
+ const l = this._parseFile(e, s, i, r), c = s ? yield l : M(l);
1997
+ n.write(o, c);
1998
+ try {
1999
+ return yield c;
2000
+ } catch (h) {
2001
+ throw n.remove(o), h;
2002
+ }
2003
+ }
2004
+ *_parseFile(e, s, i = W.Root, r) {
2005
+ const n = yield this.loader.lookup(e, i, s, r);
2006
+ return this.parse(s ? this.fs.readFileSync(n) : yield this.fs.readFile(n), n);
2007
+ }
2008
+ }
2009
+ var y;
2010
+ (function(t) {
2011
+ 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";
2012
+ })(y || (y = {}));
2013
+ function Oi(t) {
2014
+ return !!(E(t) & y.Delimited);
2015
+ }
2016
+ function qt(t) {
2017
+ return E(t) === y.Operator;
2018
+ }
2019
+ function Ae(t) {
2020
+ return E(t) === y.HTML;
2021
+ }
2022
+ function zi(t) {
2023
+ return E(t) === y.Output;
2024
+ }
2025
+ function Z(t) {
2026
+ return E(t) === y.Tag;
2027
+ }
2028
+ function Fe(t) {
2029
+ return E(t) === y.Quoted;
2030
+ }
2031
+ function ht(t) {
2032
+ return E(t) === y.Number;
2033
+ }
2034
+ function fe(t) {
2035
+ return E(t) === y.PropertyAccess;
2036
+ }
2037
+ function ct(t) {
2038
+ return E(t) === y.Word;
2039
+ }
2040
+ function jt(t) {
2041
+ return E(t) === y.Range;
2042
+ }
2043
+ function F(t) {
2044
+ return (E(t) & 1667) > 0;
2045
+ }
2046
+ function E(t) {
2047
+ return t ? t.kind : -1;
2048
+ }
2049
+ class I {
2050
+ constructor(e = {}, s = Q, i = {}, { memoryLimit: r, renderLimit: n } = {}) {
2051
+ var o, a, l, c, h;
2052
+ this.scopes = [{}], this.registers = {}, this.breakCalled = !1, this.continueCalled = !1, this.sync = !!i.sync, this.opts = s, this.globals = (o = i.globals) !== null && o !== void 0 ? o : s.globals, this.environments = pe(e) ? e : Object(e), this.strictVariables = (a = i.strictVariables) !== null && a !== void 0 ? a : this.opts.strictVariables, this.ownPropertyOnly = (l = i.ownPropertyOnly) !== null && l !== void 0 ? l : s.ownPropertyOnly, this.memoryLimit = r ?? new Se("memory alloc", (c = i.memoryLimit) !== null && c !== void 0 ? c : s.memoryLimit), this.renderLimit = n ?? new Se("template render", Rt().now() + ((h = i.renderLimit) !== null && h !== void 0 ? h : s.renderLimit));
2053
+ }
2054
+ getRegister(e) {
2055
+ return this.registers[e] = this.registers[e] || {};
2056
+ }
2057
+ setRegister(e, s) {
2058
+ return this.registers[e] = s;
2059
+ }
2060
+ saveRegister(...e) {
2061
+ return e.map((s) => [s, this.getRegister(s)]);
2062
+ }
2063
+ restoreRegister(e) {
2064
+ return e.forEach(([s, i]) => this.setRegister(s, i));
2065
+ }
2066
+ getAll() {
2067
+ return [this.globals, this.environments, ...this.scopes].reduce((e, s) => ce(e, s), {});
2068
+ }
2069
+ /**
2070
+ * @deprecated use `_get()` or `getSync()` instead
2071
+ */
2072
+ get(e) {
2073
+ return this.getSync(e);
2074
+ }
2075
+ getSync(e) {
2076
+ return V(this._get(e));
2077
+ }
2078
+ *_get(e) {
2079
+ const s = this.findScope(e[0]);
2080
+ return yield this._getFromScope(s, e);
2081
+ }
2082
+ /**
2083
+ * @deprecated use `_get()` instead
2084
+ */
2085
+ getFromScope(e, s) {
2086
+ return V(this._getFromScope(e, s));
2087
+ }
2088
+ *_getFromScope(e, s, i = this.strictVariables) {
2089
+ f(s) && (s = s.split("."));
2090
+ for (let r = 0; r < s.length; r++)
2091
+ if (e = yield this.readProperty(e, s[r]), i && Qt(e))
2092
+ throw new ns(s.slice(0, r + 1).join("."));
2093
+ return e;
2094
+ }
2095
+ push(e) {
2096
+ return this.scopes.push(e);
2097
+ }
2098
+ pop() {
2099
+ return this.scopes.pop();
2100
+ }
2101
+ bottom() {
2102
+ return this.scopes[0];
2103
+ }
2104
+ spawn(e = {}) {
2105
+ return new I(e, this.opts, {
2106
+ sync: this.sync,
2107
+ globals: this.globals,
2108
+ strictVariables: this.strictVariables
2109
+ }, {
2110
+ renderLimit: this.renderLimit,
2111
+ memoryLimit: this.memoryLimit
2112
+ });
2113
+ }
2114
+ findScope(e) {
2115
+ for (let s = this.scopes.length - 1; s >= 0; s--) {
2116
+ const i = this.scopes[s];
2117
+ if (e in i)
2118
+ return i;
2119
+ }
2120
+ return e in this.environments ? this.environments : this.globals;
2121
+ }
2122
+ readProperty(e, s) {
2123
+ if (e = gt(e), s = p(s), O(e))
2124
+ return e;
2125
+ if (S(e) && s < 0)
2126
+ return e[e.length + +s];
2127
+ const i = Ri(e, s, this.ownPropertyOnly);
2128
+ return i === void 0 && e instanceof Y ? e.liquidMethodMissing(s, this) : v(i) ? i.call(e) : s === "size" ? Ai(e) : s === "first" ? Ei(e) : s === "last" ? Ni(e) : i;
2129
+ }
2130
+ }
2131
+ function Ri(t, e, s) {
2132
+ if (!(s && !Le.call(t, e) && !(t instanceof Y)))
2133
+ return t[e];
2134
+ }
2135
+ function Ei(t) {
2136
+ return S(t) ? t[0] : t.first;
2137
+ }
2138
+ function Ni(t) {
2139
+ return S(t) ? t[t.length - 1] : t.last;
2140
+ }
2141
+ function Ai(t) {
2142
+ if (Le.call(t, "size") || t.size !== void 0)
2143
+ return t.size;
2144
+ if (S(t) || f(t))
2145
+ return t.length;
2146
+ if (typeof t == "object")
2147
+ return Object.keys(t).length;
2148
+ }
2149
+ var U;
2150
+ (function(t) {
2151
+ t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
2152
+ })(U || (U = {}));
2153
+ const Di = D(Math.abs), Mi = D(Math.max), Vi = D(Math.min), qi = D(Math.ceil), ji = D((t, e, s = !1) => s ? Math.floor(t / e) : t / e), Ci = D(Math.floor), $i = D((t, e) => t - e), Pi = D((t, e) => t + e), Ii = D((t, e) => t % e), Bi = D((t, e) => t * e);
2154
+ function Ui(t, e = 0) {
2155
+ t = ve(t), e = ve(e);
2156
+ const s = Math.pow(10, e);
2157
+ return Math.round(t * s) / s;
2158
+ }
2159
+ var Hi = /* @__PURE__ */ Object.freeze({
2160
+ __proto__: null,
2161
+ abs: Di,
2162
+ at_least: Mi,
2163
+ at_most: Vi,
2164
+ ceil: qi,
2165
+ divided_by: ji,
2166
+ floor: Ci,
2167
+ minus: $i,
2168
+ plus: Pi,
2169
+ modulo: Ii,
2170
+ times: Bi,
2171
+ round: Ui
2172
+ });
2173
+ const Wi = (t) => decodeURIComponent(u(t)).replace(/\+/g, " "), Yi = (t) => encodeURIComponent(u(t)).replace(/%20/g, "+"), Ji = (t) => encodeURIComponent(u(t)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), Zi = (t) => encodeURI(u(t)).replace(/%5B/g, "[").replace(/%5D/g, "]"), ut = /[^\p{M}\p{L}\p{Nd}]+/ug, Qi = {
2174
+ raw: /\s+/g,
2175
+ default: ut,
2176
+ pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,
2177
+ ascii: /[^A-Za-z0-9]+/g,
2178
+ latin: ut,
2179
+ none: null
2180
+ };
2181
+ function Gi(t, e = "default", s = !1) {
2182
+ t = u(t);
2183
+ const i = Qi[e];
2184
+ return i && (e === "latin" && (t = Xi(t)), t = t.replace(i, "-").replace(/^-|-$/g, "")), s ? t : t.toLowerCase();
2185
+ }
2186
+ function Xi(t) {
2187
+ 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");
2188
+ }
2189
+ var Ki = /* @__PURE__ */ Object.freeze({
2190
+ __proto__: null,
2191
+ url_decode: Wi,
2192
+ url_encode: Yi,
2193
+ cgi_escape: Ji,
2194
+ uri_escape: Zi,
2195
+ slugify: Gi
2196
+ });
2197
+ const er = ge(function(t, e) {
2198
+ const s = x(t), i = O(e) ? " " : u(e), r = s.length * (1 + i.length);
2199
+ return this.context.memoryLimit.use(r), s.join(i);
2200
+ }), tr = ge((t) => mt(t) ? yt(t) : ""), sr = ge((t) => mt(t) ? t[0] : ""), ir = ge(function(t) {
2201
+ const e = x(t);
2202
+ return this.context.memoryLimit.use(e.length), [...e].reverse();
2203
+ });
2204
+ function* rr(t, e) {
2205
+ const s = [], i = x(t);
2206
+ this.context.memoryLimit.use(i.length);
2207
+ for (const r of i)
2208
+ s.push([
2209
+ r,
2210
+ e ? yield this.context._getFromScope(r, u(e).split("."), !1) : r
2211
+ ]);
2212
+ return s.sort((r, n) => {
2213
+ const o = r[1], a = n[1];
2214
+ return o < a ? -1 : o > a ? 1 : 0;
2215
+ }).map((r) => r[0]);
2216
+ }
2217
+ function nr(t, e) {
2218
+ const s = u(e), i = e === void 0 ? Be : (n, o) => Be(n[s], o[s]), r = x(t);
2219
+ return this.context.memoryLimit.use(r.length), [...r].sort(i);
2220
+ }
2221
+ const or = (t) => t && t.length || 0;
2222
+ function* ar(t, e) {
2223
+ const s = [], i = x(t);
2224
+ this.context.memoryLimit.use(i.length);
2225
+ for (const r of i)
2226
+ s.push(yield this.context._getFromScope(r, u(e), !1));
2227
+ return s;
2228
+ }
2229
+ function* lr(t, e) {
2230
+ let s = 0;
2231
+ const i = x(t);
2232
+ for (const r of i) {
2233
+ const n = Number(e ? yield this.context._getFromScope(r, u(e), !1) : r);
2234
+ s += Number.isNaN(n) ? 0 : n;
2235
+ }
2236
+ return s;
2237
+ }
2238
+ function hr(t) {
2239
+ const e = x(t);
2240
+ return this.context.memoryLimit.use(e.length), e.filter((s) => !O(p(s)));
2241
+ }
2242
+ function Ct(t, e = []) {
2243
+ const s = x(t), i = x(e);
2244
+ return this.context.memoryLimit.use(s.length + i.length), s.concat(i);
2245
+ }
2246
+ function cr(t, e) {
2247
+ return Ct.call(this, t, [e]);
2248
+ }
2249
+ function ur(t, e) {
2250
+ const s = x(t);
2251
+ this.context.memoryLimit.use(s.length);
2252
+ const i = [...s];
2253
+ return i.unshift(e), i;
2254
+ }
2255
+ function fr(t) {
2256
+ const e = [...x(t)];
2257
+ return e.pop(), e;
2258
+ }
2259
+ function dr(t) {
2260
+ const e = x(t);
2261
+ this.context.memoryLimit.use(e.length);
2262
+ const s = [...e];
2263
+ return s.shift(), s;
2264
+ }
2265
+ function pr(t, e, s = 1) {
2266
+ return t = p(t), O(t) ? [] : (S(t) || (t = u(t)), e = e < 0 ? t.length + e : e, this.context.memoryLimit.use(s), t.slice(e, e + s));
2267
+ }
2268
+ function $t(t) {
2269
+ return this.context.opts.jekyllWhere ? (e) => K.is(t) ? q(e, t) : S(e) ? Zs(e, t) : q(e, t) : t === void 0 ? (e) => B(e, this.context) : (e) => q(e, t);
2270
+ }
2271
+ function* Pt(t, e, s, i) {
2272
+ const r = [];
2273
+ e = x(e), this.context.memoryLimit.use(e.length);
2274
+ const n = new A(u(s)).readScopeValue();
2275
+ for (const a of e)
2276
+ r.push(yield T(n, this.context.spawn(a)));
2277
+ const o = $t.call(this, i);
2278
+ return e.filter((a, l) => o(r[l]) === t);
2279
+ }
2280
+ function* It(t, e, s, i) {
2281
+ const r = [], n = new L(u(i), this.liquid), o = x(e);
2282
+ this.context.memoryLimit.use(o.length);
2283
+ for (const a of o) {
2284
+ this.context.push({ [s]: a });
2285
+ const l = yield n.value(this.context);
2286
+ this.context.pop(), l === t && r.push(a);
2287
+ }
2288
+ return r;
2289
+ }
2290
+ function* gr(t, e, s) {
2291
+ return yield* Pt.call(this, !0, t, e, s);
2292
+ }
2293
+ function* mr(t, e, s) {
2294
+ return yield* Pt.call(this, !1, t, e, s);
2295
+ }
2296
+ function* yr(t, e, s) {
2297
+ return yield* It.call(this, !0, t, e, s);
2298
+ }
2299
+ function* wr(t, e, s) {
2300
+ return yield* It.call(this, !1, t, e, s);
2301
+ }
2302
+ function* br(t, e) {
2303
+ const s = /* @__PURE__ */ new Map();
2304
+ t = ie(t);
2305
+ const i = new A(u(e)).readScopeValue();
2306
+ this.context.memoryLimit.use(t.length);
2307
+ for (const r of t) {
2308
+ const n = yield T(i, this.context.spawn(r));
2309
+ s.has(n) || s.set(n, []), s.get(n).push(r);
2310
+ }
2311
+ return [...s.entries()].map(([r, n]) => ({ name: r, items: n }));
2312
+ }
2313
+ function* Tr(t, e, s) {
2314
+ const i = /* @__PURE__ */ new Map(), r = new L(u(s), this.liquid);
2315
+ t = ie(t), this.context.memoryLimit.use(t.length);
2316
+ for (const n of t) {
2317
+ this.context.push({ [e]: n });
2318
+ const o = yield r.value(this.context);
2319
+ this.context.pop(), i.has(o) || i.set(o, []), i.get(o).push(n);
2320
+ }
2321
+ return [...i.entries()].map(([n, o]) => ({ name: n, items: o }));
2322
+ }
2323
+ function* De(t, e, s) {
2324
+ const i = new A(u(e)).readScopeValue(), r = x(t), n = $t.call(this, s);
2325
+ for (let o = 0; o < r.length; o++) {
2326
+ const a = yield T(i, this.context.spawn(r[o]));
2327
+ if (n(a))
2328
+ return [o, r[o]];
2329
+ }
2330
+ }
2331
+ function* Me(t, e, s) {
2332
+ const i = new L(u(s), this.liquid), r = x(t);
2333
+ for (let n = 0; n < r.length; n++) {
2334
+ this.context.push({ [e]: r[n] });
2335
+ const o = yield i.value(this.context);
2336
+ if (this.context.pop(), o)
2337
+ return [n, r[n]];
2338
+ }
2339
+ }
2340
+ function* kr(t, e, s) {
2341
+ return !!(yield* De.call(this, t, e, s));
2342
+ }
2343
+ function* vr(t, e, s) {
2344
+ return !!(yield* Me.call(this, t, e, s));
2345
+ }
2346
+ function* xr(t, e, s) {
2347
+ const i = yield* De.call(this, t, e, s);
2348
+ return i ? i[0] : void 0;
2349
+ }
2350
+ function* Sr(t, e, s) {
2351
+ const i = yield* Me.call(this, t, e, s);
2352
+ return i ? i[0] : void 0;
2353
+ }
2354
+ function* _r(t, e, s) {
2355
+ const i = yield* De.call(this, t, e, s);
2356
+ return i ? i[1] : void 0;
2357
+ }
2358
+ function* Fr(t, e, s) {
2359
+ const i = yield* Me.call(this, t, e, s);
2360
+ return i ? i[1] : void 0;
2361
+ }
2362
+ function Lr(t) {
2363
+ return t = x(t), this.context.memoryLimit.use(t.length), [...new Set(t)];
2364
+ }
2365
+ function Or(t, e = 1) {
2366
+ if (t = p(t), O(t))
2367
+ return [];
2368
+ S(t) || (t = u(t)), this.context.memoryLimit.use(e);
2369
+ const s = [...t].sort(() => Math.random() - 0.5);
2370
+ return e === 1 ? s[0] : s.slice(0, e);
2371
+ }
2372
+ var zr = /* @__PURE__ */ Object.freeze({
2373
+ __proto__: null,
2374
+ join: er,
2375
+ last: tr,
2376
+ first: sr,
2377
+ reverse: ir,
2378
+ sort: rr,
2379
+ sort_natural: nr,
2380
+ size: or,
2381
+ map: ar,
2382
+ sum: lr,
2383
+ compact: hr,
2384
+ concat: Ct,
2385
+ push: cr,
2386
+ unshift: ur,
2387
+ pop: fr,
2388
+ shift: dr,
2389
+ slice: pr,
2390
+ where: gr,
2391
+ reject: mr,
2392
+ where_exp: yr,
2393
+ reject_exp: wr,
2394
+ group_by: br,
2395
+ group_by_exp: Tr,
2396
+ has: kr,
2397
+ has_exp: vr,
2398
+ find_index: xr,
2399
+ find_index_exp: Sr,
2400
+ find: _r,
2401
+ find_exp: Fr,
2402
+ uniq: Lr,
2403
+ sample: Or
2404
+ });
2405
+ function Ve(t, e, s) {
2406
+ var i, r, n;
2407
+ const o = ((i = t?.length) !== null && i !== void 0 ? i : 0) + ((r = e?.length) !== null && r !== void 0 ? r : 0) + ((n = s?.length) !== null && n !== void 0 ? n : 0);
2408
+ this.context.memoryLimit.use(o);
2409
+ const a = Ut(t, this.context.opts, s);
2410
+ return a ? (e = p(e), e = O(e) ? this.context.opts.dateFormat : u(e), oe(a, e)) : t;
2411
+ }
2412
+ function Rr(t) {
2413
+ return Ve.call(this, t, "%Y-%m-%dT%H:%M:%S%:z");
2414
+ }
2415
+ function Er(t) {
2416
+ return Ve.call(this, t, "%a, %d %b %Y %H:%M:%S %z");
2417
+ }
2418
+ function Nr(t, e, s) {
2419
+ return Bt.call(this, t, "%b", e, s);
2420
+ }
2421
+ function Ar(t, e, s) {
2422
+ return Bt.call(this, t, "%B", e, s);
2423
+ }
2424
+ function Bt(t, e, s, i) {
2425
+ const r = Ut(t, this.context.opts);
2426
+ if (!r)
2427
+ return t;
2428
+ if (s === "ordinal") {
2429
+ const n = r.getDate();
2430
+ return i === "US" ? oe(r, `${e} ${n}%q, %Y`) : oe(r, `${n}%q ${e} %Y`);
2431
+ }
2432
+ return oe(r, `%d ${e} %Y`);
2433
+ }
2434
+ function Ut(t, e, s) {
2435
+ let i;
2436
+ const r = s ?? e.timezoneOffset, n = e.locale;
2437
+ return t = p(t), t === "now" || t === "today" ? i = new R(Date.now(), n, r) : de(t) ? i = new R(t * 1e3, n, r) : f(t) ? /^\d+$/.test(t) ? i = new R(+t * 1e3, n, r) : e.preserveTimezones && s === void 0 ? i = R.createDateFixedToTimezone(t, n) : i = new R(t, n, r) : i = new R(t, n, r), i.valid() ? i : void 0;
2438
+ }
2439
+ var Dr = /* @__PURE__ */ Object.freeze({
2440
+ __proto__: null,
2441
+ date: Ve,
2442
+ date_to_xmlschema: Rr,
2443
+ date_to_rfc822: Er,
2444
+ date_to_string: Nr,
2445
+ date_to_long_string: Ar
2446
+ });
2447
+ const ke = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, ft = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
2448
+ function Mr(t, e) {
2449
+ _(arguments.length === 2, "append expect 2 arguments");
2450
+ const s = u(t), i = u(e);
2451
+ return this.context.memoryLimit.use(s.length + i.length), s + i;
2452
+ }
2453
+ function Vr(t, e) {
2454
+ _(arguments.length === 2, "prepend expect 2 arguments");
2455
+ const s = u(t), i = u(e);
2456
+ return this.context.memoryLimit.use(s.length + i.length), i + s;
2457
+ }
2458
+ function qr(t, e) {
2459
+ const s = u(t);
2460
+ return this.context.memoryLimit.use(s.length), e ? (e = Oe(u(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "")) : s.replace(/^\s+/, "");
2461
+ }
2462
+ function jr(t) {
2463
+ const e = u(t);
2464
+ return this.context.memoryLimit.use(e.length), e.toLowerCase();
2465
+ }
2466
+ function Cr(t) {
2467
+ const e = u(t);
2468
+ return this.context.memoryLimit.use(e.length), u(e).toUpperCase();
2469
+ }
2470
+ function $r(t, e) {
2471
+ const s = u(t);
2472
+ return this.context.memoryLimit.use(s.length), s.split(u(e)).join("");
2473
+ }
2474
+ function Pr(t, e) {
2475
+ const s = u(t);
2476
+ return this.context.memoryLimit.use(s.length), s.replace(u(e), "");
2477
+ }
2478
+ function Ir(t, e) {
2479
+ const s = u(t);
2480
+ this.context.memoryLimit.use(s.length);
2481
+ const i = u(e), r = s.lastIndexOf(i);
2482
+ return r === -1 ? s : s.substring(0, r) + s.substring(r + i.length);
2483
+ }
2484
+ function Br(t, e) {
2485
+ return t = u(t), this.context.memoryLimit.use(t.length), e ? (e = Oe(u(e)), t.replace(new RegExp(`[${e}]+$`, "g"), "")) : t.replace(/\s+$/, "");
2486
+ }
2487
+ function Ur(t, e) {
2488
+ const s = u(t);
2489
+ this.context.memoryLimit.use(s.length);
2490
+ const i = s.split(u(e));
2491
+ for (; i.length && i[i.length - 1] === ""; )
2492
+ i.pop();
2493
+ return i;
2494
+ }
2495
+ function Hr(t, e) {
2496
+ const s = u(t);
2497
+ return this.context.memoryLimit.use(s.length), e ? (e = Oe(u(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : s.trim();
2498
+ }
2499
+ function Wr(t) {
2500
+ const e = u(t);
2501
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, "");
2502
+ }
2503
+ function Yr(t) {
2504
+ return t = u(t), this.context.memoryLimit.use(t.length), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
2505
+ }
2506
+ function Jr(t, e, s) {
2507
+ const i = u(t);
2508
+ return this.context.memoryLimit.use(i.length), i.split(u(e)).join(s);
2509
+ }
2510
+ function Zr(t, e, s) {
2511
+ const i = u(t);
2512
+ return this.context.memoryLimit.use(i.length), i.replace(u(e), s);
2513
+ }
2514
+ function Qr(t, e, s) {
2515
+ const i = u(t);
2516
+ this.context.memoryLimit.use(i.length);
2517
+ const r = u(e), n = i.lastIndexOf(r);
2518
+ if (n === -1)
2519
+ return i;
2520
+ const o = u(s);
2521
+ return i.substring(0, n) + o + i.substring(n + r.length);
2522
+ }
2523
+ function Gr(t, e = 50, s = "...") {
2524
+ const i = u(t);
2525
+ return this.context.memoryLimit.use(i.length), i.length <= e ? t : i.substring(0, e - s.length) + s;
2526
+ }
2527
+ function Xr(t, e = 15, s = "...") {
2528
+ const i = u(t);
2529
+ this.context.memoryLimit.use(i.length);
2530
+ const r = i.split(/\s+/);
2531
+ e <= 0 && (e = 1);
2532
+ let n = r.slice(0, e).join(" ");
2533
+ return r.length >= e && (n += s), n;
2534
+ }
2535
+ function Kr(t) {
2536
+ const e = u(t);
2537
+ return this.context.memoryLimit.use(e.length), e.replace(/\s+/g, " ");
2538
+ }
2539
+ function en(t, e) {
2540
+ const s = u(t);
2541
+ if (this.context.memoryLimit.use(s.length), t = s.trim(), !t)
2542
+ return 0;
2543
+ switch (e) {
2544
+ case "cjk":
2545
+ return (t.match(ke) || []).length + (t.match(ft) || []).length;
2546
+ case "auto":
2547
+ return ke.test(t) ? t.match(ke).length + (t.match(ft) || []).length : t.split(/\s+/).length;
2548
+ default:
2549
+ return t.split(/\s+/).length;
2550
+ }
2551
+ }
2552
+ function tn(t, e = "and") {
2553
+ switch (this.context.memoryLimit.use(t.length), t.length) {
2554
+ case 0:
2555
+ return "";
2556
+ case 1:
2557
+ return t[0];
2558
+ case 2:
2559
+ return `${t[0]} ${e} ${t[1]}`;
2560
+ default:
2561
+ return `${t.slice(0, -1).join(", ")}, ${e} ${t[t.length - 1]}`;
2562
+ }
2563
+ }
2564
+ var sn = /* @__PURE__ */ Object.freeze({
2565
+ __proto__: null,
2566
+ append: Mr,
2567
+ prepend: Vr,
2568
+ lstrip: qr,
2569
+ downcase: jr,
2570
+ upcase: Cr,
2571
+ remove: $r,
2572
+ remove_first: Pr,
2573
+ remove_last: Ir,
2574
+ rstrip: Br,
2575
+ split: Ur,
2576
+ strip: Hr,
2577
+ strip_newlines: Wr,
2578
+ capitalize: Yr,
2579
+ replace: Jr,
2580
+ replace_first: Zr,
2581
+ replace_last: Qr,
2582
+ truncate: Gr,
2583
+ truncatewords: Xr,
2584
+ normalize_whitespace: Kr,
2585
+ number_of_words: en,
2586
+ array_to_sentence_string: tn
2587
+ });
2588
+ const rn = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, gi), Hi), Ki), zr), Dr), sn), Nt);
2589
+ class nn extends b {
2590
+ constructor(e, s, i) {
2591
+ 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 L(this.tokenizer.readFilteredValue(), this.liquid);
2592
+ }
2593
+ *render(e) {
2594
+ e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
2595
+ }
2596
+ *arguments() {
2597
+ yield this.value;
2598
+ }
2599
+ *localScope() {
2600
+ yield this.identifier;
2601
+ }
2602
+ }
2603
+ const dt = ["offset", "limit", "reversed"];
2604
+ class on extends b {
2605
+ constructor(e, s, i, r) {
2606
+ super(e, s, i);
2607
+ const n = this.tokenizer.readIdentifier(), o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
2608
+ if (!n.size() || o.content !== "in" || !a)
2609
+ throw new Error(`illegal tag: ${e.getText()}`);
2610
+ this.variable = n.content, this.collection = a, this.hash = new ee(this.tokenizer, i.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
2611
+ let l;
2612
+ const c = r.parseStream(s).on("start", () => l = this.templates).on("tag:else", (h) => {
2613
+ he(h.args), l = this.elseTemplates;
2614
+ }).on("tag:endfor", (h) => {
2615
+ he(h.args), c.stop();
2616
+ }).on("template", (h) => l.push(h)).on("end", () => {
2617
+ throw new Error(`tag ${e.getText()} not closed`);
2618
+ });
2619
+ c.start();
2620
+ }
2621
+ *render(e, s) {
2622
+ const i = this.liquid.renderer;
2623
+ let r = ie(yield T(this.collection, e));
2624
+ if (!r.length) {
2625
+ yield i.renderTemplates(this.elseTemplates, e, s);
2626
+ return;
2627
+ }
2628
+ const n = "continue-" + this.variable + "-" + this.collection.getText();
2629
+ e.push({ continue: e.getRegister(n) });
2630
+ const o = yield this.hash.render(e);
2631
+ e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((c) => dt.includes(c)) : dt.filter((c) => o[c] !== void 0)).reduce((c, h) => h === "offset" ? ln(c, o.offset) : h === "limit" ? hn(c, o.limit) : an(c), r), e.setRegister(n, (o.offset || 0) + r.length);
2632
+ const l = { forloop: new Re(r.length, this.collection.getText(), this.variable) };
2633
+ e.push(l);
2634
+ for (const c of r) {
2635
+ if (l[this.variable] = c, e.continueCalled = e.breakCalled = !1, yield i.renderTemplates(this.templates, e, s), e.breakCalled)
2636
+ break;
2637
+ l.forloop.next();
2638
+ }
2639
+ e.continueCalled = e.breakCalled = !1, e.pop();
2640
+ }
2641
+ *children() {
2642
+ const e = this.templates.slice();
2643
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2644
+ }
2645
+ *arguments() {
2646
+ yield this.collection;
2647
+ for (const e of Object.values(this.hash.hash))
2648
+ F(e) && (yield e);
2649
+ }
2650
+ blockScope() {
2651
+ return [this.variable, "forloop"];
2652
+ }
2653
+ }
2654
+ function an(t) {
2655
+ return [...t].reverse();
2656
+ }
2657
+ function ln(t, e) {
2658
+ return t.slice(e);
2659
+ }
2660
+ function hn(t, e) {
2661
+ return t.slice(0, e);
2662
+ }
2663
+ class cn extends b {
2664
+ constructor(e, s, i, r) {
2665
+ for (super(e, s, i), this.templates = [], this.identifier = this.readVariable(), this.variable = this.identifier.content; s.length; ) {
2666
+ const n = s.shift();
2667
+ if (Z(n) && n.name === "endcapture")
2668
+ return;
2669
+ this.templates.push(r.parseToken(n, s));
2670
+ }
2671
+ throw new Error(`tag ${e.getText()} not closed`);
2672
+ }
2673
+ readVariable() {
2674
+ let e = this.tokenizer.readIdentifier();
2675
+ if (e.content || (e = this.tokenizer.readQuoted(), e))
2676
+ return e;
2677
+ throw this.tokenizer.error("invalid capture name");
2678
+ }
2679
+ *render(e) {
2680
+ const i = yield this.liquid.renderer.renderTemplates(this.templates, e);
2681
+ e.bottom()[this.variable] = i;
2682
+ }
2683
+ *children() {
2684
+ return this.templates;
2685
+ }
2686
+ *localScope() {
2687
+ yield this.identifier;
2688
+ }
2689
+ }
2690
+ class un extends b {
2691
+ constructor(e, s, i, r) {
2692
+ super(e, s, i), this.branches = [], this.elseTemplates = [], this.value = new L(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
2693
+ let n = [], o = 0;
2694
+ const a = r.parseStream(s).on("tag:when", (l) => {
2695
+ if (o > 0)
2696
+ return;
2697
+ n = [];
2698
+ const c = [];
2699
+ for (; !l.tokenizer.end(); )
2700
+ c.push(l.tokenizer.readValueOrThrow()), l.tokenizer.skipBlank(), l.tokenizer.peek() === "," ? l.tokenizer.readTo(",") : l.tokenizer.readTo("or");
2701
+ this.branches.push({
2702
+ values: c,
2703
+ templates: n
2704
+ });
2705
+ }).on("tag:else", () => {
2706
+ o++, n = this.elseTemplates;
2707
+ }).on("tag:endcase", () => a.stop()).on("template", (l) => {
2708
+ (n !== this.elseTemplates || o === 1) && n.push(l);
2709
+ }).on("end", () => {
2710
+ throw new Error(`tag ${e.getText()} not closed`);
2711
+ });
2712
+ a.start();
2713
+ }
2714
+ *render(e, s) {
2715
+ const i = this.liquid.renderer, r = p(yield this.value.value(e, e.opts.lenientIf));
2716
+ let n = !1;
2717
+ for (const o of this.branches)
2718
+ for (const a of o.values) {
2719
+ const l = yield T(a, e, e.opts.lenientIf);
2720
+ if (q(r, l)) {
2721
+ yield i.renderTemplates(o.templates, e, s), n = !0;
2722
+ break;
2723
+ }
2724
+ }
2725
+ n || (yield i.renderTemplates(this.elseTemplates, e, s));
2726
+ }
2727
+ *arguments() {
2728
+ yield this.value, yield* this.branches.flatMap((e) => e.values);
2729
+ }
2730
+ *children() {
2731
+ const e = this.branches.flatMap((s) => s.templates);
2732
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2733
+ }
2734
+ }
2735
+ class fn extends b {
2736
+ constructor(e, s, i) {
2737
+ for (super(e, s, i); s.length; ) {
2738
+ const r = s.shift();
2739
+ if (Z(r) && r.name === "endcomment")
2740
+ return;
2741
+ }
2742
+ throw new Error(`tag ${e.getText()} not closed`);
2743
+ }
2744
+ render() {
2745
+ }
2746
+ }
2747
+ class dn extends b {
2748
+ constructor(e, s, i, r) {
2749
+ super(e, s, i);
2750
+ const n = this.tokenizer;
2751
+ for (this.file = qe(n, this.liquid, r), this.currentFile = e.file; !n.end(); ) {
2752
+ n.skipBlank();
2753
+ const o = n.p, a = n.readIdentifier();
2754
+ if ((a.content === "with" || a.content === "for") && (n.skipBlank(), n.peek() !== ":")) {
2755
+ const l = n.readValue();
2756
+ if (l) {
2757
+ const c = n.p, h = n.readIdentifier();
2758
+ let d;
2759
+ h.content === "as" ? d = n.readIdentifier() : n.p = c, this[a.content] = { value: l, alias: d && d.content }, n.skipBlank(), n.peek() === "," && n.advance();
2760
+ continue;
2761
+ }
2762
+ }
2763
+ n.p = o;
2764
+ break;
2765
+ }
2766
+ this.hash = new ee(n, i.options.keyValueSeparator);
2767
+ }
2768
+ *render(e, s) {
2769
+ const { liquid: i, hash: r } = this, n = yield je(this.file, e, i);
2770
+ _(n, () => `illegal file path "${n}"`);
2771
+ const o = e.spawn(), a = o.bottom();
2772
+ if (ce(a, yield r.render(e)), this.with) {
2773
+ const { value: l, alias: c } = this.with;
2774
+ a[c || n] = yield T(l, e);
2775
+ }
2776
+ if (this.for) {
2777
+ const { value: l, alias: c } = this.for, h = ie(yield T(l, e));
2778
+ a.forloop = new Re(h.length, l.getText(), c);
2779
+ for (const d of h) {
2780
+ a[c] = d;
2781
+ const g = yield i._parsePartialFile(n, o.sync, this.currentFile);
2782
+ yield i.renderer.renderTemplates(g, o, s), a.forloop.next();
2783
+ }
2784
+ } else {
2785
+ const l = yield i._parsePartialFile(n, o.sync, this.currentFile);
2786
+ yield i.renderer.renderTemplates(l, o, s);
2787
+ }
2788
+ }
2789
+ *children(e, s) {
2790
+ return e && f(this.file) ? yield this.liquid._parsePartialFile(this.file, s, this.currentFile) : [];
2791
+ }
2792
+ partialScope() {
2793
+ if (f(this.file)) {
2794
+ const e = Object.keys(this.hash.hash);
2795
+ if (this.with) {
2796
+ const { value: s, alias: i } = this.with;
2797
+ f(i) ? e.push([i, s]) : f(this.file) && e.push([this.file, s]);
2798
+ }
2799
+ if (this.for) {
2800
+ const { value: s, alias: i } = this.for;
2801
+ f(i) ? e.push([i, s]) : f(this.file) && e.push([this.file, s]);
2802
+ }
2803
+ return { name: this.file, isolated: !0, scope: e };
2804
+ }
2805
+ }
2806
+ *arguments() {
2807
+ for (const e of Object.values(this.hash.hash))
2808
+ F(e) && (yield e);
2809
+ if (this.with) {
2810
+ const { value: e } = this.with;
2811
+ F(e) && (yield e);
2812
+ }
2813
+ if (this.for) {
2814
+ const { value: e } = this.for;
2815
+ F(e) && (yield e);
2816
+ }
2817
+ }
2818
+ }
2819
+ function qe(t, e, s) {
2820
+ if (e.options.dynamicPartials) {
2821
+ const n = t.readValue();
2822
+ if (t.assert(n, "illegal file path"), n.getText() === "none")
2823
+ return;
2824
+ if (Fe(n)) {
2825
+ const o = s.parse(Us(n));
2826
+ return pt(o);
2827
+ }
2828
+ return n;
2829
+ }
2830
+ const i = [...t.readFileNameTemplate(e.options)], r = pt(s.parseTokens(i));
2831
+ return r === "none" ? void 0 : r;
2832
+ }
2833
+ function pt(t) {
2834
+ return t.length === 1 && Ae(t[0].token) ? t[0].token.getContent() : t;
2835
+ }
2836
+ function* je(t, e, s) {
2837
+ return typeof t == "string" ? t : Array.isArray(t) ? s.renderer.renderTemplates(t, e) : yield T(t, e);
2838
+ }
2839
+ class pn extends b {
2840
+ constructor(e, s, i, r) {
2841
+ super(e, s, i);
2842
+ const { tokenizer: n } = e;
2843
+ this.file = qe(n, this.liquid, r), this.currentFile = e.file;
2844
+ const o = n.p;
2845
+ n.readIdentifier().content === "with" ? (n.skipBlank(), n.peek() !== ":" ? this.withVar = n.readValue() : n.p = o) : n.p = o, this.hash = new ee(n, i.options.jekyllInclude || i.options.keyValueSeparator);
2846
+ }
2847
+ *render(e, s) {
2848
+ const { liquid: i, hash: r, withVar: n } = this, { renderer: o } = i, a = yield je(this.file, e, i);
2849
+ _(a, () => `illegal file path "${a}"`);
2850
+ const l = e.saveRegister("blocks", "blockMode");
2851
+ e.setRegister("blocks", {}), e.setRegister("blockMode", U.OUTPUT);
2852
+ const c = yield r.render(e);
2853
+ n && (c[a] = yield T(n, e));
2854
+ const h = yield i._parsePartialFile(a, e.sync, this.currentFile);
2855
+ e.push(e.opts.jekyllInclude ? { include: c } : c), yield o.renderTemplates(h, e, s), e.pop(), e.restoreRegister(l);
2856
+ }
2857
+ *children(e, s) {
2858
+ return e && f(this.file) ? yield this.liquid._parsePartialFile(this.file, s, this.currentFile) : [];
2859
+ }
2860
+ partialScope() {
2861
+ if (f(this.file)) {
2862
+ let e;
2863
+ 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 };
2864
+ }
2865
+ }
2866
+ *arguments() {
2867
+ yield* Object.values(this.hash.hash).filter(F), F(this.file) && (yield this.file), F(this.withVar) && (yield this.withVar);
2868
+ }
2869
+ }
2870
+ class gn extends b {
2871
+ constructor(e, s, i) {
2872
+ super(e, s, i), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
2873
+ }
2874
+ render(e, s) {
2875
+ const i = e.environments;
2876
+ de(i[this.variable]) || (i[this.variable] = 0), s.write(u(--i[this.variable]));
2877
+ }
2878
+ *localScope() {
2879
+ yield this.identifier;
2880
+ }
2881
+ }
2882
+ class mn extends b {
2883
+ constructor(e, s, i) {
2884
+ super(e, s, i), this.candidates = [];
2885
+ const r = this.tokenizer.readValue();
2886
+ for (this.tokenizer.skipBlank(), r && (this.tokenizer.peek() === ":" ? (this.group = r, this.tokenizer.advance()) : this.candidates.push(r)); !this.tokenizer.end(); ) {
2887
+ const n = this.tokenizer.readValue();
2888
+ n && this.candidates.push(n), this.tokenizer.readTo(",");
2889
+ }
2890
+ this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
2891
+ }
2892
+ *render(e, s) {
2893
+ const r = `cycle:${yield T(this.group, e)}:` + this.candidates.join(","), n = e.getRegister("cycle");
2894
+ let o = n[r];
2895
+ o === void 0 && (o = n[r] = 0);
2896
+ const a = this.candidates[o];
2897
+ return o = (o + 1) % this.candidates.length, n[r] = o, yield T(a, e);
2898
+ }
2899
+ *arguments() {
2900
+ yield* this.candidates, this.group && (yield this.group);
2901
+ }
2902
+ }
2903
+ class yn extends b {
2904
+ constructor(e, s, i, r) {
2905
+ super(e, s, i), this.branches = [];
2906
+ let n = [];
2907
+ r.parseStream(s).on("start", () => this.branches.push({
2908
+ value: new L(e.tokenizer.readFilteredValue(), this.liquid),
2909
+ templates: n = []
2910
+ })).on("tag:elsif", (o) => {
2911
+ _(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
2912
+ value: new L(o.tokenizer.readFilteredValue(), this.liquid),
2913
+ templates: n = []
2914
+ });
2915
+ }).on("tag:else", (o) => {
2916
+ he(o.args), _(!this.elseTemplates, "duplicated else"), n = this.elseTemplates = [];
2917
+ }).on("tag:endif", function(o) {
2918
+ he(o.args), this.stop();
2919
+ }).on("template", (o) => n.push(o)).on("end", () => {
2920
+ throw new Error(`tag ${e.getText()} not closed`);
2921
+ }).start();
2922
+ }
2923
+ *render(e, s) {
2924
+ const i = this.liquid.renderer;
2925
+ for (const { value: r, templates: n } of this.branches) {
2926
+ const o = yield r.value(e, e.opts.lenientIf);
2927
+ if (B(o, e)) {
2928
+ yield i.renderTemplates(n, e, s);
2929
+ return;
2930
+ }
2931
+ }
2932
+ yield i.renderTemplates(this.elseTemplates || [], e, s);
2933
+ }
2934
+ *children() {
2935
+ const e = this.branches.flatMap((s) => s.templates);
2936
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2937
+ }
2938
+ arguments() {
2939
+ return this.branches.map((e) => e.value);
2940
+ }
2941
+ }
2942
+ class wn extends b {
2943
+ constructor(e, s, i) {
2944
+ super(e, s, i), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
2945
+ }
2946
+ render(e, s) {
2947
+ const i = e.environments;
2948
+ de(i[this.variable]) || (i[this.variable] = 0);
2949
+ const r = i[this.variable];
2950
+ i[this.variable]++, s.write(u(r));
2951
+ }
2952
+ *localScope() {
2953
+ yield this.identifier;
2954
+ }
2955
+ }
2956
+ class bn extends b {
2957
+ constructor(e, s, i, r) {
2958
+ super(e, s, i), this.file = qe(this.tokenizer, this.liquid, r), this.currentFile = e.file, this.args = new ee(this.tokenizer, i.options.keyValueSeparator), this.templates = r.parseTokens(s);
2959
+ }
2960
+ *render(e, s) {
2961
+ const { liquid: i, args: r, file: n } = this, { renderer: o } = i;
2962
+ if (n === void 0) {
2963
+ e.setRegister("blockMode", U.OUTPUT), yield o.renderTemplates(this.templates, e, s);
2964
+ return;
2965
+ }
2966
+ const a = yield je(this.file, e, i);
2967
+ _(a, () => `illegal file path "${a}"`);
2968
+ const l = yield i._parseLayoutFile(a, e.sync, this.currentFile);
2969
+ e.setRegister("blockMode", U.STORE);
2970
+ const c = yield o.renderTemplates(this.templates, e), h = e.getRegister("blocks");
2971
+ h[""] === void 0 && (h[""] = (d, g) => g.write(c)), e.setRegister("blockMode", U.OUTPUT), e.push(yield r.render(e)), yield o.renderTemplates(l, e, s), e.pop();
2972
+ }
2973
+ *children(e) {
2974
+ const s = this.templates.slice();
2975
+ return e && f(this.file) && s.push(...yield this.liquid._parsePartialFile(this.file, !0, this.currentFile)), s;
2976
+ }
2977
+ *arguments() {
2978
+ for (const e of Object.values(this.args.hash))
2979
+ F(e) && (yield e);
2980
+ F(this.file) && (yield this.file);
2981
+ }
2982
+ partialScope() {
2983
+ if (f(this.file))
2984
+ return { name: this.file, isolated: !1, scope: Object.keys(this.args.hash) };
2985
+ }
2986
+ }
2987
+ class Tn extends b {
2988
+ constructor(e, s, i, r) {
2989
+ super(e, s, i), this.templates = [];
2990
+ const n = /\w+/.exec(e.args);
2991
+ for (this.block = n ? n[0] : ""; s.length; ) {
2992
+ const o = s.shift();
2993
+ if (Z(o) && o.name === "endblock")
2994
+ return;
2995
+ const a = r.parseToken(o, s);
2996
+ this.templates.push(a);
2997
+ }
2998
+ throw new Error(`tag ${e.getText()} not closed`);
2999
+ }
3000
+ *render(e, s) {
3001
+ const i = this.getBlockRender(e);
3002
+ e.getRegister("blockMode") === U.STORE ? e.getRegister("blocks")[this.block] = i : yield i(new We(), s);
3003
+ }
3004
+ getBlockRender(e) {
3005
+ const { liquid: s, templates: i } = this, r = e.getRegister("blocks")[this.block], n = function* (o, a) {
3006
+ e.push({ block: o }), yield s.renderer.renderTemplates(i, e, a), e.pop();
3007
+ };
3008
+ return r ? (o, a) => r(new We((l) => n(o, l)), a) : n;
3009
+ }
3010
+ *children() {
3011
+ return this.templates;
3012
+ }
3013
+ blockScope() {
3014
+ return ["block"];
3015
+ }
3016
+ }
3017
+ class kn extends b {
3018
+ constructor(e, s, i) {
3019
+ for (super(e, s, i), this.tokens = []; s.length; ) {
3020
+ const r = s.shift();
3021
+ if (Z(r) && r.name === "endraw")
3022
+ return;
3023
+ this.tokens.push(r);
3024
+ }
3025
+ throw new Error(`tag ${e.getText()} not closed`);
3026
+ }
3027
+ render() {
3028
+ return this.tokens.map((e) => e.getText()).join("");
3029
+ }
3030
+ }
3031
+ class vn extends Re {
3032
+ constructor(e, s, i, r) {
3033
+ super(e, i, r), this.length = e, this.cols = s;
3034
+ }
3035
+ row() {
3036
+ return Math.floor(this.i / this.cols) + 1;
3037
+ }
3038
+ col0() {
3039
+ return this.i % this.cols;
3040
+ }
3041
+ col() {
3042
+ return this.col0() + 1;
3043
+ }
3044
+ col_first() {
3045
+ return this.col0() === 0;
3046
+ }
3047
+ col_last() {
3048
+ return this.col() === this.cols;
3049
+ }
3050
+ }
3051
+ class xn extends b {
3052
+ constructor(e, s, i, r) {
3053
+ super(e, s, i);
3054
+ const n = this.tokenizer.readIdentifier();
3055
+ this.tokenizer.skipBlank();
3056
+ const o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
3057
+ if (o.content !== "in" || !a)
3058
+ throw new Error(`illegal tag: ${e.getText()}`);
3059
+ this.variable = n.content, this.collection = a, this.args = new ee(this.tokenizer, i.options.keyValueSeparator), this.templates = [];
3060
+ let l;
3061
+ const c = r.parseStream(s).on("start", () => l = this.templates).on("tag:endtablerow", () => c.stop()).on("template", (h) => l.push(h)).on("end", () => {
3062
+ throw new Error(`tag ${e.getText()} not closed`);
3063
+ });
3064
+ c.start();
3065
+ }
3066
+ *render(e, s) {
3067
+ let i = ie(yield T(this.collection, e));
3068
+ const r = yield this.args.render(e), n = r.offset || 0, o = r.limit === void 0 ? i.length : r.limit;
3069
+ i = i.slice(n, n + o);
3070
+ const a = r.cols || i.length, l = this.liquid.renderer, c = new vn(i.length, a, this.collection.getText(), this.variable), h = { tablerowloop: c };
3071
+ e.push(h);
3072
+ for (let d = 0; d < i.length; d++, c.next())
3073
+ h[this.variable] = i[d], c.col0() === 0 && (c.row() !== 1 && s.write("</tr>"), s.write(`<tr class="row${c.row()}">`)), s.write(`<td class="col${c.col()}">`), yield l.renderTemplates(this.templates, e, s), s.write("</td>");
3074
+ i.length && s.write("</tr>"), e.pop();
3075
+ }
3076
+ *children() {
3077
+ return this.templates;
3078
+ }
3079
+ *arguments() {
3080
+ yield this.collection;
3081
+ for (const e of Object.values(this.args.hash))
3082
+ F(e) && (yield e);
3083
+ }
3084
+ blockScope() {
3085
+ return [this.variable, "tablerowloop"];
3086
+ }
3087
+ }
3088
+ class Sn extends b {
3089
+ constructor(e, s, i, r) {
3090
+ super(e, s, i), this.branches = [], this.elseTemplates = [];
3091
+ let n = [], o = 0;
3092
+ r.parseStream(s).on("start", () => this.branches.push({
3093
+ value: new L(e.tokenizer.readFilteredValue(), this.liquid),
3094
+ test: me,
3095
+ templates: n = []
3096
+ })).on("tag:elsif", (a) => {
3097
+ if (o > 0) {
3098
+ n = [];
3099
+ return;
3100
+ }
3101
+ this.branches.push({
3102
+ value: new L(a.tokenizer.readFilteredValue(), this.liquid),
3103
+ test: B,
3104
+ templates: n = []
3105
+ });
3106
+ }).on("tag:else", () => {
3107
+ o++, n = this.elseTemplates;
3108
+ }).on("tag:endunless", function() {
3109
+ this.stop();
3110
+ }).on("template", (a) => {
3111
+ (n !== this.elseTemplates || o === 1) && n.push(a);
3112
+ }).on("end", () => {
3113
+ throw new Error(`tag ${e.getText()} not closed`);
3114
+ }).start();
3115
+ }
3116
+ *render(e, s) {
3117
+ const i = this.liquid.renderer;
3118
+ for (const { value: r, test: n, templates: o } of this.branches) {
3119
+ const a = yield r.value(e, e.opts.lenientIf);
3120
+ if (n(a, e)) {
3121
+ yield i.renderTemplates(o, e, s);
3122
+ return;
3123
+ }
3124
+ }
3125
+ yield i.renderTemplates(this.elseTemplates, e, s);
3126
+ }
3127
+ *children() {
3128
+ const e = this.branches.flatMap((s) => s.templates);
3129
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
3130
+ }
3131
+ arguments() {
3132
+ return this.branches.map((e) => e.value);
3133
+ }
3134
+ }
3135
+ class _n extends b {
3136
+ render(e, s) {
3137
+ e.breakCalled = !0;
3138
+ }
3139
+ }
3140
+ class Fn extends b {
3141
+ render(e, s) {
3142
+ e.continueCalled = !0;
3143
+ }
3144
+ }
3145
+ class Ln extends b {
3146
+ constructor(e, s, i) {
3147
+ super(e, s, i), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new L(this.tokenizer.readFilteredValue(), this.liquid));
3148
+ }
3149
+ *render(e, s) {
3150
+ if (!this.value)
3151
+ return;
3152
+ const i = yield this.value.value(e, !1);
3153
+ s.write(i);
3154
+ }
3155
+ *arguments() {
3156
+ this.value && (yield this.value);
3157
+ }
3158
+ }
3159
+ class On extends b {
3160
+ constructor(e, s, i, r) {
3161
+ super(e, s, i);
3162
+ const n = this.tokenizer.readLiquidTagTokens(this.liquid.options);
3163
+ this.templates = r.parseTokens(n);
3164
+ }
3165
+ *render(e, s) {
3166
+ yield this.liquid.renderer.renderTemplates(this.templates, e, s);
3167
+ }
3168
+ *children() {
3169
+ return this.templates;
3170
+ }
3171
+ }
3172
+ class zn extends b {
3173
+ constructor(e, s, i) {
3174
+ if (super(e, s, i), e.args.search(/\n\s*[^#\s]/g) !== -1)
3175
+ throw new Error("every line of an inline comment must start with a '#' character");
3176
+ }
3177
+ render() {
3178
+ }
3179
+ }
3180
+ const Rn = {
3181
+ assign: nn,
3182
+ for: on,
3183
+ capture: cn,
3184
+ case: un,
3185
+ comment: fn,
3186
+ include: pn,
3187
+ render: dn,
3188
+ decrement: gn,
3189
+ increment: wn,
3190
+ cycle: mn,
3191
+ if: yn,
3192
+ layout: bn,
3193
+ block: Tn,
3194
+ raw: kn,
3195
+ tablerow: xn,
3196
+ unless: Sn,
3197
+ break: _n,
3198
+ continue: Fn,
3199
+ echo: Ln,
3200
+ liquid: On,
3201
+ "#": zn
3202
+ };
3203
+ class Ht {
3204
+ constructor(e = {}) {
3205
+ this.renderer = new Ps(), this.filters = {}, this.tags = {}, this.options = yi(e), this.parser = new P(this), Ie(Rn, (s, i) => this.registerTag(i, s)), Ie(rn, (s, i) => this.registerFilter(i, s));
3206
+ }
3207
+ parse(e, s) {
3208
+ return new P(this).parse(e, s);
3209
+ }
3210
+ _render(e, s, i) {
3211
+ const r = s instanceof I ? s : new I(s, this.options, i);
3212
+ return this.renderer.renderTemplates(e, r);
3213
+ }
3214
+ render(e, s, i) {
3215
+ return k(this, void 0, void 0, function* () {
3216
+ return M(this._render(e, s, Object.assign(Object.assign({}, i), { sync: !1 })));
3217
+ });
3218
+ }
3219
+ renderSync(e, s, i) {
3220
+ return V(this._render(e, s, Object.assign(Object.assign({}, i), { sync: !0 })));
3221
+ }
3222
+ renderToNodeStream(e, s, i = {}) {
3223
+ const r = new I(s, this.options, i);
3224
+ return this.renderer.renderTemplatesToNodeStream(e, r);
3225
+ }
3226
+ _parseAndRender(e, s, i) {
3227
+ const r = this.parse(e);
3228
+ return this._render(r, s, i);
3229
+ }
3230
+ parseAndRender(e, s, i) {
3231
+ return k(this, void 0, void 0, function* () {
3232
+ return M(this._parseAndRender(e, s, Object.assign(Object.assign({}, i), { sync: !1 })));
3233
+ });
3234
+ }
3235
+ parseAndRenderSync(e, s, i) {
3236
+ return V(this._parseAndRender(e, s, Object.assign(Object.assign({}, i), { sync: !0 })));
3237
+ }
3238
+ _parsePartialFile(e, s, i) {
3239
+ return new P(this).parseFile(e, s, W.Partials, i);
3240
+ }
3241
+ _parseLayoutFile(e, s, i) {
3242
+ return new P(this).parseFile(e, s, W.Layouts, i);
3243
+ }
3244
+ _parseFile(e, s, i, r) {
3245
+ return new P(this).parseFile(e, s, i, r);
3246
+ }
3247
+ parseFile(e, s) {
3248
+ return k(this, void 0, void 0, function* () {
3249
+ return M(new P(this).parseFile(e, !1, s));
3250
+ });
3251
+ }
3252
+ parseFileSync(e, s) {
3253
+ return V(new P(this).parseFile(e, !0, s));
3254
+ }
3255
+ *_renderFile(e, s, i) {
3256
+ const r = yield this._parseFile(e, i.sync, i.lookupType);
3257
+ return yield this._render(r, s, i);
3258
+ }
3259
+ renderFile(e, s, i) {
3260
+ return k(this, void 0, void 0, function* () {
3261
+ return M(this._renderFile(e, s, Object.assign(Object.assign({}, i), { sync: !1 })));
3262
+ });
3263
+ }
3264
+ renderFileSync(e, s, i) {
3265
+ return V(this._renderFile(e, s, Object.assign(Object.assign({}, i), { sync: !0 })));
3266
+ }
3267
+ renderFileToNodeStream(e, s, i) {
3268
+ return k(this, void 0, void 0, function* () {
3269
+ const r = yield this.parseFile(e);
3270
+ return this.renderToNodeStream(r, s, i);
3271
+ });
3272
+ }
3273
+ _evalValue(e, s) {
3274
+ const i = new L(e, this), r = s instanceof I ? s : new I(s, this.options);
3275
+ return i.value(r);
3276
+ }
3277
+ evalValue(e, s) {
3278
+ return k(this, void 0, void 0, function* () {
3279
+ return M(this._evalValue(e, s));
3280
+ });
3281
+ }
3282
+ evalValueSync(e, s) {
3283
+ return V(this._evalValue(e, s));
3284
+ }
3285
+ registerFilter(e, s) {
3286
+ this.filters[e] = s;
3287
+ }
3288
+ registerTag(e, s) {
3289
+ this.tags[e] = v(s) ? s : xi(s);
3290
+ }
3291
+ plugin(e) {
3292
+ return e.call(this, Ht);
3293
+ }
3294
+ express() {
3295
+ const e = this;
3296
+ let s = !0;
3297
+ return function(i, r, n) {
3298
+ if (s) {
3299
+ s = !1;
3300
+ const o = ae(this.root);
3301
+ e.options.root.unshift(...o), e.options.layouts.unshift(...o), e.options.partials.unshift(...o);
3302
+ }
3303
+ e.renderFile(i, r).then((o) => n(null, o), n);
3304
+ };
3305
+ }
3306
+ analyze(e, s = {}) {
3307
+ return k(this, void 0, void 0, function* () {
3308
+ return j(e, s);
3309
+ });
3310
+ }
3311
+ analyzeSync(e, s = {}) {
3312
+ return C(e, s);
3313
+ }
3314
+ parseAndAnalyze(e, s, i = {}) {
3315
+ return k(this, void 0, void 0, function* () {
3316
+ return j(this.parse(e, s), i);
3317
+ });
3318
+ }
3319
+ parseAndAnalyzeSync(e, s, i = {}) {
3320
+ return C(this.parse(e, s), i);
3321
+ }
3322
+ /** Return an array of all variables without their properties. */
3323
+ variables(e, s = {}) {
3324
+ return k(this, void 0, void 0, function* () {
3325
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3326
+ return Object.keys(i.variables);
3327
+ });
3328
+ }
3329
+ /** Return an array of all variables without their properties. */
3330
+ variablesSync(e, s = {}) {
3331
+ const i = C(f(e) ? this.parse(e) : e, s);
3332
+ return Object.keys(i.variables);
3333
+ }
3334
+ /** Return an array of all variables including their properties/paths. */
3335
+ fullVariables(e, s = {}) {
3336
+ return k(this, void 0, void 0, function* () {
3337
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3338
+ return Array.from(new Set(Object.values(i.variables).flatMap((r) => r.map((n) => String(n)))));
3339
+ });
3340
+ }
3341
+ /** Return an array of all variables including their properties/paths. */
3342
+ fullVariablesSync(e, s = {}) {
3343
+ const i = C(f(e) ? this.parse(e) : e, s);
3344
+ return Array.from(new Set(Object.values(i.variables).flatMap((r) => r.map((n) => String(n)))));
3345
+ }
3346
+ /** Return an array of all variables, each as an array of properties/segments. */
3347
+ variableSegments(e, s = {}) {
3348
+ return k(this, void 0, void 0, function* () {
3349
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3350
+ return Array.from(re(Object.values(i.variables).flatMap((r) => r.map((n) => n.toArray()))));
3351
+ });
3352
+ }
3353
+ /** Return an array of all variables, each as an array of properties/segments. */
3354
+ variableSegmentsSync(e, s = {}) {
3355
+ const i = C(f(e) ? this.parse(e) : e, s);
3356
+ return Array.from(re(Object.values(i.variables).flatMap((r) => r.map((n) => n.toArray()))));
3357
+ }
3358
+ /** Return an array of all expected context variables without their properties. */
3359
+ globalVariables(e, s = {}) {
3360
+ return k(this, void 0, void 0, function* () {
3361
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3362
+ return Object.keys(i.globals);
3363
+ });
3364
+ }
3365
+ /** Return an array of all expected context variables without their properties. */
3366
+ globalVariablesSync(e, s = {}) {
3367
+ const i = C(f(e) ? this.parse(e) : e, s);
3368
+ return Object.keys(i.globals);
3369
+ }
3370
+ /** Return an array of all expected context variables including their properties/paths. */
3371
+ globalFullVariables(e, s = {}) {
3372
+ return k(this, void 0, void 0, function* () {
3373
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3374
+ return Array.from(new Set(Object.values(i.globals).flatMap((r) => r.map((n) => String(n)))));
3375
+ });
3376
+ }
3377
+ /** Return an array of all expected context variables including their properties/paths. */
3378
+ globalFullVariablesSync(e, s = {}) {
3379
+ const i = C(f(e) ? this.parse(e) : e, s);
3380
+ return Array.from(new Set(Object.values(i.globals).flatMap((r) => r.map((n) => String(n)))));
3381
+ }
3382
+ /** Return an array of all expected context variables, each as an array of properties/segments. */
3383
+ globalVariableSegments(e, s = {}) {
3384
+ return k(this, void 0, void 0, function* () {
3385
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3386
+ return Array.from(re(Object.values(i.globals).flatMap((r) => r.map((n) => n.toArray()))));
3387
+ });
3388
+ }
3389
+ /** Return an array of all expected context variables, each as an array of properties/segments. */
3390
+ globalVariableSegmentsSync(e, s = {}) {
3391
+ const i = C(f(e) ? this.parse(e) : e, s);
3392
+ return Array.from(re(Object.values(i.globals).flatMap((r) => r.map((n) => n.toArray()))));
3393
+ }
3394
+ }
3395
+ export {
3396
+ Ht as L
3397
+ };