@templatical/editor 0.0.3 → 0.0.5

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